diff --git a/libraries/render-utils/src/directional_ambient_light.slf b/libraries/render-utils/src/directional_ambient_light.slf index 3105b76bde..15d00f713e 100644 --- a/libraries/render-utils/src/directional_ambient_light.slf +++ b/libraries/render-utils/src/directional_ambient_light.slf @@ -23,8 +23,8 @@ <$declareEvalAmbientSphereGlobalColor(supportScattering)$> layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw layout(location=0) out vec4 _fragColor; void main(void) { diff --git a/libraries/render-utils/src/directional_ambient_light_shadow.slf b/libraries/render-utils/src/directional_ambient_light_shadow.slf index 88c0188048..d6cdf78f19 100644 --- a/libraries/render-utils/src/directional_ambient_light_shadow.slf +++ b/libraries/render-utils/src/directional_ambient_light_shadow.slf @@ -21,8 +21,8 @@ <$declareEvalAmbientSphereGlobalColor(isScattering)$> layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw layout(location=0) out vec4 _fragColor; void main(void) { diff --git a/libraries/render-utils/src/directional_skybox_light.slf b/libraries/render-utils/src/directional_skybox_light.slf index 56a7cd1883..b27d759dd4 100644 --- a/libraries/render-utils/src/directional_skybox_light.slf +++ b/libraries/render-utils/src/directional_skybox_light.slf @@ -20,8 +20,8 @@ <$declareEvalSkyboxGlobalColor(isScattering)$> layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw layout(location=0) out vec4 _fragColor; void main(void) { diff --git a/libraries/render-utils/src/directional_skybox_light_shadow.slf b/libraries/render-utils/src/directional_skybox_light_shadow.slf index 6eaa989c6b..292f7348e3 100644 --- a/libraries/render-utils/src/directional_skybox_light_shadow.slf +++ b/libraries/render-utils/src/directional_skybox_light_shadow.slf @@ -21,8 +21,8 @@ <$declareEvalSkyboxGlobalColor(isScattering)$> layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw layout(location=0) out vec4 _fragColor; void main(void) { diff --git a/libraries/render-utils/src/forward_model.slf b/libraries/render-utils/src/forward_model.slf index 82d776602f..f77ab358f2 100644 --- a/libraries/render-utils/src/forward_model.slf +++ b/libraries/render-utils/src/forward_model.slf @@ -27,8 +27,8 @@ layout(location=RENDER_UTILS_ATTR_POSITION_ES) in vec4 _positionES; layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS; layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color; diff --git a/libraries/render-utils/src/forward_model_normal_map.slf b/libraries/render-utils/src/forward_model_normal_map.slf index 21ed0b9359..73fae33fb0 100644 --- a/libraries/render-utils/src/forward_model_normal_map.slf +++ b/libraries/render-utils/src/forward_model_normal_map.slf @@ -25,8 +25,8 @@ layout(location=RENDER_UTILS_ATTR_POSITION_ES) in vec4 _positionES; layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS; layout(location=RENDER_UTILS_ATTR_TANGENT_WS) in vec3 _tangentWS; layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color; diff --git a/libraries/render-utils/src/forward_model_translucent.slf b/libraries/render-utils/src/forward_model_translucent.slf index 74d200542f..d247b589c7 100644 --- a/libraries/render-utils/src/forward_model_translucent.slf +++ b/libraries/render-utils/src/forward_model_translucent.slf @@ -24,8 +24,8 @@ <$declareMaterialTextures(ALBEDO, ROUGHNESS, _SCRIBE_NULL, METALLIC, EMISSIVE, OCCLUSION)$> layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw layout(location=RENDER_UTILS_ATTR_POSITION_ES) in vec4 _positionES; layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS; layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color; diff --git a/libraries/render-utils/src/forward_model_unlit.slf b/libraries/render-utils/src/forward_model_unlit.slf index daad2ee6b9..19b40d884c 100644 --- a/libraries/render-utils/src/forward_model_unlit.slf +++ b/libraries/render-utils/src/forward_model_unlit.slf @@ -20,8 +20,8 @@ <$declareMaterialTextures(ALBEDO)$> layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color; layout(location=0) out vec4 _fragColor0; diff --git a/libraries/render-utils/src/forward_simple.slf b/libraries/render-utils/src/forward_simple.slf index 09365635cf..2c1be14080 100644 --- a/libraries/render-utils/src/forward_simple.slf +++ b/libraries/render-utils/src/forward_simple.slf @@ -22,8 +22,8 @@ layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS; layout(location=RENDER_UTILS_ATTR_NORMAL_MS) in vec3 _normalMS; layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color; layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw layout(location=RENDER_UTILS_ATTR_POSITION_MS) in vec4 _positionMS; layout(location=RENDER_UTILS_ATTR_POSITION_ES) in vec4 _positionES; diff --git a/libraries/render-utils/src/forward_simple_textured.slf b/libraries/render-utils/src/forward_simple_textured.slf index 532d12dd17..8570ae6183 100644 --- a/libraries/render-utils/src/forward_simple_textured.slf +++ b/libraries/render-utils/src/forward_simple_textured.slf @@ -28,8 +28,8 @@ layout(binding=0) uniform sampler2D originalTexture; layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS; layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color; layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw layout(location=RENDER_UTILS_ATTR_POSITION_ES) in vec4 _positionES; layout(location=0) out vec4 _fragColor0; diff --git a/libraries/render-utils/src/forward_simple_textured_transparent.slf b/libraries/render-utils/src/forward_simple_textured_transparent.slf index 98dc0bb368..11c44c18a2 100644 --- a/libraries/render-utils/src/forward_simple_textured_transparent.slf +++ b/libraries/render-utils/src/forward_simple_textured_transparent.slf @@ -28,8 +28,8 @@ layout(binding=0) uniform sampler2D originalTexture; layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS; layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color; layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw layout(location=RENDER_UTILS_ATTR_POSITION_ES) in vec4 _positionES; layout(location=0) out vec4 _fragColor0; diff --git a/libraries/render-utils/src/forward_simple_textured_unlit.slf b/libraries/render-utils/src/forward_simple_textured_unlit.slf index 7d3bf5912a..8ca46da499 100644 --- a/libraries/render-utils/src/forward_simple_textured_unlit.slf +++ b/libraries/render-utils/src/forward_simple_textured_unlit.slf @@ -24,8 +24,8 @@ layout(binding=0) uniform sampler2D originalTexture; layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color; layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw void main(void) { vec4 texel = texture(originalTexture, _texCoord0.st); diff --git a/libraries/render-utils/src/forward_simple_transparent.slf b/libraries/render-utils/src/forward_simple_transparent.slf index a47d5963a2..f8390d6253 100644 --- a/libraries/render-utils/src/forward_simple_transparent.slf +++ b/libraries/render-utils/src/forward_simple_transparent.slf @@ -21,8 +21,8 @@ layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS; layout(location=RENDER_UTILS_ATTR_NORMAL_MS) in vec3 _normalMS; layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color; layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw layout(location=RENDER_UTILS_ATTR_POSITION_MS) in vec4 _positionMS; layout(location=RENDER_UTILS_ATTR_POSITION_ES) in vec4 _positionES; diff --git a/libraries/render-utils/src/hmd_ui.slf b/libraries/render-utils/src/hmd_ui.slf index b8bca889bf..eebeb2e060 100644 --- a/libraries/render-utils/src/hmd_ui.slf +++ b/libraries/render-utils/src/hmd_ui.slf @@ -24,8 +24,8 @@ layout(std140, binding=0) uniform hudBuffer { }; layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw layout(location=0) out vec4 fragColor0; diff --git a/libraries/render-utils/src/local_lights_drawOutline.slf b/libraries/render-utils/src/local_lights_drawOutline.slf index ff6476e21c..fc1d416f96 100644 --- a/libraries/render-utils/src/local_lights_drawOutline.slf +++ b/libraries/render-utils/src/local_lights_drawOutline.slf @@ -34,8 +34,8 @@ layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw layout(location=0) out vec4 _fragColor; void main(void) { diff --git a/libraries/render-utils/src/local_lights_shading.slf b/libraries/render-utils/src/local_lights_shading.slf index 14cecd1815..538bdacc99 100644 --- a/libraries/render-utils/src/local_lights_shading.slf +++ b/libraries/render-utils/src/local_lights_shading.slf @@ -22,8 +22,8 @@ <@include render-utils/ShaderConstants.h@> layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw layout(location=0) out vec4 _fragColor; void main(void) { diff --git a/libraries/render-utils/src/model.slf b/libraries/render-utils/src/model.slf index 70b71e0d22..2c42ed6083 100644 --- a/libraries/render-utils/src/model.slf +++ b/libraries/render-utils/src/model.slf @@ -20,8 +20,8 @@ <$declareMaterialTextures(ALBEDO, ROUGHNESS, _SCRIBE_NULL, METALLIC, EMISSIVE, OCCLUSION, SCATTERING)$> layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS; layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color; diff --git a/libraries/render-utils/src/model_fade.slf b/libraries/render-utils/src/model_fade.slf index 23c629ddb0..b5a2c8d3ef 100644 --- a/libraries/render-utils/src/model_fade.slf +++ b/libraries/render-utils/src/model_fade.slf @@ -26,8 +26,8 @@ layout(location=RENDER_UTILS_ATTR_POSITION_WS) in vec4 _positionWS; layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS; layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color; diff --git a/libraries/render-utils/src/model_lightmap.slf b/libraries/render-utils/src/model_lightmap.slf index 34da0a8a05..efc36cc14a 100644 --- a/libraries/render-utils/src/model_lightmap.slf +++ b/libraries/render-utils/src/model_lightmap.slf @@ -22,8 +22,8 @@ layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS; layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color; diff --git a/libraries/render-utils/src/model_lightmap_fade.slf b/libraries/render-utils/src/model_lightmap_fade.slf index 6f6dd9c413..4cbf3dcdea 100644 --- a/libraries/render-utils/src/model_lightmap_fade.slf +++ b/libraries/render-utils/src/model_lightmap_fade.slf @@ -26,8 +26,8 @@ <@include render-utils/ShaderConstants.h@> layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS; layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color; layout(location=RENDER_UTILS_ATTR_POSITION_WS) in vec4 _positionWS; diff --git a/libraries/render-utils/src/model_lightmap_normal_map.slf b/libraries/render-utils/src/model_lightmap_normal_map.slf index 362c331f63..ebafc6dfe2 100644 --- a/libraries/render-utils/src/model_lightmap_normal_map.slf +++ b/libraries/render-utils/src/model_lightmap_normal_map.slf @@ -22,8 +22,8 @@ layout(location=RENDER_UTILS_ATTR_POSITION_ES) in vec4 _positionES; layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS; layout(location=RENDER_UTILS_ATTR_TANGENT_WS) in vec3 _tangentWS; layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color; diff --git a/libraries/render-utils/src/model_lightmap_normal_map_fade.slf b/libraries/render-utils/src/model_lightmap_normal_map_fade.slf index bbeade488e..a9bac0e051 100644 --- a/libraries/render-utils/src/model_lightmap_normal_map_fade.slf +++ b/libraries/render-utils/src/model_lightmap_normal_map_fade.slf @@ -27,8 +27,8 @@ layout(location=RENDER_UTILS_ATTR_POSITION_ES) in vec4 _positionES; layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS; layout(location=RENDER_UTILS_ATTR_TANGENT_WS) in vec3 _tangentWS; layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color; diff --git a/libraries/render-utils/src/model_normal_map.slf b/libraries/render-utils/src/model_normal_map.slf index 4e89dfb3e8..5f30830511 100644 --- a/libraries/render-utils/src/model_normal_map.slf +++ b/libraries/render-utils/src/model_normal_map.slf @@ -21,8 +21,8 @@ layout(location=RENDER_UTILS_ATTR_POSITION_ES) in vec4 _positionES; layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS; layout(location=RENDER_UTILS_ATTR_TANGENT_WS) in vec3 _tangentWS; layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color; diff --git a/libraries/render-utils/src/model_normal_map_fade.slf b/libraries/render-utils/src/model_normal_map_fade.slf index 16b8138efe..499f376efa 100644 --- a/libraries/render-utils/src/model_normal_map_fade.slf +++ b/libraries/render-utils/src/model_normal_map_fade.slf @@ -25,8 +25,8 @@ layout(location=RENDER_UTILS_ATTR_POSITION_ES) in vec4 _positionES; layout(location=RENDER_UTILS_ATTR_POSITION_WS) in vec4 _positionWS; layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS; layout(location=RENDER_UTILS_ATTR_TANGENT_WS) in vec3 _tangentWS; layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color; diff --git a/libraries/render-utils/src/model_translucent.slf b/libraries/render-utils/src/model_translucent.slf index 7fe81ab992..564150cebd 100644 --- a/libraries/render-utils/src/model_translucent.slf +++ b/libraries/render-utils/src/model_translucent.slf @@ -27,8 +27,8 @@ <$declareMaterialTextures(ALBEDO, ROUGHNESS, _SCRIBE_NULL, _SCRIBE_NULL, EMISSIVE, OCCLUSION)$> layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw layout(location=RENDER_UTILS_ATTR_POSITION_ES) in vec4 _positionES; layout(location=RENDER_UTILS_ATTR_POSITION_WS) in vec4 _positionWS; layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS; diff --git a/libraries/render-utils/src/model_translucent_fade.slf b/libraries/render-utils/src/model_translucent_fade.slf index b9df51fcb9..3cebc59ea7 100644 --- a/libraries/render-utils/src/model_translucent_fade.slf +++ b/libraries/render-utils/src/model_translucent_fade.slf @@ -25,8 +25,8 @@ <@include render-utils/ShaderConstants.h@> layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw layout(location=RENDER_UTILS_ATTR_POSITION_ES) in vec4 _positionES; layout(location=RENDER_UTILS_ATTR_POSITION_WS) in vec4 _positionWS; layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS; diff --git a/libraries/render-utils/src/model_translucent_normal_map.slf b/libraries/render-utils/src/model_translucent_normal_map.slf index c023f78e25..36ea50c321 100644 --- a/libraries/render-utils/src/model_translucent_normal_map.slf +++ b/libraries/render-utils/src/model_translucent_normal_map.slf @@ -29,8 +29,8 @@ <@include render-utils/ShaderConstants.h@> layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw layout(location=RENDER_UTILS_ATTR_POSITION_ES) in vec4 _positionES; layout(location=RENDER_UTILS_ATTR_POSITION_WS) in vec4 _positionWS; layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS; diff --git a/libraries/render-utils/src/model_translucent_normal_map_fade.slf b/libraries/render-utils/src/model_translucent_normal_map_fade.slf index 992993edb3..24922c4e43 100644 --- a/libraries/render-utils/src/model_translucent_normal_map_fade.slf +++ b/libraries/render-utils/src/model_translucent_normal_map_fade.slf @@ -33,8 +33,8 @@ <@include render-utils/ShaderConstants.h@> layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw layout(location=RENDER_UTILS_ATTR_POSITION_ES) in vec4 _positionES; layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS; layout(location=RENDER_UTILS_ATTR_TANGENT_WS) in vec3 _tangentWS; diff --git a/libraries/render-utils/src/model_translucent_unlit.slf b/libraries/render-utils/src/model_translucent_unlit.slf index 8f823e010a..87a712b239 100644 --- a/libraries/render-utils/src/model_translucent_unlit.slf +++ b/libraries/render-utils/src/model_translucent_unlit.slf @@ -21,8 +21,8 @@ <@include render-utils/ShaderConstants.h@> layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color; layout(location=0) out vec4 _fragColor; diff --git a/libraries/render-utils/src/model_translucent_unlit_fade.slf b/libraries/render-utils/src/model_translucent_unlit_fade.slf index 2c72780976..74dee12ec8 100644 --- a/libraries/render-utils/src/model_translucent_unlit_fade.slf +++ b/libraries/render-utils/src/model_translucent_unlit_fade.slf @@ -24,8 +24,8 @@ <@include render-utils/ShaderConstants.h@> layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color; layout(location=RENDER_UTILS_ATTR_POSITION_WS) in vec4 _positionWS; diff --git a/libraries/render-utils/src/model_unlit.slf b/libraries/render-utils/src/model_unlit.slf index 0e93022b83..b14a807eb5 100644 --- a/libraries/render-utils/src/model_unlit.slf +++ b/libraries/render-utils/src/model_unlit.slf @@ -21,8 +21,8 @@ <$declareMaterialTextures(ALBEDO)$> layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS; layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color; diff --git a/libraries/render-utils/src/model_unlit_fade.slf b/libraries/render-utils/src/model_unlit_fade.slf index 1172bd5556..cb5c72bdf2 100644 --- a/libraries/render-utils/src/model_unlit_fade.slf +++ b/libraries/render-utils/src/model_unlit_fade.slf @@ -25,8 +25,8 @@ layout(location=RENDER_UTILS_ATTR_POSITION_WS) in vec4 _positionWS; layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS; layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color; diff --git a/libraries/render-utils/src/parabola.slv b/libraries/render-utils/src/parabola.slv index 46d6924191..50b5999450 100644 --- a/libraries/render-utils/src/parabola.slv +++ b/libraries/render-utils/src/parabola.slv @@ -27,7 +27,7 @@ layout(location=0) out vec4 _color; void main(void) { _color = color; - float t = parabolicDistance * (floor(gl_VertexID / 2) / float(numSections)); + float t = parabolicDistance * (float(gl_VertexID / 2) / float(numSections)); vec4 pos = vec4(velocity * t + 0.5 * acceleration * t * t, 1); const float EPSILON = 0.00001; diff --git a/libraries/render-utils/src/sdf_text3D.slf b/libraries/render-utils/src/sdf_text3D.slf index 999fb9e1a9..2fbaa03900 100644 --- a/libraries/render-utils/src/sdf_text3D.slf +++ b/libraries/render-utils/src/sdf_text3D.slf @@ -20,8 +20,8 @@ layout(location=RENDER_UTILS_UNIFORM_TEXT_COLOR) uniform vec4 Color; // the interpolated normal layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS; layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw #define TAA_TEXTURE_LOD_BIAS -3.0 diff --git a/libraries/render-utils/src/sdf_text3D_transparent.slf b/libraries/render-utils/src/sdf_text3D_transparent.slf index fbf4c4c372..218236c26b 100644 --- a/libraries/render-utils/src/sdf_text3D_transparent.slf +++ b/libraries/render-utils/src/sdf_text3D_transparent.slf @@ -20,8 +20,8 @@ layout(location=RENDER_UTILS_UNIFORM_TEXT_COLOR) uniform vec4 Color; // the interpolated normal layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS; layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw const float gamma = 2.2; const float smoothing = 32.0; diff --git a/libraries/render-utils/src/simple.slf b/libraries/render-utils/src/simple.slf index a699a10cad..04ffade2fa 100644 --- a/libraries/render-utils/src/simple.slf +++ b/libraries/render-utils/src/simple.slf @@ -21,8 +21,8 @@ layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS; layout(location=RENDER_UTILS_ATTR_NORMAL_MS) in vec3 _normalMS; layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color; layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw layout(location=RENDER_UTILS_ATTR_POSITION_MS) in vec4 _positionMS; layout(location=RENDER_UTILS_ATTR_POSITION_ES) in vec4 _positionES; diff --git a/libraries/render-utils/src/simple_fade.slf b/libraries/render-utils/src/simple_fade.slf index 00d81cadc9..e9f94c29bc 100644 --- a/libraries/render-utils/src/simple_fade.slf +++ b/libraries/render-utils/src/simple_fade.slf @@ -24,8 +24,8 @@ layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS; layout(location=RENDER_UTILS_ATTR_NORMAL_MS) in vec3 _normalMS; layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color; layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw layout(location=RENDER_UTILS_ATTR_POSITION_MS) in vec4 _positionMS; layout(location=RENDER_UTILS_ATTR_POSITION_ES) in vec4 _positionES; layout(location=RENDER_UTILS_ATTR_POSITION_WS) in vec4 _positionWS; diff --git a/libraries/render-utils/src/simple_opaque_web_browser.slf b/libraries/render-utils/src/simple_opaque_web_browser.slf index 27a0781eef..cf4828d3b3 100644 --- a/libraries/render-utils/src/simple_opaque_web_browser.slf +++ b/libraries/render-utils/src/simple_opaque_web_browser.slf @@ -24,8 +24,8 @@ layout(binding=0) uniform sampler2D originalTexture; layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS; layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color; layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw void main(void) { vec4 texel = texture(originalTexture, _texCoord0.st); diff --git a/libraries/render-utils/src/simple_textured.slf b/libraries/render-utils/src/simple_textured.slf index f1a60bdc5a..7676844084 100644 --- a/libraries/render-utils/src/simple_textured.slf +++ b/libraries/render-utils/src/simple_textured.slf @@ -23,8 +23,8 @@ layout(binding=0) uniform sampler2D originalTexture; layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS; layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color; layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw void main(void) { vec4 texel = texture(originalTexture, _texCoord0); diff --git a/libraries/render-utils/src/simple_textured_fade.slf b/libraries/render-utils/src/simple_textured_fade.slf index a1476939d1..600f19be0f 100644 --- a/libraries/render-utils/src/simple_textured_fade.slf +++ b/libraries/render-utils/src/simple_textured_fade.slf @@ -26,8 +26,8 @@ layout(binding=0) uniform sampler2D originalTexture; layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS; layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color; layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw layout(location=RENDER_UTILS_ATTR_POSITION_WS) in vec4 _positionWS; // Declare after all samplers to prevent sampler location mix up with originalTexture diff --git a/libraries/render-utils/src/simple_textured_unlit.slf b/libraries/render-utils/src/simple_textured_unlit.slf index fcdf118732..e3d9b9daf6 100644 --- a/libraries/render-utils/src/simple_textured_unlit.slf +++ b/libraries/render-utils/src/simple_textured_unlit.slf @@ -24,8 +24,8 @@ layout(binding=0) uniform sampler2D originalTexture; layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS; layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color; layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw void main(void) { vec4 texel = texture(originalTexture, _texCoord0.st); diff --git a/libraries/render-utils/src/simple_textured_unlit_fade.slf b/libraries/render-utils/src/simple_textured_unlit_fade.slf index 2007f0f684..bffadbe819 100644 --- a/libraries/render-utils/src/simple_textured_unlit_fade.slf +++ b/libraries/render-utils/src/simple_textured_unlit_fade.slf @@ -26,8 +26,8 @@ layout(binding=0) uniform sampler2D originalTexture; layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS; layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color; layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw layout(location=RENDER_UTILS_ATTR_POSITION_WS) in vec4 _positionWS; // Declare after all samplers to prevent sampler location mix up with originalTexture diff --git a/libraries/render-utils/src/simple_transparent.slf b/libraries/render-utils/src/simple_transparent.slf index d2ba332566..f81c06390c 100644 --- a/libraries/render-utils/src/simple_transparent.slf +++ b/libraries/render-utils/src/simple_transparent.slf @@ -21,8 +21,8 @@ layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS; layout(location=RENDER_UTILS_ATTR_NORMAL_MS) in vec3 _normalMS; layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color; layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw layout(location=RENDER_UTILS_ATTR_POSITION_MS) in vec4 _positionMS; layout(location=RENDER_UTILS_ATTR_POSITION_ES) in vec4 _positionES; diff --git a/libraries/render-utils/src/simple_transparent_textured.slf b/libraries/render-utils/src/simple_transparent_textured.slf index ffd715215a..0e6198de68 100644 --- a/libraries/render-utils/src/simple_transparent_textured.slf +++ b/libraries/render-utils/src/simple_transparent_textured.slf @@ -23,8 +23,8 @@ layout(location=0) uniform sampler2D originalTexture; layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS; layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color; layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw void main(void) { vec4 texel = texture(originalTexture, _texCoord0); diff --git a/libraries/render-utils/src/simple_transparent_textured_fade.slf b/libraries/render-utils/src/simple_transparent_textured_fade.slf index 8e530f41aa..44a3fe2e01 100644 --- a/libraries/render-utils/src/simple_transparent_textured_fade.slf +++ b/libraries/render-utils/src/simple_transparent_textured_fade.slf @@ -32,8 +32,8 @@ layout(location=RENDER_UTILS_ATTR_POSITION_ES) in vec4 _positionES; layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS; layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color; layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw layout(location=RENDER_UTILS_ATTR_POSITION_WS) in vec4 _positionWS; // Declare after all samplers to prevent sampler location mix up with originalTexture diff --git a/libraries/render-utils/src/simple_transparent_textured_unlit.slf b/libraries/render-utils/src/simple_transparent_textured_unlit.slf index d05ca02560..9d43e41c2f 100644 --- a/libraries/render-utils/src/simple_transparent_textured_unlit.slf +++ b/libraries/render-utils/src/simple_transparent_textured_unlit.slf @@ -21,8 +21,8 @@ layout(binding=0) uniform sampler2D originalTexture; layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color; layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw layout(location=0) out vec4 _fragColor0; diff --git a/libraries/render-utils/src/simple_transparent_textured_unlit_fade.slf b/libraries/render-utils/src/simple_transparent_textured_unlit_fade.slf index 53006b508d..43c28c41c3 100644 --- a/libraries/render-utils/src/simple_transparent_textured_unlit_fade.slf +++ b/libraries/render-utils/src/simple_transparent_textured_unlit_fade.slf @@ -23,8 +23,8 @@ layout(binding=0) uniform sampler2D originalTexture; layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color; layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw layout(location=RENDER_UTILS_ATTR_POSITION_WS) in vec4 _positionWS; layout(location=0) out vec4 _fragColor0; diff --git a/libraries/render-utils/src/simple_transparent_web_browser.slf b/libraries/render-utils/src/simple_transparent_web_browser.slf index 156339b702..df92d238bf 100644 --- a/libraries/render-utils/src/simple_transparent_web_browser.slf +++ b/libraries/render-utils/src/simple_transparent_web_browser.slf @@ -24,8 +24,8 @@ layout(binding=0) uniform sampler2D originalTexture; layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS; layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color; layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; -vec2 _texCoord0 = _texCoord01.xy; -vec2 _texCoord1 = _texCoord01.zw; +#define _texCoord0 _texCoord01.xy +#define _texCoord1 _texCoord01.zw void main(void) { vec4 texel = texture(originalTexture, _texCoord0.st);