浏览代码

Fix wrong interpretation of forceNoMotion

/feature-ReflectionProbeFit
Sebastien Lagarde 7 年前
当前提交
7d085503
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 6
      ScriptableRenderPipeline/HDRenderPipeline/ShaderPass/ShaderPassVelocity.hlsl

6
ScriptableRenderPipeline/HDRenderPipeline/ShaderPass/ShaderPassVelocity.hlsl


// So motion vetor will be based on interpolate previous position at vertex level instead.
varyingsType.vpass.positionCS = mul(_NonJitteredViewProjMatrix, float4(varyingsType.vmesh.positionWS, 1.0));
bool forceNoMotion = unity_MotionVectorsParams.y > 0.0;
// Note: unity_MotionVectorsParams.y is 0 is forceNoMotion is enabled
bool forceNoMotion = unity_MotionVectorsParams.y == 0.0;
if (forceNoMotion)
{
varyingsType.vpass.previousPositionCS = float4(0.0, 0.0, 0.0, 1.0);

float4 Frag(PackedVaryingsToPS packedInput) : SV_Target
{
bool forceNoMotion = unity_MotionVectorsParams.y > 0.0;
// Note: unity_MotionVectorsParams.y is 0 is forceNoMotion is enabled
bool forceNoMotion = unity_MotionVectorsParams.y == 0.0;
if (forceNoMotion)
return float4(0.0, 0.0, 0.0, 0.0);

正在加载...
取消
保存