浏览代码

Disable the deferred CS and SSS parameter caching

Deferred CS issue: cmd.SetComputeFloatParams() does not correctly set "_ThicknessRemaps".
SSS parameter caching issue: SSS profiles are not correctly deserialized in the Player.
/RenderPassXR_Sandbox
Evgenii Golubev 7 年前
当前提交
f8020847
共有 2 个文件被更改,包括 1011 次插入12 次删除
  1. 998
      Assets/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipelineAsset.asset
  2. 25
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/SubsurfaceScatteringProfile.cs

998
Assets/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipelineAsset.asset
文件差异内容过多而无法显示
查看文件

25
Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/SubsurfaceScatteringProfile.cs


{
public int numProfiles; // Excluding the neutral profile
public SubsurfaceScatteringProfile[] profiles;
// Below are the cached values.
[NonSerialized] public uint texturingModeFlags; // 1 bit/profile; 0 = PreAndPostScatter, 1 = PostScatter
[NonSerialized] public uint transmissionFlags; // 2 bit/profile; 0 = inf. thick, 1 = thin, 2 = regular
[NonSerialized] public float[] thicknessRemaps; // Remap: 0 = start, 1 = end - start
[NonSerialized] public float[] worldScales; // Size of the world unit in meters
[NonSerialized] public Vector4[] shapeParams; // RGB = S = 1 / D, A = filter radius
[NonSerialized] public Vector4[] transmissionTints; // RGB = color, A = unused
[NonSerialized] public float[] filterKernelsNearField; // 0 = radius, 1 = reciprocal of the PDF
[NonSerialized] public float[] filterKernelsFarField; // 0 = radius, 1 = reciprocal of the PDF
// Below are the cached values. TODO: uncomment when SSS profile asset serialization is fixed.
/*[NonSerialized]*/ public uint texturingModeFlags; // 1 bit/profile; 0 = PreAndPostScatter, 1 = PostScatter
/*[NonSerialized]*/ public uint transmissionFlags; // 2 bit/profile; 0 = inf. thick, 1 = thin, 2 = regular
/*[NonSerialized]*/ public float[] thicknessRemaps; // Remap: 0 = start, 1 = end - start
/*[NonSerialized]*/ public float[] worldScales; // Size of the world unit in meters
/*[NonSerialized]*/ public Vector4[] shapeParams; // RGB = S = 1 / D, A = filter radius
/*[NonSerialized]*/ public Vector4[] transmissionTints; // RGB = color, A = unused
/*[NonSerialized]*/ public float[] filterKernelsNearField; // 0 = radius, 1 = reciprocal of the PDF
/*[NonSerialized]*/ public float[] filterKernelsFarField; // 0 = radius, 1 = reciprocal of the PDF
[NonSerialized] public Vector4[] halfRcpWeightedVariances;
[NonSerialized] public Vector4[] filterKernelsBasic;
/*[NonSerialized]*/ public Vector4[] halfRcpWeightedVariances;
/*[NonSerialized]*/ public Vector4[] filterKernelsBasic;
// <<< Old SSS Model
// --- Public Methods ---

public void OnAfterDeserialize()
{
UpdateCache();
// TODO: uncomment when SSS profile asset serialization is fixed.
// UpdateCache();
}
}

正在加载...
取消
保存