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:
authorJason Fielder <jason_apple>2022-03-30 20:47:59 +0300
committerClément Foucault <foucault.clem@gmail.com>2022-03-30 20:53:22 +0300
commit49bc640b76c77a19e523cd1843585a0c6b21e82f (patch)
treec3446aaa594ac467a76a2e5af5dd86ba886b4aba /source/blender/draw/engines/workbench/shaders/workbench_transparent_accum_frag.glsl
parent7c9e128bbfb37d70799f8867d93992ee3f522242 (diff)
Metal: GLSL Shader compatibility 5
MSL does not have an implicit global scope, this is emulated via macro's adding an indirection for uniforms, attributes, shader stage inputs and outputs such as: #define roughness shaderinst->roughness. Variables in GLSL which exist within uniform blocks can be directly referenced via the global scope, unlike standard C++. This means that variable name pollution occurs if subsequent local variables in the code use the same name, resulting in compilation errors. A number of these conflicting names have been renamed to ensure unique naming and no further scope pollution. Ref T96261 Reviewed By: fclem Maniphest Tasks: T96261 Differential Revision: https://developer.blender.org/D14452
Diffstat (limited to 'source/blender/draw/engines/workbench/shaders/workbench_transparent_accum_frag.glsl')
-rw-r--r--source/blender/draw/engines/workbench/shaders/workbench_transparent_accum_frag.glsl2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/draw/engines/workbench/shaders/workbench_transparent_accum_frag.glsl b/source/blender/draw/engines/workbench/shaders/workbench_transparent_accum_frag.glsl
index 9c0f93c67d9..d8f1b83d747 100644
--- a/source/blender/draw/engines/workbench/shaders/workbench_transparent_accum_frag.glsl
+++ b/source/blender/draw/engines/workbench/shaders/workbench_transparent_accum_frag.glsl
@@ -62,7 +62,7 @@ void main()
#endif
#ifdef V3D_LIGHTING_STUDIO
- vec3 shaded_color = get_world_lighting(color, roughness, metallic, N, I);
+ vec3 shaded_color = get_world_lighting(color, _roughness, metallic, N, I);
#endif
#ifdef V3D_LIGHTING_FLAT