summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/pbrterrainF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/textureUtilV.glsl6
2 files changed, 4 insertions, 6 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/pbrterrainF.glsl b/indra/newview/app_settings/shaders/class1/deferred/pbrterrainF.glsl
index f57d7eb7eb..2efd50a46a 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/pbrterrainF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/pbrterrainF.glsl
@@ -195,18 +195,18 @@ void main()
PBRMix mix = init_pbr_mix();
PBRMix mix2;
+ TerrainCoord terrain_texcoord;
switch (tm.type & MIX_X)
{
case MIX_X:
#if TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT == 3
- TerrainCoord terrain_texcoord;
terrain_texcoord[0].xy = vary_coords[0].xy;
terrain_texcoord[0].zw = vary_coords[0].zw;
terrain_texcoord[1].xy = vary_coords[1].xy;
terrain_texcoord[1].zw = vary_coords[1].zw;
terrain_texcoord[2].xy = vary_coords[2].xy;
#elif TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT == 1
- TerrainCoord terrain_texcoord = vary_coords[0].xy;
+ terrain_texcoord = vary_coords[0].xy;
#endif
mix2 = terrain_sample_and_multiply_pbr(
terrain_texcoord
diff --git a/indra/newview/app_settings/shaders/class1/deferred/textureUtilV.glsl b/indra/newview/app_settings/shaders/class1/deferred/textureUtilV.glsl
index baf4010fa7..bf5d106dab 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/textureUtilV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/textureUtilV.glsl
@@ -84,11 +84,9 @@ vec2 terrain_texture_transform(vec2 vertex_texcoord, vec4[2] khr_gltf_transform)
{
vec2 texcoord = vertex_texcoord;
- texcoord.y = 1.0 - texcoord.y;
- //texcoord.y = -texcoord.y;
+ texcoord.y = -texcoord.y;
texcoord = khr_texture_transform(texcoord, khr_gltf_transform[0].xy, khr_gltf_transform[0].z, khr_gltf_transform[1].xy);
- texcoord.y = 1.0 - texcoord.y;
- //texcoord.y = -texcoord.y;
+ texcoord.y = -texcoord.y;
return texcoord;
}