add emission gbuffer attachment

This commit is contained in:
MihailRis
2025-07-12 21:09:23 +03:00
parent 8a3306ed41
commit 5ec9f14021
12 changed files with 101 additions and 31 deletions
+2
View File
@@ -15,6 +15,7 @@ out vec3 a_realnormal;
out vec4 a_torchLight;
out vec3 a_skyLight;
out vec4 a_modelpos;
out float a_emission;
uniform mat4 u_model;
uniform mat4 u_proj;
@@ -51,6 +52,7 @@ void main() {
mat4 viewmodel = u_view * u_model;
a_distance = length(viewmodel * vec4(pos3d, 0.0));
a_fog = calc_fog(length(viewmodel * vec4(pos3d * FOG_POS_SCALE, 0.0)) / 256.0);
a_emission = v_normal.w;
vec4 viewmodelpos = u_view * a_modelpos;
a_position = viewmodelpos.xyz;