diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-02-03 02:08:27 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-02-03 02:24:30 +0300 |
commit | e5dcd917550c8dd72b3ccd2bc4bcc1d9a6be056c (patch) | |
tree | 819763c65a9e2519397ca895851a246544676450 /source/blender/draw/engines/eevee/shaders | |
parent | 0ef24bb0e22cb28c0ac39199332ba4e57b378720 (diff) |
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.
Diffstat (limited to 'source/blender/draw/engines/eevee/shaders')
3 files changed, 6 insertions, 6 deletions
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 |