浏览代码

Revert case 1046713 fix

/main
RSlysz 6 年前
当前提交
8e9287b1
共有 2 个文件被更改,包括 5 次插入9 次删除
  1. 4
      com.unity.render-pipelines.high-definition/HDRP/Lighting/LightLoop/LightLoop.cs
  2. 10
      com.unity.render-pipelines.high-definition/HDRP/Lighting/LightLoop/LightLoopDef.hlsl

4
com.unity.render-pipelines.high-definition/HDRP/Lighting/LightLoop/LightLoop.cs


out worldToCamera, out projection, out capturePosition, out captureRotation,
camera);
var gpuProj = GL.GetGPUProjectionMatrix(projection, true); // Had to change this from 'false'
// Provide non device dependent projection matrix (clip space range is [-1..1]^3)
var vp = projection * gpuView * Matrix4x4.Translate(capturePosition);
var vp = gpuProj * gpuView * Matrix4x4.Translate(capturePosition);
m_Env2DCaptureVP[fetchIndex] = vp;
}
else if (probe.reflectionProbe != null)

10
com.unity.render-pipelines.high-definition/HDRP/Lighting/LightLoop/LightLoopDef.hlsl


{
if (cacheType == ENVCACHETYPE_TEXTURE2D)
{
// _Env2DCaptureVP transform from this camera view space to capture camera clip space.
// And it uses a non device dependent projection matrix (clip space range is [-1..1]^3)
float4 positionCS = mul(_Env2DCaptureVP[index], float4(texCoord, 1.0));
float3 ndc = (positionCS.xyz * rcp(positionCS.w)) * 0.5 + 0.5;
//_Env2DCaptureVP is in capture space
float3 ndc = ComputeNormalizedDeviceCoordinatesWithZ(texCoord, _Env2DCaptureVP[index]);
// Clip against oblique near clip plane and side clip planes.
// Don't clip against far clip plane to handle properly infinite projection.
color.a = any(ndc.xyz < 0) || any(ndc.xy > 1) ? 0.0 : 1.0;
color.a = any(ndc.xyz < 0) || any(ndc.xyz > 1) ? 0.0 : 1.0;
}
else if (cacheType == ENVCACHETYPE_CUBEMAP)
{

正在加载...
取消
保存