From e5dcd917550c8dd72b3ccd2bc4bcc1d9a6be056c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Thu, 3 Feb 2022 00:08:27 +0100 Subject: DRW: Fix heatmap_gradient function messing error line number For some reason on some GL implementation (amdgpu) this particular syntaxes shift the error lines. Remove the context lines by default as they are not useful anymore. --- .../blender/draw/engines/eevee/shaders/eevee_culling_debug_frag.glsl | 4 ++-- source/blender/draw/engines/eevee/shaders/eevee_light_eval_lib.glsl | 4 ++-- .../engines/eevee/shaders/eevee_shadow_tilemap_depth_scan_comp.glsl | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'source/blender/draw/engines/eevee/shaders') diff --git a/source/blender/draw/engines/eevee/shaders/eevee_culling_debug_frag.glsl b/source/blender/draw/engines/eevee/shaders/eevee_culling_debug_frag.glsl index 21127cf65d0..b2fa2dea70d 100644 --- a/source/blender/draw/engines/eevee/shaders/eevee_culling_debug_frag.glsl +++ b/source/blender/draw/engines/eevee/shaders/eevee_culling_debug_frag.glsl @@ -19,8 +19,8 @@ void main(void) float lights_count = 0.0; uint lights_cull = 0u; - LIGHT_FOREACH_BEGIN_LOCAL ( - light_culling, lights_zbins, lights_culling_words, gl_FragCoord.xy, vP_z, l_idx) { + uvec2 px = uvec2(gl_FragCoord.xy); + LIGHT_FOREACH_BEGIN_LOCAL (light_culling, lights_zbins, lights_culling_words, px, vP_z, l_idx) { LightData light = lights[l_idx]; lights_cull |= 1u << l_idx; lights_count += 1.0; diff --git a/source/blender/draw/engines/eevee/shaders/eevee_light_eval_lib.glsl b/source/blender/draw/engines/eevee/shaders/eevee_light_eval_lib.glsl index 168ceb69d64..196564696f9 100644 --- a/source/blender/draw/engines/eevee/shaders/eevee_light_eval_lib.glsl +++ b/source/blender/draw/engines/eevee/shaders/eevee_light_eval_lib.glsl @@ -88,8 +88,8 @@ void light_eval(ClosureDiffuse diffuse, } LIGHT_FOREACH_END - LIGHT_FOREACH_BEGIN_LOCAL ( - light_culling, lights_zbins, lights_culling_words, gl_FragCoord.xy, vP_z, l_idx) { + uvec2 px = uvec2(gl_FragCoord.xy); + LIGHT_FOREACH_BEGIN_LOCAL (light_culling, lights_zbins, lights_culling_words, px, vP_z, l_idx) { light_eval_ex( diffuse, reflection, P, V, vP_z, thickness, ltc_mat, l_idx, out_diffuse, out_specular); } diff --git a/source/blender/draw/engines/eevee/shaders/eevee_shadow_tilemap_depth_scan_comp.glsl b/source/blender/draw/engines/eevee/shaders/eevee_shadow_tilemap_depth_scan_comp.glsl index 790028864c2..f423f9e6407 100644 --- a/source/blender/draw/engines/eevee/shaders/eevee_shadow_tilemap_depth_scan_comp.glsl +++ b/source/blender/draw/engines/eevee/shaders/eevee_shadow_tilemap_depth_scan_comp.glsl @@ -95,8 +95,8 @@ void main() } LIGHT_FOREACH_END - LIGHT_FOREACH_BEGIN_LOCAL ( - light_culling, lights_zbins, lights_culling_words, gl_GlobalInvocationID.xy, vP.z, l_idx) { + uvec2 px = gl_GlobalInvocationID.xy; + LIGHT_FOREACH_BEGIN_LOCAL (light_culling, lights_zbins, lights_culling_words, px, vP.z, l_idx) { tag_tilemap(l_idx, P, dist_to_cam, false); } LIGHT_FOREACH_END -- cgit v1.2.3