浏览代码

Fixed spot cookies.

/Add-support-for-light-specular-color-tint
Felipe Lira 7 年前
当前提交
90a62e55
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 2
      ScriptableRenderPipeline/LightweightPipeline/LightweightPipelineUtils.cs
  2. 2
      ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightLighting.cginc

2
ScriptableRenderPipeline/LightweightPipeline/LightweightPipelineUtils.cs


public static bool IsSupportedCookieType(LightType lightType)
{
return lightType == LightType.Directional;
return lightType == LightType.Directional || lightType == LightType.Spot;
}
public static bool PlatformSupportsMSAABackBuffer()

2
ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightLighting.cginc


float2 cookieUV = mul(_WorldToLight, float4(worldPos, 1.0)).xy;
return tex2D(_MainLightCookie, cookieUV).a;
#elif defined(_MAIN_SPOT_LIGHT)
float3 projPos = mul(_WorldToLight, float4(worldPos, 1.0)).xyz;
float4 projPos = mul(_WorldToLight, float4(worldPos, 1.0));
float2 cookieUV = projPos.xy / projPos.w + 0.5;
return tex2D(_MainLightCookie, cookieUV).a;
#endif // POINT LIGHT cookie not supported

正在加载...
取消
保存