浏览代码

Fixed bug in light transport uv->position 'unwrap'.

/Branch_Batching2
Torbjorn Laedre 7 年前
当前提交
5c1b2a97
共有 1 个文件被更改,包括 5 次插入10 次删除
  1. 15
      Assets/ScriptableRenderPipeline/HDRenderPipeline/ShaderPass/ShaderPassLightTransport.hlsl

15
Assets/ScriptableRenderPipeline/HDRenderPipeline/ShaderPass/ShaderPassLightTransport.hlsl


// Output UV coordinate in vertex shader
if (unity_MetaVertexControl.x)
{
// OpenGL right now needs to actually use incoming vertex position,
// so use it in a very dummy way
//v.positionOS.z = vertex.z > 0 ? 1.0e-4 : 0.0;
}
{
// OpenGL right now needs to actually use incoming vertex position,
// so use it in a very dummy way
//v.positionOS.z = vertex.z > 0 ? 1.0e-4 : 0.0;
}
// Zero out the Z component. However, OpenGL right now needs to actually use the incoming vertex
// position, so also take this opportunity to create a dependence on it.
inputMesh.positionOS.z = inputMesh.positionOS.z > 0 ? 1.0e-4 : 0.0;
float3 positionWS = TransformObjectToWorld(inputMesh.positionOS);
output.vmesh.positionCS = TransformWorldToHClip(positionWS);

正在加载...
取消
保存