diff options
author | Cosmic Linden <cosmic@lindenlab.com> | 2023-02-23 10:58:39 -0800 |
---|---|---|
committer | Cosmic Linden <cosmic@lindenlab.com> | 2023-02-23 14:28:42 -0800 |
commit | 6494eed242b1cf64160e379c6d40df333deae23a (patch) | |
tree | 2ab6194d6cf1fcec77b2d28827753038f5d2bfb7 /indra/newview/app_settings/shaders/class2/deferred | |
parent | d1531eb2cec851e663e1bdde2e2858a939a6cb81 (diff) |
SL-19228: Fix GLTF texture transform rotation and add UV debug (PBR only). See textureUtilV.glsl for UV coordinate comments
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/deferred')
-rw-r--r-- | indra/newview/app_settings/shaders/class2/deferred/pbralphaF.glsl | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/pbralphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/pbralphaF.glsl index 35ccc65a8e..47d6c5e195 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/pbralphaF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/pbralphaF.glsl @@ -57,6 +57,9 @@ in vec2 basecolor_texcoord; in vec2 normal_texcoord; in vec2 metallic_roughness_texcoord; in vec2 emissive_texcoord; +#if DEBUG_TEXCOORD +in vec2 original_texcoord; +#endif in vec4 vertex_color; @@ -173,6 +176,10 @@ void main() #endif vec3 col = vertex_color.rgb * basecolor.rgb; +#if DEBUG_TEXCOORD + vec3 texcoord_color = vec3(mod(original_texcoord, 1.0), 0); + col = texcoord_color; +#endif vec3 vNt = texture(bumpMap, normal_texcoord.xy).xyz*2.0-1.0; float sign = vary_sign; @@ -265,6 +272,9 @@ in vec3 vary_position; in vec2 basecolor_texcoord; in vec2 emissive_texcoord; +#if DEBUG_TEXCOORD +in vec2 original_texcoord; +#endif in vec4 vertex_color; @@ -292,6 +302,10 @@ void main() #endif color = vertex_color.rgb * basecolor.rgb; +#if DEBUG_TEXCOORD + vec3 texcoord_color = vec3(mod(original_texcoord, 1.0), 0); + color = texcoord_color; +#endif // emissiveColor is the emissive color factor from GLTF and is already in linear space vec3 colorEmissive = emissiveColor; |