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
+1 -1
View File
@@ -16,7 +16,7 @@ vec4 effect() {
vec3 normal = transpose(mat3(u_view)) * texture(u_normal, v_uv).xyz;
vec3 dir = modelpos.xyz - u_cameraPos;
#ifdef ENABLE_SHADOWS
ssao *= calc_shadow(modelpos, normal, length(pos));
ssao *= max(calc_shadow(modelpos, normal, length(pos)), texture(u_emission, v_uv).r);
#endif
vec3 fogColor = texture(u_skybox, dir).rgb;
float fog = calc_fog(length(u_view * vec4((modelpos.xyz - u_cameraPos) * FOG_POS_SCALE, 0.0)) / 256.0);