summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings
diff options
context:
space:
mode:
authorBrad Linden <brad@lindenlab.com>2024-02-23 14:11:31 -0800
committerBrad Linden <brad@lindenlab.com>2024-02-23 14:11:31 -0800
commitf1e9d13b9918e44dda635a7085c4ffdd924172bd (patch)
tree0b7cb045c2443d3ee6f155d91aab6891b4dd10fe /indra/newview/app_settings
parent2ca26ad19a00c055abcb7696ef93f091909678fa (diff)
Fixes for some shader compilation failures on mac.
* conditional compilation should use #ifdef * layout keywords need to be lowercase
Diffstat (limited to 'indra/newview/app_settings')
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/normaldebugG.glsl12
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/normaldebugV.glsl4
2 files changed, 8 insertions, 8 deletions
diff --git a/indra/newview/app_settings/shaders/class1/interface/normaldebugG.glsl b/indra/newview/app_settings/shaders/class1/interface/normaldebugG.glsl
index ea04ce1cae..51d05cd507 100644
--- a/indra/newview/app_settings/shaders/class1/interface/normaldebugG.glsl
+++ b/indra/newview/app_settings/shaders/class1/interface/normaldebugG.glsl
@@ -32,15 +32,15 @@
out vec4 vertex_color;
in vec4 normal_g[];
-#if HAS_ATTRIBUTE_TANGENT == 1
+#ifdef HAS_ATTRIBUTE_TANGENT
in vec4 tangent_g[];
#endif
-layout(TRIANGLES) in;
-#if HAS_ATTRIBUTE_TANGENT == 1
-layout(LINE_STRIP, max_vertices = 12) out;
+layout(triangles) in;
+#ifdef HAS_ATTRIBUTE_TANGENT
+layout(line_strip, max_vertices = 12) out;
#else
-layout(LINE_STRIP, max_vertices = 6) out;
+layout(line_strip, max_vertices = 6) out;
#endif
void triangle_normal_debug(int i)
@@ -55,7 +55,7 @@ void triangle_normal_debug(int i)
EmitVertex();
EndPrimitive();
-#if HAS_ATTRIBUTE_TANGENT == 1
+#ifdef HAS_ATTRIBUTE_TANGENT
// Tangent
vec4 tangent_color = vec4(0.0, 1.0, 1.0, 1.0);
gl_Position = gl_in[i].gl_Position;
diff --git a/indra/newview/app_settings/shaders/class1/interface/normaldebugV.glsl b/indra/newview/app_settings/shaders/class1/interface/normaldebugV.glsl
index d1596b9d2a..b198bc2485 100644
--- a/indra/newview/app_settings/shaders/class1/interface/normaldebugV.glsl
+++ b/indra/newview/app_settings/shaders/class1/interface/normaldebugV.glsl
@@ -26,7 +26,7 @@
in vec3 position;
in vec3 normal;
out vec4 normal_g;
-#if HAS_ATTRIBUTE_TANGENT == 1
+#ifdef HAS_ATTRIBUTE_TANGENT
in vec4 tangent;
out vec4 tangent_g;
#endif
@@ -67,7 +67,7 @@ void main()
gl_Position = projection_matrix * world_pos;
normal_g = get_screen_normal(position.xyz, world_pos, normal.xyz, mat);
-#if HAS_ATTRIBUTE_TANGENT == 1
+#ifdef HAS_ATTRIBUTE_TANGENT
tangent_g = get_screen_normal(position.xyz, world_pos, tangent.xyz, mat);
#endif
}