add emission gbuffer attachment
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -29,6 +29,7 @@ vec4 effect() {
|
||||
occlusion += (sampleDepth >= samplePos.z + u_bias ? 1.0 : 0.0) * rangeCheck;
|
||||
}
|
||||
occlusion = min(1.0, 1.05 - (occlusion / u_kernelSize));
|
||||
occlusion = max(occlusion, texture(u_emission, v_uv).r);
|
||||
|
||||
float z = -position.z * 0.01;
|
||||
z = max(0.0, 1.0 - z);
|
||||
|
||||
Reference in New Issue
Block a user