diff options
Diffstat (limited to 'indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl index 3274153a46..8618159313 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl @@ -44,13 +44,13 @@ out vec4 frag_color; #define frag_color gl_FragColor #endif -uniform sampler2DRect diffuseRect; -uniform sampler2DRect specularRect; -uniform sampler2DRect depthMap; -uniform sampler2DRect normalMap; -uniform sampler2DRect emissiveRect; // PBR linear packed Occlusion, Roughness, Metal. See: pbropaqueF.glsl +uniform sampler2D diffuseRect; +uniform sampler2D specularRect; +uniform sampler2D depthMap; +uniform sampler2D normalMap; +uniform sampler2D emissiveRect; // PBR linear packed Occlusion, Roughness, Metal. See: pbropaqueF.glsl uniform samplerCube environmentMap; -uniform sampler2DRect lightMap; +uniform sampler2D lightMap; uniform sampler2D noiseMap; uniform sampler2D projectionMap; // rgba uniform sampler2D lightFunc; @@ -90,6 +90,7 @@ vec3 getProjectedLightAmbiance(float amb_da, float attenuation, float lit, float vec3 getProjectedLightDiffuseColor(float light_distance, vec2 projected_uv ); vec3 getProjectedLightSpecularColor(vec3 pos, vec3 n); vec2 getScreenXY(vec4 clip_point); +vec2 getScreenCoord(vec4 clip_point); vec3 srgb_to_linear(vec3 c); vec4 texture2DLodSpecular(vec2 tc, float lod); @@ -110,7 +111,7 @@ void main() discard; #else vec3 final_color = vec3(0,0,0); - vec2 tc = getScreenXY(vary_fragcoord); + vec2 tc = getScreenCoord(vary_fragcoord); vec3 pos = getPosition(tc).xyz; vec3 lv; @@ -125,7 +126,7 @@ void main() if (proj_shadow_idx >= 0) { - vec4 shd = texture2DRect(lightMap, tc); + vec4 shd = texture2D(lightMap, tc); shadow = (proj_shadow_idx == 0) ? shd.b : shd.a; shadow += shadow_fade; shadow = clamp(shadow, 0.0, 1.0); @@ -146,15 +147,15 @@ void main() float nh, nl, nv, vh, lightDist; calcHalfVectors(lv, n, v, h, l, nh, nl, nv, vh, lightDist); - vec3 diffuse = texture2DRect(diffuseRect, tc).rgb; - vec4 spec = texture2DRect(specularRect, tc); + vec3 diffuse = texture2D(diffuseRect, tc).rgb; + vec4 spec = texture2D(specularRect, tc); vec3 dlit = vec3(0, 0, 0); vec3 slit = vec3(0, 0, 0); vec3 amb_rgb = vec3(0); if (GET_GBUFFER_FLAG(GBUFFER_FLAG_HAS_PBR)) { - vec3 colorEmissive = texture2DRect(emissiveRect, tc).rgb; + vec3 colorEmissive = texture2D(emissiveRect, tc).rgb; vec3 orm = spec.rgb; float perceptualRoughness = orm.g; float metallic = orm.b; |