diff options
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl index 64d99bae2c..0126e09d4c 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl @@ -22,20 +22,14 @@ * $/LicenseInfo$ */ -#extension GL_ARB_texture_rectangle : enable - /*[EXTRA_CODE_HERE]*/ -#ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; -#else -#define frag_color gl_FragColor -#endif //class 2 -- shadows and SSAO // Inputs -VARYING vec2 vary_fragcoord; +in vec2 vary_fragcoord; vec4 getPosition(vec2 pos_screen); vec3 getNorm(vec2 pos_screen); @@ -50,8 +44,11 @@ void main() vec4 pos = getPosition(pos_screen); vec3 norm = getNorm(pos_screen); - frag_color.r = sampleDirectionalShadow(pos.xyz, norm, pos_screen); - frag_color.g = calcAmbientOcclusion(pos, norm, pos_screen); - frag_color.b = sampleSpotShadow(pos.xyz, norm, 0, pos_screen); - frag_color.a = sampleSpotShadow(pos.xyz, norm, 1, pos_screen); + vec4 col; + col.r = sampleDirectionalShadow(pos.xyz, norm, pos_screen); + col.g = calcAmbientOcclusion(pos, norm, pos_screen); + col.b = sampleSpotShadow(pos.xyz, norm, 0, pos_screen); + col.a = sampleSpotShadow(pos.xyz, norm, 1, pos_screen); + + frag_color = clamp(col, vec4(0), vec4(1)); } |