mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-13 15:01:49 +00:00
add emission gbuffer attachment
This commit is contained in:
parent
8a3306ed41
commit
5ec9f14021
12 changed files with 101 additions and 31 deletions
|
|
@ -1,6 +1,7 @@
|
|||
layout (location = 0) out vec4 f_color;
|
||||
layout (location = 1) out vec4 f_position;
|
||||
layout (location = 2) out vec4 f_normal;
|
||||
layout (location = 3) out vec4 f_emission;
|
||||
|
||||
in float a_distance;
|
||||
in float a_fog;
|
||||
|
|
@ -12,6 +13,7 @@ in vec3 a_realnormal;
|
|||
in vec3 a_skyLight;
|
||||
in vec4 a_modelpos;
|
||||
in vec4 a_torchLight;
|
||||
in float a_emission;
|
||||
|
||||
uniform sampler2D u_texture0;
|
||||
uniform samplerCube u_skybox;
|
||||
|
|
@ -47,8 +49,8 @@ void main() {
|
|||
vec3 fogColor = texture(u_skybox, a_dir).rgb;
|
||||
f_color = mix(f_color, vec4(fogColor, 1.0), a_fog);
|
||||
#endif
|
||||
|
||||
f_color.a = alpha;
|
||||
f_position = vec4(a_position, 1.0);
|
||||
f_normal = vec4(a_normal, 1.0);
|
||||
f_emission = vec4(a_emission);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue