浏览代码

Merge pull request #156 from EvgeniiG/master

Implement painted-thickness-based transmittance for SSS
/Branch_Batching2
GitHub 7 年前
当前提交
29e588a8
共有 180 个文件被更改,包括 526 次插入391 次删除
  1. 25
      Assets/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs
  2. 17
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/Resources/Deferred.shader
  3. 8
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/TilePass.cs
  4. 8
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/TilePass.hlsl
  5. 25
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/LayeredLit/LayeredLit.shader
  6. 21
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/LayeredLit/LayeredLitTessellation.shader
  7. 2
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Editor/BaseLitUI.cs
  8. 8
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.cs
  9. 8
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.cs.hlsl
  10. 145
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.hlsl
  11. 10
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.shader
  12. 1
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LitDataInternal.hlsl
  13. 11
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LitTessellation.shader
  14. 11
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Resources/CombineSubsurfaceScattering.shader
  15. 319
      Assets/ScriptableRenderPipeline/HDRenderPipeline/SceneSettings/SubsurfaceScatteringParameters.cs
  16. 7
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Utilities.cs
  17. 4
      Assets/TestScenes/HDTest/CascadedShadowsTest/Lit_Gray.mat
  18. 4
      Assets/TestScenes/HDTest/GlobalIlluminationTest/Material/Chrome.mat
  19. 3
      Assets/TestScenes/HDTest/GlobalIlluminationTest/Material/Lit_Green.mat
  20. 3
      Assets/TestScenes/HDTest/GlobalIlluminationTest/Material/Lit_Grey.mat
  21. 4
      Assets/TestScenes/HDTest/GlobalIlluminationTest/Material/Lit_Red.mat
  22. 4
      Assets/TestScenes/HDTest/GraphicTest/Common/Dragon/DragonStatue.mat
  23. 3
      Assets/TestScenes/HDTest/GraphicTest/Common/Material/Lit_Blue.mat
  24. 3
      Assets/TestScenes/HDTest/GraphicTest/Common/Material/Lit_Green.mat
  25. 4
      Assets/TestScenes/HDTest/GraphicTest/Common/Material/Lit_Red.mat
  26. 4
      Assets/TestScenes/HDTest/GraphicTest/Common/Material/Lit_White.mat
  27. 3
      Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smooth0_0.mat
  28. 3
      Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smooth0_1.mat
  29. 3
      Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smooth0_2.mat
  30. 3
      Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smooth0_3.mat
  31. 3
      Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smooth0_4.mat
  32. 3
      Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smooth0_5.mat
  33. 3
      Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smooth0_6.mat
  34. 3
      Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smooth0_7.mat
  35. 3
      Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smooth0_8.mat
  36. 3
      Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smooth0_9.mat
  37. 3
      Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smooth1_1.mat
  38. 3
      Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smoothdielectric0_0.mat
  39. 3
      Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smoothdielectric0_1.mat
  40. 3
      Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smoothdielectric0_2.mat
  41. 3
      Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smoothdielectric0_3.mat
  42. 3
      Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smoothdielectric0_4.mat
  43. 3
      Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smoothdielectric0_5.mat
  44. 3
      Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smoothdielectric0_6.mat
  45. 3
      Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smoothdielectric0_7.mat
  46. 3
      Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smoothdielectric0_8.mat
  47. 3
      Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smoothdielectric0_9.mat
  48. 3
      Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smoothdielectric1_0.mat
  49. 4
      Assets/TestScenes/HDTest/GraphicTest/Parallax Occlusion Mapping/Material/POM - Rock.mat
  50. 4
      Assets/TestScenes/HDTest/GraphicTest/Parallax Occlusion Mapping/Material/POM - Wood.mat
  51. 4
      Assets/TestScenes/HDTest/GraphicTest/Tessellation/Material/Tessellation - Rock.mat
  52. 4
      Assets/TestScenes/HDTest/GraphicTest/Tessellation/Material/Tessellation - Wood.mat
  53. 5
      Assets/TestScenes/HDTest/GraphicTest/Two Sided/Material/GroundLeaf_DoubleSided.mat
  54. 5
      Assets/TestScenes/HDTest/GraphicTest/Two Sided/Material/GroundLeaf_DoubleSidedFlip.mat
  55. 4
      Assets/TestScenes/HDTest/LayeredLitTest/Material/Layered_BlendColor.mat
  56. 4
      Assets/TestScenes/HDTest/LayeredLitTest/Material/Layered_BlendMask.mat
  57. 4
      Assets/TestScenes/HDTest/LayeredLitTest/Material/Lit_Blue.mat
  58. 4
      Assets/TestScenes/HDTest/LayeredLitTest/Material/Lit_Green.mat
  59. 4
      Assets/TestScenes/HDTest/LayeredLitTest/Material/Lit_Ground_01_2x2.mat
  60. 4
      Assets/TestScenes/HDTest/LayeredLitTest/Material/Lit_Moss_02_2x2.mat
  61. 4
      Assets/TestScenes/HDTest/LayeredLitTest/Material/Lit_Red.mat
  62. 4
      Assets/TestScenes/HDTest/LayeredLitTest/Material/Lit_Sand01_2x2.mat
  63. 4
      Assets/TestScenes/HDTest/LayeredLitTest/Material/Lit_Spheres.mat
  64. 4
      Assets/TestScenes/HDTest/LayeredLitTest/Material/Lit_UVChart_Layer0_Detail.mat
  65. 4
      Assets/TestScenes/HDTest/LayeredLitTest/Material/Lit_UVChart_Layer1_Detail.mat
  66. 4
      Assets/TestScenes/HDTest/LayeredLitTest/Material/Lit_UVChart_Layer2_Detail.mat
  67. 4
      Assets/TestScenes/HDTest/LayeredLitTest/Material/Lit_UVChart_Layer3_Detail.mat
  68. 4
      Assets/TestScenes/HDTest/LayeredLitTest/Material/Lit_White.mat
  69. 4
      Assets/TestScenes/HDTest/LayeredLitTest/Material/Lit_White_Detail.mat
  70. 4
      Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/Blue_Alpha.mat
  71. 4
      Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/Chrome.mat
  72. 5
      Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/CubeTransparent.mat
  73. 4
      Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_D_a00_s00.mat
  74. 4
      Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_D_a00_s02.mat
  75. 4
      Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_D_a00_s04.mat
  76. 4
      Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_D_a00_s06.mat
  77. 4
      Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_D_a00_s08.mat
  78. 4
      Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_D_a00_s10.mat
  79. 3
      Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a00_s00.mat
  80. 3
      Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a00_s01.mat
  81. 3
      Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a00_s02.mat
  82. 3
      Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a00_s03.mat
  83. 3
      Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a00_s04.mat
  84. 3
      Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a00_s05.mat
  85. 3
      Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a00_s06.mat
  86. 3
      Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a00_s07.mat
  87. 3
      Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a00_s08.mat
  88. 3
      Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a00_s09.mat
  89. 3
      Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a00_s10.mat
  90. 3
      Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a02_s00.mat
  91. 3
      Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a02_s01.mat
  92. 3
      Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a02_s02.mat
  93. 3
      Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a02_s03.mat
  94. 3
      Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a02_s04.mat
  95. 3
      Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a02_s05.mat
  96. 3
      Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a02_s06.mat
  97. 3
      Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a02_s07.mat
  98. 3
      Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a02_s08.mat
  99. 3
      Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a02_s09.mat
  100. 3
      Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a02_s10.mat

25
Assets/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs


}
}
public void PushGlobalParams(HDCamera hdCamera, ScriptableRenderContext renderContext)
public void PushGlobalParams(HDCamera hdCamera, ScriptableRenderContext renderContext, SubsurfaceScatteringParameters sssParameters)
{
if (m_SkyManager.IsSkyValid())
{

{
Shader.SetGlobalInt("_EnvLightSkyEnabled", 0);
}
// Broadcast SSS parameters to all shaders.
Shader.SetGlobalInt("_TransmittanceFlags", sssParameters.transmittanceFlags);
Shader.SetGlobalFloatArray("_ThicknessScales", sssParameters.thicknessScales);
Shader.SetGlobalVectorArray("_HalfRcpVariancesAndLerpWeights", sssParameters.halfRcpVariancesAndLerpWeights);
var cmd = new CommandBuffer {name = "Push Global Parameters"};

}
}
PushGlobalParams(hdCamera, renderContext);
PushGlobalParams(hdCamera, renderContext, m_Owner.sssParameters);
// Caution: We require sun light here as some sky use the sun light to render, mean UpdateSkyEnvironment
// must be call after BuildGPULightLists.

// Currently, forward-rendered objects do not output split lighting required for the SSS pass.
if (m_Owner.renderingParameters.ShouldUseForwardRenderingOnly()) return;
// Load the kernel data.
Vector4[] kernelData = new Vector4[SubsurfaceScatteringParameters.maxNumProfiles * SubsurfaceScatteringProfile.numVectors];
for (int j = 0, m = sssParameters.profiles.Length; j < m; j++)
{
for (int i = 0, n = SubsurfaceScatteringProfile.numVectors; i < n; i++)
{
kernelData[n * j + i] = sssParameters.profiles[j].filterKernel[i];
}
}
m_FilterSubsurfaceScattering.SetVectorArray("_FilterKernels", kernelData);
m_FilterSubsurfaceScattering.SetVectorArray("_FilterKernels", sssParameters.filterKernels);
m_FilterSubsurfaceScattering.SetVectorArray("_HalfRcpWeightedVariances", sssParameters.halfRcpWeightedVariances);
cmd.SetGlobalTexture("_IrradianceSource", m_CameraSubsurfaceBufferRT);
Utilities.DrawFullScreen(cmd, m_FilterSubsurfaceScattering, hdCamera,
m_CameraFilteringBufferRT, m_CameraStencilBufferRT);

m_FilterAndCombineSubsurfaceScattering.SetVectorArray("_FilterKernels", kernelData);
m_FilterAndCombineSubsurfaceScattering.SetVectorArray("_FilterKernels", sssParameters.filterKernels);
m_FilterAndCombineSubsurfaceScattering.SetVectorArray("_HalfRcpWeightedVariances", sssParameters.halfRcpWeightedVariances);
cmd.SetGlobalTexture("_IrradianceSource", m_CameraFilteringBufferRT);
Utilities.DrawFullScreen(cmd, m_FilterAndCombineSubsurfaceScattering, hdCamera,
m_CameraColorBufferRT, m_CameraStencilBufferRT);

17
Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/Resources/Deferred.shader


PreLightData preLightData = GetPreLightData(V, posInput, bsdfData);
float3 diffuseLighting = float3(0, 0, 0);
float3 specularLighting = float3(0, 0, 0);
#if UNITY_REVERSED_Z
float clearDepth = 0;
#else
float clearDepth = 1;
#endif
// Do not shade the far plane - wastes cycles and produces wrong results.
if (depth != clearDepth)
{
LightLoop(V, posInput, preLightData, bsdfData, bakeDiffuseLighting, diffuseLighting, specularLighting);
}
float3 diffuseLighting;
float3 specularLighting;
LightLoop(V, posInput, preLightData, bsdfData, bakeDiffuseLighting, diffuseLighting, specularLighting);
Outputs outputs;
#ifdef OUTPUT_SPLIT_LIGHTING

8
Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/TilePass.cs


Utilities.SelectKeyword(m_DeferredDirectMaterialSRT, tileKeywords, 0);
m_DeferredDirectMaterialSRT.EnableKeyword("LIGHTLOOP_TILE_PASS");
m_DeferredDirectMaterialSRT.DisableKeyword("OUTPUT_SPLIT_LIGHTING");
m_DeferredDirectMaterialSRT.SetInt("_StencilRef", (int)StencilBits.None);
m_DeferredDirectMaterialSRT.SetInt("_StencilRef", (int)StencilBits.Standard);
m_DeferredDirectMaterialSRT.SetInt("_SrcBlend", (int)BlendMode.One);
m_DeferredDirectMaterialSRT.SetInt("_DstBlend", (int)BlendMode.Zero);

Utilities.SelectKeyword(m_DeferredIndirectMaterialSRT, tileKeywords, 1);
m_DeferredIndirectMaterialSRT.EnableKeyword("LIGHTLOOP_TILE_PASS");
m_DeferredIndirectMaterialSRT.DisableKeyword("OUTPUT_SPLIT_LIGHTING");
m_DeferredIndirectMaterialSRT.SetInt("_StencilRef", (int)StencilBits.None);
m_DeferredIndirectMaterialSRT.SetInt("_StencilRef", (int)StencilBits.Standard);
m_DeferredIndirectMaterialSRT.SetInt("_SrcBlend", (int)BlendMode.One);
m_DeferredIndirectMaterialSRT.SetInt("_DstBlend", (int)BlendMode.One); // Additive color & alpha source

Utilities.SelectKeyword(m_DeferredAllMaterialSRT, tileKeywords, 2);
m_DeferredAllMaterialSRT.EnableKeyword("LIGHTLOOP_TILE_PASS");
m_DeferredAllMaterialSRT.DisableKeyword("OUTPUT_SPLIT_LIGHTING");
m_DeferredAllMaterialSRT.SetInt("_StencilRef", (int)StencilBits.None);
m_DeferredAllMaterialSRT.SetInt("_StencilRef", (int)StencilBits.Standard);
m_DeferredAllMaterialSRT.SetInt("_SrcBlend", (int)BlendMode.One);
m_DeferredAllMaterialSRT.SetInt("_DstBlend", (int)BlendMode.Zero);

m_SingleDeferredMaterialSRT = Utilities.CreateEngineMaterial("Hidden/HDRenderPipeline/Deferred");
m_SingleDeferredMaterialSRT.EnableKeyword("LIGHTLOOP_SINGLE_PASS");
m_SingleDeferredMaterialSRT.DisableKeyword("OUTPUT_SPLIT_LIGHTING");
m_SingleDeferredMaterialSRT.SetInt("_StencilRef", (int)StencilBits.None);
m_SingleDeferredMaterialSRT.SetInt("_StencilRef", (int)StencilBits.Standard);
m_SingleDeferredMaterialSRT.SetInt("_SrcBlend", (int)BlendMode.One);
m_SingleDeferredMaterialSRT.SetInt("_DstBlend", (int)BlendMode.Zero);

8
Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/TilePass.hlsl


// Note: scale and bias of shadow atlas are included in ShadowTransform but could be apply here.
float4 positionTXS = mul(float4(positionWS, 1.0), shadowData.worldToShadow);
positionTXS.xyz /= positionTXS.w;
// positionTXS.z -= shadowData.bias; // Apply a linear bias
positionTXS.z -= 0.001;
// positionTXS.z -= shadowData.bias;
positionTXS.z -= 0.001; // Apply a linear bias
#if UNITY_REVERSED_Z
positionTXS.z = 1.0 - positionTXS.z;

// Note: scale and bias of shadow atlas are included in ShadowTransform but could be apply here.
float4 positionTXS = mul(float4(positionWS, 1.0), shadowData.worldToShadow);
positionTXS.xyz /= positionTXS.w;
// positionTXS.z -= shadowData.bias; // Apply a linear bias
positionTXS.z -= 0.003;
// positionTXS.z -= shadowData.bias;
positionTXS.z -= 0.003; // Apply a linear bias
#if UNITY_REVERSED_Z
positionTXS.z = 1.0 - positionTXS.z;

25
Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/LayeredLit/LayeredLit.shader


_HorizonFade("Horizon fade", Range(0.0, 5.0)) = 1.0
// Stencil state
[HideInInspector] _StencilRef("_StencilRef", Int) = 1
// Blending state
[HideInInspector] _SurfaceType("__surfacetype", Float) = 0.0
[HideInInspector] _BlendMode ("__blendmode", Float) = 0.0

Name "GBuffer" // Name is not used
Tags { "LightMode" = "GBuffer" } // This will be only for opaque object based on the RenderQueue index
Cull [_CullMode]
Cull [_CullMode]
Stencil
{
Ref [_StencilRef]
Comp Always
Pass Replace
}
#include "../../Material/Material.hlsl"
#include "../Lit/ShaderPass/LitSharePass.hlsl"
#include "../../Material/Material.hlsl"
#include "../Lit/ShaderPass/LitSharePass.hlsl"
#include "../Lit/LitData.hlsl"
#include "../../ShaderPass/ShaderPassGBuffer.hlsl"

Name "GBufferDebugLighting" // Name is not used
Tags{ "LightMode" = "GBufferDebugLighting" } // This will be only for opaque object based on the RenderQueue index
Cull[_CullMode]
Cull [_CullMode]
Stencil
{
Ref [_StencilRef]
Comp Always
Pass Replace
}
HLSLPROGRAM

21
Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/LayeredLit/LayeredLitTessellation.shader


_HorizonFade("Horizon fade", Range(0.0, 5.0)) = 1.0
// Stencil state
[HideInInspector] _StencilRef("_StencilRef", Int) = 1
// Blending state
[HideInInspector] _SurfaceType("__surfacetype", Float) = 0.0
[HideInInspector] _BlendMode ("__blendmode", Float) = 0.0

Name "GBuffer" // Name is not used
Tags { "LightMode" = "GBuffer" } // This will be only for opaque object based on the RenderQueue index
Cull [_CullMode]
Cull [_CullMode]
Stencil
{
Ref [_StencilRef]
Comp Always
Pass Replace
}
HLSLPROGRAM

Name "GBufferDebugLighting" // Name is not used
Tags{ "LightMode" = "GBufferDebugLighting" } // This will be only for opaque object based on the RenderQueue index
Cull[_CullMode]
Cull [_CullMode]
Stencil
{
Ref [_StencilRef]
Comp Always
Pass Replace
}
HLSLPROGRAM

2
Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Editor/BaseLitUI.cs


SetKeyword(material, "_DEPTHOFFSET_ON", depthOffsetEnable);
if (material.HasProperty(kMaterialID))
material.SetInt("_StencilRef", (int)material.GetFloat(kMaterialID)); // See 'StencilBits'.
material.SetInt("_StencilRef", 1 + (int)material.GetFloat(kMaterialID)); // See 'StencilBits'.
bool enablePerPixelDisplacement = material.GetFloat(kEnablePerPixelDisplacement) > 0.0f;
SetKeyword(material, "_PER_PIXEL_DISPLACEMENT", enablePerPixelDisplacement);

8
Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.cs


// fold into fresnel0
// SSS
public float subsurfaceRadius;
public float thickness;
public int subsurfaceProfile;
public float subsurfaceRadius;
public float thickness;
public int subsurfaceProfile;
public bool enableTransmittance;
public Vector3 transmittance;
// Clearcoat
public Vector3 coatNormalWS;

8
Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.cs.hlsl


#define DEBUGVIEW_LIT_BSDFDATA_SUBSURFACE_RADIUS (1042)
#define DEBUGVIEW_LIT_BSDFDATA_THICKNESS (1043)
#define DEBUGVIEW_LIT_BSDFDATA_SUBSURFACE_PROFILE (1044)
#define DEBUGVIEW_LIT_BSDFDATA_COAT_NORMAL_WS (1045)
#define DEBUGVIEW_LIT_BSDFDATA_COAT_ROUGHNESS (1046)
#define DEBUGVIEW_LIT_BSDFDATA_ENABLE_TRANSMITTANCE (1045)
#define DEBUGVIEW_LIT_BSDFDATA_TRANSMITTANCE (1046)
#define DEBUGVIEW_LIT_BSDFDATA_COAT_NORMAL_WS (1047)
#define DEBUGVIEW_LIT_BSDFDATA_COAT_ROUGHNESS (1048)
//
// UnityEngine.Experimental.Rendering.HDPipeline.Lit.GBufferMaterial: static fields

float subsurfaceRadius;
float thickness;
int subsurfaceProfile;
bool enableTransmittance;
float3 transmittance;
float3 coatNormalWS;
float coatRoughness;
};

145
Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.hlsl


#define LTC_DISNEY_DIFFUSE_MATRIX_INDEX 1 // RGBA
#define LTC_MULTI_GGX_FRESNEL_DISNEY_DIFFUSE_INDEX 2 // RGB, A unused
// SSS parameters
#define N_PROFILES 8
uint _TransmittanceFlags; // One bit per profile; 1 = enabled
float _ThicknessScales[N_PROFILES];
float4 _HalfRcpVariancesAndLerpWeights[N_PROFILES][2]; // 2x Gaussians per color channel, A is the the associated interpolation weight
//-----------------------------------------------------------------------------
// Helper functions/variable specific to this material
//-----------------------------------------------------------------------------

#endif
}
// Evaluates transmittance for a linear combination of two normalized 2D Gaussians.
// Computes results for each color channel separately.
// Ref: Real-Time Realistic Skin Translucency (2010), equation 9 (modified).
float3 ComputeTransmittance(float3 halfRcpVariance1, float lerpWeight1,
float3 halfRcpVariance2, float lerpWeight2,
float thickness, float radiusScale)
{
// Thickness and SSS radius are decoupled for artists.
// In theory, we should modify the thickness by the inverse of the radius scale of the profile.
// thickness /= radiusScale;
thickness *= 100;
float t2 = thickness * thickness;
// TODO: 6 exponentials is kind of expensive... Should we use a LUT instead?
// lerp(exp(-t2 * halfRcpVariance1), exp(-t2 * halfRcpVariance2), lerpWeight2)
return exp(-t2 * halfRcpVariance1) * lerpWeight1 + exp(-t2 * halfRcpVariance2) * lerpWeight2;
}
//-----------------------------------------------------------------------------
// conversion function for forward
//-----------------------------------------------------------------------------

{
bsdfData.diffuseColor = surfaceData.baseColor;
bsdfData.fresnel0 = 0.028; // TODO take from subsurfaceProfile
bsdfData.subsurfaceRadius = surfaceData.subsurfaceRadius;
bsdfData.thickness = surfaceData.thickness;
bsdfData.subsurfaceRadius = surfaceData.subsurfaceRadius * 0.01;
bsdfData.thickness = surfaceData.thickness * 0.01 * _ThicknessScales[bsdfData.subsurfaceProfile];
bsdfData.enableTransmittance = (1 << bsdfData.subsurfaceProfile) & _TransmittanceFlags;
if (bsdfData.enableTransmittance)
{
bsdfData.transmittance = ComputeTransmittance(_HalfRcpVariancesAndLerpWeights[bsdfData.subsurfaceProfile][0].xyz,
_HalfRcpVariancesAndLerpWeights[bsdfData.subsurfaceProfile][0].w,
_HalfRcpVariancesAndLerpWeights[bsdfData.subsurfaceProfile][1].xyz,
_HalfRcpVariancesAndLerpWeights[bsdfData.subsurfaceProfile][1].w,
bsdfData.thickness, bsdfData.subsurfaceRadius);
}
}
else if (bsdfData.materialId == MATERIALID_LIT_CLEAR_COAT)
{

{
bsdfData.diffuseColor = baseColor;
bsdfData.fresnel0 = 0.028; // TODO take from subsurfaceProfile
bsdfData.subsurfaceRadius = inGBuffer2.r;
bsdfData.thickness = inGBuffer2.g;
bsdfData.subsurfaceRadius = inGBuffer2.r * 0.01;
bsdfData.thickness = inGBuffer2.g * 0.01 * _ThicknessScales[bsdfData.subsurfaceProfile];
bsdfData.enableTransmittance = (1 << bsdfData.subsurfaceProfile) & _TransmittanceFlags;
if (bsdfData.enableTransmittance)
{
bsdfData.transmittance = ComputeTransmittance(_HalfRcpVariancesAndLerpWeights[bsdfData.subsurfaceProfile][0].xyz,
_HalfRcpVariancesAndLerpWeights[bsdfData.subsurfaceProfile][0].w,
_HalfRcpVariancesAndLerpWeights[bsdfData.subsurfaceProfile][1].xyz,
_HalfRcpVariancesAndLerpWeights[bsdfData.subsurfaceProfile][1].w,
bsdfData.thickness, bsdfData.subsurfaceRadius);
}
}
else if (bsdfData.materialId == MATERIALID_LIT_CLEAR_COAT)
{

#ifdef HAS_LIGHTLOOP
//-----------------------------------------------------------------------------
// BSDF share between directional light, punctual light and area light (reference)
// BSDF share between directional light, punctual light and area light (reference)
//-----------------------------------------------------------------------------
void BSDF( float3 V, float3 L, float3 positionWS, PreLightData preLightData, BSDFData bsdfData,

float3 L = -lightData.forward; // Lights are pointing backward in Unity
float illuminance = saturate(dot(bsdfData.normalWS, L));
diffuseLighting = float3(0.0, 0.0, 0.0);
specularLighting = float3(0.0, 0.0, 0.0);
float3 cookieColor = float3(1.0, 1.0, 1.0);
diffuseLighting = float3(0.0, 0.0, 0.0);
specularLighting = float3(0.0, 0.0, 0.0);
float4 cookie = float4(1.0, 1.0, 1.0, 1.0);
float shadowAttenuation = GetDirectionalShadowAttenuation(lightLoopContext, positionWS, lightData.shadowIndex, L, posInput.unPositionSS);
float shadow = GetDirectionalShadowAttenuation(lightLoopContext, positionWS, lightData.shadowIndex, L, posInput.unPositionSS);
illuminance *= shadowAttenuation;
illuminance *= shadow;
}
[branch] if (lightData.cookieIndex >= 0 && illuminance > 0.0)

coord = coord * 0.5 + 0.5;
// Tile the texture if the 'repeat' wrap mode is enabled.
if (lightData.tileCookie)
if (lightData.tileCookie)
float4 cookie = SampleCookie2D(lightLoopContext, coord, lightData.cookieIndex);
cookie = SampleCookie2D(lightLoopContext, coord, lightData.cookieIndex);
cookieColor = cookie.rgb;
illuminance *= cookie.a;
}

diffuseLighting *= (cookieColor * lightData.color) * (illuminance * lightData.diffuseScale);
specularLighting *= (cookieColor * lightData.color) * (illuminance * lightData.specularScale);
diffuseLighting *= (cookie.rgb * lightData.color) * (illuminance * lightData.diffuseScale);
specularLighting *= (cookie.rgb * lightData.color) * (illuminance * lightData.specularScale);
}
[branch] if (bsdfData.enableTransmittance)
{
// Reverse the normal.
illuminance = saturate(dot(-bsdfData.normalWS, L));
[branch] if (lightData.shadowIndex >= 0 && illuminance > 0.0)
{
// TODO: factor out the biased position?
float3 biasedPositionWS = positionWS + bsdfData.normalWS * bsdfData.thickness;
float shadow = GetDirectionalShadowAttenuation(lightLoopContext, biasedPositionWS, lightData.shadowIndex, L, posInput.unPositionSS);
illuminance *= shadow;
}
illuminance *= cookie.a;
// The difference between the Disney Diffuse and the Lambertian BRDF for transmittance is negligible.
float3 backLight = (cookie.rgb * lightData.color) * (illuminance * lightData.diffuseScale * Lambert());
// TODO: multiplication by 'diffuseColor' and 'transmittance' is the same for each light.
float3 transmittedLight = backLight * bsdfData.diffuseColor * bsdfData.transmittance;
// We use diffuse lighting for accumulation since it is going to be blurred during the SSS pass.
diffuseLighting += transmittedLight;
}
}

attenuation *= GetAngleAttenuation(L, -lightData.forward, lightData.angleScale, lightData.angleOffset);
float illuminance = saturate(dot(bsdfData.normalWS, L)) * attenuation;
diffuseLighting = float3(0.0, 0.0, 0.0);
specularLighting = float3(0.0, 0.0, 0.0);
float3 cookieColor = float3(1.0, 1.0, 1.0);
diffuseLighting = float3(0.0, 0.0, 0.0);
specularLighting = float3(0.0, 0.0, 0.0);
float4 cookie = float4(1.0, 1.0, 1.0, 1.0);
// TODO: measure impact of having all these dynamic branch here and the gain (or not) of testing illuminace > 0

[branch] if (lightData.shadowIndex >= 0 && illuminance > 0.0)
{
float3 offset = float3(0.0, 0.0, 0.0); // GetShadowPosOffset(nDotL, normal);
float shadowAttenuation = GetPunctualShadowAttenuation(lightLoopContext, lightData.lightType, positionWS + offset, lightData.shadowIndex, L, posInput.unPositionSS);
shadowAttenuation = lerp(1.0, shadowAttenuation, lightData.shadowDimmer);
float shadow = GetPunctualShadowAttenuation(lightLoopContext, lightData.lightType, positionWS + offset, lightData.shadowIndex, L, posInput.unPositionSS);
shadow = lerp(1.0, shadow, lightData.shadowDimmer);
illuminance *= shadowAttenuation;
illuminance *= shadow;
}
[branch] if (lightData.cookieIndex >= 0 && illuminance > 0.0)

// Rotate 'L' into the light space.
// We perform the negation because lights are oriented backwards (-Z).
float3 coord = mul(-L, transpose(lightToWorld));
float4 cookie;
[branch] if (lightData.lightType == GPULIGHTTYPE_SPOT)
{

cookie = SampleCookieCube(lightLoopContext, coord, lightData.cookieIndex);
}
cookieColor = cookie.rgb;
illuminance *= cookie.a;
}

diffuseLighting *= (cookieColor * lightData.color) * (illuminance * lightData.diffuseScale);
specularLighting *= (cookieColor * lightData.color) * (illuminance * lightData.specularScale);
diffuseLighting *= (cookie.rgb * lightData.color) * (illuminance * lightData.diffuseScale);
specularLighting *= (cookie.rgb * lightData.color) * (illuminance * lightData.specularScale);
}
[branch] if (bsdfData.enableTransmittance)
{
// Reverse the normal.
illuminance = saturate(dot(-bsdfData.normalWS, L)) * attenuation;
[branch] if (lightData.shadowIndex >= 0 && illuminance > 0.0)
{
// TODO: factor out the common biased position?
float3 biasedPositionWS = positionWS + bsdfData.normalWS * bsdfData.thickness;
float3 offset = float3(0.0, 0.0, 0.0); // GetShadowPosOffset(nDotL, normal);
float shadow = GetPunctualShadowAttenuation(lightLoopContext, lightData.lightType, biasedPositionWS + offset, lightData.shadowIndex, L, posInput.unPositionSS);
shadow = lerp(1.0, shadow, lightData.shadowDimmer);
illuminance *= shadow;
}
illuminance *= cookie.a;
// The difference between the Disney Diffuse and the Lambertian BRDF for transmittance is negligible.
float3 backLight = (cookie.rgb * lightData.color) * (illuminance * lightData.diffuseScale * Lambert());
// TODO: multiplication by 'diffuseColor' and 'transmittance' is the same for each light.
float3 transmittedLight = backLight * bsdfData.diffuseColor * bsdfData.transmittance;
// We use diffuse lighting for accumulation since it is going to be blurred during the SSS pass.
diffuseLighting += transmittedLight;
}
}

10
Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.shader


_HorizonFade("Horizon fade", Range(0.0, 5.0)) = 1.0
// Stencil state
[HideInInspector] _StencilRef("_StencilRef", Int) = 0
[HideInInspector] _StencilRef("_StencilRef", Int) = 1
// Blending state
[HideInInspector] _SurfaceType("__surfacetype", Float) = 0.0

Name "GBuffer" // Name is not used
Tags { "LightMode" = "GBuffer" } // This will be only for opaque object based on the RenderQueue index
Cull [_CullMode]
Cull [_CullMode]
Stencil
{

Name "GBufferDebugLighting" // Name is not used
Tags{ "LightMode" = "GBufferDebugLighting" } // This will be only for opaque object based on the RenderQueue index
Cull[_CullMode]
Cull [_CullMode]
Stencil
Stencil
Ref[_StencilRef]
Ref [_StencilRef]
Comp Always
Pass Replace
}

1
Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LitDataInternal.hlsl


#else
surfaceData.subsurfaceRadius = _SubsurfaceRadius;
#endif
surfaceData.subsurfaceProfile = 0;
#ifdef _THICKNESS_MAP
surfaceData.thickness = SAMPLE_LAYER_TEXTURE2D(ADD_IDX(_ThicknessMap), ADD_ZERO_IDX(sampler_ThicknessMap), ADD_IDX(layerTexCoord.base)).r;

11
Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LitTessellation.shader


_HorizonFade("Horizon fade", Range(0.0, 5.0)) = 1.0
// Stencil state
[HideInInspector] _StencilRef("_StencilRef", Int) = 0
[HideInInspector] _StencilRef("_StencilRef", Int) = 1
// Blending state
[HideInInspector] _SurfaceType("__surfacetype", Float) = 0.0

Name "GBuffer" // Name is not used
Tags { "LightMode" = "GBuffer" } // This will be only for opaque object based on the RenderQueue index
Cull [_CullMode]
Cull [_CullMode]
Stencil
{

Name "GBufferDebugLighting" // Name is not used
Tags{ "LightMode" = "GBufferDebugLighting" } // This will be only for opaque object based on the RenderQueue index
Cull[_CullMode]
Cull [_CullMode]
Stencil
Stencil
Ref[_StencilRef]
Ref [_StencilRef]
Comp Always
Pass Replace
}

ENDHLSL
}
}
CustomEditor "Experimental.Rendering.HDPipeline.LitGUI"

11
Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Resources/CombineSubsurfaceScattering.shader


{
Stencil
{
Ref 1 // StencilBits.SSS
Ref 2 // StencilBits.SSS
Comp Equal
Pass Keep
}

#define N_PROFILES 8
#define N_SAMPLES 7
float4 _FilterKernels[N_PROFILES][N_SAMPLES + 1]; // RGB = weights, A = radial distance
float4 _FilterKernels[N_PROFILES][N_SAMPLES]; // RGB = weights, A = radial distance
float4 _HalfRcpWeightedVariances[N_PROFILES]; // RGB for chromatic, A for achromatic
float4x4 _InvProjMatrix;
TEXTURE2D_FLOAT(_CameraDepthTexture);

#endif
float2 scaledDirection = distScale * stepSize * unitDirection;
// Load (1 / (2 * Variance)) for bilateral weighting.
// Load (1 / (2 * WeightedVariance)) for bilateral weighting.
float3 halfRcpVariance = _FilterKernels[profileID][N_SAMPLES].rgb;
float3 halfRcpVariance = _HalfRcpWeightedVariances[profileID].rgb;
float halfRcpVariance = _FilterKernels[profileID][N_SAMPLES].a;
float halfRcpVariance = _HalfRcpWeightedVariances[profileID].a;
#endif
// Take the first (central) sample.
float2 samplePosition = posInput.unPositionSS;

319
Assets/ScriptableRenderPipeline/HDRenderPipeline/SceneSettings/SubsurfaceScatteringParameters.cs


public class SubsurfaceScatteringProfile
{
public const int numSamples = 7; // Must be an odd number
public const int numVectors = 8; // numSamples + 1 for (1 / (2 * WeightedVariance))
Color m_StdDev1;
public Color stdDev1;
Color m_StdDev2;
public Color stdDev2;
float m_LerpWeight;
public float lerpWeight;
Vector4[] m_FilterKernel;
public bool enableTransmittance;
public bool m_KernelNeedsUpdate;
public float thicknessScale;
[SerializeField] [HideInInspector]
Vector4[] m_FilterKernel;
[SerializeField] [HideInInspector]
Vector3[] m_HalfRcpVariances;
[SerializeField] [HideInInspector]
Vector4 m_HalfRcpWeightedVariances;
m_StdDev1 = new Color(0.3f, 0.3f, 0.3f, 0.0f);
m_StdDev2 = new Color(1.0f, 1.0f, 1.0f, 0.0f);
m_LerpWeight = 0.5f;
ComputeKernel();
}
public Color stdDev1
{
get { return m_StdDev1; }
set { if (m_StdDev1 != value) { m_StdDev1 = value; m_KernelNeedsUpdate = true; } }
}
public Color stdDev2
{
get { return m_StdDev2; }
set { if (m_StdDev2 != value) { m_StdDev2 = value; m_KernelNeedsUpdate = true; } }
}
stdDev1 = new Color(0.3f, 0.3f, 0.3f, 0.0f);
stdDev2 = new Color(1.0f, 1.0f, 1.0f, 0.0f);
lerpWeight = 0.5f;
enableTransmittance = false;
thicknessScale = 3.0f;
public float lerpWeight
{
get { return m_LerpWeight; }
set { if (m_LerpWeight != value) { m_LerpWeight = value; m_KernelNeedsUpdate = true; } }
UpdateKernelAndVarianceData();
get { if (m_KernelNeedsUpdate) ComputeKernel(); return m_FilterKernel; }
}
public void SetDirtyFlag()
{
m_KernelNeedsUpdate = true;
// Set via UpdateKernelAndVarianceData().
get { return m_FilterKernel; }
// --- Private Methods ---
static float Gaussian(float x, float stdDev)
public Vector3[] halfRcpVariances
float variance = stdDev * stdDev;
return Mathf.Exp(-x * x / (2 * variance)) / Mathf.Sqrt(2 * Mathf.PI * variance);
// Set via UpdateKernelAndVarianceData().
get { return m_HalfRcpVariances; }
static float GaussianCombination(float x, float stdDev1, float stdDev2, float lerpWeight)
public Vector4 halfRcpWeightedVariances
return Mathf.Lerp(Gaussian(x, stdDev1), Gaussian(x, stdDev2), lerpWeight);
// Set via UpdateKernelAndVarianceData().
get { return m_HalfRcpWeightedVariances; }
static float RationalApproximation(float t)
{
// Abramowitz and Stegun formula 26.2.23.
// The absolute value of the error should be less than 4.5 e-4.
float[] c = {2.515517f, 0.802853f, 0.010328f};
float[] d = {1.432788f, 0.189269f, 0.001308f};
return t - ((c[2] * t + c[1]) * t + c[0]) / (((d[2] * t + d[1]) * t + d[0]) * t + 1.0f);
}
// Ref: https://www.johndcook.com/blog/csharp_phi_inverse/
static float NormalCdfInverse(float p, float stdDev)
public void UpdateKernelAndVarianceData()
float x;
if (p < 0.5)
{
// F^-1(p) = - G^-1(p)
x = -RationalApproximation(Mathf.Sqrt(-2.0f * Mathf.Log(p)));
}
else
if (m_FilterKernel == null)
// F^-1(p) = G^-1(1-p)
x = RationalApproximation(Mathf.Sqrt(-2.0f * Mathf.Log(1.0f - p)));
m_FilterKernel = new Vector4[numSamples];
return x * stdDev;
}
static float GaussianCombinationCdfInverse(float p, float stdDev1, float stdDev2, float lerpWeight)
{
return Mathf.Lerp(NormalCdfInverse(p, stdDev1), NormalCdfInverse(p, stdDev2), lerpWeight);
}
void ComputeKernel()
{
if (m_FilterKernel == null || m_FilterKernel.Length != numVectors)
if (m_HalfRcpVariances == null)
m_FilterKernel = new Vector4[numVectors];
m_HalfRcpVariances = new Vector3[2];
}
// Our goal is to blur the image using a filter which is represented

// It is separable by design, but generally not radially symmetric.
// Find the widest Gaussian across 3 color channels.
float maxStdDev1 = Mathf.Max(m_StdDev1.r, m_StdDev1.g, m_StdDev1.b);
float maxStdDev2 = Mathf.Max(m_StdDev2.r, m_StdDev2.g, m_StdDev2.b);
float maxStdDev1 = Mathf.Max(stdDev1.r, stdDev1.g, stdDev1.b);
float maxStdDev2 = Mathf.Max(stdDev2.r, stdDev2.g, stdDev2.b);
Vector3 weightSum = new Vector3(0, 0, 0);
Vector3 weightSum = new Vector3(0, 0, 0);
float pos = GaussianCombinationCdfInverse(u, maxStdDev1, maxStdDev2, m_LerpWeight);
float pdf = GaussianCombination(pos, maxStdDev1, maxStdDev2, m_LerpWeight);
float pos = GaussianCombinationCdfInverse(u, maxStdDev1, maxStdDev2, lerpWeight);
float pdf = GaussianCombination(pos, maxStdDev1, maxStdDev2, lerpWeight);
val.x = GaussianCombination(pos, m_StdDev1.r, m_StdDev2.r, m_LerpWeight);
val.y = GaussianCombination(pos, m_StdDev1.g, m_StdDev2.g, m_LerpWeight);
val.z = GaussianCombination(pos, m_StdDev1.b, m_StdDev2.b, m_LerpWeight);
val.x = GaussianCombination(pos, stdDev1.r, stdDev2.r, lerpWeight);
val.y = GaussianCombination(pos, stdDev1.g, stdDev2.g, lerpWeight);
val.z = GaussianCombination(pos, stdDev1.b, stdDev2.b, lerpWeight);
// We do not divide by 'numSamples' since we will renormalize, anyway.
m_FilterKernel[i].x = val.x * (1 / pdf);

m_FilterKernel[i].z *= 1 / weightSum.z;
}
// Store (1 / (2 * Variance)) per color channel per Gaussian.
m_HalfRcpVariances[0].x = 0.5f / (stdDev1.r * stdDev1.r);
m_HalfRcpVariances[0].y = 0.5f / (stdDev1.g * stdDev1.g);
m_HalfRcpVariances[0].z = 0.5f / (stdDev1.b * stdDev1.b);
m_HalfRcpVariances[1].x = 0.5f / (stdDev2.r * stdDev2.r);
m_HalfRcpVariances[1].y = 0.5f / (stdDev2.g * stdDev2.g);
m_HalfRcpVariances[1].z = 0.5f / (stdDev2.b * stdDev2.b);
weightedStdDev.x = Mathf.Lerp(m_StdDev1.r, m_StdDev2.r, m_LerpWeight);
weightedStdDev.y = Mathf.Lerp(m_StdDev1.g, m_StdDev2.g, m_LerpWeight);
weightedStdDev.z = Mathf.Lerp(m_StdDev1.b, m_StdDev2.b, m_LerpWeight);
weightedStdDev.w = Mathf.Lerp(maxStdDev1, maxStdDev2, m_LerpWeight);
weightedStdDev.x = Mathf.Lerp(stdDev1.r, stdDev2.r, lerpWeight);
weightedStdDev.y = Mathf.Lerp(stdDev1.g, stdDev2.g, lerpWeight);
weightedStdDev.z = Mathf.Lerp(stdDev1.b, stdDev2.b, lerpWeight);
weightedStdDev.w = Mathf.Lerp(maxStdDev1, maxStdDev2, lerpWeight);
// Store (1 / (2 * WeightedVariance)) per color channel.
m_HalfRcpWeightedVariances.x = 0.5f / (weightedStdDev.x * weightedStdDev.x);
m_HalfRcpWeightedVariances.y = 0.5f / (weightedStdDev.y * weightedStdDev.y);
m_HalfRcpWeightedVariances.z = 0.5f / (weightedStdDev.z * weightedStdDev.z);
m_HalfRcpWeightedVariances.w = 0.5f / (weightedStdDev.w * weightedStdDev.w);
}
// --- Private Methods ---
static float Gaussian(float x, float stdDev)
{
float variance = stdDev * stdDev;
return Mathf.Exp(-x * x / (2 * variance)) / Mathf.Sqrt(2 * Mathf.PI * variance);
}
static float GaussianCombination(float x, float stdDev1, float stdDev2, float lerpWeight)
{
return Mathf.Lerp(Gaussian(x, stdDev1), Gaussian(x, stdDev2), lerpWeight);
}
static float RationalApproximation(float t)
{
// Abramowitz and Stegun formula 26.2.23.
// The absolute value of the error should be less than 4.5 e-4.
float[] c = {2.515517f, 0.802853f, 0.010328f};
float[] d = {1.432788f, 0.189269f, 0.001308f};
return t - ((c[2] * t + c[1]) * t + c[0]) / (((d[2] * t + d[1]) * t + d[0]) * t + 1.0f);
}
// Store (1 / (2 * Variance)) per color channel.
m_FilterKernel[numSamples].x = 0.5f / (weightedStdDev.x * weightedStdDev.x);
m_FilterKernel[numSamples].y = 0.5f / (weightedStdDev.y * weightedStdDev.y);
m_FilterKernel[numSamples].z = 0.5f / (weightedStdDev.z * weightedStdDev.z);
m_FilterKernel[numSamples].w = 0.5f / (weightedStdDev.w * weightedStdDev.w);
// Ref: https://www.johndcook.com/blog/csharp_phi_inverse/
static float NormalCdfInverse(float p, float stdDev)
{
float x;
if (p < 0.5)
{
// F^-1(p) = - G^-1(p)
x = -RationalApproximation(Mathf.Sqrt(-2.0f * Mathf.Log(p)));
}
else
{
// F^-1(p) = G^-1(1-p)
x = RationalApproximation(Mathf.Sqrt(-2.0f * Mathf.Log(1.0f - p)));
}
return x * stdDev;
}
static float GaussianCombinationCdfInverse(float p, float stdDev1, float stdDev2, float lerpWeight)
{
return Mathf.Lerp(NormalCdfInverse(p, stdDev1), NormalCdfInverse(p, stdDev2), lerpWeight);
}
}

int m_NumProfiles;
int m_NumProfiles;
[SerializeField]
int m_TransmittanceFlags;
[SerializeField]
float[] m_ThicknessScales;
[SerializeField]
Vector4[] m_HalfRcpVariancesAndLerpWeights;
[SerializeField]
Vector4[] m_HalfRcpWeightedVariances;
[SerializeField]
Vector4[] m_FilterKernels;
// --- Public Methods ---

{
m_Profiles[i] = new SubsurfaceScatteringProfile();
}
OnValidate();
public SubsurfaceScatteringProfile[] profiles { set { m_Profiles = value; OnValidate(); } get { return m_Profiles; } }
public SubsurfaceScatteringProfile[] profiles {
// Set via serialization.
get { return m_Profiles; }
}
// Returns a bit mask s.t. the i-th bit indicates whether the i-th profile requires transmittance evaluation.
// Supplies '_TransmittanceFlags' to Lit.hlsl.
public int transmittanceFlags {
// Set during OnValidate().
get { return m_TransmittanceFlags; }
}
public void SetDirtyFlag()
// Supplies '_ThicknessScales' to Lit.hlsl.
public float[] thicknessScales
{
// Set during OnValidate().
get { return m_ThicknessScales; }
}
// Supplies '_HalfRcpVariancesAndLerpWeights' to Lit.hlsl.
public Vector4[] halfRcpVariancesAndLerpWeights {
// Set during OnValidate().
get { return m_HalfRcpVariancesAndLerpWeights; }
}
// Supplies '_HalfRcpWeightedVariances' to CombineSubsurfaceScattering.shader.
public Vector4[] halfRcpWeightedVariances {
// Set during OnValidate().
get { return m_HalfRcpWeightedVariances; }
}
// Supplies '_FilterKernels' to CombineSubsurfaceScattering.shader.
public Vector4[] filterKernels
for (int i = 0; i < m_Profiles.Length; i++)
{
m_Profiles[i].SetDirtyFlag();
}
// Set during OnValidate().
get { return m_FilterKernels; }
}
// --- Private Methods ---

Array.Resize(ref m_Profiles, maxNumProfiles);
}
m_NumProfiles = m_Profiles.Length;
m_NumProfiles = m_Profiles.Length;
m_TransmittanceFlags = 0;
if (m_ThicknessScales == null)
{
m_ThicknessScales = new float[maxNumProfiles];
}
if (m_HalfRcpVariancesAndLerpWeights == null)
{
m_HalfRcpVariancesAndLerpWeights = new Vector4[maxNumProfiles * 2];
}
if (m_HalfRcpWeightedVariances == null)
{
m_HalfRcpWeightedVariances = new Vector4[maxNumProfiles];
}
if (m_FilterKernels == null)
{
m_FilterKernels = new Vector4[maxNumProfiles * SubsurfaceScatteringProfile.numSamples];
}
m_TransmittanceFlags |= (m_Profiles[i].enableTransmittance ? 1 : 0) << i;
c.r = Mathf.Clamp(m_Profiles[i].stdDev1.r, 0.05f, 2.0f);
c.g = Mathf.Clamp(m_Profiles[i].stdDev1.g, 0.05f, 2.0f);
c.b = Mathf.Clamp(m_Profiles[i].stdDev1.b, 0.05f, 2.0f);

m_Profiles[i].stdDev2 = c;
m_Profiles[i].lerpWeight = Mathf.Clamp01(m_Profiles[i].lerpWeight);
m_Profiles[i].thicknessScale = Mathf.Max(0.0f, m_Profiles[i].thicknessScale);
m_Profiles[i].UpdateKernelAndVarianceData();
}
// Use the updated data to fill the cache.
for (int i = 0; i < m_NumProfiles; i++)
{
m_ThicknessScales[i] = m_Profiles[i].thicknessScale;
m_HalfRcpVariancesAndLerpWeights[2 * i] = m_Profiles[i].halfRcpVariances[0];
m_HalfRcpVariancesAndLerpWeights[2 * i].w = 1.0f - m_Profiles[i].lerpWeight;
m_HalfRcpVariancesAndLerpWeights[2 * i + 1] = m_Profiles[i].halfRcpVariances[1];
m_HalfRcpVariancesAndLerpWeights[2 * i + 1].w = m_Profiles[i].lerpWeight;
m_HalfRcpWeightedVariances[i] = m_Profiles[i].halfRcpWeightedVariances;
for (int j = 0, n = SubsurfaceScatteringProfile.numSamples; j < n; j++)
{
m_FilterKernels[n * i + j] = m_Profiles[i].filterKernel[j];
}
}
}
}

{
private class Styles
{
public readonly GUIContent sssCategory = new GUIContent("Subsurface scattering");
public readonly GUIContent sssProfileStdDev1 = new GUIContent("SSS profile standard deviation #1", "Determines the shape of the 1st Gaussian filter. Increases the strength and the radius of the blur of the corresponding color channel.");
public readonly GUIContent sssProfileStdDev2 = new GUIContent("SSS profile standard deviation #2", "Determines the shape of the 2nd Gaussian filter. Increases the strength and the radius of the blur of the corresponding color channel.");
public readonly GUIContent sssProfileLerpWeight = new GUIContent("SSS profile filter interpolation", "Controls linear interpolation between the two Gaussian filters.");
public readonly GUIContent sssCategory = new GUIContent("Subsurface scattering");
public readonly GUIContent sssProfileStdDev1 = new GUIContent("Standard deviation #1", "Determines the shape of the 1st Gaussian filter. Increases the strength and the radius of the blur of the corresponding color channel.");
public readonly GUIContent sssProfileStdDev2 = new GUIContent("Standard deviation #2", "Determines the shape of the 2nd Gaussian filter. Increases the strength and the radius of the blur of the corresponding color channel.");
public readonly GUIContent sssProfileLerpWeight = new GUIContent("Filter interpolation", "Controls linear interpolation between the two Gaussian filters.");
public readonly GUIContent sssProfileTransmittance = new GUIContent("Enable transmittance", "Toggles simulation of light passing through thin objects. Depends on the thickness of the material.");
public readonly GUIContent sssProfileThicknessScale = new GUIContent("Thickness scale", "Linearly scales the thickness of the object which affects the amount of transmitted lighting.");
private SerializedProperty m_Profiles;
// --- Public Methods ---

{
serializedObject.Update();
SerializedProperty profiles = serializedObject.FindProperty("m_Profiles");
EditorGUILayout.PropertyField(m_Profiles, true);
EditorGUILayout.PropertyField(profiles, true);
// Serialization does not invoke setters, but does call OnValidate().
// Serialization ignores setters.
((SubsurfaceScatteringParameters)target).SetDirtyFlag();
}
// --- Private Methods ---
void OnEnable()
{
m_Profiles = serializedObject.FindProperty("m_Profiles");
}
}
#endif

7
Assets/ScriptableRenderPipeline/HDRenderPipeline/Utilities.cs


[Flags]
public enum StencilBits
{
None = Lit.MaterialId.LitStandard,
SSS = Lit.MaterialId.LitSSS,
ClearCoat = Lit.MaterialId.LitClearCoat,
None = 0,
Standard = 1 + Lit.MaterialId.LitStandard,
SSS = 1 + Lit.MaterialId.LitSSS,
ClearCoat = 1 + Lit.MaterialId.LitClearCoat,
All = 255 // 0xff
}

4
Assets/TestScenes/HDTest/CascadedShadowsTest/Lit_Gray.mat


- _GlossyReflections: 1
- _HeightAmplitude: 0.01
- _HeightCenter: 0.5
- _MaterialId: 0
- _MaterialID: 0
- _StencilRef: 1
- _Metallic: 0
- _Mode: 0
- _NormalMapSpace: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SubSurfaceRadius: 0
- _SurfaceType: 0
- _TexWorldScale: 1
- _UVBase: 0

4
Assets/TestScenes/HDTest/GlobalIlluminationTest/Material/Chrome.mat


- _GlossyReflections: 1
- _HeightAmplitude: 0.01
- _HeightCenter: 0.5
- _MaterialId: 0
- _MaterialID: 0
- _StencilRef: 1
- _Metallic: 1
- _Mode: 0
- _NormalMapSpace: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SubSurfaceRadius: 0
- _SurfaceType: 0
- _TexWorldScale: 1
- _UVBase: 0

3
Assets/TestScenes/HDTest/GlobalIlluminationTest/Material/Lit_Green.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 0
- _Metallic: 0
- _Mettalic: 0

- _SmoothnessTextureChannel: 1
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/GlobalIlluminationTest/Material/Lit_Grey.mat


- _HeightCenter: 0.5
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metallic: 0
- _Mode: 0
- _NormalMapSpace: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

4
Assets/TestScenes/HDTest/GlobalIlluminationTest/Material/Lit_Red.mat


- _HeightMapMode: 0
- _HeightScale: 1
- _MaterialID: 0
- _MaterialId: 0
- _StencilRef: 1
- _Mettalic: 0
- _Mode: 0
- _NormalMapSpace: 0
- _NormalScale: 1

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SubSurfaceRadius: 0
- _SurfaceType: 0
- _TexWorldScale: 1
- _UVBase: 0

4
Assets/TestScenes/HDTest/GraphicTest/Common/Dragon/DragonStatue.mat


- _HeightAmplitude: 0
- _HeightCenter: 0
- _HorizonFade: 1
- _MaterialId: 0
- _MaterialID: 0
- _StencilRef: 1
- _Metallic: 0
- _Mode: 0
- _NormalDetailMul: 0.347

- _SmoothnessVar: 0.491
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SubSurfaceRadius: 0
- _SurfaceType: 0
- _Tess: 8
- _TessFar: 1

3
Assets/TestScenes/HDTest/GraphicTest/Common/Material/Lit_Blue.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metallic: 0
- _Mode: 0
- _NormalMapSpace: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/GraphicTest/Common/Material/Lit_Green.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metallic: 0
- _Mode: 0
- _NormalMapSpace: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

4
Assets/TestScenes/HDTest/GraphicTest/Common/Material/Lit_Red.mat


- _HeightCenter: 0.5
- _HeightMapMode: 0
- _HeightScale: 1
- _MaterialId: 0
- _MaterialID: 0
- _StencilRef: 1
- _Metallic: 0
- _Mode: 0
- _NormalMapSpace: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SubSurfaceRadius: 0
- _SurfaceType: 0
- _TexWorldScale: 1
- _UVBase: 0

4
Assets/TestScenes/HDTest/GraphicTest/Common/Material/Lit_White.mat


- _HeightCenter: 0.5
- _HeightMapMode: 0
- _HeightScale: 1
- _MaterialId: 0
- _MaterialID: 0
- _StencilRef: 1
- _Metallic: 0
- _Mode: 0
- _NormalMapSpace: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SubSurfaceRadius: 0
- _SurfaceType: 0
- _TexWorldScale: 1
- _UVBase: 0

3
Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smooth0_0.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 1
- _Metallic: 1
- _Mode: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smooth0_1.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 1
- _Metallic: 1
- _Mode: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smooth0_2.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 1
- _Metallic: 1
- _Mode: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smooth0_3.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 1
- _Metallic: 1
- _Mode: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smooth0_4.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 1
- _Metallic: 1
- _Mode: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smooth0_5.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 1
- _Metallic: 1
- _Mode: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smooth0_6.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 1
- _Metallic: 1
- _Mode: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smooth0_7.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 1
- _Metallic: 1
- _Mode: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smooth0_8.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 1
- _Metallic: 1
- _Mode: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smooth0_9.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 1
- _Metallic: 1
- _Mode: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smooth1_1.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 1
- _Metallic: 1
- _Mode: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smoothdielectric0_0.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 0
- _Metallic: 0
- _Mode: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smoothdielectric0_1.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 0
- _Metallic: 0
- _Mode: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smoothdielectric0_2.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 0
- _Metallic: 0
- _Mode: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smoothdielectric0_3.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 0
- _Metallic: 0
- _Mode: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smoothdielectric0_4.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 0
- _Metallic: 0
- _Mode: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smoothdielectric0_5.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 0
- _Metallic: 0
- _Mode: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smoothdielectric0_6.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 0
- _Metallic: 0
- _Mode: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smoothdielectric0_7.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 0
- _Metallic: 0
- _Mode: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smoothdielectric0_8.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 0
- _Metallic: 0
- _Mode: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smoothdielectric0_9.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 0
- _Metallic: 0
- _Mode: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/GraphicTest/Common/Material/Mat_smoothdielectric1_0.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 0
- _Metallic: 0
- _Mode: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

4
Assets/TestScenes/HDTest/GraphicTest/Parallax Occlusion Mapping/Material/POM - Rock.mat


- _GlossyReflections: 1
- _HeightAmplitude: 0.09
- _HeightCenter: 0.5
- _MaterialId: 0
- _MaterialID: 0
- _StencilRef: 1
- _Metallic: 0
- _Mode: 0
- _NormalMapSpace: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SubSurfaceRadius: 0
- _SurfaceType: 0
- _TexWorldScale: 1
- _UVBase: 0

4
Assets/TestScenes/HDTest/GraphicTest/Parallax Occlusion Mapping/Material/POM - Wood.mat


- _GlossyReflections: 1
- _HeightAmplitude: 0.17
- _HeightCenter: 0.5
- _MaterialId: 0
- _MaterialID: 0
- _StencilRef: 1
- _Metallic: 0
- _Mode: 0
- _NormalMapSpace: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SubSurfaceRadius: 0
- _SurfaceType: 0
- _TexWorldScale: 1
- _UVBase: 0

4
Assets/TestScenes/HDTest/GraphicTest/Tessellation/Material/Tessellation - Rock.mat


- _HeightCenter: 0.5
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metallic: 0
- _Mode: 0
- _NormalMapSpace: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _SubSurfaceRadius: 0
- _StencilRef: 1
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1
- _SurfaceType: 0

4
Assets/TestScenes/HDTest/GraphicTest/Tessellation/Material/Tessellation - Wood.mat


- _GlossyReflections: 1
- _HeightAmplitude: 1.27
- _HeightCenter: 0.5
- _MaterialId: 0
- _MaterialID: 0
- _StencilRef: 1
- _Metallic: 0
- _Mode: 0
- _NormalMapSpace: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SubSurfaceRadius: 0
- _SurfaceType: 0
- _TessellationBackFaceCullEpsilon: -0.25
- _TessellationFactor: 15

5
Assets/TestScenes/HDTest/GraphicTest/Two Sided/Material/GroundLeaf_DoubleSided.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Mettalic: 0
- _Mode: 1
- _NormalMapSpace: 0
- _NormalScale: 1

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _SubSurfaceRadius: 0
- _StencilRef: 1
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1
- _SurfaceType: 0

5
Assets/TestScenes/HDTest/GraphicTest/Two Sided/Material/GroundLeaf_DoubleSidedFlip.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Mettalic: 0
- _Mode: 1
- _NormalMapSpace: 0
- _NormalScale: 1

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _SubSurfaceRadius: 0
- _StencilRef: 1
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1
- _SurfaceType: 0

4
Assets/TestScenes/HDTest/LayeredLitTest/Material/Layered_BlendColor.mat


- _LayerTiling2: 1
- _LayerTiling3: 1
- _LayerTilingBlendMask: 1
- _MaterialId: 0
- _MaterialID: 0
- _StencilRef: 1
- _Metalic: 0
- _Metalic0: 0
- _Metalic1: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SubSurfaceRadius: 0
- _SurfaceType: 0
- _TexWorldScale: 1
- _TexWorldScale0: 1

4
Assets/TestScenes/HDTest/LayeredLitTest/Material/Layered_BlendMask.mat


- _LayerTiling2: 1
- _LayerTiling3: 1
- _LayerTilingBlendMask: 1
- _MaterialId: 0
- _MaterialID: 0
- _StencilRef: 1
- _Metalic: 0
- _Metalic0: 0
- _Metalic1: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SubSurfaceRadius: 0
- _SurfaceType: 0
- _TexWorldScale: 1
- _TexWorldScale0: 1

4
Assets/TestScenes/HDTest/LayeredLitTest/Material/Lit_Blue.mat


- _HeightBias: 0
- _HeightMapMode: 0
- _HeightScale: 1
- _MaterialId: 0
- _MaterialID: 0
- _StencilRef: 1
- _Metallic: 0
- _Mode: 0
- _NormalMapSpace: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SubSurfaceRadius: 0
- _SurfaceType: 0
- _TexWorldScale: 1
- _UVBase: 0

4
Assets/TestScenes/HDTest/LayeredLitTest/Material/Lit_Green.mat


- _HeightBias: 0
- _HeightMapMode: 0
- _HeightScale: 1
- _MaterialId: 0
- _MaterialID: 0
- _StencilRef: 1
- _Metallic: 0
- _Mode: 0
- _NormalMapSpace: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SubSurfaceRadius: 0
- _SurfaceType: 0
- _TexWorldScale: 1
- _UVBase: 0

4
Assets/TestScenes/HDTest/LayeredLitTest/Material/Lit_Ground_01_2x2.mat


- _HeightCenter: 0.5
- _HeightMapMode: 0
- _HeightScale: 0.02
- _MaterialId: 0
- _MaterialID: 0
- _StencilRef: 1
- _Metallic: 0
- _Mode: 0
- _NormalDetailMul: 1

- _SmoothnessVar: 0.097
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SubSurfaceRadius: 0
- _SurfaceType: 0
- _Tess: 64
- _TessFar: 2

4
Assets/TestScenes/HDTest/LayeredLitTest/Material/Lit_Moss_02_2x2.mat


- _HeightCenter: 0.5
- _HeightMapMode: 0
- _HeightScale: 0.05
- _MaterialId: 0
- _MaterialID: 0
- _StencilRef: 1
- _Metallic: 0
- _Mode: 0
- _NormalDetailMul: 1

- _SmoothnessVar: 0.5
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SubSurfaceRadius: 0
- _SurfaceType: 0
- _Tess: 64
- _TessFar: 3.5

4
Assets/TestScenes/HDTest/LayeredLitTest/Material/Lit_Red.mat


- _HeightBias: 0
- _HeightMapMode: 0
- _HeightScale: 1
- _MaterialId: 0
- _MaterialID: 0
- _StencilRef: 1
- _Metallic: 0
- _Mode: 0
- _NormalMapSpace: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SubSurfaceRadius: 0
- _SurfaceType: 0
- _TexWorldScale: 1
- _UVBase: 0

4
Assets/TestScenes/HDTest/LayeredLitTest/Material/Lit_Sand01_2x2.mat


- _HeightScale: 0.1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metallic: 0
- _Mode: 0
- _NormalDetailMul: 1

- _SmoothnessVar: 0.5
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _SubSurfaceRadius: 0
- _StencilRef: 1
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1
- _SurfaceType: 0

4
Assets/TestScenes/HDTest/LayeredLitTest/Material/Lit_Spheres.mat


- _HeightScale3: 1
- _LayerCount: 2
- _LayerMaskVertexColor: 0
- _MaterialId: 0
- _MaterialID: 0
- _StencilRef: 1
- _Metallic: 0
- _Metallic0: 0
- _Metallic1: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SubSurfaceRadius: 0
- _SurfaceType: 0
- _TexWorldScale: 1
- _TexWorldScale0: 1

4
Assets/TestScenes/HDTest/LayeredLitTest/Material/Lit_UVChart_Layer0_Detail.mat


- _HeightBias: 0
- _HeightMapMode: 0
- _HeightScale: 1
- _MaterialId: 0
- _MaterialID: 0
- _StencilRef: 1
- _Metallic: 0
- _Mode: 0
- _NormalMapSpace: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SubSurfaceRadius: 0
- _SurfaceType: 0
- _TexWorldScale: 1
- _UVBase: 0

4
Assets/TestScenes/HDTest/LayeredLitTest/Material/Lit_UVChart_Layer1_Detail.mat


- _HeightBias: 0
- _HeightMapMode: 0
- _HeightScale: 1
- _MaterialId: 0
- _MaterialID: 0
- _StencilRef: 1
- _Metallic: 0
- _Mode: 0
- _NormalMapSpace: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SubSurfaceRadius: 0
- _SurfaceType: 0
- _TexWorldScale: 1
- _UVBase: 0

4
Assets/TestScenes/HDTest/LayeredLitTest/Material/Lit_UVChart_Layer2_Detail.mat


- _HeightBias: 0
- _HeightMapMode: 0
- _HeightScale: 1
- _MaterialId: 0
- _MaterialID: 0
- _StencilRef: 1
- _Metallic: 0
- _Mode: 0
- _NormalMapSpace: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SubSurfaceRadius: 0
- _SurfaceType: 0
- _TexWorldScale: 1
- _UVBase: 0

4
Assets/TestScenes/HDTest/LayeredLitTest/Material/Lit_UVChart_Layer3_Detail.mat


- _HeightBias: 0
- _HeightMapMode: 0
- _HeightScale: 1
- _MaterialId: 0
- _MaterialID: 0
- _StencilRef: 1
- _Metallic: 0
- _Mode: 0
- _NormalMapSpace: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SubSurfaceRadius: 0
- _SurfaceType: 0
- _TexWorldScale: 1
- _UVBase: 0

4
Assets/TestScenes/HDTest/LayeredLitTest/Material/Lit_White.mat


- _HeightBias: 0
- _HeightMapMode: 0
- _HeightScale: 1
- _MaterialId: 0
- _MaterialID: 0
- _StencilRef: 1
- _Metallic: 0
- _Mode: 0
- _NormalMapSpace: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SubSurfaceRadius: 0
- _SurfaceType: 0
- _TexWorldScale: 1
- _UVBase: 0

4
Assets/TestScenes/HDTest/LayeredLitTest/Material/Lit_White_Detail.mat


- _HeightBias: 0
- _HeightMapMode: 0
- _HeightScale: 1
- _MaterialId: 0
- _MaterialID: 0
- _StencilRef: 1
- _Metallic: 0
- _Mode: 0
- _NormalMapSpace: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SubSurfaceRadius: 0
- _SurfaceType: 0
- _TexWorldScale: 1
- _UVBase: 0

4
Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/Blue_Alpha.mat


name: _MaterialID
second: 0
- first:
name: _MaterialId
second: 0
name: _StencilRef
second: 1
- first:
name: _Metalic
second: 0

4
Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/Chrome.mat


- _HeightBias: 0
- _HeightMapMode: 0
- _HeightScale: 1
- _MaterialId: 0
- _MaterialID: 0
- _StencilRef: 1
- _Metallic: 1
- _Mode: 0
- _NormalMapSpace: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SubSurfaceRadius: 0
- _SurfaceType: 0
- _UVDetail: 0
- _UVSec: 0

5
Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/CubeTransparent.mat


- _HeightCenter: 0.5
- _HeightMapMode: 0
- _HeightScale: 1
- _MaterialId: 0
- _MaterialID: 0
- _StencilRef: 1
- _Mettalic: 0
- _Mode: 0
- _NormalMapSpace: 0
- _NormalScale: 1

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 5
- _SubSurfaceRadius: 0
- _SurfaceType: 1
- _TexWorldScale: 1
- _UVBase: 0

4
Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_D_a00_s00.mat


- _HeightMapMode: 0
- _HeightScale: 1
- _MaterialID: 0
- _MaterialId: 0
- _StencilRef: 1
- _Mettalic: 0
- _Mode: 0
- _NormalMapSpace: 0
- _OcclusionStrength: 1

- _SpecularHighlights: 1
- _SrcBlend: 1
- _SubSurfaceRadius: 0
- _SurfaceType: 0
- _UVDetail: 0
- _UVSec: 0

4
Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_D_a00_s02.mat


- _HeightMapMode: 0
- _HeightScale: 1
- _MaterialID: 0
- _MaterialId: 0
- _StencilRef: 1
- _Mettalic: 0
- _Mode: 0
- _NormalMapSpace: 0
- _OcclusionStrength: 1

- _SpecularHighlights: 1
- _SrcBlend: 1
- _SubSurfaceRadius: 0
- _SurfaceType: 0
- _UVDetail: 0
- _UVSec: 0

4
Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_D_a00_s04.mat


- _HeightMapMode: 0
- _HeightScale: 1
- _MaterialID: 0
- _MaterialId: 0
- _StencilRef: 1
- _Mettalic: 0
- _Mode: 0
- _NormalMapSpace: 0
- _OcclusionStrength: 1

- _SpecularHighlights: 1
- _SrcBlend: 1
- _SubSurfaceRadius: 0
- _SurfaceType: 0
- _UVDetail: 0
- _UVSec: 0

4
Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_D_a00_s06.mat


- _HeightMapMode: 0
- _HeightScale: 1
- _MaterialID: 0
- _MaterialId: 0
- _StencilRef: 1
- _Mettalic: 0
- _Mode: 0
- _NormalMapSpace: 0
- _OcclusionStrength: 1

- _SpecularHighlights: 1
- _SrcBlend: 1
- _SubSurfaceRadius: 0
- _SurfaceType: 0
- _UVDetail: 0
- _UVSec: 0

4
Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_D_a00_s08.mat


- _HeightMapMode: 0
- _HeightScale: 1
- _MaterialID: 0
- _MaterialId: 0
- _StencilRef: 1
- _Mettalic: 0
- _Mode: 0
- _NormalMapSpace: 0
- _OcclusionStrength: 1

- _SpecularHighlights: 1
- _SrcBlend: 1
- _SubSurfaceRadius: 0
- _SurfaceType: 0
- _UVDetail: 0
- _UVSec: 0

4
Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_D_a00_s10.mat


- _HeightMapMode: 0
- _HeightScale: 1
- _MaterialID: 0
- _MaterialId: 0
- _StencilRef: 1
- _Mettalic: 0
- _Mode: 0
- _NormalMapSpace: 0
- _OcclusionStrength: 1

- _SpecularHighlights: 1
- _SrcBlend: 1
- _SubSurfaceRadius: 0
- _SurfaceType: 0
- _UVDetail: 0
- _UVSec: 0

3
Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a00_s00.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 0
- _Metallic: 1
- _Mettalic: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a00_s01.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 0
- _Metallic: 1
- _Mettalic: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a00_s02.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 0
- _Metallic: 1
- _Mettalic: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a00_s03.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 0
- _Metallic: 1
- _Mettalic: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a00_s04.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 0
- _Metallic: 1
- _Mettalic: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a00_s05.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 0
- _Metallic: 1
- _Mettalic: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a00_s06.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 0
- _Metallic: 1
- _Mettalic: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a00_s07.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 0
- _Metallic: 1
- _Mettalic: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a00_s08.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 0
- _Metallic: 1
- _Mettalic: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a00_s09.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 0
- _Metallic: 1
- _Mettalic: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a00_s10.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 0
- _Metallic: 1
- _Mettalic: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a02_s00.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 0
- _Metallic: 1
- _Mettalic: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a02_s01.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 0
- _Metallic: 1
- _Mettalic: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a02_s02.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 0
- _Metallic: 1
- _Mettalic: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a02_s03.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 0
- _Metallic: 1
- _Mettalic: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a02_s04.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 0
- _Metallic: 1
- _Mettalic: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a02_s05.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 0
- _Metallic: 1
- _Mettalic: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a02_s06.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 0
- _Metallic: 1
- _Mettalic: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a02_s07.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 0
- _Metallic: 1
- _Mettalic: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a02_s08.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 0
- _Metallic: 1
- _Mettalic: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a02_s09.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 0
- _Metallic: 1
- _Mettalic: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

3
Assets/TestScenes/HDTest/Material/HDRenderLoopMaterials/GGX Test/GGX_a02_s10.mat


- _HeightScale: 1
- _HorizonFade: 1
- _MaterialID: 0
- _MaterialId: 0
- _Metalic: 0
- _Metallic: 1
- _Mettalic: 0

- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRef: 1
- _SubSurfaceRadius: 0
- _SubsurfaceProfile: 0
- _SubsurfaceRadius: 1

部分文件因为文件数量过多而无法显示

正在加载...
取消
保存