diff options
author | cosmic-linden <111533034+cosmic-linden@users.noreply.github.com> | 2024-05-15 15:27:42 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-15 15:27:42 -0700 |
commit | 6252449cd392918d976f0af0317c44688e052b32 (patch) | |
tree | 935c476e5e0b3858da88b1f6045a3eb3683c28bf | |
parent | 904f5b2ac32b0c7ab35ec1c56fb1824642d8f296 (diff) | |
parent | 6e501c5a1ae956e13d3ba3ba05ea8954d25bbc55 (diff) |
Merge pull request #1487 from secondlife/v-1474
secondlife/viewer#1474: Remove small texture offset from PBR terrain
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/pbrterrainF.glsl | 4 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/textureUtilV.glsl | 6 |
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; } |