summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class3
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@geenzo.com>2024-01-31 15:54:14 -0800
committerJonathan "Geenz" Goodman <geenz@geenzo.com>2024-01-31 15:54:14 -0800
commit476cbaed6a876c308baa057b50af2631668f7293 (patch)
tree0699bf3a2efcb7185ff13827794a0b9a506b0f4b /indra/newview/app_settings/shaders/class3
parent80ce790d2e952c7fb41cea69071fc026ac82f691 (diff)
#677 Some clipping WIP
Diffstat (limited to 'indra/newview/app_settings/shaders/class3')
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/materialF.glsl12
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl1
2 files changed, 7 insertions, 6 deletions
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
}