Buckets:
| /*============================================================================= | |
| PointLightPixelShader.hlsl: Point light pixel shader. | |
| Copyright 1998-2008 Epic Games, Inc. All Rights Reserved. | |
| =============================================================================*/ | |
| half4 LightColorAndFalloffExponent; | |
| sampler2D ShadowTexture; | |
| // Unpack the light color and falloff exponent. | |
| static half3 LightColor = LightColorAndFalloffExponent.xyz; | |
| static half FalloffExponent = LightColorAndFalloffExponent.w; | |
| void Main( | |
| in FVertexFactoryInterpolants FactoryInterpolants, | |
| in float3 TangentLightVector : TEXCOORD4, | |
| in float4 WorldLightVector : TEXCOORD5, | |
| in float3 CameraVector : TEXCOORD6, | |
| in float4 PixelPosition : TEXCOORD7, | |
| OPTIONAL_FacingSign | |
| out float4 OutColor : COLOR0 | |
| ) | |
| { | |
| FMaterialParameters MaterialParameters = GetMaterialParameters(FactoryInterpolants); | |
| CalcMaterialParameters(MaterialParameters,FacingSign,CameraVector,PixelPosition,TangentLightVector); | |
| half LightMask = Square(tex2D(ShadowTexture,GetLightMapCoordinate(FactoryInterpolants)).r); | |
| half LightMask = WorldLightVector.w; | |
| half LightMask = 1; | |
| // clip and early out if outside of the light radius or masked | |
| OutColor = float4(0,0,0,0); | |
| float LightDist = dot(WorldLightVector.xyz,WorldLightVector.xyz); | |
| float LightAmount = (1 - LightDist) * LightMask; | |
| clip(LightAmount); | |
| // only emit the branch attribute on xbox, D3D platforms have too many restrictions. (tex2D can't be used inside the if) | |
| BRANCH | |
| if( LightAmount > 0 ) | |
| { | |
| GetMaterialClipping(MaterialParameters); | |
| OutColor.rgb = GetLightAttenuation(MaterialParameters.ScreenPosition) * | |
| LightMask * | |
| GetMaterialPointLightTransfer(MaterialParameters,WorldLightVector.xyz,FalloffExponent) * | |
| LightColor; | |
| OutColor.a = 0.0f; | |
| } | |
| OutColor = RETURN_COLOR(AccumulateSceneColor(OutColor)); | |
| } | |
Xet Storage Details
- Size:
- 2.22 kB
- Xet hash:
- 0f8f065e9adf99fdca0a043dd6ba4aa0f39cc768467f3bc43010b16270ee3c75
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.