diff options
Diffstat (limited to 'indra/newview/app_settings/shaders/class3/deferred/multiSpotLightF.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class3/deferred/multiSpotLightF.glsl | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/indra/newview/app_settings/shaders/class3/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/multiSpotLightF.glsl index 33715d4d87..23120bbbbe 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/multiSpotLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/multiSpotLightF.glsl @@ -23,16 +23,9 @@ * $/LicenseInfo$ */ -#extension GL_ARB_texture_rectangle : enable -#extension GL_ARB_shader_texture_lod : enable - /*[EXTRA_CODE_HERE]*/ -#ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; -#else -#define frag_color gl_FragColor -#endif uniform sampler2D diffuseRect; uniform sampler2D specularRect; @@ -67,7 +60,7 @@ uniform float size; uniform vec3 color; uniform float falloff; -VARYING vec4 vary_fragcoord; +in vec4 vary_fragcoord; uniform vec2 screen_res; uniform mat4 inv_proj; @@ -118,7 +111,7 @@ void main() if (proj_shadow_idx >= 0) { - vec4 shd = texture2D(lightMap, tc); + vec4 shd = texture(lightMap, tc); shadow = (proj_shadow_idx==0)?shd.b:shd.a; shadow += shadow_fade; shadow = clamp(shadow, 0.0, 1.0); @@ -139,8 +132,8 @@ void main() float nh, nl, nv, vh, lightDist; calcHalfVectors(lv, n, v, h, l, nh, nl, nv, vh, lightDist); - vec3 diffuse = texture2D(diffuseRect, tc).rgb; - vec4 spec = texture2D(specularRect, tc); + vec3 diffuse = texture(diffuseRect, tc).rgb; + vec4 spec = texture(specularRect, tc); vec3 dlit = vec3(0, 0, 0); vec3 slit = vec3(0, 0, 0); @@ -148,7 +141,7 @@ void main() if (GET_GBUFFER_FLAG(GBUFFER_FLAG_HAS_PBR)) { - vec3 colorEmissive = texture2D(emissiveRect, tc).rgb; + vec3 colorEmissive = texture(emissiveRect, tc).rgb; vec3 orm = spec.rgb; float perceptualRoughness = orm.g; float metallic = orm.b; @@ -223,7 +216,7 @@ void main() if (nh > 0.0) { - float scol = fres*texture2D(lightFunc, vec2(nh, spec.a)).r*gt/(nh*nl); + float scol = fres*texture(lightFunc, vec2(nh, spec.a)).r*gt/(nh*nl); vec3 speccol = dlit*scol*spec.rgb*shadow; speccol = clamp(speccol, vec3(0), vec3(1)); final_color += speccol; |