diff options
author | RunitaiLinden <davep@lindenlab.com> | 2024-02-01 14:00:40 -0600 |
---|---|---|
committer | RunitaiLinden <davep@lindenlab.com> | 2024-02-01 14:00:40 -0600 |
commit | b1410c8b679c14432038a62bff2de772f490bc4a (patch) | |
tree | 2650a91476b6ddfe95e259ad6c25307a5b6e955b /indra/newview/app_settings/shaders/class1/deferred | |
parent | 169562bf13ca6ed47dac1e73c6d8e72cd89861eb (diff) |
#677 WIP -- fix PBR and avatar mirror clipping.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl | 4 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/avatarV.glsl | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl index 6ebe4ce251..c0607d0149 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl @@ -33,11 +33,15 @@ uniform float minimum_alpha; in vec3 vary_normal; in vec2 vary_texcoord0; +in vec3 vary_position; vec2 encode_normal(vec3 n); +void mirrorClip(vec3 pos); void main() { + mirrorClip(vary_position); + vec4 diff = texture(diffuseMap, vary_texcoord0.xy); if (diff.a < minimum_alpha) diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarV.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarV.glsl index bc0c11ec46..5cc2846156 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/avatarV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/avatarV.glsl @@ -35,6 +35,7 @@ in vec4 weight; out vec3 vary_normal; out vec2 vary_texcoord0; +out vec3 vary_position; void main() { @@ -57,6 +58,7 @@ void main() vary_normal = norm; + vary_position = pos.xyz; gl_Position = projection_matrix * pos; } |