浏览代码

fixed compilation error in SkyProcedural.shader

/sample_game
runes 7 年前
当前提交
6a0e0e87
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 5
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Sky/ProceduralSky/Resources/SkyProcedural.shader

5
Assets/ScriptableRenderPipeline/HDRenderPipeline/Sky/ProceduralSky/Resources/SkyProcedural.shader


float4 Frag(Varyings input) : SV_Target
{
// Points towards the camera
float3 viewDirWS = normalize(mul(float3(input.positionCS.xy, 1.0), (float3x3)_PixelCoordToViewDirWS));
float3 viewDirWS_unnormalized = mul(float3(input.positionCS.xy, 1.0), (float3x3)_PixelCoordToViewDirWS);
float3 viewDirWS = normalize(viewDirWS_unnormalized);
// Reverse it to point into the scene
float3 dir = -viewDirWS;

if (depthRaw > 0.0f)
{
skyTexWeight = 0.0f;
linearDist = LinearEyeDepth(depthRaw, _ZBufferParams) * length(input.eyeVector);
linearDist = LinearEyeDepth(depthRaw, _ZBufferParams) * length(viewDirWS_unnormalized);
yOffset = 0.0;
}
}

正在加载...
取消
保存