浏览代码

Add comment

/main
sebastienlagarde 7 年前
当前提交
e7211667
共有 2 个文件被更改,包括 3 次插入1 次删除
  1. 1
      com.unity.render-pipelines.high-definition/HDRP/RenderPipelineResources/CameraMotionVectors.shader
  2. 3
      com.unity.render-pipelines.high-definition/HDRP/ShaderPass/ShaderPassVelocity.hlsl

1
com.unity.render-pipelines.high-definition/HDRP/RenderPipelineResources/CameraMotionVectors.shader


velocity.y = -velocity.y;
#endif
// Convert velocity from Clip space (-1..1) to NDC 0..1 space
// Note it doesn't mean we don't have negative value, we store negative or positive offset in NDC space.
// Note: ((positionCS * 0.5 + 0.5) - (previousPositionCS * 0.5 + 0.5)) = (velocity * 0.5)
EncodeVelocity(velocity * 0.5, outColor);
}

3
com.unity.render-pipelines.high-definition/HDRP/ShaderPass/ShaderPassVelocity.hlsl


// TODO: How to allow overriden velocity vector from GetSurfaceAndBuiltinData ?
float2 velocity = CalculateVelocity(inputPass.positionCS, inputPass.previousPositionCS);
// Convert from Clip space (-1..1) to NDC 0..1 space
// Convert from Clip space (-1..1) to NDC 0..1 space.
// Note it doesn't mean we don't have negative value, we store negative or positive offset in NDC space.
// Note: ((positionCS * 0.5 + 0.5) - (previousPositionCS * 0.5 + 0.5)) = (velocity * 0.5)
EncodeVelocity(velocity * 0.5, outColor);

正在加载...
取消
保存