[Bf-blender-cvs] [3225bc2e7fb] master: GPU: Fix Metal GLSL compilation errors due to recent changes.

Jeroen Bakker noreply at git.blender.org
Fri Oct 21 14:58:49 CEST 2022


Commit: 3225bc2e7fb6100c74788acbaba9849a77c93ef2
Author: Jeroen Bakker
Date:   Fri Oct 21 14:36:25 2022 +0200
Branches: master
https://developer.blender.org/rB3225bc2e7fb6100c74788acbaba9849a77c93ef2

GPU: Fix Metal GLSL compilation errors due to recent changes.

vec.st is legacy OpenGL and should not be used.

===================================================================

M	source/blender/gpu/shaders/gpu_shader_icon_frag.glsl

===================================================================

diff --git a/source/blender/gpu/shaders/gpu_shader_icon_frag.glsl b/source/blender/gpu/shaders/gpu_shader_icon_frag.glsl
index ff56d772317..4452349f23c 100644
--- a/source/blender/gpu/shaders/gpu_shader_icon_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_icon_frag.glsl
@@ -27,15 +27,15 @@ void main()
   bool lower_half = mask_coord_interp.y < circle_center.y;
   bool right_half = mask_coord_interp.x > circle_center.x;
 
-  if (right_half && mask_coord_interp.t < circle_center.y + circle_radius_outer) {
+  if (right_half && mask_coord_interp.y < circle_center.y + circle_radius_outer) {
     mask = smoothstep(circle_center.y + circle_radius_inner,
                       circle_center.y + circle_radius_outer,
-                      mask_coord_interp.t);
+                      mask_coord_interp.y);
   }
-  if (lower_half && mask_coord_interp.s > circle_center.x - circle_radius_outer) {
+  if (lower_half && mask_coord_interp.x > circle_center.x - circle_radius_outer) {
     mask = smoothstep(circle_center.x - circle_radius_inner,
                       circle_center.x - circle_radius_outer,
-                      mask_coord_interp.s);
+                      mask_coord_interp.x);
   }
 
   fragColor = mix(vec4(0.0), fragColor, max(mask_transparency, mask));



More information about the Bf-blender-cvs mailing list