summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-04-02 15:46:47 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-04-02 15:46:47 +0100
commit1a4645b7fea37bb6e272b0a41cbf0f600f7a506a (patch)
tree42358b7d4b75f081c947ee2fe83daafa8027696d /indra/newview/app_settings/shaders/class1
parentb41902d533f8064a9c185d28bfd28e2c9b078dcd (diff)
ssreflections: perspective reflection for sunlight, planar reflection for ssreflection
Diffstat (limited to 'indra/newview/app_settings/shaders/class1')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl6
1 files changed, 3 insertions, 3 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
index 25733e80d1..d00d3ed412 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
@@ -282,13 +282,13 @@ void main()
{
// the old infinite-sky shiny reflection
//
- vec3 refnorm = normalize(reflect(vec3(0,0,-1), norm.xyz));
- //vec3 refnorm = normalize(reflect(pos.xyz, norm.xyz));
- float sa = dot(refnorm, vary_light.xyz);
+ vec3 refnormpersp = normalize(reflect(pos.xyz, norm.xyz));
+ float sa = dot(refnormpersp, vary_light.xyz);
vec3 dumbshiny = vary_SunlitColor*scol_ambocc.r*texture2D(lightFunc, vec2(sa, spec.a)).a;
// screen-space cheap fakey reflection map
//
+ vec3 refnorm = normalize(reflect(vec3(0,0,-1), norm.xyz));
depth -= 0.5; // unbias depth
// first figure out where we'll make our 2D guess from
vec2 ref2d = (0.25 * screen_res.y) * (refnorm.xy) * abs(refnorm.z) / depth;