Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/draw/engines/eevee_next/shaders/eevee_light_culling_debug_frag.glsl')
-rw-r--r--source/blender/draw/engines/eevee_next/shaders/eevee_light_culling_debug_frag.glsl16
1 files changed, 9 insertions, 7 deletions
diff --git a/source/blender/draw/engines/eevee_next/shaders/eevee_light_culling_debug_frag.glsl b/source/blender/draw/engines/eevee_next/shaders/eevee_light_culling_debug_frag.glsl
index 321c99f7952..eefc024d0b8 100644
--- a/source/blender/draw/engines/eevee_next/shaders/eevee_light_culling_debug_frag.glsl
+++ b/source/blender/draw/engines/eevee_next/shaders/eevee_light_culling_debug_frag.glsl
@@ -14,7 +14,7 @@ void main()
{
ivec2 texel = ivec2(gl_FragCoord.xy);
- float depth = texelFetch(depth_tx, texel, 0).r;
+ float depth = texelFetch(hiz_tx, texel, 0).r;
float vP_z = get_view_z_from_depth(depth);
vec3 P = get_world_space_from_depth(uvcoordsvar.xy, depth);
@@ -36,17 +36,19 @@ void main()
vec3 L;
float dist;
light_vector_get(light, P, L, dist);
- if (light_attenuation(light_buf[l_idx], L, dist) > 0.0) {
+ if (light_attenuation(light, L, dist) > 0.0) {
light_nocull |= 1u << l_idx;
}
}
LIGHT_FOREACH_END
+ vec4 color = vec4(heatmap_gradient(light_count / 4.0), 1.0);
+
if ((light_cull & light_nocull) != light_nocull) {
/* ERROR. Some lights were culled incorrectly. */
- out_debug_color = vec4(0.0, 1.0, 0.0, 1.0);
- }
- else {
- out_debug_color = vec4(heatmap_gradient(light_count / 4.0), 1.0);
+ color = vec4(0.0, 1.0, 0.0, 1.0);
}
-} \ No newline at end of file
+
+ out_debug_color_add = vec4(color.rgb, 0.0) * 0.2;
+ out_debug_color_mul = color;
+}