浏览代码

Implement the color blending

/main
Evgenii Golubev 8 年前
当前提交
b4576ede
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 6
      Assets/ScriptableRenderLoop/HDRenderLoop/Sky/Resources/SkyHDRI.shader

6
Assets/ScriptableRenderLoop/HDRenderLoop/Sky/Resources/SkyHDRI.shader


Coordinate coord = GetCoordinate(input.positionCS.xy, _ScreenSize.zw);
// Pass the depth value near the far plane.
float3 positionWS = UnprojectToWorld(0.01, coord.positionSS, _InvViewProjMatrix);
// Get the depth value of the scene, or use 0.01 otherwise.
float rawDepth = max(LOAD_TEXTURE2D(_CameraDepthTexture, coord.unPositionSS).r, 0.01);
float3 positionWS = UnprojectToWorld(rawDepth, coord.positionSS, _InvViewProjMatrix);
float4 c1, c2, c3;
VolundTransferScatter(positionWS, c1, c2, c3);

}
#endif
// Blend with the color of the scene.
return float4(skyDome * extinction + scatter, 0.0);
}

正在加载...
取消
保存