diff options
author | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2024-01-31 15:54:14 -0800 |
---|---|---|
committer | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2024-01-31 15:54:14 -0800 |
commit | 476cbaed6a876c308baa057b50af2631668f7293 (patch) | |
tree | 0699bf3a2efcb7185ff13827794a0b9a506b0f4b /indra/newview/app_settings/shaders | |
parent | 80ce790d2e952c7fb41cea69071fc026ac82f691 (diff) |
#677 Some clipping WIP
Diffstat (limited to 'indra/newview/app_settings/shaders')
3 files changed, 8 insertions, 7 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialV.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialV.glsl index 65706e2c3f..41112bce30 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/materialV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/materialV.glsl @@ -127,7 +127,7 @@ void main() vertex_color = diffuse_color; #if !defined(HAS_SKIN) - vary_position = (projection_matrix*vec4(position.xyz, 1.0)).xyz; + vary_position = (modelview_matrix*vec4(position.xyz, 1.0)).xyz; #endif } diff --git a/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl index b3b1aaed56..8fe0e1cec8 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl @@ -48,15 +48,18 @@ vec3 linear_to_srgb(vec3 cs); uniform vec4 clipPlane; uniform float clipSign; uniform float mirror_flag; +uniform mat4 modelview_matrix; +uniform mat3 normal_matrix; void applyClip(vec3 pos) { - float funnyClip = 0; + if (mirror_flag > 0) { - if ((dot(pos.xyz, clipPlane.xyz) + clipPlane.w) > 0.0) - { + if ((dot(pos.xyz, clipPlane.xyz) + clipPlane.w) < 0.0) + { discard; - } + } + } } @@ -308,7 +311,6 @@ void main() // diffcol == diffuse map combined with vertex color vec4 diffcol = texture(diffuseMap, vary_texcoord0.xy); diffcol.rgb *= vertex_color.rgb; - alphaMask(diffcol.a); // spec == specular map combined with specular color diff --git a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl index f1de0b88d6..b49c3386db 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl @@ -201,7 +201,6 @@ void main() #ifdef HERO_PROBES vec3 refnormpersp = reflect(pos.xyz, norm.xyz); - if (GET_GBUFFER_FLAG(GBUFFER_FLAG_HAS_MIRROR)) color = textureLod(heroProbes, vec4(env_mat * refnormpersp, 0), (1.0 - gloss) * 11).xyz * specularColor; #endif } |