浏览代码

Remove warning in gradient sky shader

/main
Sebastien Lagarde 7 年前
当前提交
a15bafc8
共有 2 个文件被更改,包括 3 次插入4 次删除
  1. 1
      com.unity.render-pipelines.high-definition/HDRP/Editor/Sky/HDRISky/HDRISkyEditor.cs
  2. 6
      com.unity.render-pipelines.high-definition/HDRP/Sky/GradientSky/GradientSky.shader

1
com.unity.render-pipelines.high-definition/HDRP/Editor/Sky/HDRISky/HDRISkyEditor.cs


if (hdri == null)
return;
float omegaP = (Mathf.PI * 4) / (6.0f * hdri.width * hdri.width);
m_IntegrateHDRISkyMaterial.SetTexture(HDShaderIDs._Cubemap, hdri);
Graphics.Blit(Texture2D.whiteTexture, m_IntensityTexture.rt, m_IntegrateHDRISkyMaterial);

6
com.unity.render-pipelines.high-definition/HDRP/Sky/GradientSky/GradientSky.shader


float verticalGradient = viewDirWS.y * _GradientDiffusion;
float topLerpFactor = saturate(-verticalGradient);
float bottomLerpFactor = saturate(verticalGradient);
float3 color = lerp(_GradientMiddle,_GradientBottom,bottomLerpFactor);
color = lerp(color.xyz,_GradientTop,topLerpFactor);
return float4 (color.xyz,1);
float3 color = lerp(_GradientMiddle.xyz, _GradientBottom.xyz, bottomLerpFactor);
color = lerp(color, _GradientTop.xyz, topLerpFactor);
return float4 (color, 1.0);
}

正在加载...
取消
保存