From bf0d36bf889bb913fbc2a53c5a1b9818acb11ee6 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Wed, 24 Aug 2011 15:41:00 -0700 Subject: Mac rendering now with 100% fewer crashes when enabling shadows. --- indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl | 6 +++--- indra/newview/app_settings/shaders/class2/deferred/sunLightV.glsl | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'indra/newview/app_settings/shaders/class2') diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl index 1809cff1e5..146fac56e9 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl @@ -48,12 +48,12 @@ uniform float ssao_factor; uniform float ssao_factor_inv; varying vec2 vary_fragcoord; -varying vec4 vary_light; uniform mat4 inv_proj; uniform vec2 screen_res; uniform vec2 shadow_res; uniform vec2 proj_shadow_res; +uniform vec3 sun_dir; uniform float shadow_bias; uniform float shadow_offset; @@ -132,10 +132,10 @@ void main() }*/ float shadow = 1.0; - float dp_directional_light = max(0.0, dot(norm, vary_light.xyz)); + float dp_directional_light = max(0.0, dot(norm, sun_dir.xyz)); vec3 shadow_pos = pos.xyz + displace*norm; - vec3 offset = vary_light.xyz * (1.0-dp_directional_light); + vec3 offset = sun_dir.xyz * (1.0-dp_directional_light); vec4 spos = vec4(shadow_pos+offset*shadow_offset, 1.0); diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightV.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightV.glsl index 827ec15621..2cf7375d4d 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/sunLightV.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightV.glsl @@ -1,5 +1,5 @@ /** - * @file sunLightF.glsl + * @file sunLightV.glsl * * $LicenseInfo:firstyear=2007&license=viewerlgpl$ * Second Life Viewer Source Code @@ -25,8 +25,6 @@ attribute vec3 position; - -varying vec4 vary_light; varying vec2 vary_fragcoord; uniform vec2 screen_res; -- cgit v1.2.3