浏览代码

Merge branch 'HDRP/staging' into HDRP/fix/ObliqueLightLoop

/main
sebastienlagarde 6 年前
当前提交
f75e94af
共有 97 个文件被更改,包括 13185 次插入835 次删除
  1. 6
      TestProjects/LWGraphicsTest/Assets/Scenes/045_CustomLWPipe/CustomLWPipe.cs
  2. 5
      com.unity.render-pipelines.high-definition/CHANGELOG.md
  3. 5
      com.unity.render-pipelines.high-definition/HDRP/Debug/DebugColorPicker.shader
  4. 1
      com.unity.render-pipelines.high-definition/HDRP/Debug/LightingDebug.cs
  5. 13
      com.unity.render-pipelines.high-definition/HDRP/Debug/LightingDebug.cs.hlsl
  6. 26
      com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/HDLightEditor.cs
  7. 2
      com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Volumetric/Texture3DCreationEditor.cs.meta
  8. 160
      com.unity.render-pipelines.high-definition/HDRP/Editor/ShaderGraph/HDPBRPass.template
  9. 104
      com.unity.render-pipelines.high-definition/HDRP/Editor/ShaderGraph/HDSubShaderUtilities.cs
  10. 161
      com.unity.render-pipelines.high-definition/HDRP/Editor/ShaderGraph/HDUnlitPassForward.template
  11. 3
      com.unity.render-pipelines.high-definition/HDRP/Lighting/Volumetrics/DensityVolume.cs
  12. 2
      com.unity.render-pipelines.high-definition/HDRP/Lighting/Volumetrics/DensityVolumeManager.cs
  13. 13
      com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/HDRenderPipeline.cs
  14. 2
      com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/HDUtils.cs
  15. 9
      com.unity.render-pipelines.high-definition/HDRP/Sky/SkyRenderingContext.cs
  16. 7
      com.unity.render-pipelines.lightweight/CHANGELOG.md
  17. 18
      com.unity.render-pipelines.lightweight/LWRP/DefaultRendererSetup.cs
  18. 130
      com.unity.render-pipelines.lightweight/LWRP/Editor/LightweightPipelineAssetEditor.cs
  19. 4
      com.unity.render-pipelines.lightweight/LWRP/LightweightForwardRenderer.cs
  20. 3
      com.unity.render-pipelines.lightweight/LWRP/Passes/BeginXRRenderingPass.cs
  21. 10
      com.unity.render-pipelines.lightweight/LWRP/Passes/CopyColorPass.cs
  22. 12
      com.unity.render-pipelines.lightweight/LWRP/Passes/CopyDepthPass.cs
  23. 2
      com.unity.render-pipelines.lightweight/LWRP/Passes/CreateLightweightRenderTexturesPass.cs
  24. 2
      com.unity.render-pipelines.lightweight/LWRP/Passes/DepthOnlyPass.cs
  25. 7
      com.unity.render-pipelines.lightweight/LWRP/Passes/DirectionalShadowsPass.cs
  26. 2
      com.unity.render-pipelines.lightweight/LWRP/Passes/DrawSkyboxPass.cs
  27. 2
      com.unity.render-pipelines.lightweight/LWRP/Passes/EndXRRenderingPass.cs
  28. 16
      com.unity.render-pipelines.lightweight/LWRP/Passes/FinalBlitPass.cs
  29. 11
      com.unity.render-pipelines.lightweight/LWRP/Passes/LightweightForwardPass.cs
  30. 4
      com.unity.render-pipelines.lightweight/LWRP/Passes/LocalShadowsPass.cs
  31. 3
      com.unity.render-pipelines.lightweight/LWRP/Passes/OpaquePostProcessPass.cs
  32. 9
      com.unity.render-pipelines.lightweight/LWRP/Passes/RenderOpaqueForwardPass.cs
  33. 7
      com.unity.render-pipelines.lightweight/LWRP/Passes/RenderTransparentForwardPass.cs
  34. 16
      com.unity.render-pipelines.lightweight/LWRP/Passes/SceneViewDepthCopy.cs
  35. 11
      com.unity.render-pipelines.lightweight/LWRP/Passes/ScreenSpaceShadowResolvePass.cs
  36. 2
      com.unity.render-pipelines.lightweight/LWRP/Passes/ScriptableRenderPass.cs
  37. 3
      com.unity.render-pipelines.lightweight/LWRP/Passes/SetupForwardRenderingPass.cs
  38. 2
      com.unity.render-pipelines.lightweight/LWRP/Passes/SetupLightweightConstanstPass.cs
  39. 2
      com.unity.render-pipelines.lightweight/LWRP/Passes/TransparentPostProcessPass.cs
  40. 7
      com.unity.render-pipelines.lightweight/LWRP/ShaderLibrary/Shadows.hlsl
  41. 92
      com.unity.render-pipelines.lightweight/LWRP/ShaderLibrary/Terrain/LightweightPassLitTerrain.hlsl
  42. 6
      com.unity.shadergraph/Editor/Data/Implementation/NodeUtils.cs
  43. 483
      com.unity.shadergraph/Editor/Data/Util/GraphUtil.cs
  44. 10
      com.unity.shadergraph/Editor/Data/Util/ShaderStringBuilder.cs
  45. 1001
      TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_PlanarReflectionVFace.unity
  46. 7
      TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_PlanarReflectionVFace.unity.meta
  47. 8
      TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling.meta
  48. 8
      TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2207_ReflectionCullingStencil.meta
  49. 1001
      TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2207_ReflectionProbeVFace.unity
  50. 7
      TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2207_ReflectionProbeVFace.unity.meta
  51. 1001
      TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2208_PlanarReflectionCullingStencil.unity
  52. 7
      TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2208_PlanarReflectionCullingStencil.unity.meta
  53. 1001
      TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2209_ReflectionProbeCullingStencil.unity
  54. 7
      TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2209_ReflectionProbeCullingStencil.unity.meta
  55. 1001
      TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/2206_PlanarReflectionVFace.png
  56. 88
      TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/2206_PlanarReflectionVFace.png.meta
  57. 1001
      TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/2207_ReflectionProbeVFace.png
  58. 88
      TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/2207_ReflectionProbeVFace.png.meta
  59. 1001
      TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/2208_PlanarReflectionCullingStencil.png
  60. 88
      TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/2208_PlanarReflectionCullingStencil.png.meta
  61. 1001
      TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/2209_ReflectionProbeCullingStencil.png
  62. 88
      TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/2209_ReflectionProbeCullingStencil.png.meta
  63. 129
      com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Volumetric/Texture3DCreationEditor.cs
  64. 71
      com.unity.render-pipelines.high-definition/HDRP/Editor/ShaderGraph/SharedCode.template.hlsl
  65. 9
      com.unity.render-pipelines.high-definition/HDRP/Editor/ShaderGraph/SharedCode.template.hlsl.meta
  66. 50
      com.unity.render-pipelines.high-definition/HDRP/Editor/ShaderGraph/VertexAnimation.template.hlsl
  67. 9
      com.unity.render-pipelines.high-definition/HDRP/Editor/ShaderGraph/VertexAnimation.template.hlsl.meta
  68. 8
      TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Material.meta
  69. 8
      TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Mesh.meta
  70. 1001
      TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Mesh/Torus.obj
  71. 100
      TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Mesh/Torus.obj.meta
  72. 21
      TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Mesh/filp.obj
  73. 99
      TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Mesh/filp.obj.meta
  74. 572
      TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Mesh/grid.obj
  75. 99
      TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Mesh/grid.obj.meta
  76. 232
      TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Scene Settings Profile 1.asset
  77. 8
      TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Scene Settings Profile 1.asset.meta
  78. 209
      TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Scene Settings Profile.asset
  79. 8
      TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Scene Settings Profile.asset.meta
  80. 233
      TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Material/Mirror.mat
  81. 8
      TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Material/Mirror.mat.meta
  82. 235
      TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Material/White.mat
  83. 8
      TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Material/White.mat.meta
  84. 233
      TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Material/DoubleSidedFlipMode.mat
  85. 8
      TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Material/DoubleSidedFlipMode.mat.meta
  86. 233
      TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Material/DoubleSidedMirrorMode.mat
  87. 8
      TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Material/DoubleSidedMirrorMode.mat.meta
  88. 233
      TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Material/DoubleSidedNoneMode.mat
  89. 8
      TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Material/DoubleSidedNoneMode.mat.meta
  90. 232
      TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2207_ReflectionCullingStencil/Scene Settings Profile.asset
  91. 8
      TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2207_ReflectionCullingStencil/Scene Settings Profile.asset.meta
  92. 141
      com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Volumetric/volumeTextureTool.cs
  93. 0
      /com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Volumetric/Texture3DCreationEditor.cs.meta

6
TestProjects/LWGraphicsTest/Assets/Scenes/045_CustomLWPipe/CustomLWPipe.cs


[NonSerialized]
private bool m_Initialized = false;
private void Init(LightweightForwardRenderer renderer)
private void Init()
{
if (m_Initialized)
return;

m_SetupLightweightConstants = new SetupLightweightConstanstPass();
m_RenderOpaqueForwardPass = new RenderOpaqueForwardPass(renderer.GetMaterial(MaterialHandles.Error));
m_RenderOpaqueForwardPass = new RenderOpaqueForwardPass();
m_Initialized = true;
}

{
Init(renderer);
Init();
renderer.Clear();

5
com.unity.render-pipelines.high-definition/CHANGELOG.md


## [3.2.0-preview]
### Added
- Added a luminance meter in the debug menu
- Fix issue with package upgrading (HDRP resources asset is now versionned to worarkound package manager limitation)
- Fix lux meter mode - The lux meter isn't affected by the sky anymore
## [3.1.0-preview]

5
com.unity.render-pipelines.high-definition/HDRP/Debug/DebugColorPicker.shader


//Decompress value if luxMeter is active
if (_DebugLightingMode == DEBUGLIGHTINGMODE_LUX_METER && _ColorPickerMode != COLORPICKERDEBUGMODE_NONE)
result.rgb = result.rgb * LUXMETER_COMPRESSION_RATIO;
if (_DebugLightingMode == DEBUGLIGHTINGMODE_LUMINANCE_METER)
{
result = Luminance(result.rgb);
}
if (_FalseColor)
result.rgb = FasleColorRemap(Luminance(result.rgb), _FalseColorThresholds);

1
com.unity.render-pipelines.high-definition/HDRP/Debug/LightingDebug.cs


DiffuseLighting,
SpecularLighting,
LuxMeter,
LuminanceMeter,
VisualizeCascade,
VisualizeShadowMasks,
IndirectDiffuseOcclusion,

13
com.unity.render-pipelines.high-definition/HDRP/Debug/LightingDebug.cs.hlsl


#define DEBUGLIGHTINGMODE_DIFFUSE_LIGHTING (1)
#define DEBUGLIGHTINGMODE_SPECULAR_LIGHTING (2)
#define DEBUGLIGHTINGMODE_LUX_METER (3)
#define DEBUGLIGHTINGMODE_VISUALIZE_CASCADE (4)
#define DEBUGLIGHTINGMODE_VISUALIZE_SHADOW_MASKS (5)
#define DEBUGLIGHTINGMODE_INDIRECT_DIFFUSE_OCCLUSION (6)
#define DEBUGLIGHTINGMODE_INDIRECT_SPECULAR_OCCLUSION (7)
#define DEBUGLIGHTINGMODE_SCREEN_SPACE_TRACING_REFRACTION (8)
#define DEBUGLIGHTINGMODE_SCREEN_SPACE_TRACING_REFLECTION (9)
#define DEBUGLIGHTINGMODE_LUMINANCE_METER (4)
#define DEBUGLIGHTINGMODE_VISUALIZE_CASCADE (5)
#define DEBUGLIGHTINGMODE_VISUALIZE_SHADOW_MASKS (6)
#define DEBUGLIGHTINGMODE_INDIRECT_DIFFUSE_OCCLUSION (7)
#define DEBUGLIGHTINGMODE_INDIRECT_SPECULAR_OCCLUSION (8)
#define DEBUGLIGHTINGMODE_SCREEN_SPACE_TRACING_REFRACTION (9)
#define DEBUGLIGHTINGMODE_SCREEN_SPACE_TRACING_REFLECTION (10)
//
// UnityEngine.Experimental.Rendering.HDPipeline.DebugScreenSpaceTracing: static fields

26
com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/HDLightEditor.cs


// In case of change, think to update InitDefaultHDAdditionalLightData()
settings.lightType.enumValueIndex = (int)LightType.Point;
m_AdditionalLightData.lightTypeExtent.enumValueIndex = (int)LightTypeExtent.Rectangle;
EditorGUI.BeginChangeCheck();
m_AdditionalLightData.shapeWidth.floatValue = Mathf.Max(m_AdditionalLightData.shapeWidth.floatValue, k_MinAreaWidth);
m_AdditionalLightData.shapeHeight.floatValue = Mathf.Max(m_AdditionalLightData.shapeHeight.floatValue, k_MinAreaWidth);
settings.areaSizeX.floatValue = m_AdditionalLightData.shapeWidth.floatValue;
settings.areaSizeY.floatValue = m_AdditionalLightData.shapeHeight.floatValue;
if (EditorGUI.EndChangeCheck())
{
m_AdditionalLightData.shapeWidth.floatValue = Mathf.Max(m_AdditionalLightData.shapeWidth.floatValue, k_MinAreaWidth);
m_AdditionalLightData.shapeHeight.floatValue = Mathf.Max(m_AdditionalLightData.shapeHeight.floatValue, k_MinAreaWidth);
settings.areaSizeX.floatValue = m_AdditionalLightData.shapeWidth.floatValue;
settings.areaSizeY.floatValue = m_AdditionalLightData.shapeHeight.floatValue;
}
if (settings.isRealtime)
settings.shadowsType.enumValueIndex = (int)LightShadows.None;
break;

//m_BaseData.type.enumValueIndex = (int)LightType.Area;
settings.lightType.enumValueIndex = (int)LightType.Point;
m_AdditionalLightData.lightTypeExtent.enumValueIndex = (int)LightTypeExtent.Line;
EditorGUI.BeginChangeCheck();
m_AdditionalLightData.shapeWidth.floatValue = Mathf.Max(m_AdditionalLightData.shapeWidth.floatValue, k_MinAreaWidth);
m_AdditionalLightData.shapeHeight.floatValue = Mathf.Max(m_AdditionalLightData.shapeHeight.floatValue, k_MinAreaWidth);
// Fake line with a small rectangle in vanilla unity for GI
settings.areaSizeX.floatValue = m_AdditionalLightData.shapeWidth.floatValue;
settings.areaSizeY.floatValue = k_MinAreaWidth;
if (EditorGUI.EndChangeCheck())
{
m_AdditionalLightData.shapeWidth.floatValue = Mathf.Max(m_AdditionalLightData.shapeWidth.floatValue, k_MinAreaWidth);
m_AdditionalLightData.shapeHeight.floatValue = Mathf.Max(m_AdditionalLightData.shapeHeight.floatValue, k_MinAreaWidth);
// Fake line with a small rectangle in vanilla unity for GI
settings.areaSizeX.floatValue = m_AdditionalLightData.shapeWidth.floatValue;
settings.areaSizeY.floatValue = k_MinAreaWidth;
}
settings.shadowsType.enumValueIndex = (int)LightShadows.None;
break;

2
com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Volumetric/Texture3DCreationEditor.cs.meta


fileFormatVersion: 2
guid: 6fac8c32212b2374ba031d6c1cc3d128
guid: 9723a65f374db464a8a4f39c94ca7f54
MonoImporter:
externalObjects: {}
serializedVersion: 2

160
com.unity.render-pipelines.high-definition/HDRP/Editor/ShaderGraph/HDPBRPass.template


Pass
{
// based on HDPBRPass.template
Name "${PassName}"
Tags { "LightMode" = "${LightMode}" }
Name "$splice(PassName)"
Tags { "LightMode" = "$splice(LightMode)" }
${Blending}
${Culling}
${ZTest}
${ZWrite}
${Stencil}
${ColorMask}
$splice(Blending)
$splice(Culling)
$splice(ZTest)
$splice(ZWrite)
$splice(Stencil)
$splice(ColorMask)
//-------------------------------------------------------------------------------------
// End Render Modes
//-------------------------------------------------------------------------------------

#pragma target 4.5
#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch
//#pragma enable_d3d11_debug_symbols
#pragma target 4.5
#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch
//#pragma enable_d3d11_debug_symbols
//-------------------------------------------------------------------------------------
// Variant Definitions (active field translations to HDRP defines)

//-------------------------------------------------------------------------------------
// Defines
//-------------------------------------------------------------------------------------
${Defines}
$splice(Defines)
// this translates the new dependency tracker into the old preprocessor definitions for the existing HDRP shader code
$AttributesMesh.normalOS: #define ATTRIBUTES_NEED_NORMAL

//-------------------------------------------------------------------------------------
// Interpolator Packing And Struct Declarations
//-------------------------------------------------------------------------------------
${InterpolatorPacking}
$buildType(AttributesMesh)
$buildType(VaryingsMeshToPS)
$buildType(VaryingsMeshToDS)
//-------------------------------------------------------------------------------------
// End Interpolator Packing And Struct Declarations
//-------------------------------------------------------------------------------------

//-------------------------------------------------------------------------------------
${Graph}
$splice(Graph)
#ifdef HAVE_MESH_MODIFICATION
// TODO: we should share this between template files somehow
VertexDescriptionInputs AttributesMeshToVertexDescriptionInputs(AttributesMesh input)
{
VertexDescriptionInputs output;
ZERO_INITIALIZE(VertexDescriptionInputs, output);
$VertexDescriptionInputs.ObjectSpaceNormal: output.ObjectSpaceNormal = input.normalOS;
$VertexDescriptionInputs.WorldSpaceNormal: output.WorldSpaceNormal = TransformObjectToWorldNormal(input.normalOS);
$VertexDescriptionInputs.ViewSpaceNormal: output.ViewSpaceNormal = TransformWorldToViewDir(output.WorldSpaceNormal);
$VertexDescriptionInputs.TangentSpaceNormal: output.TangentSpaceNormal = float3(0.0f, 0.0f, 1.0f);
$VertexDescriptionInputs.ObjectSpaceTangent: output.ObjectSpaceTangent = input.tangentOS;
$VertexDescriptionInputs.WorldSpaceTangent: output.WorldSpaceTangent = TransformObjectToWorldDir(input.tangentOS.xyz);
$VertexDescriptionInputs.ViewSpaceTangent: output.ViewSpaceTangent = TransformWorldToViewDir(output.WorldSpaceTangent);
$VertexDescriptionInputs.TangentSpaceTangent: output.TangentSpaceTangent = float3(1.0f, 0.0f, 0.0f);
$VertexDescriptionInputs.ObjectSpaceBiTangent: output.ObjectSpaceBiTangent = normalize(cross(input.normalOS, input.tangentOS) * (input.tangentOS.w > 0.0f ? 1.0f : -1.0f) * GetOddNegativeScale());
$VertexDescriptionInputs.WorldSpaceBiTangent: output.WorldSpaceBiTangent = TransformObjectToWorldDir(output.ObjectSpaceBiTangent);
$VertexDescriptionInputs.ViewSpaceBiTangent: output.ViewSpaceBiTangent = TransformWorldToViewDir(output.WorldSpaceBiTangent);
$VertexDescriptionInputs.TangentSpaceBiTangent: output.TangentSpaceBiTangent = float3(0.0f, 1.0f, 0.0f);
$VertexDescriptionInputs.ObjectSpacePosition: output.ObjectSpacePosition = input.positionOS;
$VertexDescriptionInputs.WorldSpacePosition: output.WorldSpacePosition = GetAbsolutePositionWS(TransformObjectToWorld(input.positionOS));
$VertexDescriptionInputs.ViewSpacePosition: output.ViewSpacePosition = TransformWorldToView(output.WorldSpacePosition);
$VertexDescriptionInputs.TangentSpacePosition: output.TangentSpacePosition = float3(0.0f, 0.0f, 0.0f);
$VertexDescriptionInputs.WorldSpaceViewDirection: output.WorldSpaceViewDirection = GetWorldSpaceNormalizeViewDir(output.WorldSpacePosition);
$VertexDescriptionInputs.ObjectSpaceViewDirection: output.ObjectSpaceViewDirection = TransformWorldToObjectDir(output.WorldSpaceViewDirection);
$VertexDescriptionInputs.ViewSpaceViewDirection: output.ViewSpaceViewDirection = TransformWorldToViewDir(output.WorldSpaceViewDirection);
$VertexDescriptionInputs.TangentSpaceViewDirection: float3x3 tangentSpaceTransform = float3x3(output.WorldSpaceTangent,output.WorldSpaceBiTangent,output.WorldSpaceNormal);
$VertexDescriptionInputs.TangentSpaceViewDirection: output.TangentSpaceViewDirection = mul(tangentSpaceTransform, output.WorldSpaceViewDirection);
$VertexDescriptionInputs.ScreenPosition: output.ScreenPosition = ComputeScreenPos(TransformWorldToHClip(output.WorldSpacePosition), _ProjectionParams.x);
$VertexDescriptionInputs.uv0: output.uv0 = float4(input.uv0, 0.0f, 0.0f);
$VertexDescriptionInputs.uv1: output.uv1 = float4(input.uv1, 0.0f, 0.0f);
$VertexDescriptionInputs.uv2: output.uv2 = float4(input.uv2, 0.0f, 0.0f);
$VertexDescriptionInputs.uv3: output.uv3 = float4(input.uv3, 0.0f, 0.0f);
$VertexDescriptionInputs.VertexColor: output.VertexColor = input.color;
return output;
}
AttributesMesh ApplyMeshModification(AttributesMesh input)
{
// build graph inputs
VertexDescriptionInputs vertexDescriptionInputs = AttributesMeshToVertexDescriptionInputs(input);
// evaluate vertex graph
VertexDescription vertexDescription = VertexDescriptionFunction(vertexDescriptionInputs);
// copy graph output to the results
$VertexDescription.Position: input.positionOS = vertexDescription.Position;
return input;
}
#endif // HAVE_MESH_MODIFICATION
// TODO: Do we want to build include functionality for sharing these preprocessed functions across templates?
FragInputs BuildFragInputs(VaryingsMeshToPS input)
{
FragInputs output;
ZERO_INITIALIZE(FragInputs, output);
// Init to some default value to make the computer quiet (else it output 'divide by zero' warning even if value is not used).
// TODO: this is a really poor workaround, but the variable is used in a bunch of places
// to compute normals which are then passed on elsewhere to compute other values...
output.worldToTangent = k_identity3x3;
output.positionSS = input.positionCS; // input.positionCS is SV_Position
$FragInputs.positionRWS: output.positionRWS = input.positionRWS;
$FragInputs.worldToTangent: output.worldToTangent = BuildWorldToTangent(input.tangentWS, input.normalWS);
$FragInputs.texCoord0: output.texCoord0 = input.texCoord0;
$FragInputs.texCoord1: output.texCoord1 = input.texCoord1;
$FragInputs.texCoord2: output.texCoord2 = input.texCoord2;
$FragInputs.texCoord3: output.texCoord3 = input.texCoord3;
$FragInputs.color: output.color = input.color;
#if SHADER_STAGE_FRAGMENT
$FragInputs.isFrontFace: output.isFrontFace = IS_FRONT_VFACE(input.cullFace, true, false); // TODO: SHADER_STAGE_FRAGMENT only
$FragInputs.isFrontFace: // Handle handness of the view matrix (In Unity view matrix default to a determinant of -1)
$FragInputs.isFrontFace: // when we render a cubemap the view matrix handness is flipped (due to convention used for cubemap) we have a determinant of +1
$FragInputs.isFrontFace: output.isFrontFace = _DetViewMatrix < 0.0 ? output.isFrontFace : !output.isFrontFace;
#endif // SHADER_STAGE_FRAGMENT
return output;
}
SurfaceDescriptionInputs FragInputsToSurfaceDescriptionInputs(FragInputs input, float3 viewWS)
{
SurfaceDescriptionInputs output;
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
$SurfaceDescriptionInputs.WorldSpaceNormal: output.WorldSpaceNormal = normalize(input.worldToTangent[2].xyz);
$SurfaceDescriptionInputs.ObjectSpaceNormal: output.ObjectSpaceNormal = mul(output.WorldSpaceNormal, (float3x3) UNITY_MATRIX_M); // transposed multiplication by inverse matrix to handle normal scale
$SurfaceDescriptionInputs.ViewSpaceNormal: output.ViewSpaceNormal = mul(output.WorldSpaceNormal, (float3x3) UNITY_MATRIX_I_V); // transposed multiplication by inverse matrix to handle normal scale
$SurfaceDescriptionInputs.TangentSpaceNormal: output.TangentSpaceNormal = float3(0.0f, 0.0f, 1.0f);
$SurfaceDescriptionInputs.WorldSpaceTangent: output.WorldSpaceTangent = input.worldToTangent[0].xyz;
$SurfaceDescriptionInputs.ObjectSpaceTangent: output.ObjectSpaceTangent = TransformWorldToObjectDir(output.WorldSpaceTangent);
$SurfaceDescriptionInputs.ViewSpaceTangent: output.ViewSpaceTangent = TransformWorldToViewDir(output.WorldSpaceTangent);
$SurfaceDescriptionInputs.TangentSpaceTangent: output.TangentSpaceTangent = float3(1.0f, 0.0f, 0.0f);
$SurfaceDescriptionInputs.WorldSpaceBiTangent: output.WorldSpaceBiTangent = input.worldToTangent[1].xyz;
$SurfaceDescriptionInputs.ObjectSpaceBiTangent: output.ObjectSpaceBiTangent = TransformWorldToObjectDir(output.WorldSpaceBiTangent);
$SurfaceDescriptionInputs.ViewSpaceBiTangent: output.ViewSpaceBiTangent = TransformWorldToViewDir(output.WorldSpaceBiTangent);
$SurfaceDescriptionInputs.TangentSpaceBiTangent: output.TangentSpaceBiTangent = float3(0.0f, 1.0f, 0.0f);
$SurfaceDescriptionInputs.WorldSpaceViewDirection: output.WorldSpaceViewDirection = normalize(viewWS);
$SurfaceDescriptionInputs.ObjectSpaceViewDirection: output.ObjectSpaceViewDirection = TransformWorldToObjectDir(output.WorldSpaceViewDirection);
$SurfaceDescriptionInputs.ViewSpaceViewDirection: output.ViewSpaceViewDirection = TransformWorldToViewDir(output.WorldSpaceViewDirection);
$SurfaceDescriptionInputs.TangentSpaceViewDirection: float3x3 tangentSpaceTransform = float3x3(output.WorldSpaceTangent,output.WorldSpaceBiTangent,output.WorldSpaceNormal);
$SurfaceDescriptionInputs.TangentSpaceViewDirection: output.TangentSpaceViewDirection = mul(tangentSpaceTransform, output.WorldSpaceViewDirection);
$SurfaceDescriptionInputs.WorldSpacePosition: output.WorldSpacePosition = GetAbsolutePositionWS(input.positionRWS);
$SurfaceDescriptionInputs.ObjectSpacePosition: output.ObjectSpacePosition = TransformWorldToObject(input.positionRWS);
$SurfaceDescriptionInputs.ViewSpacePosition: float4 posViewSpace = TransformWorldToView(input.positionRWS);
$SurfaceDescriptionInputs.ViewSpacePosition: output.ViewSpacePosition = posViewSpace.xyz / posViewSpace.w;
$SurfaceDescriptionInputs.TangentSpacePosition: output.TangentSpacePosition = float3(0.0f, 0.0f, 0.0f);
$SurfaceDescriptionInputs.ScreenPosition: output.ScreenPosition = ComputeScreenPos(TransformWorldToHClip(input.positionRWS), _ProjectionParams.x);
$SurfaceDescriptionInputs.uv0: output.uv0 = float4(input.texCoord0, 0.0f, 0.0f);
$SurfaceDescriptionInputs.uv1: output.uv1 = float4(input.texCoord1, 0.0f, 0.0f);
$SurfaceDescriptionInputs.uv2: output.uv2 = float4(input.texCoord2, 0.0f, 0.0f);
$SurfaceDescriptionInputs.uv3: output.uv3 = float4(input.texCoord3, 0.0f, 0.0f);
$features.modifyMesh: $include("VertexAnimation.template.hlsl")
$SurfaceDescriptionInputs.VertexColor: output.VertexColor = input.color;
$SurfaceDescriptionInputs.FaceSign: output.FaceSign = input.isFrontFace;
$include("SharedCode.template.hlsl")
return output;
}
// existing HDRP code uses the combined function to go directly from packed to frag inputs
FragInputs UnpackVaryingsMeshToFragInputs(PackedVaryingsMeshToPS input)
{
VaryingsMeshToPS unpacked= UnpackVaryingsMeshToPS(input);
return BuildFragInputs(unpacked);
}
void BuildSurfaceData(FragInputs fragInputs, SurfaceDescription surfaceDescription, float3 V, out SurfaceData surfaceData)
{

//-------------------------------------------------------------------------------------
// Pass Includes
//-------------------------------------------------------------------------------------
${Includes}
$splice(Includes)
//-------------------------------------------------------------------------------------
// End Pass Includes
//-------------------------------------------------------------------------------------

104
com.unity.render-pipelines.high-definition/HDRP/Editor/ShaderGraph/HDSubShaderUtilities.cs


namespace UnityEditor.Experimental.Rendering.HDPipeline
{
public static class HDRPShaderStructs
internal static class HDRPShaderStructs
struct AttributesMesh
internal struct AttributesMesh
{
[Semantic("POSITION")] Vector3 positionOS;
[Semantic("NORMAL")][Optional] Vector3 normalOS;

[Semantic("COLOR")][Optional] Vector4 color;
};
struct VaryingsMeshToPS
[InterpolatorPack]
internal struct VaryingsMeshToPS
{
[Semantic("SV_Position")] Vector4 positionCS;
[Optional] Vector3 positionRWS;

};
};
struct VaryingsMeshToDS
[InterpolatorPack]
internal struct VaryingsMeshToDS
{
Vector3 positionRWS;
Vector3 normalWS;

};
};
struct FragInputs
internal struct FragInputs
{
public static Dependency[] dependencies = new Dependency[]
{

};
// this describes the input to the pixel shader graph eval
public struct SurfaceDescriptionInputs
internal struct SurfaceDescriptionInputs
{
[Optional] Vector3 ObjectSpaceNormal;
[Optional] Vector3 ViewSpaceNormal;

};
// this describes the input to the pixel shader graph eval
public struct VertexDescriptionInputs
internal struct VertexDescriptionInputs
{
[Optional] Vector3 ObjectSpaceNormal;
[Optional] Vector3 ViewSpaceNormal;

}
}
}
public static void Generate(
ShaderGenerator codeResult,
HashSet<string> activeFields)
{
// propagate requirements using dependencies
{
ShaderSpliceUtil.ApplyDependencies(
activeFields,
new List<Dependency[]>()
{
FragInputs.dependencies,
VaryingsMeshToPS.standardDependencies,
SurfaceDescriptionInputs.dependencies,
VertexDescriptionInputs.dependencies
});
}
// generate code based on requirements
ShaderSpliceUtil.BuildType(typeof(AttributesMesh), activeFields, codeResult);
ShaderSpliceUtil.BuildType(typeof(VaryingsMeshToPS), activeFields, codeResult);
ShaderSpliceUtil.BuildType(typeof(VaryingsMeshToDS), activeFields, codeResult);
ShaderSpliceUtil.BuildPackedType(typeof(VaryingsMeshToPS), activeFields, codeResult);
ShaderSpliceUtil.BuildPackedType(typeof(VaryingsMeshToDS), activeFields, codeResult);
}
};
public struct Pass

{
public static bool GenerateShaderPass(AbstractMaterialNode masterNode, Pass pass, GenerationMode mode, SurfaceMaterialOptions materialOptions, HashSet<string> activeFields, ShaderGenerator result, List<string> sourceAssetDependencyPaths)
{
var templateLocation = Path.Combine(Path.Combine(Path.Combine(HDUtils.GetHDRenderPipelinePath(), "Editor"), "ShaderGraph"), pass.TemplateName);
string templatePath = Path.Combine(Path.Combine(HDUtils.GetHDRenderPipelinePath(), "Editor"), "ShaderGraph");
string templateLocation = Path.Combine(templatePath, pass.TemplateName);
if (!File.Exists(templateLocation))
{
// TODO: produce error here

bool debugOutput = false;
if (sourceAssetDependencyPaths != null)
sourceAssetDependencyPaths.Add(templateLocation);
// grab all of the active nodes (for pixel and vertex graphs)
var vertexNodes = ListPool<INode>.Get();

HDRPShaderStructs.AddRequiredFields(pass.RequiredFields, activeFields);
// apply dependencies to the active fields, and build interpolators (TODO: split this function)
var packedInterpolatorCode = new ShaderGenerator();
HDRPShaderStructs.Generate(
packedInterpolatorCode,
activeFields);
// propagate active field requirements using dependencies
ShaderSpliceUtil.ApplyDependencies(
activeFields,
new List<Dependency[]>()
{
HDRPShaderStructs.FragInputs.dependencies,
HDRPShaderStructs.VaryingsMeshToPS.standardDependencies,
HDRPShaderStructs.SurfaceDescriptionInputs.dependencies,
HDRPShaderStructs.VertexDescriptionInputs.dependencies
});
// debug output all active fields
var interpolatorDefines = new ShaderGenerator();

// build the hash table of all named fragments TODO: could make this Dictionary<string, ShaderGenerator / string> ?
Dictionary<string, string> namedFragments = new Dictionary<string, string>();
namedFragments.Add("${Defines}", defines.GetShaderString(2, false));
namedFragments.Add("${Graph}", graph.GetShaderString(2, false));
namedFragments.Add("${LightMode}", pass.LightMode);
namedFragments.Add("${PassName}", pass.Name);
namedFragments.Add("${Includes}", shaderPassIncludes.GetShaderString(2, false));
namedFragments.Add("${InterpolatorPacking}", packedInterpolatorCode.GetShaderString(2, false));
namedFragments.Add("${Blending}", blendCode.ToString());
namedFragments.Add("${Culling}", cullCode.ToString());
namedFragments.Add("${ZTest}", zTestCode.ToString());
namedFragments.Add("${ZWrite}", zWriteCode.ToString());
namedFragments.Add("${Stencil}", stencilCode.ToString());
namedFragments.Add("${ColorMask}", colorMaskCode.ToString());
namedFragments.Add("${LOD}", materialOptions.lod.ToString());
namedFragments.Add("Defines", defines.GetShaderString(2, false));
namedFragments.Add("Graph", graph.GetShaderString(2, false));
namedFragments.Add("LightMode", pass.LightMode);
namedFragments.Add("PassName", pass.Name);
namedFragments.Add("Includes", shaderPassIncludes.GetShaderString(2, false));
namedFragments.Add("Blending", blendCode.ToString());
namedFragments.Add("Culling", cullCode.ToString());
namedFragments.Add("ZTest", zTestCode.ToString());
namedFragments.Add("ZWrite", zWriteCode.ToString());
namedFragments.Add("Stencil", stencilCode.ToString());
namedFragments.Add("ColorMask", colorMaskCode.ToString());
namedFragments.Add("LOD", materialOptions.lod.ToString());
// this is the format string for building the 'C# qualified assembly type names' for $buildType() commands
string buildTypeAssemblyNameFormat = "UnityEditor.Experimental.Rendering.HDPipeline.HDRPShaderStructs+{0}, " + typeof(HDSubShaderUtilities).Assembly.FullName.ToString();
// process the template to generate the shader code for this pass
ShaderSpliceUtil.TemplatePreprocessor templatePreprocessor =
new ShaderSpliceUtil.TemplatePreprocessor(activeFields, namedFragments, debugOutput, templatePath, sourceAssetDependencyPaths, buildTypeAssemblyNameFormat);
// process the template to generate the shader code for this pass TODO: could make this a shared function
string[] templateLines = File.ReadAllLines(templateLocation);
System.Text.StringBuilder builder = new System.Text.StringBuilder();
foreach (string line in templateLines)
{
ShaderSpliceUtil.PreprocessShaderCode(line, activeFields, namedFragments, builder, debugOutput);
}
templatePreprocessor.ProcessTemplateFile(templateLocation);
result.AddShaderChunk(builder.ToString(), false);
result.AddShaderChunk(templatePreprocessor.GetShaderCode().ToString(), false);
return true;
}

161
com.unity.render-pipelines.high-definition/HDRP/Editor/ShaderGraph/HDUnlitPassForward.template


Pass
{
// based on HDUnlitPassForward.template
Name "${PassName}"
Tags { "LightMode" = "${LightMode}" }
Name "$splice(PassName)"
Tags { "LightMode" = "$splice(LightMode)" }
${Blending}
${Culling}
${ZTest}
${ZWrite}
${Stencil}
${ColorMask}
$splice(Blending)
$splice(Culling)
$splice(ZTest)
$splice(ZWrite)
$splice(Stencil)
$splice(ColorMask)
//-------------------------------------------------------------------------------------
// End Render Modes
//-------------------------------------------------------------------------------------

#pragma target 4.5
#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch
//#pragma enable_d3d11_debug_symbols
#pragma target 4.5
#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch
//#pragma enable_d3d11_debug_symbols
//-------------------------------------------------------------------------------------
// Variant Definitions (active field translations to HDRP defines)

//-------------------------------------------------------------------------------------
// Defines
//-------------------------------------------------------------------------------------
${Defines}
$splice(Defines)
// this translates the new dependency tracker into the old preprocessor definitions for the existing HDRP shader code
$AttributesMesh.normalOS: #define ATTRIBUTES_NEED_NORMAL

//-------------------------------------------------------------------------------------
// Interpolator Packing And Struct Declarations
//-------------------------------------------------------------------------------------
${InterpolatorPacking}
$buildType(AttributesMesh)
$buildType(VaryingsMeshToPS)
$buildType(VaryingsMeshToDS)
//-------------------------------------------------------------------------------------
// End Interpolator Packing And Struct Declarations
//-------------------------------------------------------------------------------------

//-------------------------------------------------------------------------------------
${Graph}
$splice(Graph)
#ifdef HAVE_MESH_MODIFICATION
// TODO: we should share this between template files somehow
VertexDescriptionInputs AttributesMeshToVertexDescriptionInputs(AttributesMesh input)
{
VertexDescriptionInputs output;
ZERO_INITIALIZE(VertexDescriptionInputs, output);
$features.modifyMesh: $include("VertexAnimation.template.hlsl")
$VertexDescriptionInputs.ObjectSpaceNormal: output.ObjectSpaceNormal = input.normalOS;
$VertexDescriptionInputs.WorldSpaceNormal: output.WorldSpaceNormal = TransformObjectToWorldNormal(input.normalOS);
$VertexDescriptionInputs.ViewSpaceNormal: output.ViewSpaceNormal = TransformWorldToViewDir(output.WorldSpaceNormal);
$VertexDescriptionInputs.TangentSpaceNormal: output.TangentSpaceNormal = float3(0.0f, 0.0f, 1.0f);
$VertexDescriptionInputs.ObjectSpaceTangent: output.ObjectSpaceTangent = input.tangentOS;
$VertexDescriptionInputs.WorldSpaceTangent: output.WorldSpaceTangent = TransformObjectToWorldDir(input.tangentOS.xyz);
$VertexDescriptionInputs.ViewSpaceTangent: output.ViewSpaceTangent = TransformWorldToViewDir(output.WorldSpaceTangent);
$VertexDescriptionInputs.TangentSpaceTangent: output.TangentSpaceTangent = float3(1.0f, 0.0f, 0.0f);
$VertexDescriptionInputs.ObjectSpaceBiTangent: output.ObjectSpaceBiTangent = normalize(cross(input.normalOS, input.tangentOS) * (input.tangentOS.w > 0.0f ? 1.0f : -1.0f) * GetOddNegativeScale());
$VertexDescriptionInputs.WorldSpaceBiTangent: output.WorldSpaceBiTangent = TransformObjectToWorldDir(output.ObjectSpaceBiTangent);
$VertexDescriptionInputs.ViewSpaceBiTangent: output.ViewSpaceBiTangent = TransformWorldToViewDir(output.WorldSpaceBiTangent);
$VertexDescriptionInputs.TangentSpaceBiTangent: output.TangentSpaceBiTangent = float3(0.0f, 1.0f, 0.0f);
$VertexDescriptionInputs.ObjectSpacePosition: output.ObjectSpacePosition = input.positionOS;
$VertexDescriptionInputs.WorldSpacePosition: output.WorldSpacePosition = GetAbsolutePositionWS(TransformObjectToWorld(input.positionOS));
$VertexDescriptionInputs.ViewSpacePosition: output.ViewSpacePosition = TransformWorldToView(output.WorldSpacePosition);
$VertexDescriptionInputs.TangentSpacePosition: output.TangentSpacePosition = float3(0.0f, 0.0f, 0.0f);
$VertexDescriptionInputs.WorldSpaceViewDirection: output.WorldSpaceViewDirection = GetWorldSpaceNormalizeViewDir(output.WorldSpacePosition);
$VertexDescriptionInputs.ObjectSpaceViewDirection: output.ObjectSpaceViewDirection = TransformWorldToObjectDir(output.WorldSpaceViewDirection);
$VertexDescriptionInputs.ViewSpaceViewDirection: output.ViewSpaceViewDirection = TransformWorldToViewDir(output.WorldSpaceViewDirection);
$VertexDescriptionInputs.TangentSpaceViewDirection: float3x3 tangentSpaceTransform = float3x3(output.WorldSpaceTangent,output.WorldSpaceBiTangent,output.WorldSpaceNormal);
$VertexDescriptionInputs.TangentSpaceViewDirection: output.TangentSpaceViewDirection = mul(tangentSpaceTransform, output.WorldSpaceViewDirection);
$VertexDescriptionInputs.ScreenPosition: output.ScreenPosition = ComputeScreenPos(TransformWorldToHClip(output.WorldSpacePosition), _ProjectionParams.x);
$VertexDescriptionInputs.uv0: output.uv0 = float4(input.uv0, 0.0f, 0.0f);
$VertexDescriptionInputs.uv1: output.uv1 = float4(input.uv1, 0.0f, 0.0f);
$VertexDescriptionInputs.uv2: output.uv2 = float4(input.uv2, 0.0f, 0.0f);
$VertexDescriptionInputs.uv3: output.uv3 = float4(input.uv3, 0.0f, 0.0f);
$VertexDescriptionInputs.VertexColor: output.VertexColor = input.color;
$include("SharedCode.template.hlsl")
return output;
}
AttributesMesh ApplyMeshModification(AttributesMesh input)
{
// build graph inputs
VertexDescriptionInputs vertexDescriptionInputs = AttributesMeshToVertexDescriptionInputs(input);
// evaluate vertex graph
VertexDescription vertexDescription = VertexDescriptionFunction(vertexDescriptionInputs);
// copy graph output to the results
$VertexDescription.Position: input.positionOS = vertexDescription.Position;
return input;
}
#endif // HAVE_MESH_MODIFICATION
// TODO: Do we want to build include functionality for sharing these preprocessed functions across templates?
FragInputs BuildFragInputs(VaryingsMeshToPS input)
{
FragInputs output;
ZERO_INITIALIZE(FragInputs, output);
// Init to some default value to make the computer quiet (else it output 'divide by zero' warning even if value is not used).
// TODO: this is a really poor workaround, but the variable is used in a bunch of places
// to compute normals which are then passed on elsewhere to compute other values...
output.worldToTangent = k_identity3x3;
output.positionSS = input.positionCS; // input.positionCS is SV_Position
$FragInputs.positionRWS: output.positionRWS = input.positionRWS;
$FragInputs.worldToTangent: output.worldToTangent = BuildWorldToTangent(input.tangentWS, input.normalWS);
$FragInputs.texCoord0: output.texCoord0 = input.texCoord0;
$FragInputs.texCoord1: output.texCoord1 = input.texCoord1;
$FragInputs.texCoord2: output.texCoord2 = input.texCoord2;
$FragInputs.texCoord3: output.texCoord3 = input.texCoord3;
$FragInputs.color: output.color = input.color;
#if SHADER_STAGE_FRAGMENT
$FragInputs.isFrontFace: output.isFrontFace = IS_FRONT_VFACE(input.cullFace, true, false); // TODO: SHADER_STAGE_FRAGMENT only
$FragInputs.isFrontFace: // Handle handness of the view matrix (In Unity view matrix default to a determinant of -1)
$FragInputs.isFrontFace: // when we render a cubemap the view matrix handness is flipped (due to convention used for cubemap) we have a determinant of +1
$FragInputs.isFrontFace: output.isFrontFace = _DetViewMatrix < 0.0 ? output.isFrontFace : !output.isFrontFace;
#endif // SHADER_STAGE_FRAGMENT
return output;
}
SurfaceDescriptionInputs FragInputsToSurfaceDescriptionInputs(FragInputs input, float3 viewWS)
{
SurfaceDescriptionInputs output;
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
$SurfaceDescriptionInputs.WorldSpaceNormal: output.WorldSpaceNormal = normalize(input.worldToTangent[2].xyz);
$SurfaceDescriptionInputs.ObjectSpaceNormal: output.ObjectSpaceNormal = mul(output.WorldSpaceNormal, (float3x3) UNITY_MATRIX_M); // transposed multiplication by inverse matrix to handle normal scale
$SurfaceDescriptionInputs.ViewSpaceNormal: output.ViewSpaceNormal = mul(output.WorldSpaceNormal, (float3x3) UNITY_MATRIX_I_V); // transposed multiplication by inverse matrix to handle normal scale
$SurfaceDescriptionInputs.TangentSpaceNormal: output.TangentSpaceNormal = float3(0.0f, 0.0f, 1.0f);
$SurfaceDescriptionInputs.WorldSpaceTangent: output.WorldSpaceTangent = input.worldToTangent[0].xyz;
$SurfaceDescriptionInputs.ObjectSpaceTangent: output.ObjectSpaceTangent = TransformWorldToObjectDir(output.WorldSpaceTangent);
$SurfaceDescriptionInputs.ViewSpaceTangent: output.ViewSpaceTangent = TransformWorldToViewDir(output.WorldSpaceTangent);
$SurfaceDescriptionInputs.TangentSpaceTangent: output.TangentSpaceTangent = float3(1.0f, 0.0f, 0.0f);
$SurfaceDescriptionInputs.WorldSpaceBiTangent: output.WorldSpaceBiTangent = input.worldToTangent[1].xyz;
$SurfaceDescriptionInputs.ObjectSpaceBiTangent: output.ObjectSpaceBiTangent = TransformWorldToObjectDir(output.WorldSpaceBiTangent);
$SurfaceDescriptionInputs.ViewSpaceBiTangent: output.ViewSpaceBiTangent = TransformWorldToViewDir(output.WorldSpaceBiTangent);
$SurfaceDescriptionInputs.TangentSpaceBiTangent: output.TangentSpaceBiTangent = float3(0.0f, 1.0f, 0.0f);
$SurfaceDescriptionInputs.WorldSpaceViewDirection: output.WorldSpaceViewDirection = normalize(viewWS);
$SurfaceDescriptionInputs.ObjectSpaceViewDirection: output.ObjectSpaceViewDirection = TransformWorldToObjectDir(output.WorldSpaceViewDirection);
$SurfaceDescriptionInputs.ViewSpaceViewDirection: output.ViewSpaceViewDirection = TransformWorldToViewDir(output.WorldSpaceViewDirection);
$SurfaceDescriptionInputs.TangentSpaceViewDirection: float3x3 tangentSpaceTransform = float3x3(output.WorldSpaceTangent,output.WorldSpaceBiTangent,output.WorldSpaceNormal);
$SurfaceDescriptionInputs.TangentSpaceViewDirection: output.TangentSpaceViewDirection = mul(tangentSpaceTransform, output.WorldSpaceViewDirection);
$SurfaceDescriptionInputs.WorldSpacePosition: output.WorldSpacePosition = GetAbsolutePositionWS(input.positionRWS);
$SurfaceDescriptionInputs.ObjectSpacePosition: output.ObjectSpacePosition = TransformWorldToObject(input.positionRWS);
$SurfaceDescriptionInputs.ViewSpacePosition: float4 posViewSpace = TransformWorldToView(input.positionRWS);
$SurfaceDescriptionInputs.ViewSpacePosition: output.ViewSpacePosition = posViewSpace.xyz / posViewSpace.w;
$SurfaceDescriptionInputs.TangentSpacePosition: output.TangentSpacePosition = float3(0.0f, 0.0f, 0.0f);
$SurfaceDescriptionInputs.ScreenPosition: output.ScreenPosition = ComputeScreenPos(TransformWorldToHClip(input.positionRWS), _ProjectionParams.x);
$SurfaceDescriptionInputs.uv0: output.uv0 = float4(input.texCoord0, 0.0f, 0.0f);
$SurfaceDescriptionInputs.uv1: output.uv1 = float4(input.texCoord1, 0.0f, 0.0f);
$SurfaceDescriptionInputs.uv2: output.uv2 = float4(input.texCoord2, 0.0f, 0.0f);
$SurfaceDescriptionInputs.uv3: output.uv3 = float4(input.texCoord3, 0.0f, 0.0f);
$SurfaceDescriptionInputs.VertexColor: output.VertexColor = input.color;
$SurfaceDescriptionInputs.FaceSign: output.FaceSign = input.isFrontFace;
return output;
}
// existing HDRP code uses the combined function to go directly from packed to frag inputs
FragInputs UnpackVaryingsMeshToFragInputs(PackedVaryingsMeshToPS input)
{
VaryingsMeshToPS unpacked= UnpackVaryingsMeshToPS(input);
return BuildFragInputs(unpacked);
}
void BuildSurfaceData(FragInputs fragInputs, SurfaceDescription surfaceDescription, float3 V, out SurfaceData surfaceData)
{

//-------------------------------------------------------------------------------------
// Pass Includes
//-------------------------------------------------------------------------------------
${Includes}
$splice(Includes)
//-------------------------------------------------------------------------------------
// End Pass Includes
//-------------------------------------------------------------------------------------

3
com.unity.render-pipelines.high-definition/HDRP/Lighting/Volumetrics/DensityVolume.cs


{
float animationTime = animate ? time : 0.0f;
volumeScrollingAmount = (textureScrollingSpeed * animationTime);
// Switch from right-handed to left-handed coordinate system.
volumeScrollingAmount.x = -volumeScrollingAmount.x;
volumeScrollingAmount.y = -volumeScrollingAmount.y;
}
}

2
com.unity.render-pipelines.high-definition/HDRP/Lighting/Volumetrics/DensityVolumeManager.cs


}
}
public void TriggerVolumeAtlasRefresh()
private void TriggerVolumeAtlasRefresh()
{
atlasNeedsRefresh = true;
}

13
com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/HDRenderPipeline.cs


public void PushColorPickerDebugTexture(CommandBuffer cmd, RTHandleSystem.RTHandle textureID, HDCamera hdCamera)
{
if (m_CurrentDebugDisplaySettings.colorPickerDebugSettings.colorPickerMode != ColorPickerDebugMode.None || m_DebugDisplaySettings.falseColorDebugSettings.falseColor)
if (m_CurrentDebugDisplaySettings.colorPickerDebugSettings.colorPickerMode != ColorPickerDebugMode.None || m_DebugDisplaySettings.falseColorDebugSettings.falseColor || m_DebugDisplaySettings.lightingDebugSettings.debugLightingMode == DebugLightingMode.LuminanceMeter)
{
using (new ProfilingSample(cmd, "Push To Color Picker"))
{

// TODO TEMP: Not sure I want to keep this special case. Gotta see how to get rid of it (not sure it will work correctly for non-full viewports.
public void PushColorPickerDebugTexture(HDCamera hdCamera, CommandBuffer cmd, RenderTargetIdentifier textureID)
{
if (m_CurrentDebugDisplaySettings.colorPickerDebugSettings.colorPickerMode != ColorPickerDebugMode.None || m_DebugDisplaySettings.falseColorDebugSettings.falseColor)
if (m_CurrentDebugDisplaySettings.colorPickerDebugSettings.colorPickerMode != ColorPickerDebugMode.None || m_DebugDisplaySettings.falseColorDebugSettings.falseColor || m_DebugDisplaySettings.lightingDebugSettings.debugLightingMode == DebugLightingMode.LuminanceMeter)
{
using (new ProfilingSample(cmd, "Push To Color Picker"))
{

DecalSystem.instance.RenderDebugOverlay(hdCamera, cmd, m_CurrentDebugDisplaySettings, ref x, ref y, overlaySize, hdCamera.actualWidth);
if (m_CurrentDebugDisplaySettings.colorPickerDebugSettings.colorPickerMode != ColorPickerDebugMode.None || m_CurrentDebugDisplaySettings.falseColorDebugSettings.falseColor)
if (m_CurrentDebugDisplaySettings.colorPickerDebugSettings.colorPickerMode != ColorPickerDebugMode.None || m_CurrentDebugDisplaySettings.falseColorDebugSettings.falseColor || m_CurrentDebugDisplaySettings.lightingDebugSettings.debugLightingMode == DebugLightingMode.LuminanceMeter)
{
ColorPickerDebugSettings colorPickerDebugSettings = m_CurrentDebugDisplaySettings.colorPickerDebugSettings;
FalseColorDebugSettings falseColorDebugSettings = m_CurrentDebugDisplaySettings.falseColorDebugSettings;

using (new ProfilingSample(cmd, "Clear HDR target", CustomSamplerId.ClearHDRTarget.GetSampler()))
{
if (hdCamera.clearColorMode == HDAdditionalCameraData.ClearColorMode.BackgroundColor ||
// If the luxmeter is enabled, the sky isn't rendered so we clear the background color
m_DebugDisplaySettings.lightingDebugSettings.debugLightingMode == DebugLightingMode.LuxMeter ||
// If we want the sky but the sky don't exist, still clear with background color
(hdCamera.clearColorMode == HDAdditionalCameraData.ClearColorMode.Sky && !m_SkyManager.IsVisualSkyValid()) ||
// Special handling for Preview we force to clear with background color (i.e black)

{
Color clearColor = hdCamera.backgroundColorHDR;
// We set the background color to black when the luxmeter is enabled to avoid picking the sky color
if (m_DebugDisplaySettings.lightingDebugSettings.debugLightingMode == DebugLightingMode.LuxMeter)
clearColor = Color.black;
HDUtils.SetRenderTarget(cmd, hdCamera, m_CameraColorBuffer, m_CameraDepthStencilBuffer, ClearFlag.Color, clearColor);
}
}

2
com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/HDUtils.cs


s_PropertyBlock.SetVector(HDShaderIDs._BlitScaleBias, scaleBiasTex);
s_PropertyBlock.SetVector(HDShaderIDs._BlitScaleBiasRt, scaleBiasRT);
s_PropertyBlock.SetFloat(HDShaderIDs._BlitMipLevel, mipLevelTex);
cmd.DrawProcedural(Matrix4x4.identity, GetBlitMaterial(), bilinear ? 2 : 3, MeshTopology.Quads, 4, 1, s_PropertyBlock);
cmd.DrawProcedural(Matrix4x4.identity, GetBlitMaterial(), bilinear ? 3 : 2, MeshTopology.Quads, 4, 1, s_PropertyBlock);
}
public static void BlitTexture(CommandBuffer cmd, RTHandleSystem.RTHandle source, RTHandleSystem.RTHandle destination, Vector4 scaleBias, float mipLevel, bool bilinear)

9
com.unity.render-pipelines.high-definition/HDRP/Sky/SkyRenderingContext.cs


m_BuiltinParameters.debugSettings = debugSettings;
skyContext.renderer.SetRenderTargets(m_BuiltinParameters);
// When rendering the visual sky for reflection probes, we need to remove the sun disk if skySettings.includeSunInBaking is false.
skyContext.renderer.RenderSky(m_BuiltinParameters, false, hdCamera.camera.cameraType != CameraType.Reflection || skyContext.skySettings.includeSunInBaking);
// If the luxmeter is enabled, we don't render the sky
if (debugSettings.lightingDebugSettings.debugLightingMode != DebugLightingMode.LuxMeter)
{
// When rendering the visual sky for reflection probes, we need to remove the sun disk if skySettings.includeSunInBaking is false.
skyContext.renderer.RenderSky(m_BuiltinParameters, false, hdCamera.camera.cameraType != CameraType.Reflection || skyContext.skySettings.includeSunInBaking);
}
}
}
}

7
com.unity.render-pipelines.lightweight/CHANGELOG.md


and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## [3.2.0-preview]
### Changed
- The UI for Lightweight asset has been updated with new categories. A more clean structure and foldouts has been added to keep things organized.
### Fixed
- Scriptable passes no longer have missing material references. Now they access cached materials in the renderer.(case 1061353)
- When you change a Shadow Cascade option in the Pipeline Asset, this no longer warns you that you've exceeded the array size for the _WorldToShadow property.
- Terrain shader optimizations.
## [3.1.0-preview]

18
com.unity.render-pipelines.lightweight/LWRP/DefaultRendererSetup.cs


[NonSerialized]
private bool m_Initialized = false;
private void Init(LightweightForwardRenderer renderer)
private void Init()
{
if (m_Initialized)
return;

m_LocalShadowPass = new LocalShadowsPass();
m_SetupForwardRenderingPass = new SetupForwardRenderingPass();
m_ScreenSpaceShadowResovePass = new ScreenSpaceShadowResolvePass(renderer.GetMaterial(MaterialHandles.ScrenSpaceShadow));
m_ScreenSpaceShadowResovePass = new ScreenSpaceShadowResolvePass();
m_RenderOpaqueForwardPass = new RenderOpaqueForwardPass(renderer.GetMaterial(MaterialHandles.Error));
m_RenderOpaqueForwardPass = new RenderOpaqueForwardPass();
m_CopyDepthPass = new CopyDepthPass(renderer.GetMaterial(MaterialHandles.DepthCopy));
m_CopyColorPass = new CopyColorPass(renderer.GetMaterial(MaterialHandles.Sampling));
m_RenderTransparentForwardPass = new RenderTransparentForwardPass(renderer.GetMaterial(MaterialHandles.Error));
m_CopyDepthPass = new CopyDepthPass();
m_CopyColorPass = new CopyColorPass();
m_RenderTransparentForwardPass = new RenderTransparentForwardPass();
m_FinalBlitPass = new FinalBlitPass(renderer.GetMaterial(MaterialHandles.Blit));
m_FinalBlitPass = new FinalBlitPass();
m_SceneViewDepthCopyPass = new SceneViewDepthCopyPass(renderer.GetMaterial(MaterialHandles.DepthCopy));
m_SceneViewDepthCopyPass = new SceneViewDepthCopyPass();
#endif
// RenderTexture format depends on camera and pipeline (HDR, non HDR, etc)

public void Setup(LightweightForwardRenderer renderer, ref ScriptableRenderContext context,
ref CullResults cullResults, ref RenderingData renderingData)
{
Init(renderer);
Init();
renderer.Clear();

130
com.unity.render-pipelines.lightweight/LWRP/Editor/LightweightPipelineAssetEditor.cs


[CustomEditor(typeof(LightweightPipelineAsset))]
public class LightweightPipelineAssetEditor : Editor
{
bool generalSettingsFoldout = false;
bool qualitySettingsFoldout = false;
bool shadowsSettingsFoldout = false;
public static GUIContent renderingLabel = new GUIContent("Rendering");
public static GUIContent qualityLabel = new GUIContent("Quality");
public static GUIContent capabilitiesLabel = new GUIContent("Capabilities");
public static GUIContent featuresLabel = new GUIContent("Shader Features");
public static GUIContent renderScaleLabel = new GUIContent("Render Scale", "Scales the camera render target allowing the game to render at a resolution different than native resolution. UI is always rendered at native resolution.");

SerializedProperty m_CustomShaderVariantStripSettingsProp;
SerializedProperty m_XRConfig;
public override void OnInspectorGUI()
{
serializedObject.Update();

DrawCapabilitiesSettings();
DrawShaderFeaturesSettings();
DrawQualitySettings();
DrawShadowSettings();
EditorGUILayout.PropertyField(m_XRConfig);
serializedObject.ApplyModifiedProperties();

{
{
m_RenderScale = serializedObject.FindProperty("m_RenderScale");
m_MaxPixelLights = serializedObject.FindProperty("m_MaxPixelLights");
m_SupportsVertexLightProp = serializedObject.FindProperty("m_SupportsVertexLight");

m_ShowOpaqueTextureScale.valueChanged.AddListener(Repaint);
m_ShowOpaqueTextureScale.value = m_RequireOpaqueTextureProp.boolValue;
m_XRConfig = serializedObject.FindProperty("m_SavedXRConfig");
}
void OnDisable()

m_ShowOpaqueTextureScale.target = m_RequireOpaqueTextureProp.boolValue;
}
void DrawGeneralSettings()
void DrawShaderFeaturesSettings()
EditorGUILayout.LabelField(Styles.generalSettingsLabel, EditorStyles.boldLabel);
EditorGUILayout.LabelField(Styles.featuresLabel, EditorStyles.boldLabel);
m_RenderScale.floatValue = EditorGUILayout.Slider(Styles.renderScaleLabel, m_RenderScale.floatValue, k_MinRenderScale, k_MaxRenderScale);
m_MaxPixelLights.intValue = EditorGUILayout.IntSlider(Styles.maxPixelLightsLabel, m_MaxPixelLights.intValue, 0, k_MaxSupportedPixelLights);
EditorGUILayout.PropertyField(m_SupportsVertexLightProp, Styles.enableVertexLightLabel);
EditorGUILayout.PropertyField(m_DirectionalShadowsSupportedProp, Styles.supportsDirectionalShadows);
EditorGUILayout.PropertyField(m_LocalShadowSupportedProp, Styles.supportsLocalShadows);
EditorGUI.BeginDisabledGroup(!(m_DirectionalShadowsSupportedProp.boolValue || m_LocalShadowSupportedProp.boolValue));
EditorGUILayout.PropertyField(m_SoftShadowsSupportedProp, Styles.supportsSoftShadows);
EditorGUI.EndDisabledGroup();
EditorGUI.indentLevel--;
EditorGUILayout.Space();
}
bool directionalShadows = m_DirectionalShadowsSupportedProp.boolValue;
if (directionalShadows)
void DrawGeneralSettings()
{
generalSettingsFoldout = EditorGUILayout.Foldout(generalSettingsFoldout, Styles.generalSettingsLabel, true);
if (generalSettingsFoldout)
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(m_SupportsDynamicBatching, Styles.dynamicBatching);
EditorGUILayout.PropertyField(m_RequireDepthTextureProp, Styles.requireDepthTexture);
EditorGUI.BeginDisabledGroup(!m_RequireDepthTextureProp.boolValue);
EditorGUILayout.PropertyField(m_RequireSoftParticlesProp, Styles.requireSoftParticles);
EditorGUI.EndDisabledGroup();
EditorGUILayout.PropertyField(m_RequireOpaqueTextureProp, Styles.requireOpaqueTexture);
EditorGUI.indentLevel++;
EditorGUI.BeginDisabledGroup(!m_RequireOpaqueTextureProp.boolValue);
EditorGUILayout.PropertyField(m_OpaqueDownsamplingProp, Styles.opaqueDownsampling);
EditorGUI.EndDisabledGroup();
EditorGUI.indentLevel--;
EditorGUI.indentLevel--;
EditorGUILayout.Space();
EditorGUILayout.Space();
}
}
void DrawQualitySettings()
{
qualitySettingsFoldout = EditorGUILayout.Foldout(qualitySettingsFoldout, Styles.qualityLabel, true);
if (qualitySettingsFoldout)
{
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(m_HDR, Styles.hdrContent);
EditorGUILayout.PropertyField(m_MSAA, Styles.msaaContent);
m_RenderScale.floatValue = EditorGUILayout.Slider(Styles.renderScaleLabel, m_RenderScale.floatValue, k_MinRenderScale, k_MaxRenderScale);
m_MaxPixelLights.intValue = EditorGUILayout.IntSlider(Styles.maxPixelLightsLabel, m_MaxPixelLights.intValue, 0, k_MaxSupportedPixelLights);
EditorGUI.indentLevel--;
EditorGUILayout.Space();
EditorGUILayout.Space();
}
}
void DrawShadowSettings()
{
shadowsSettingsFoldout = EditorGUILayout.Foldout(shadowsSettingsFoldout, Styles.shadowLabel, true);
if (shadowsSettingsFoldout)
{
// Directional Shadows
EditorGUI.BeginDisabledGroup(!m_DirectionalShadowsSupportedProp.boolValue);
EditorGUI.indentLevel++;
EditorGUILayout.LabelField(Styles.directionalShadowLabel);
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(m_DirectionalShadowAtlasResolutionProp, Styles.directionalShadowAtlasResolution);

EditorGUI.indentLevel--;
EditorGUILayout.Space();
}
EditorGUI.EndDisabledGroup();
bool localShadows = m_LocalShadowSupportedProp.boolValue;
if (localShadows)
{
// Local Shadows
EditorGUI.BeginDisabledGroup(!m_LocalShadowSupportedProp.boolValue);
EditorGUILayout.Space();
EditorGUI.indentLevel--;
EditorGUI.EndDisabledGroup();
if (directionalShadows || localShadows)
EditorGUILayout.PropertyField(m_SoftShadowsSupportedProp, Styles.supportsSoftShadows);
EditorGUI.indentLevel--;
EditorGUILayout.Space();
EditorGUILayout.Space();
void DrawCapabilitiesSettings()
{
EditorGUILayout.LabelField(Styles.capabilitiesLabel, EditorStyles.boldLabel);
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(m_SupportsVertexLightProp, Styles.enableVertexLightLabel);
EditorGUILayout.PropertyField(m_RequireDepthTextureProp, Styles.requireDepthTexture);
EditorGUI.BeginDisabledGroup(!m_RequireDepthTextureProp.boolValue);
EditorGUILayout.PropertyField(m_RequireSoftParticlesProp, Styles.requireSoftParticles);
EditorGUI.EndDisabledGroup();
EditorGUILayout.PropertyField(m_RequireOpaqueTextureProp, Styles.requireOpaqueTexture);
EditorGUI.indentLevel++;
EditorGUI.BeginDisabledGroup(!m_RequireOpaqueTextureProp.boolValue);
EditorGUILayout.PropertyField(m_OpaqueDownsamplingProp, Styles.opaqueDownsampling);
EditorGUI.EndDisabledGroup();
EditorGUI.indentLevel--;
EditorGUILayout.PropertyField(m_HDR, Styles.hdrContent);
EditorGUILayout.PropertyField(m_MSAA, Styles.msaaContent);
EditorGUILayout.PropertyField(m_SupportsDynamicBatching, Styles.dynamicBatching);
EditorGUILayout.PropertyField(m_DirectionalShadowsSupportedProp, Styles.supportsDirectionalShadows);
EditorGUILayout.PropertyField(m_LocalShadowSupportedProp, Styles.supportsLocalShadows);
EditorGUI.indentLevel--;
EditorGUILayout.Space();
EditorGUILayout.Space();
}
}
}

4
com.unity.render-pipelines.lightweight/LWRP/LightweightForwardRenderer.cs


using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using UnityEngine.Rendering;
using UnityEngine.Rendering.PostProcessing;

public void Execute(ref ScriptableRenderContext context, ref CullResults cullResults, ref RenderingData renderingData)
{
for (int i = 0; i < m_ActiveRenderPassQueue.Count; ++i)
m_ActiveRenderPassQueue[i].Execute(ref context, ref cullResults, ref renderingData);
m_ActiveRenderPassQueue[i].Execute(this, ref context, ref cullResults, ref renderingData);
public Material GetMaterial(MaterialHandles handle)
{
int handleID = (int)handle;

3
com.unity.render-pipelines.lightweight/LWRP/Passes/BeginXRRenderingPass.cs


{
public class BeginXRRenderingPass : ScriptableRenderPass
{
public override void Execute(ref ScriptableRenderContext context, ref CullResults cullResults,
public override void Execute(LightweightForwardRenderer renderer, ref ScriptableRenderContext context,
ref CullResults cullResults,
ref RenderingData renderingData)
{
Camera camera = renderingData.cameraData.camera;

10
com.unity.render-pipelines.lightweight/LWRP/Passes/CopyColorPass.cs


private RenderTargetHandle source { get; set; }
private RenderTargetHandle destination { get; set; }
private Material samplingMaterial { get; set; }
public CopyColorPass(Material samplingMaterial)
public CopyColorPass()
this.samplingMaterial = samplingMaterial;
m_SampleOffsetShaderHandle = Shader.PropertyToID("_SampleOffset");
}

this.destination = destination;
}
public override void Execute(ref ScriptableRenderContext context,
public override void Execute(LightweightForwardRenderer renderer, ref ScriptableRenderContext context,
ref CullResults cullResults,
ref RenderingData renderingData)
{

cmd.Blit(colorRT, opaqueColorRT);
break;
case Downsampling._4xBox:
Material samplingMaterial = renderer.GetMaterial(MaterialHandles.Sampling);
samplingMaterial.SetFloat(m_SampleOffsetShaderHandle, 2);
cmd.Blit(colorRT, opaqueColorRT, samplingMaterial, 0);
break;

}
}
}
}

12
com.unity.render-pipelines.lightweight/LWRP/Passes/CopyDepthPass.cs


{
private RenderTargetHandle source { get; set; }
private RenderTargetHandle destination { get; set; }
private Material depthCopyMaterial { get; set; }
public CopyDepthPass(Material depthCopyMaterial)
{
this.depthCopyMaterial = depthCopyMaterial;
}
const string k_DepthCopyTag = "Depth Copy";
public void Setup(RenderTargetHandle source, RenderTargetHandle destination)
{

public override void Execute(ref ScriptableRenderContext context,
public override void Execute(LightweightForwardRenderer renderer, ref ScriptableRenderContext context,
CommandBuffer cmd = CommandBufferPool.Get("Depth Copy");
CommandBuffer cmd = CommandBufferPool.Get(k_DepthCopyTag);
Material depthCopyMaterial = renderer.GetMaterial(MaterialHandles.DepthCopy);
RenderTextureDescriptor descriptor = LightweightForwardRenderer.CreateRTDesc(ref renderingData.cameraData);
descriptor.colorFormat = RenderTextureFormat.Depth;

2
com.unity.render-pipelines.lightweight/LWRP/Passes/CreateLightweightRenderTexturesPass.cs


descriptor = baseDescriptor;
}
public override void Execute(ref ScriptableRenderContext context,
public override void Execute(LightweightForwardRenderer renderer, ref ScriptableRenderContext context,
ref CullResults cullResults,
ref RenderingData renderingData)
{

2
com.unity.render-pipelines.lightweight/LWRP/Passes/DepthOnlyPass.cs


};
}
public override void Execute(ref ScriptableRenderContext context,
public override void Execute(LightweightForwardRenderer renderer, ref ScriptableRenderContext context,
ref CullResults cullResults,
ref RenderingData renderingData)
{

7
com.unity.render-pipelines.lightweight/LWRP/Passes/DirectionalShadowsPass.cs


this.destination = destination;
}
public override void Execute(ref ScriptableRenderContext context,
public override void Execute(LightweightForwardRenderer renderer, ref ScriptableRenderContext context,
ref CullResults cullResults,
ref RenderingData renderingData)
{

float invHalfShadowAtlasWidth = 0.5f * invShadowAtlasWidth;
float invHalfShadowAtlasHeight = 0.5f * invShadowAtlasHeight;
cmd.SetGlobalTexture(destination.id, m_DirectionalShadowmapTexture);
if (shadowData.directionalLightCascadeCount > 1)
cmd.SetGlobalMatrixArray(DirectionalShadowConstantBuffer._WorldToShadow, m_DirectionalShadowMatrices);
else
cmd.SetGlobalMatrix(DirectionalShadowConstantBuffer._WorldToShadow, m_DirectionalShadowMatrices[0]);
cmd.SetGlobalMatrixArray(DirectionalShadowConstantBuffer._WorldToShadow, m_DirectionalShadowMatrices);
cmd.SetGlobalVector(DirectionalShadowConstantBuffer._ShadowData, new Vector4(light.shadowStrength, 0.0f, 0.0f, 0.0f));
cmd.SetGlobalVector(DirectionalShadowConstantBuffer._DirShadowSplitSpheres0, m_CascadeSplitDistances[0]);
cmd.SetGlobalVector(DirectionalShadowConstantBuffer._DirShadowSplitSpheres1, m_CascadeSplitDistances[1]);

2
com.unity.render-pipelines.lightweight/LWRP/Passes/DrawSkyboxPass.cs


{
public class DrawSkyboxPass : ScriptableRenderPass
{
public override void Execute(ref ScriptableRenderContext context,
public override void Execute(LightweightForwardRenderer renderer, ref ScriptableRenderContext context,
ref CullResults cullResults,
ref RenderingData renderingData)
{

2
com.unity.render-pipelines.lightweight/LWRP/Passes/EndXRRenderingPass.cs


{
public class EndXRRenderingPass : ScriptableRenderPass
{
public override void Execute(ref ScriptableRenderContext context,
public override void Execute(LightweightForwardRenderer renderer, ref ScriptableRenderContext context,
ref CullResults cullResults,
ref RenderingData renderingData)
{

16
com.unity.render-pipelines.lightweight/LWRP/Passes/FinalBlitPass.cs


{
public class FinalBlitPass : ScriptableRenderPass
{
const string k_FinalBlitTag = "Final Blit Pass";
private Material blitMaterial { get; set; }
public FinalBlitPass(Material blitMaterial)
{
this.blitMaterial = blitMaterial;
}
public void Setup(RenderTextureDescriptor baseDescriptor, RenderTargetHandle colorAttachmentHandle)
{
this.colorAttachmentHandle = colorAttachmentHandle;

public override void Execute(ref ScriptableRenderContext context,
public override void Execute(LightweightForwardRenderer renderer, ref ScriptableRenderContext context,
Material material = renderingData.cameraData.isStereoEnabled ? null : blitMaterial;
Material material = renderingData.cameraData.isStereoEnabled ? null : renderer.GetMaterial(MaterialHandles.Blit);
CommandBuffer cmd = CommandBufferPool.Get("Final Blit Pass");
CommandBuffer cmd = CommandBufferPool.Get(k_FinalBlitTag);
cmd.SetGlobalTexture("_BlitTex", sourceRT);
// We need to handle viewport on a RT. We do it by rendering a fullscreen quad + viewport

11
com.unity.render-pipelines.lightweight/LWRP/Passes/LightweightForwardPass.cs


private RenderTargetHandle colorAttachmentHandle { get; set; }
private RenderTargetHandle depthAttachmentHandle { get; set; }
private RenderTextureDescriptor descriptor { get; set; }
private Material errorMaterial { get; set; }
const string k_SwitchRTs = "Switch RT";
protected LightweightForwardPass(Material errorMaterial)
protected LightweightForwardPass()
{
m_LegacyShaderPassNames = new List<ShaderPassName>();
m_LegacyShaderPassNames.Add(new ShaderPassName("Always"));

m_LegacyShaderPassNames.Add(new ShaderPassName("VertexLMRGBM"));
m_LegacyShaderPassNames.Add(new ShaderPassName("VertexLM"));
this.errorMaterial = errorMaterial;
RegisterShaderPassName("LightweightForward");
RegisterShaderPassName("SRPDefaultUnlit");

}
[Conditional("DEVELOPMENT_BUILD"), Conditional("UNITY_EDITOR")]
protected void RenderObjectsWithError(ref ScriptableRenderContext context, ref CullResults cullResults, Camera camera, FilterRenderersSettings filterSettings, SortFlags sortFlags)
protected void RenderObjectsWithError(LightweightForwardRenderer renderer, ref ScriptableRenderContext context, ref CullResults cullResults, Camera camera, FilterRenderersSettings filterSettings, SortFlags sortFlags)
Material errorMaterial = renderer.GetMaterial(MaterialHandles.Error);
if (errorMaterial != null)
{
DrawRendererSettings errorSettings = new DrawRendererSettings(camera, m_LegacyShaderPassNames[0]);

4
com.unity.render-pipelines.lightweight/LWRP/Passes/LocalShadowsPass.cs


using System;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine.Rendering;
namespace UnityEngine.Experimental.Rendering.LightweightPipeline

}
}
public override void Execute(ref ScriptableRenderContext context, ref CullResults cullResults,
public override void Execute(LightweightForwardRenderer renderer, ref ScriptableRenderContext context,
ref CullResults cullResults,
ref RenderingData renderingData)
{
if (renderingData.shadowData.renderLocalShadows)

3
com.unity.render-pipelines.lightweight/LWRP/Passes/OpaquePostProcessPass.cs


descriptor = baseDescriptor;
}
public override void Execute(ref ScriptableRenderContext context, ref CullResults cullResults,
public override void Execute(LightweightForwardRenderer renderer, ref ScriptableRenderContext context,
ref CullResults cullResults,
ref RenderingData renderingData)
{
CommandBuffer cmd = CommandBufferPool.Get("Render Opaque PostProcess Effects");

9
com.unity.render-pipelines.lightweight/LWRP/Passes/RenderOpaqueForwardPass.cs


const string k_RenderOpaquesTag = "Render Opaques";
public FilterRenderersSettings opaqueFilterSettings { get; private set; }
public RenderOpaqueForwardPass(Material errorMaterial) : base(errorMaterial)
public RenderOpaqueForwardPass()
{
opaqueFilterSettings = new FilterRenderersSettings(true)
{

public override void Execute(ref ScriptableRenderContext context,
public override void Execute(LightweightForwardRenderer renderer, ref ScriptableRenderContext context,
ref CullResults cullResults,
ref RenderingData renderingData)
{

SetRenderTarget(cmd, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.Store, clearFlag, CoreUtils.ConvertSRGBToActiveColorSpace(clearColor));
// TODO: We need a proper way to handle multiple camera/ camera stack. Issue is: multiple cameras can share a same RT

// cmd.SetViewport(camera.pixelRect);
Camera camera = renderingData.cameraData.camera;
var drawSettings = CreateDrawRendererSettings(camera, SortFlags.CommonOpaque, rendererConfiguration, dynamicBatching);

RenderObjectsWithError(ref context, ref cullResults, camera, opaqueFilterSettings, SortFlags.None);
RenderObjectsWithError(renderer, ref context, ref cullResults, camera, opaqueFilterSettings, SortFlags.None);
}
context.ExecuteCommandBuffer(cmd);
CommandBufferPool.Release(cmd);

7
com.unity.render-pipelines.lightweight/LWRP/Passes/RenderTransparentForwardPass.cs


private FilterRenderersSettings transparentFilterSettings { get; set; }
public RenderTransparentForwardPass(Material errorMaterial) : base(errorMaterial)
public RenderTransparentForwardPass()
public override void Execute(ref ScriptableRenderContext context,
public override void Execute(LightweightForwardRenderer renderer, ref ScriptableRenderContext context,
ref CullResults cullResults,
ref RenderingData renderingData)
{

context.DrawRenderers(cullResults.visibleRenderers, ref drawSettings, transparentFilterSettings);
// Render objects that did not match any shader pass with error shader
RenderObjectsWithError(ref context, ref cullResults, camera, transparentFilterSettings, SortFlags.None);
RenderObjectsWithError(renderer, ref context, ref cullResults, camera, transparentFilterSettings, SortFlags.None);
}
context.ExecuteCommandBuffer(cmd);

16
com.unity.render-pipelines.lightweight/LWRP/Passes/SceneViewDepthCopy.cs


{
public class SceneViewDepthCopyPass : ScriptableRenderPass
{
private RenderTargetHandle source { get; set; }
private Material depthCopyMaterial { get; set; }
const string k_CopyDepthToCameraTag = "Copy Depth to Camera";
public SceneViewDepthCopyPass(Material depthCopyMaterial)
{
this.depthCopyMaterial = depthCopyMaterial;
}
private RenderTargetHandle source { get; set; }
public void Setup(RenderTargetHandle source)
{

public override void Execute(ref ScriptableRenderContext context,
public override void Execute(LightweightForwardRenderer renderer, ref ScriptableRenderContext context,
CommandBuffer cmd = CommandBufferPool.Get("Copy Depth to Camera");
CommandBuffer cmd = CommandBufferPool.Get(k_CopyDepthToCameraTag);
cmd.Blit(source.Identifier(), BuiltinRenderTextureType.CameraTarget, depthCopyMaterial);
cmd.Blit(source.Identifier(), BuiltinRenderTextureType.CameraTarget, renderer.GetMaterial(MaterialHandles.DepthCopy));
}
}

11
com.unity.render-pipelines.lightweight/LWRP/Passes/ScreenSpaceShadowResolvePass.cs


public class ScreenSpaceShadowResolvePass : ScriptableRenderPass
{
RenderTextureFormat m_ColorFormat;
private Material screenSpaceShadowsMaterial { get; set; }
public ScreenSpaceShadowResolvePass(Material screenSpaceShadowsMaterial)
public ScreenSpaceShadowResolvePass()
this.screenSpaceShadowsMaterial = screenSpaceShadowsMaterial;
}
private RenderTargetHandle colorAttachmentHandle { get; set; }

descriptor = baseDescriptor;
}
public override void Execute(ref ScriptableRenderContext context, ref CullResults cullResults,
public override void Execute(LightweightForwardRenderer renderer, ref ScriptableRenderContext context,
ref CullResults cullResults,
ref RenderingData renderingData)
{
if (renderingData.shadowData.renderedDirectionalShadowQuality == LightShadows.None)

RenderTargetIdentifier screenSpaceOcclusionTexture = colorAttachmentHandle.Identifier();
SetRenderTarget(cmd, screenSpaceOcclusionTexture, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.Store,
ClearFlag.Color | ClearFlag.Depth, Color.white, descriptor.dimension);
cmd.Blit(screenSpaceOcclusionTexture, screenSpaceOcclusionTexture, screenSpaceShadowsMaterial);
cmd.Blit(screenSpaceOcclusionTexture, screenSpaceOcclusionTexture, renderer.GetMaterial(MaterialHandles.ScrenSpaceShadow));
if (renderingData.cameraData.isStereoEnabled)
{

2
com.unity.render-pipelines.lightweight/LWRP/Passes/ScriptableRenderPass.cs


public virtual void FrameCleanup(CommandBuffer cmd)
{}
public abstract void Execute(ref ScriptableRenderContext context,
public abstract void Execute(LightweightForwardRenderer renderer, ref ScriptableRenderContext context,
ref CullResults cullResults,
ref RenderingData renderingData);

3
com.unity.render-pipelines.lightweight/LWRP/Passes/SetupForwardRenderingPass.cs


{
public class SetupForwardRenderingPass : ScriptableRenderPass
{
public override void Execute(ref ScriptableRenderContext context, ref CullResults cullResults,
public override void Execute(LightweightForwardRenderer renderer, ref ScriptableRenderContext context,
ref CullResults cullResults,
ref RenderingData renderingData)
{
// SetupCameraProperties does the following:

2
com.unity.render-pipelines.lightweight/LWRP/Passes/SetupLightweightConstanstPass.cs


CoreUtils.SetKeyword(cmd, "SOFTPARTICLES_ON", cameraData.requiresSoftParticles);
}
public override void Execute(ref ScriptableRenderContext context,
public override void Execute(LightweightForwardRenderer renderer, ref ScriptableRenderContext context,
ref CullResults cullResults,
ref RenderingData renderingData)
{

2
com.unity.render-pipelines.lightweight/LWRP/Passes/TransparentPostProcessPass.cs


descriptor = baseDescriptor;
}
public override void Execute(ref ScriptableRenderContext context,
public override void Execute(LightweightForwardRenderer renderer, ref ScriptableRenderContext context,
ref CullResults cullResults,
ref RenderingData renderingData)
{

7
com.unity.render-pipelines.lightweight/LWRP/ShaderLibrary/Shadows.hlsl


// Last cascade is initialized with a no-op matrix. It always transforms
// shadow coord to half(0, 0, NEAR_PLANE). We use this trick to avoid
// branching since ComputeCascadeIndex can return cascade index = MAX_SHADOW_CASCADES
#ifdef _SHADOWS_CASCADE
#else
float4x4 _WorldToShadow;
#endif
float4 _DirShadowSplitSpheres0;
float4 _DirShadowSplitSpheres1;
float4 _DirShadowSplitSpheres2;

half ComputeCascadeIndex(float3 positionWS)
{
// TODO: profile if there's a performance improvement if we avoid indexing here
float3 fromCenter0 = positionWS - _DirShadowSplitSpheres0.xyz;
float3 fromCenter1 = positionWS - _DirShadowSplitSpheres1.xyz;
float3 fromCenter2 = positionWS - _DirShadowSplitSpheres2.xyz;

half cascadeIndex = ComputeCascadeIndex(positionWS);
return mul(_WorldToShadow[cascadeIndex], float4(positionWS, 1.0));
#else
return mul(_WorldToShadow, float4(positionWS, 1.0));
return mul(_WorldToShadow[0], float4(positionWS, 1.0));
#endif
}

92
com.unity.render-pipelines.lightweight/LWRP/ShaderLibrary/Terrain/LightweightPassLitTerrain.hlsl


float4 uvSplat01 : TEXCOORD0; // xy: splat0, zw: splat1
float4 uvSplat23 : TEXCOORD1; // xy: splat2, zw: splat3
float4 uvControlAndLM : TEXCOORD2; // xy: control, zw: lightmap
#if _TERRAIN_NORMAL_MAP
half4 normal : TEXCOORD3; // xyz: normal, w: viewDir.x
half4 tangent : TEXCOORD4; // xyz: tangent, w: viewDir.y
half4 binormal : TEXCOORD5; // xyz: binormal, w: viewDir.z
#else
#if _TERRAIN_NORMAL_MAP
half3 tangent : TEXCOORD4;
half3 binormal : TEXCOORD5;
half3 viewDir : TEXCOORD4;
half4 fogFactorAndVertexLight : TEXCOORD6; // x: fogFactor, yzw: vertex light
float3 positionWS : TEXCOORD7;
float4 shadowCoord : TEXCOORD8;

input.positionWS = IN.positionWS;
#ifdef _TERRAIN_NORMAL_MAP
input.normalWS = TangentToWorldNormal(normalTS, IN.tangent, IN.binormal, IN.normal);
half3 viewDir = half3(IN.normal.w, IN.tangent.w, IN.binormal.w);
input.normalWS = TangentToWorldNormal(normalTS, IN.tangent.xyz, IN.binormal.xyz, IN.normal.xyz);
input.normalWS = normalize(IN.normal);
half3 viewDir = IN.viewDir;
input.normalWS = FragmentNormalWS(IN.normal);
input.viewDirectionWS = SafeNormalize(GetCameraPositionWS() - IN.positionWS);
input.viewDirectionWS = FragmentViewDirWS(viewDir);
#ifdef _SHADOWS_ENABLED
input.shadowCoord = IN.shadowCoord;
#else

#endif
}
void SplatmapMix(VertexOutput IN, half4 defaultAlpha, out half4 splat_control, out half weight, out half4 mixedDiffuse, inout half3 mixedNormal)
void SplatmapMix(VertexOutput IN, half4 defaultAlpha, out half4 splatControl, out half weight, out half4 mixedDiffuse, inout half3 mixedNormal)
splat_control = SAMPLE_TEXTURE2D(_Control, sampler_Control, IN.uvControlAndLM.xy);
weight = dot(splat_control, 1);
splatControl = SAMPLE_TEXTURE2D(_Control, sampler_Control, IN.uvControlAndLM.xy);
weight = dot(splatControl, 1.0h);
clip(weight == 0.0f ? -1 : 1);
clip(weight == 0.0h ? -1.0h : 1.0h);
splat_control /= (weight + 1e-3f);
splatControl /= (weight + HALF_MIN);
mixedDiffuse = 0.0f;
mixedDiffuse += splat_control.r * SAMPLE_TEXTURE2D(_Splat0, sampler_Splat0, IN.uvSplat01.xy) * half4(1.0, 1.0, 1.0, defaultAlpha.r);
mixedDiffuse += splat_control.g * SAMPLE_TEXTURE2D(_Splat1, sampler_Splat0, IN.uvSplat01.zw) * half4(1.0, 1.0, 1.0, defaultAlpha.g);
mixedDiffuse += splat_control.b * SAMPLE_TEXTURE2D(_Splat2, sampler_Splat0, IN.uvSplat23.xy) * half4(1.0, 1.0, 1.0, defaultAlpha.b);
mixedDiffuse += splat_control.a * SAMPLE_TEXTURE2D(_Splat3, sampler_Splat0, IN.uvSplat23.zw) * half4(1.0, 1.0, 1.0, defaultAlpha.a);
half4 alpha = defaultAlpha * splatControl;
mixedDiffuse = 0.0h;
mixedDiffuse += SAMPLE_TEXTURE2D(_Splat0, sampler_Splat0, IN.uvSplat01.xy) * half4(splatControl.rrr, alpha.r);
mixedDiffuse += SAMPLE_TEXTURE2D(_Splat1, sampler_Splat0, IN.uvSplat01.zw) * half4(splatControl.ggg, alpha.g);
mixedDiffuse += SAMPLE_TEXTURE2D(_Splat2, sampler_Splat0, IN.uvSplat23.xy) * half4(splatControl.bbb, alpha.b);
mixedDiffuse += SAMPLE_TEXTURE2D(_Splat3, sampler_Splat0, IN.uvSplat23.zw) * half4(splatControl.aaa, alpha.a);
nrm += splat_control.r * SAMPLE_TEXTURE2D(_Normal0, sampler_Normal0, IN.uvSplat01.xy);
nrm += splat_control.g * SAMPLE_TEXTURE2D(_Normal1, sampler_Normal0, IN.uvSplat01.zw);
nrm += splat_control.b * SAMPLE_TEXTURE2D(_Normal2, sampler_Normal0, IN.uvSplat23.xy);
nrm += splat_control.a * SAMPLE_TEXTURE2D(_Normal3, sampler_Normal0, IN.uvSplat23.zw);
nrm += SAMPLE_TEXTURE2D(_Normal0, sampler_Normal0, IN.uvSplat01.xy) * splatControl.r;
nrm += SAMPLE_TEXTURE2D(_Normal1, sampler_Normal0, IN.uvSplat01.zw) * splatControl.g;
nrm += SAMPLE_TEXTURE2D(_Normal2, sampler_Normal0, IN.uvSplat23.xy) * splatControl.b;
nrm += SAMPLE_TEXTURE2D(_Normal3, sampler_Normal0, IN.uvSplat23.zw) * splatControl.a;
mixedNormal = half3(0, 0, 1);
mixedNormal = half3(0.0h, 0.0h, 1.0h);
#endif
}

#ifdef TERRAIN_SPLAT_ADDPASS
ApplyFogColor(color.rgb, half3(0,0,0), fogCoord);
#else
ApplyFog(color.rgb, fogCoord);
#endif
#ifdef TERRAIN_SPLAT_ADDPASS
ApplyFogColor(color.rgb, half3(0.0h, 0.0h, 0.0h), fogCoord);
#else
ApplyFog(color.rgb, fogCoord);
#endif
}
///////////////////////////////////////////////////////////////////////////////

o.uvControlAndLM.xy = TRANSFORM_TEX(v.texcoord, _Control);
o.uvControlAndLM.zw = v.texcoord1 * unity_LightmapST.xy + unity_LightmapST.zw;
half3 viewDir = VertexViewDirWS(GetCameraPositionWS() - positionWS.xyz);
OutputTangentToWorld(vertexTangent, v.normal, o.tangent, o.binormal, o.normal);
OutputTangentToWorld(vertexTangent, v.normal, o.tangent.xyz, o.binormal.xyz, o.normal.xyz);
o.normal.w = viewDir.x;
o.tangent.w = viewDir.y;
o.binormal.w = viewDir.z;
o.viewDir = viewDir;
#endif
o.fogFactorAndVertexLight.x = ComputeFogFactor(clipPos.z);
o.fogFactorAndVertexLight.yzw = VertexLighting(positionWS, o.normal);

#ifdef _SHADOWS_ENABLED
#if SHADOWS_SCREEN
o.shadowCoord = ComputeShadowCoord(o.clipPos);
#else
o.shadowCoord = TransformWorldToShadowCoord(positionWS);
#endif
#if SHADOWS_SCREEN
o.shadowCoord = ComputeShadowCoord(o.clipPos);
#else
o.shadowCoord = TransformWorldToShadowCoord(positionWS);
#endif
#endif
return o;

half4 SpatmapFragment(VertexOutput IN) : SV_TARGET
{
half4 splat_control;
half4 splatControl;
SplatmapMix(IN, defaultSmoothness, splat_control, weight, mixedDiffuse, normalTS);
SplatmapMix(IN, defaultSmoothness, splatControl, weight, mixedDiffuse, normalTS);
half metallic = dot(splat_control, half4(_Metallic0, _Metallic1, _Metallic2, _Metallic3));
half3 specular = half3(0, 0, 0);
half metallic = dot(splatControl, half4(_Metallic0, _Metallic1, _Metallic2, _Metallic3));
half3 specular = half3(0.0h, 0.0h, 0.0h);
half4 color = LightweightFragmentPBR(inputData, albedo, metallic, specular, smoothness, /* occlusion */ 1.0, /* emission */ half3(0, 0, 0), alpha);
half4 color = LightweightFragmentPBR(inputData, albedo, metallic, specular, smoothness, /* occlusion */ 1.0h, /* emission */ half3(0.0h, 0.0h, 0.0h), alpha);
return half4(color.rgb, 1);
return half4(color.rgb, 1.0h);
}
#endif // LIGHTWEIGHT_PASS_LIT_TERRAIN_INCLUDED

6
com.unity.shadergraph/Editor/Data/Implementation/NodeUtils.cs


if (nodeList.Contains(node))
return;
var ids = node.GetInputSlots<ISlot>().Select(x => x.id);
if (slotIds != null)
IEnumerable<int> ids;
if (slotIds == null)
ids = node.GetInputSlots<ISlot>().Select(x => x.id);
else
ids = node.GetInputSlots<ISlot>().Where(x => slotIds.Contains(x.id)).Select(x => x.id);
foreach (var slot in ids)

483
com.unity.shadergraph/Editor/Data/Util/GraphUtil.cs


}
};
[System.AttributeUsage(System.AttributeTargets.Struct)]
public class InterpolatorPack : System.Attribute
{
public InterpolatorPack()
{
}
}
// attribute used to flag a field as needing an HLSL semantic applied
// i.e. float3 position : POSITION;
// ^ semantic

}
result.Deindent();
result.AddShaderChunk("};");
object[] packAttributes = t.GetCustomAttributes(typeof(InterpolatorPack), false);
if (packAttributes.Length > 0)
{
BuildPackedType(t, activeFields, result);
}
}
public static void BuildPackedType(System.Type unpacked, HashSet<string> activeFields, ShaderGenerator result)

result.AddGenerator(unpacker);
}
// an easier to use version of substring Append() -- explicit inclusion on each end, and checks for positive length
private static void AppendSubstring(System.Text.StringBuilder target, string str, int start, bool includeStart, int end, bool includeEnd)
{
if (!includeStart)
{
start++;
}
if (!includeEnd)
{
end--;
}
int count = end - start + 1;
if (count > 0)
{
target.Append(str, start, count);
}
}
// returns the offset of the first non-whitespace character, in the range [start, end] inclusive ... will return end if none found
private static int SkipWhitespace(string str, int start, int end)
{

return index;
}
public static System.Text.StringBuilder PreprocessShaderCode(string code, HashSet<string> activeFields, Dictionary<string, string> namedFragments, System.Text.StringBuilder result, bool debugOutput)
public class TemplatePreprocessor
if (result == null)
// inputs
HashSet<string> activeFields;
Dictionary<string, string> namedFragments;
string templatePath;
bool debugOutput;
string buildTypeAssemblyNameFormat;
// intermediates
HashSet<string> includedFiles;
// outputs
ShaderStringBuilder result;
List<string> sourceAssetDependencyPaths;
public TemplatePreprocessor(HashSet<string> activeFields, Dictionary<string, string> namedFragments, bool debugOutput, string templatePath, List<string> sourceAssetDependencyPaths, string buildTypeAssemblyNameFormat, ShaderStringBuilder outShaderCodeResult = null)
{
this.activeFields = activeFields;
this.namedFragments = namedFragments;
this.debugOutput = debugOutput;
this.templatePath = templatePath;
this.sourceAssetDependencyPaths = sourceAssetDependencyPaths;
this.buildTypeAssemblyNameFormat = buildTypeAssemblyNameFormat;
this.result = outShaderCodeResult ?? new ShaderStringBuilder();
includedFiles = new HashSet<string>();
}
public ShaderStringBuilder GetShaderCode()
result = new System.Text.StringBuilder();
return result;
int cur = 0;
int end = code.Length;
bool skipEndln = false;
public void ProcessTemplateFile(string filePath)
{
if (File.Exists(filePath) &&
!includedFiles.Contains(filePath))
{
includedFiles.Add(filePath);
while (cur < end)
if (sourceAssetDependencyPaths != null)
sourceAssetDependencyPaths.Add(filePath);
string[] templateLines = File.ReadAllLines(filePath);
foreach (string line in templateLines)
{
ProcessTemplateLine(line, 0, line.Length);
}
}
}
private struct Token
int dollar = code.IndexOf('$', cur);
if (dollar < 0)
public string s;
public int start;
public int end;
public Token(string s, int start, int end)
// no escape sequence found -- just append the remaining part of the code verbatim
AppendSubstring(result, code, cur, true, end, false);
cur = end;
this.s = s;
this.start = start;
this.end = end;
else
public static Token Invalid()
// found $ escape sequence
return new Token(null, 0, 0);
}
// find the end of the line (or if none found, the end of the code)
int endln = code.IndexOf('\n', dollar + 1);
if (endln < 0)
public bool IsValid()
{
return (s != null);
}
public bool Is(string other)
{
int len = end - start;
return (other.Length == len) && (0 == string.Compare(s, start, other, 0, len));
}
public string GetString()
{
int len = end - start;
if (len > 0)
endln = end;
return s.Substring(start, end - start);
return null;
}
}
// see if the character after '$' is '{', which would indicate a named fragment splice
if ((dollar + 1 < endln) && (code[dollar + 1] == '{'))
public void ProcessTemplateLine(string line, int start, int end)
{
bool appendEndln = true;
int cur = start;
while (cur < end)
{
// find an escape code '$'
int dollar = line.IndexOf('$', cur, end - cur);
if (dollar < 0)
{
// no escape code found in the remaining code -- just append the rest verbatim
AppendSubstring(line, cur, true, end, false);
break;
}
else
// named fragment splice
// search for the '}' within the current line
int curlystart = dollar + 1;
int curlyend = -1;
if (endln > curlystart + 1)
// found $ escape sequence
Token command = ParseIdentifier(line, dollar+1, end);
if (!command.IsValid())
curlyend = code.IndexOf('}', curlystart + 1, endln - curlystart - 1);
Error("ERROR: $ must be followed by a command string (if, splice, or include)", line, dollar+1);
break;
int nameLength = curlyend - dollar + 1;
if ((curlyend < 0) || (nameLength <= 0))
else
// no } found, or zero length name
// append everything before the beginning of the escape sequence
AppendSubstring(result, code, cur, true, dollar, false);
if (curlyend < 0)
if (command.Is("include"))
result.Append("// ERROR: unterminated escape sequence ('${' and '}' must be matched)\n");
ProcessIncludeCommand(command, end);
break; // include command always ignores the rest of the line, error or not
else
else if (command.Is("splice"))
result.Append("// ERROR: name '${}' is empty\n");
if (!ProcessSpliceCommand(command, end, ref cur))
{
// error, skip the rest of the line
break;
}
// append the line (commented out) for context
result.Append("// ");
AppendSubstring(result, code, dollar, true, endln, false);
result.Append("\n");
}
else
{
// } found!
// ugh, this probably allocates memory -- wish we could do the name lookup direct from a substring
string name = code.Substring(dollar, nameLength);
// append everything before the beginning of the escape sequence
AppendSubstring(result, code, cur, true, dollar, false);
string fragment;
if ((namedFragments != null) && namedFragments.TryGetValue(name, out fragment))
else if (command.Is("buildType"))
// splice the fragment
result.Append(fragment);
// advance to just after the '}'
cur = curlyend + 1;
ProcessBuildTypeCommand(command, end);
break; // buildType command always ignores the rest of the line, error or not
// no named fragment found
result.AppendFormat("/* Could not find named fragment '{0}' */", name);
cur = curlyend + 1;
// let's see if it is a predicate
Token predicate = ParseUntil(line, dollar + 1, end, ':');
if (!predicate.IsValid())
{
Error("ERROR: unrecognized command: " + command.GetString(), line, command.start);
break;
}
else
{
if (!ProcessPredicate(predicate, end, ref cur, ref appendEndln))
{
break; // skip the rest of the line
}
}
}
if (appendEndln)
{
result.AppendNewLine();
}
}
private void ProcessIncludeCommand(Token includeCommand, int lineEnd)
{
if (Expect(includeCommand.s, includeCommand.end, '('))
{
Token param = ParseString(includeCommand.s, includeCommand.end + 1, lineEnd);
if (!param.IsValid())
{
Error("ERROR: $include expected a string file path parameter", includeCommand.s, includeCommand.end + 1);
}
// it's a predicate
// search for the colon within the current line
int colon = -1;
if (endln > dollar + 1)
var includeLocation = Path.Combine(templatePath, param.GetString());
if (!File.Exists(includeLocation))
{
Error("ERROR: $include cannot find file : " + includeLocation, includeCommand.s, param.start);
}
else
colon = code.IndexOf(':', dollar + 1, endln - dollar - 1);
// skip a line, just to be sure we've cleaned up the current line
result.AppendNewLine();
result.AppendLine("//-------------------------------------------------------------------------------------");
result.AppendLine("// TEMPLATE INCLUDE : " + param.GetString());
result.AppendLine("//-------------------------------------------------------------------------------------");
ProcessTemplateFile(includeLocation);
result.AppendNewLine();
result.AppendLine("//-------------------------------------------------------------------------------------");
result.AppendLine("// END TEMPLATE INCLUDE : " + param.GetString());
result.AppendLine("//-------------------------------------------------------------------------------------");
}
}
}
int predicateLength = colon - dollar - 1;
if ((colon < 0) || (predicateLength <= 0))
private bool ProcessSpliceCommand(Token spliceCommand, int lineEnd, ref int cur)
{
if (!Expect(spliceCommand.s, spliceCommand.end, '('))
{
return false;
}
else
{
Token param = ParseUntil(spliceCommand.s, spliceCommand.end + 1, lineEnd, ')');
if (!param.IsValid())
{
Error("ERROR: splice command is missing a ')'", spliceCommand.s, spliceCommand.start);
return false;
}
else
{
// append everything before the beginning of the escape sequence
AppendSubstring(spliceCommand.s, cur, true, spliceCommand.start-1, false);
// find the named fragment
string name = param.GetString(); // unfortunately this allocates a new string
string fragment;
if ((namedFragments != null) && namedFragments.TryGetValue(name, out fragment))
// no colon found... error! Spit out error and context
// splice the fragment
result.Append(fragment);
}
else
{
// no named fragment found
result.Append("/* WARNING: $splice Could not find named fragment '{0}' */", name);
}
// append everything before the beginning of the escape sequence
AppendSubstring(result, code, cur, true, dollar, false);
// advance to just after the ')' and continue parsing
cur = param.end + 1;
}
}
return true;
}
if (colon < 0)
{
result.Append("// ERROR: unterminated escape sequence ('$' and ':' must be matched)\n");
}
else
{
result.Append("// ERROR: predicate is zero length\n");
}
// append the line (commented out) for context
result.Append("// ");
AppendSubstring(result, code, dollar, true, endln, false);
private void ProcessBuildTypeCommand(Token command, int endLine)
{
if (Expect(command.s, command.end, '('))
{
Token param = ParseUntil(command.s, command.end + 1, endLine, ')');
if (!param.IsValid())
{
Error("ERROR: buildType command is missing a ')'", command.s, command.start);
}
else
{
string typeName = param.GetString();
string assemblyQualifiedTypeName = string.Format(buildTypeAssemblyNameFormat, typeName);
Type type = Type.GetType(assemblyQualifiedTypeName);
if (type == null)
{
Error("ERROR: buildType could not find type : " + typeName, command.s, param.start);
// colon found!
// ugh, this probably allocates memory -- wish we could do the field lookup direct from a substring
string predicate = code.Substring(dollar + 1, predicateLength);
int nonwhitespace = SkipWhitespace(code, colon + 1, endln);
if (activeFields.Contains(predicate))
{
// append everything before the beginning of the escape sequence
AppendSubstring(result, code, cur, true, dollar, false);
result.AppendLine("// Generated Type: " + typeName);
ShaderGenerator temp = new ShaderGenerator();
BuildType(type, activeFields, temp);
result.AppendLine(temp.GetShaderString(0, false));
}
}
}
}
private bool ProcessPredicate(Token predicate, int endLine, ref int cur, ref bool appendEndln)
{
// eval if(param)
string fieldName = predicate.GetString();
int nonwhitespace = SkipWhitespace(predicate.s, predicate.end + 1, endLine);
if (activeFields.Contains(fieldName))
{
// predicate is active
// append everything before the beginning of the escape sequence
AppendSubstring(predicate.s, cur, true, predicate.start-1, false);
// continue parsing the rest of the line, starting with the first nonwhitespace character
cur = nonwhitespace;
return true;
}
else
{
// predicate is not active
if (debugOutput)
{
// append everything before the beginning of the escape sequence
AppendSubstring(predicate.s, cur, true, predicate.start-1, false);
// append the rest of the line, commented out
result.Append("// ");
AppendSubstring(predicate.s, nonwhitespace, true, endLine, false);
}
else
{
// don't append anything
appendEndln = false;
}
return false;
}
}
// predicate is active, append the line
AppendSubstring(result, code, nonwhitespace, true, endln, false);
}
else
{
// predicate is not active
if (debugOutput)
{
// append everything before the beginning of the escape sequence
AppendSubstring(result, code, cur, true, dollar, false);
result.Append("// ");
AppendSubstring(result, code, nonwhitespace, true, endln, false);
}
else
{
skipEndln = true;
}
}
private Token ParseIdentifier(string code, int start, int end)
{
if (start < end)
{
char c = code[start];
if (Char.IsLetter(c) || (c == '_'))
{
int cur = start + 1;
while (cur < end)
{
c = code[cur];
if (!(Char.IsLetterOrDigit(c) || (c == '_')))
break;
cur++;
cur = endln + 1;
return new Token(code, start, cur);
return Token.Invalid();
if (!skipEndln)
private Token ParseString(string line, int start, int end)
result.AppendLine();
if (Expect(line, start, '"'))
{
return ParseUntil(line, start + 1, end, '"');
}
return Token.Invalid();
return result;
private Token ParseUntil(string line, int start, int end, char endChar)
{
int cur = start;
while (cur < end)
{
if (line[cur] == endChar)
{
return new Token(line, start, cur);
}
cur++;
}
return Token.Invalid();
}
private bool Expect(string line, int location, char expected)
{
if ((location < line.Length) && (line[location] == expected))
{
return true;
}
Error("Expected '" + expected + "'", line, location);
return false;
}
private void Error(string error, string line, int location)
{
// append the line for context
result.Append("\n");
result.Append("// ");
AppendSubstring(line, 0, true, line.Length, false);
result.Append("\n");
// append the location marker, and error description
result.Append("// ");
result.AppendSpaces(location);
result.Append("^ ");
result.Append(error);
result.Append("\n");
}
// an easier to use version of substring Append() -- explicit inclusion on each end, and checks for positive length
private void AppendSubstring(string str, int start, bool includeStart, int end, bool includeEnd)
{
if (!includeStart)
{
start++;
}
if (!includeEnd)
{
end--;
}
int count = end - start + 1;
if (count > 0)
{
result.Append(str, start, count);
}
}
}
public static void ApplyDependencies(HashSet<string> activeFields, List<Dependency[]> dependsList)

10
com.unity.shadergraph/Editor/Data/Util/ShaderStringBuilder.cs


m_StringBuilder.Append(value);
}
public void Append(string value, int start, int count)
{
m_StringBuilder.Append(value, start, count);
}
}
public void AppendSpaces(int count)
{
m_StringBuilder.Append(' ', count);
}
public void AppendIndentation()

1001
TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_PlanarReflectionVFace.unity
文件差异内容过多而无法显示
查看文件

7
TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_PlanarReflectionVFace.unity.meta


fileFormatVersion: 2
guid: d4d352e2cbfbfac4686e77b69fe84ec0
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling.meta


fileFormatVersion: 2
guid: cd6381d605cfab541bf5ab0fff797a51
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2207_ReflectionCullingStencil.meta


fileFormatVersion: 2
guid: d1fb0cb31241de446a46395469886d4b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

1001
TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2207_ReflectionProbeVFace.unity
文件差异内容过多而无法显示
查看文件

7
TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2207_ReflectionProbeVFace.unity.meta


fileFormatVersion: 2
guid: 4814073d6e6ec404bba1f26bec73307a
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

1001
TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2208_PlanarReflectionCullingStencil.unity
文件差异内容过多而无法显示
查看文件

7
TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2208_PlanarReflectionCullingStencil.unity.meta


fileFormatVersion: 2
guid: a550f264fed1623459f813b5001bea48
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

1001
TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2209_ReflectionProbeCullingStencil.unity
文件差异内容过多而无法显示
查看文件

7
TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2209_ReflectionProbeCullingStencil.unity.meta


fileFormatVersion: 2
guid: b8090c44833d0a842bcd90e27dc43b6b
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

1001
TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/2206_PlanarReflectionVFace.png
文件差异内容过多而无法显示
查看文件

88
TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/2206_PlanarReflectionVFace.png.meta


fileFormatVersion: 2
guid: 06c8481f47e2a8047b120d3db6296e76
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 7
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 1
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

1001
TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/2207_ReflectionProbeVFace.png
文件差异内容过多而无法显示
查看文件

88
TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/2207_ReflectionProbeVFace.png.meta


fileFormatVersion: 2
guid: 114312c6dcfc9aa40ad6548d7c490f63
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 7
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 1
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

1001
TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/2208_PlanarReflectionCullingStencil.png
文件差异内容过多而无法显示
查看文件

88
TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/2208_PlanarReflectionCullingStencil.png.meta


fileFormatVersion: 2
guid: 113c47e919e496b439b2d63cd955add2
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 7
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 1
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

1001
TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/2209_ReflectionProbeCullingStencil.png
文件差异内容过多而无法显示
查看文件

88
TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/2209_ReflectionProbeCullingStencil.png.meta


fileFormatVersion: 2
guid: 2d5b9c4a15002e443881edae1161815e
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 7
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 1
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

129
com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Volumetric/Texture3DCreationEditor.cs


///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// ///
/// MIT License ///
/// ///
/// Copyright (c) 2016 Rapha�l Ernaelsten (@RaphErnaelsten) ///
/// ///
/// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), ///
/// to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, ///
/// and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: ///
/// ///
/// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. ///
/// ///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ///
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ///
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS ///
/// IN THE SOFTWARE. ///
/// ///
/// PLEASE CONSIDER CREDITING AURA IN YOUR PROJECTS. IF RELEVANT, USE THE UNMODIFIED LOGO PROVIDED IN THE "LICENSE" FOLDER. ///
/// ///
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
using System;
using UnityEngine;
using System.Collections.Generic;
using UnityEngine.Experimental.Rendering;
using UnityEngine.Experimental.Rendering.HDPipeline;
namespace UnityEditor.Experimental.Rendering.HDPipeline
{
//This Editor window is a quick way to generate 3D Textures for the Volumetric system.
//It will take a sourceTexture and slice it up into tiles that will fill a 3D Texture
//The volumetric system has a hardcoded size of 32x32x32 volume texture atlas so this tool makes sure it fits that size.
public class Texture3DCreationEditor : EditorWindow
{
private Texture2D sourceTexture = null;
private string sourcePath = null;
private int tileSize = DensityVolumeManager.volumeTextureSize;
private int numXTiles
{
get { return sourceTexture != null ? sourceTexture.width / tileSize : 0; }
set {}
}
private int numYTiles
{
get { return sourceTexture != null ? sourceTexture.height / tileSize : 0; }
set {}
}
private bool validData
{
get { return numXTiles * numYTiles >= tileSize; }
set {}
}
[MenuItem("Window/Render Pipeline/Create 3D Texture")]
private static void Init()
{
Texture3DCreationEditor window = (Texture3DCreationEditor)EditorWindow.GetWindow(typeof(Texture3DCreationEditor));
window.titleContent.text = "Create Texture3D Asset";
window.Show();
}
private void OnGUI()
{
EditorGUILayout.BeginVertical(EditorStyles.miniButton);
GUILayout.Button(new GUIContent(" Create Texture3D Asset", ""), EditorStyles.centeredGreyMiniLabel);
EditorGUILayout.Separator();
EditorGUILayout.LabelField("Source Texture");
sourceTexture = (Texture2D)EditorGUILayout.ObjectField(sourceTexture, typeof(Texture2D), false);
EditorGUILayout.HelpBox(String.Format("Volumetric system requires textures of size {0}x{0}x{0} so please ensure the source texture is at least this many pixels.", tileSize), MessageType.Info);
EditorGUILayout.Separator();
if (sourceTexture != null)
{
sourcePath = AssetDatabase.GetAssetPath(sourceTexture);
if (validData)
{
if (GUILayout.Button(new GUIContent("Generate 3D Texture", ""), EditorStyles.toolbarButton))
{
Generate3DTexture();
}
}
else
{
EditorGUILayout.HelpBox("Invalid Source Texture: Source texture size is not enough to create " + tileSize + " depthSlices.", MessageType.Error);
}
}
EditorGUILayout.EndVertical();
}
private void Generate3DTexture()
{
Texture3D texture = new Texture3D(tileSize, tileSize, tileSize, sourceTexture.format, false);
texture.wrapMode = sourceTexture.wrapMode;
texture.wrapModeU = sourceTexture.wrapModeU;
texture.wrapModeV = sourceTexture.wrapModeV;
texture.wrapModeW = sourceTexture.wrapModeW;
texture.filterMode = sourceTexture.filterMode;
texture.mipMapBias = 0;
texture.anisoLevel = 0;
Color[] colorArray = new Color[0];
for (int i = numYTiles - 1; i >= 0; --i)
{
for (int j = 0; j < numXTiles; ++j)
{
Color[] texColor = sourceTexture.GetPixels(j * tileSize, i * tileSize, tileSize, tileSize);
Array.Resize(ref colorArray, texColor.Length + colorArray.Length);
Array.Copy(texColor, 0, colorArray, colorArray.Length - texColor.Length, texColor.Length);
}
}
texture.SetPixels(colorArray);
texture.Apply();
AssetDatabase.CreateAsset(texture, System.IO.Directory.GetParent(sourcePath) + "\\" + sourceTexture.name + "_Texture3D.asset");
}
}
}

71
com.unity.render-pipelines.high-definition/HDRP/Editor/ShaderGraph/SharedCode.template.hlsl


FragInputs BuildFragInputs(VaryingsMeshToPS input)
{
FragInputs output;
ZERO_INITIALIZE(FragInputs, output);
// Init to some default value to make the computer quiet (else it output 'divide by zero' warning even if value is not used).
// TODO: this is a really poor workaround, but the variable is used in a bunch of places
// to compute normals which are then passed on elsewhere to compute other values...
output.worldToTangent = k_identity3x3;
output.positionSS = input.positionCS; // input.positionCS is SV_Position
$FragInputs.positionRWS: output.positionRWS = input.positionRWS;
$FragInputs.worldToTangent: output.worldToTangent = BuildWorldToTangent(input.tangentWS, input.normalWS);
$FragInputs.texCoord0: output.texCoord0 = input.texCoord0;
$FragInputs.texCoord1: output.texCoord1 = input.texCoord1;
$FragInputs.texCoord2: output.texCoord2 = input.texCoord2;
$FragInputs.texCoord3: output.texCoord3 = input.texCoord3;
$FragInputs.color: output.color = input.color;
#if SHADER_STAGE_FRAGMENT
$FragInputs.isFrontFace: output.isFrontFace = IS_FRONT_VFACE(input.cullFace, true, false); // TODO: SHADER_STAGE_FRAGMENT only
$FragInputs.isFrontFace: // Handle handness of the view matrix (In Unity view matrix default to a determinant of -1)
$FragInputs.isFrontFace: // when we render a cubemap the view matrix handness is flipped (due to convention used for cubemap) we have a determinant of +1
$FragInputs.isFrontFace: output.isFrontFace = _DetViewMatrix < 0.0 ? output.isFrontFace : !output.isFrontFace;
#endif // SHADER_STAGE_FRAGMENT
return output;
}
SurfaceDescriptionInputs FragInputsToSurfaceDescriptionInputs(FragInputs input, float3 viewWS)
{
SurfaceDescriptionInputs output;
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
$SurfaceDescriptionInputs.WorldSpaceNormal: output.WorldSpaceNormal = normalize(input.worldToTangent[2].xyz);
$SurfaceDescriptionInputs.ObjectSpaceNormal: output.ObjectSpaceNormal = mul(output.WorldSpaceNormal, (float3x3) UNITY_MATRIX_M); // transposed multiplication by inverse matrix to handle normal scale
$SurfaceDescriptionInputs.ViewSpaceNormal: output.ViewSpaceNormal = mul(output.WorldSpaceNormal, (float3x3) UNITY_MATRIX_I_V); // transposed multiplication by inverse matrix to handle normal scale
$SurfaceDescriptionInputs.TangentSpaceNormal: output.TangentSpaceNormal = float3(0.0f, 0.0f, 1.0f);
$SurfaceDescriptionInputs.WorldSpaceTangent: output.WorldSpaceTangent = input.worldToTangent[0].xyz;
$SurfaceDescriptionInputs.ObjectSpaceTangent: output.ObjectSpaceTangent = TransformWorldToObjectDir(output.WorldSpaceTangent);
$SurfaceDescriptionInputs.ViewSpaceTangent: output.ViewSpaceTangent = TransformWorldToViewDir(output.WorldSpaceTangent);
$SurfaceDescriptionInputs.TangentSpaceTangent: output.TangentSpaceTangent = float3(1.0f, 0.0f, 0.0f);
$SurfaceDescriptionInputs.WorldSpaceBiTangent: output.WorldSpaceBiTangent = input.worldToTangent[1].xyz;
$SurfaceDescriptionInputs.ObjectSpaceBiTangent: output.ObjectSpaceBiTangent = TransformWorldToObjectDir(output.WorldSpaceBiTangent);
$SurfaceDescriptionInputs.ViewSpaceBiTangent: output.ViewSpaceBiTangent = TransformWorldToViewDir(output.WorldSpaceBiTangent);
$SurfaceDescriptionInputs.TangentSpaceBiTangent: output.TangentSpaceBiTangent = float3(0.0f, 1.0f, 0.0f);
$SurfaceDescriptionInputs.WorldSpaceViewDirection: output.WorldSpaceViewDirection = normalize(viewWS);
$SurfaceDescriptionInputs.ObjectSpaceViewDirection: output.ObjectSpaceViewDirection = TransformWorldToObjectDir(output.WorldSpaceViewDirection);
$SurfaceDescriptionInputs.ViewSpaceViewDirection: output.ViewSpaceViewDirection = TransformWorldToViewDir(output.WorldSpaceViewDirection);
$SurfaceDescriptionInputs.TangentSpaceViewDirection: float3x3 tangentSpaceTransform = float3x3(output.WorldSpaceTangent,output.WorldSpaceBiTangent,output.WorldSpaceNormal);
$SurfaceDescriptionInputs.TangentSpaceViewDirection: output.TangentSpaceViewDirection = mul(tangentSpaceTransform, output.WorldSpaceViewDirection);
$SurfaceDescriptionInputs.WorldSpacePosition: output.WorldSpacePosition = GetAbsolutePositionWS(input.positionRWS);
$SurfaceDescriptionInputs.ObjectSpacePosition: output.ObjectSpacePosition = TransformWorldToObject(input.positionRWS);
$SurfaceDescriptionInputs.ViewSpacePosition: output.ViewSpacePosition = TransformWorldToView(input.positionRWS);
$SurfaceDescriptionInputs.TangentSpacePosition: output.TangentSpacePosition = float3(0.0f, 0.0f, 0.0f);
$SurfaceDescriptionInputs.ScreenPosition: output.ScreenPosition = ComputeScreenPos(TransformWorldToHClip(input.positionRWS), _ProjectionParams.x);
$SurfaceDescriptionInputs.uv0: output.uv0 = float4(input.texCoord0, 0.0f, 0.0f);
$SurfaceDescriptionInputs.uv1: output.uv1 = float4(input.texCoord1, 0.0f, 0.0f);
$SurfaceDescriptionInputs.uv2: output.uv2 = float4(input.texCoord2, 0.0f, 0.0f);
$SurfaceDescriptionInputs.uv3: output.uv3 = float4(input.texCoord3, 0.0f, 0.0f);
$SurfaceDescriptionInputs.VertexColor: output.VertexColor = input.color;
$SurfaceDescriptionInputs.FaceSign: output.FaceSign = input.isFrontFace;
return output;
}
// existing HDRP code uses the combined function to go directly from packed to frag inputs
FragInputs UnpackVaryingsMeshToFragInputs(PackedVaryingsMeshToPS input)
{
VaryingsMeshToPS unpacked= UnpackVaryingsMeshToPS(input);
return BuildFragInputs(unpacked);
}

9
com.unity.render-pipelines.high-definition/HDRP/Editor/ShaderGraph/SharedCode.template.hlsl.meta


fileFormatVersion: 2
guid: 63ca087b7dde4344bafcf314b6a7df47
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

50
com.unity.render-pipelines.high-definition/HDRP/Editor/ShaderGraph/VertexAnimation.template.hlsl


VertexDescriptionInputs AttributesMeshToVertexDescriptionInputs(AttributesMesh input)
{
VertexDescriptionInputs output;
ZERO_INITIALIZE(VertexDescriptionInputs, output);
$VertexDescriptionInputs.ObjectSpaceNormal: output.ObjectSpaceNormal = input.normalOS;
$VertexDescriptionInputs.WorldSpaceNormal: output.WorldSpaceNormal = TransformObjectToWorldNormal(input.normalOS);
$VertexDescriptionInputs.ViewSpaceNormal: output.ViewSpaceNormal = TransformWorldToViewDir(output.WorldSpaceNormal);
$VertexDescriptionInputs.TangentSpaceNormal: output.TangentSpaceNormal = float3(0.0f, 0.0f, 1.0f);
$VertexDescriptionInputs.ObjectSpaceTangent: output.ObjectSpaceTangent = input.tangentOS;
$VertexDescriptionInputs.WorldSpaceTangent: output.WorldSpaceTangent = TransformObjectToWorldDir(input.tangentOS.xyz);
$VertexDescriptionInputs.ViewSpaceTangent: output.ViewSpaceTangent = TransformWorldToViewDir(output.WorldSpaceTangent);
$VertexDescriptionInputs.TangentSpaceTangent: output.TangentSpaceTangent = float3(1.0f, 0.0f, 0.0f);
$VertexDescriptionInputs.ObjectSpaceBiTangent: output.ObjectSpaceBiTangent = normalize(cross(input.normalOS, input.tangentOS) * (input.tangentOS.w > 0.0f ? 1.0f : -1.0f) * GetOddNegativeScale());
$VertexDescriptionInputs.WorldSpaceBiTangent: output.WorldSpaceBiTangent = TransformObjectToWorldDir(output.ObjectSpaceBiTangent);
$VertexDescriptionInputs.ViewSpaceBiTangent: output.ViewSpaceBiTangent = TransformWorldToViewDir(output.WorldSpaceBiTangent);
$VertexDescriptionInputs.TangentSpaceBiTangent: output.TangentSpaceBiTangent = float3(0.0f, 1.0f, 0.0f);
$VertexDescriptionInputs.ObjectSpacePosition: output.ObjectSpacePosition = input.positionOS;
$VertexDescriptionInputs.WorldSpacePosition: output.WorldSpacePosition = GetAbsolutePositionWS(TransformObjectToWorld(input.positionOS));
$VertexDescriptionInputs.ViewSpacePosition: output.ViewSpacePosition = TransformWorldToView(output.WorldSpacePosition);
$VertexDescriptionInputs.TangentSpacePosition: output.TangentSpacePosition = float3(0.0f, 0.0f, 0.0f);
$VertexDescriptionInputs.WorldSpaceViewDirection: output.WorldSpaceViewDirection = GetWorldSpaceNormalizeViewDir(output.WorldSpacePosition);
$VertexDescriptionInputs.ObjectSpaceViewDirection: output.ObjectSpaceViewDirection = TransformWorldToObjectDir(output.WorldSpaceViewDirection);
$VertexDescriptionInputs.ViewSpaceViewDirection: output.ViewSpaceViewDirection = TransformWorldToViewDir(output.WorldSpaceViewDirection);
$VertexDescriptionInputs.TangentSpaceViewDirection: float3x3 tangentSpaceTransform = float3x3(output.WorldSpaceTangent,output.WorldSpaceBiTangent,output.WorldSpaceNormal);
$VertexDescriptionInputs.TangentSpaceViewDirection: output.TangentSpaceViewDirection = mul(tangentSpaceTransform, output.WorldSpaceViewDirection);
$VertexDescriptionInputs.ScreenPosition: output.ScreenPosition = ComputeScreenPos(TransformWorldToHClip(output.WorldSpacePosition), _ProjectionParams.x);
$VertexDescriptionInputs.uv0: output.uv0 = float4(input.uv0, 0.0f, 0.0f);
$VertexDescriptionInputs.uv1: output.uv1 = float4(input.uv1, 0.0f, 0.0f);
$VertexDescriptionInputs.uv2: output.uv2 = float4(input.uv2, 0.0f, 0.0f);
$VertexDescriptionInputs.uv3: output.uv3 = float4(input.uv3, 0.0f, 0.0f);
$VertexDescriptionInputs.VertexColor: output.VertexColor = input.color;
return output;
}
AttributesMesh ApplyMeshModification(AttributesMesh input)
{
// build graph inputs
VertexDescriptionInputs vertexDescriptionInputs = AttributesMeshToVertexDescriptionInputs(input);
// evaluate vertex graph
VertexDescription vertexDescription = VertexDescriptionFunction(vertexDescriptionInputs);
// copy graph output to the results
$VertexDescription.Position: input.positionOS = vertexDescription.Position;
return input;
}

9
com.unity.render-pipelines.high-definition/HDRP/Editor/ShaderGraph/VertexAnimation.template.hlsl.meta


fileFormatVersion: 2
guid: 0c7cf800109d94245b1843175a674ab4
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

8
TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Material.meta


fileFormatVersion: 2
guid: c906d81874eaf51489365fdcf659e057
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Mesh.meta


fileFormatVersion: 2
guid: 57aec92ca35075b43bbfda18f1f83a48
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

1001
TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Mesh/Torus.obj
文件差异内容过多而无法显示
查看文件

100
TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Mesh/Torus.obj.meta


fileFormatVersion: 2
guid: 9ad41073880e68b4ebefb45f61ab7b08
ModelImporter:
serializedVersion: 23
fileIDToRecycleName:
100000: Torus
100002: //RootNode
400000: Torus
400002: //RootNode
2100000: TorusMat
2300000: Torus
3300000: Torus
4300000: Torus
externalObjects: {}
materials:
importMaterials: 1
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 1
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 0
addColliders: 0
useSRGBMaterialColor: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
optimizeMeshForGPU: 1
keepQuads: 0
weldVertices: 1
preserveHierarchy: 0
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVPackMargin: 4
useFileScale: 1
previousCalculatedGlobalScale: 1
hasPreviousCalculatedGlobalScale: 0
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
blendShapeNormalImportMode: 1
normalSmoothingSource: 0
importAnimation: 1
copyAvatar: 0
humanDescription:
serializedVersion: 2
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
rootMotionBoneName:
rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1}
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
animationType: 0
humanoidOversampling: 1
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

21
TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Mesh/filp.obj


# Blender v2.79 (sub 0) OBJ File: ''
# www.blender.org
mtllib filp.mtl
o Plane.001
v -1.000000 1.147200 3.031491
v 1.000000 1.147200 3.031491
v -1.000000 1.147200 1.031491
v 1.000000 1.147200 1.031491
vn 0.0000 1.0000 0.0000
usemtl None
s off
f 1//1 2//1 4//1 3//1
o Plane
v -1.000000 0.000000 1.000000
v 1.000000 0.000000 1.000000
v -1.000000 0.000000 -1.000000
v 1.000000 0.000000 -1.000000
vn 0.0000 -1.0000 0.0000
usemtl None
s off
f 5//2 7//2 8//2 6//2

99
TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Mesh/filp.obj.meta


fileFormatVersion: 2
guid: bec99738381e9764f9214f131dedf619
ModelImporter:
serializedVersion: 23
fileIDToRecycleName:
100000: default
100002: //RootNode
400000: default
400002: //RootNode
2100000: defaultMat
2300000: default
3300000: default
4300000: default
externalObjects: {}
materials:
importMaterials: 1
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 1
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 0
addColliders: 0
useSRGBMaterialColor: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
optimizeMeshForGPU: 1
keepQuads: 0
weldVertices: 1
preserveHierarchy: 0
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVPackMargin: 4
useFileScale: 1
previousCalculatedGlobalScale: 1
hasPreviousCalculatedGlobalScale: 0
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
blendShapeNormalImportMode: 1
normalSmoothingSource: 0
importAnimation: 1
copyAvatar: 0
humanDescription:
serializedVersion: 2
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
rootMotionBoneName:
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
animationType: 0
humanoidOversampling: 1
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

572
TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Mesh/grid.obj


# Blender v2.79 (sub 0) OBJ File: 'grid.blend'
# www.blender.org
mtllib grid.mtl
o Cube.003_Cube.010
v -0.100000 -2.000000 -3.500001
v -0.100000 2.000000 -3.500001
v -0.100000 -2.000000 -3.700001
v -0.100000 2.000000 -3.700001
v 0.100000 -2.000000 -3.500001
v 0.100000 2.000000 -3.500001
v 0.100000 -2.000000 -3.700001
v 0.100000 2.000000 -3.700001
v 0.300000 -2.000000 -3.500001
v 0.300000 2.000000 -3.500001
v 0.300000 -2.000000 -3.700001
v 0.300000 2.000000 -3.700001
v 0.500000 -2.000000 -3.500001
v 0.500000 2.000000 -3.500001
v 0.500000 -2.000000 -3.700001
v 0.500000 2.000000 -3.700001
v 0.700000 -2.000000 -3.500001
v 0.700000 2.000000 -3.500001
v 0.700000 -2.000000 -3.700001
v 0.700000 2.000000 -3.700001
v 0.900000 -2.000000 -3.500001
v 0.900000 2.000000 -3.500001
v 0.900000 -2.000000 -3.700001
v 0.900000 2.000000 -3.700001
v 1.100000 -2.000000 -3.500001
v 1.100000 2.000000 -3.500001
v 1.100000 -2.000000 -3.700001
v 1.100000 2.000000 -3.700001
v 1.300000 -2.000000 -3.500001
v 1.300000 2.000000 -3.500001
v 1.300000 -2.000000 -3.700001
v 1.300000 2.000000 -3.700001
v 1.500000 -2.000000 -3.500001
v 1.500000 2.000000 -3.500001
v 1.500000 -2.000000 -3.700001
v 1.500000 2.000000 -3.700001
v 1.700000 -2.000000 -3.500001
v 1.700000 2.000000 -3.500001
v 1.700000 -2.000000 -3.700001
v 1.700000 2.000000 -3.700001
v 1.900000 -2.000000 -3.500001
v 1.900000 2.000000 -3.500001
v 1.900000 -2.000000 -3.700001
v 1.900000 2.000000 -3.700001
v 2.100000 -2.000000 -3.500001
v 2.100000 2.000000 -3.500001
v 2.100000 -2.000000 -3.700001
v 2.100000 2.000000 -3.700001
v 2.300000 -2.000000 -3.500001
v 2.300000 2.000000 -3.500001
v 2.300000 -2.000000 -3.700001
v 2.300000 2.000000 -3.700001
v 2.500000 -2.000000 -3.500001
v 2.500000 2.000000 -3.500001
v 2.500000 -2.000000 -3.700001
v 2.500000 2.000000 -3.700001
v 2.700001 -2.000000 -3.500001
v 2.700001 2.000000 -3.500001
v 2.700001 -2.000000 -3.700001
v 2.700001 2.000000 -3.700001
v 2.900000 -2.000000 -3.500001
v 2.900000 2.000000 -3.500001
v 2.900000 -2.000000 -3.700001
v 2.900000 2.000000 -3.700001
v 3.100001 -2.000000 -3.500001
v 3.100001 2.000000 -3.500001
v 3.100001 -2.000000 -3.700001
v 3.100001 2.000000 -3.700001
v 3.300000 -2.000000 -3.500001
v 3.300000 2.000000 -3.500001
v 3.300000 -2.000000 -3.700001
v 3.300000 2.000000 -3.700001
v 3.500001 -2.000000 -3.500001
v 3.500001 2.000000 -3.500001
v 3.500001 -2.000000 -3.700001
v 3.500001 2.000000 -3.700001
v 3.700001 -2.000000 -3.500001
v 3.700001 2.000000 -3.500001
v 3.700001 -2.000000 -3.700001
v 3.700001 2.000000 -3.700001
v 3.700001 -2.000000 0.100000
v 3.700001 2.000000 0.100000
v 3.500001 -2.000000 0.100000
v 3.500001 2.000000 0.100000
v 3.700001 -2.000000 -0.100000
v 3.700001 2.000000 -0.100000
v 3.500001 -2.000000 -0.100000
v 3.500001 2.000000 -0.100000
v 3.700001 -2.000000 -0.300000
v 3.700001 2.000000 -0.300000
v 3.500001 -2.000000 -0.300000
v 3.500001 2.000000 -0.300000
v 3.700001 -2.000000 -0.500000
v 3.700001 2.000000 -0.500000
v 3.500001 -2.000000 -0.500000
v 3.500001 2.000000 -0.500000
v 3.700001 -2.000000 -0.700000
v 3.700001 2.000000 -0.700000
v 3.500001 -2.000000 -0.700000
v 3.500001 2.000000 -0.700000
v 3.700001 -2.000000 -0.900000
v 3.700001 2.000000 -0.900000
v 3.500001 -2.000000 -0.900000
v 3.500001 2.000000 -0.900000
v 3.700001 -2.000000 -1.100000
v 3.700001 2.000000 -1.100000
v 3.500001 -2.000000 -1.100000
v 3.500001 2.000000 -1.100000
v 3.700001 -2.000000 -1.300000
v 3.700001 2.000000 -1.300000
v 3.500001 -2.000000 -1.300000
v 3.500001 2.000000 -1.300000
v 3.700001 -2.000000 -1.500000
v 3.700001 2.000000 -1.500000
v 3.500001 -2.000000 -1.500000
v 3.500001 2.000000 -1.500000
v 3.700001 -2.000000 -1.700000
v 3.700001 2.000000 -1.700000
v 3.500001 -2.000000 -1.700000
v 3.500001 2.000000 -1.700000
v 3.700001 -2.000000 -1.900000
v 3.700001 2.000000 -1.900000
v 3.500001 -2.000000 -1.900000
v 3.500001 2.000000 -1.900000
v 3.700001 -2.000000 -2.100000
v 3.700001 2.000000 -2.100000
v 3.500001 -2.000000 -2.100000
v 3.500001 2.000000 -2.100000
v 3.700001 -2.000000 -2.300000
v 3.700001 2.000000 -2.300000
v 3.500001 -2.000000 -2.300000
v 3.500001 2.000000 -2.300000
v 3.700001 -2.000000 -2.500000
v 3.700001 2.000000 -2.500000
v 3.500001 -2.000000 -2.500000
v 3.500001 2.000000 -2.500000
v 3.700001 -2.000000 -2.700000
v 3.700001 2.000000 -2.700000
v 3.500001 -2.000000 -2.700000
v 3.500001 2.000000 -2.700000
v 3.700001 -2.000000 -2.900000
v 3.700001 2.000000 -2.900000
v 3.500001 -2.000000 -2.900000
v 3.500001 2.000000 -2.900000
v 3.700001 -2.000000 -3.100000
v 3.700001 2.000000 -3.100000
v 3.500001 -2.000000 -3.100000
v 3.500001 2.000000 -3.100000
v 3.700001 -2.000000 -3.300000
v 3.700001 2.000000 -3.300000
v 3.500001 -2.000000 -3.300000
v 3.500001 2.000000 -3.300000
v 3.700001 -2.000000 -3.500000
v 3.700001 2.000000 -3.500000
v 3.500001 -2.000000 -3.500000
v 3.500001 2.000000 -3.500000
v 3.700001 -2.000000 -3.700001
v 3.700001 2.000000 -3.700001
v 3.500001 -2.000000 -3.700001
v 3.500001 2.000000 -3.700001
v 0.100000 -2.000000 0.100000
v 0.100000 2.000000 0.100000
v -0.100000 -2.000000 0.100000
v -0.100000 2.000000 0.100000
v 0.100000 -2.000000 -0.100000
v 0.100000 2.000000 -0.100000
v -0.100000 -2.000000 -0.100000
v -0.100000 2.000000 -0.100000
v 0.100000 -2.000000 -0.300000
v 0.100000 2.000000 -0.300000
v -0.100000 -2.000000 -0.300000
v -0.100000 2.000000 -0.300000
v 0.100000 -2.000000 -0.500000
v 0.100000 2.000000 -0.500000
v -0.100000 -2.000000 -0.500000
v -0.100000 2.000000 -0.500000
v 0.100000 -2.000000 -0.700000
v 0.100000 2.000000 -0.700000
v -0.100000 -2.000000 -0.700000
v -0.100000 2.000000 -0.700000
v 0.100000 -2.000000 -0.900000
v 0.100000 2.000000 -0.900000
v -0.100000 -2.000000 -0.900000
v -0.100000 2.000000 -0.900000
v 0.100000 -2.000000 -1.100000
v 0.100000 2.000000 -1.100000
v -0.100000 -2.000000 -1.100000
v -0.100000 2.000000 -1.100000
v 0.100000 -2.000000 -1.300000
v 0.100000 2.000000 -1.300000
v -0.100000 -2.000000 -1.300000
v -0.100000 2.000000 -1.300000
v 0.100000 -2.000000 -1.500000
v 0.100000 2.000000 -1.500000
v -0.100000 -2.000000 -1.500000
v -0.100000 2.000000 -1.500000
v 0.100000 -2.000000 -1.700000
v 0.100000 2.000000 -1.700000
v -0.100000 -2.000000 -1.700000
v -0.100000 2.000000 -1.700000
v 0.100000 -2.000000 -1.900000
v 0.100000 2.000000 -1.900000
v -0.100000 -2.000000 -1.900000
v -0.100000 2.000000 -1.900000
v 0.100000 -2.000000 -2.100000
v 0.100000 2.000000 -2.100000
v -0.100000 -2.000000 -2.100000
v -0.100000 2.000000 -2.100000
v 0.100000 -2.000000 -2.300001
v 0.100000 2.000000 -2.300001
v -0.100000 -2.000000 -2.300001
v -0.100000 2.000000 -2.300001
v 0.100000 -2.000000 -2.500000
v 0.100000 2.000000 -2.500000
v -0.100000 -2.000000 -2.500000
v -0.100000 2.000000 -2.500000
v 0.100000 -2.000000 -2.700001
v 0.100000 2.000000 -2.700001
v -0.100000 -2.000000 -2.700001
v -0.100000 2.000000 -2.700001
v 0.100000 -2.000000 -2.900001
v 0.100000 2.000000 -2.900001
v -0.100000 -2.000000 -2.900001
v -0.100000 2.000000 -2.900001
v 0.100000 -2.000000 -3.100001
v 0.100000 2.000000 -3.100001
v -0.100000 -2.000000 -3.100001
v -0.100000 2.000000 -3.100001
v 0.100000 -2.000000 -3.300001
v 0.100000 2.000000 -3.300001
v -0.100000 -2.000000 -3.300001
v -0.100000 2.000000 -3.300001
v 0.100000 -2.000000 -3.500001
v 0.100000 2.000000 -3.500001
v -0.100000 -2.000000 -3.500001
v -0.100000 2.000000 -3.500001
v 0.100000 -2.000000 -3.700001
v 0.100000 2.000000 -3.700001
v -0.100000 -2.000000 -3.700001
v -0.100000 2.000000 -3.700001
v -0.100000 -2.000000 0.100000
v -0.100000 2.000000 0.100000
v -0.100000 -2.000000 -0.100000
v -0.100000 2.000000 -0.100000
v 0.100000 -2.000000 0.100000
v 0.100000 2.000000 0.100000
v 0.100000 -2.000000 -0.100000
v 0.100000 2.000000 -0.100000
v 0.300000 -2.000000 0.100000
v 0.300000 2.000000 0.100000
v 0.300000 -2.000000 -0.100000
v 0.300000 2.000000 -0.100000
v 0.500000 -2.000000 0.100000
v 0.500000 2.000000 0.100000
v 0.500000 -2.000000 -0.100000
v 0.500000 2.000000 -0.100000
v 0.700000 -2.000000 0.100000
v 0.700000 2.000000 0.100000
v 0.700000 -2.000000 -0.100000
v 0.700000 2.000000 -0.100000
v 0.900000 -2.000000 0.100000
v 0.900000 2.000000 0.100000
v 0.900000 -2.000000 -0.100000
v 0.900000 2.000000 -0.100000
v 1.100000 -2.000000 0.100000
v 1.100000 2.000000 0.100000
v 1.100000 -2.000000 -0.100000
v 1.100000 2.000000 -0.100000
v 1.300000 -2.000000 0.100000
v 1.300000 2.000000 0.100000
v 1.300000 -2.000000 -0.100000
v 1.300000 2.000000 -0.100000
v 1.500000 -2.000000 0.100000
v 1.500000 2.000000 0.100000
v 1.500000 -2.000000 -0.100000
v 1.500000 2.000000 -0.100000
v 1.700000 -2.000000 0.100000
v 1.700000 2.000000 0.100000
v 1.700000 -2.000000 -0.100000
v 1.700000 2.000000 -0.100000
v 1.900000 -2.000000 0.100000
v 1.900000 2.000000 0.100000
v 1.900000 -2.000000 -0.100000
v 1.900000 2.000000 -0.100000
v 2.100000 -2.000000 0.100000
v 2.100000 2.000000 0.100000
v 2.100000 -2.000000 -0.100000
v 2.100000 2.000000 -0.100000
v 2.300000 -2.000000 0.100000
v 2.300000 2.000000 0.100000
v 2.300000 -2.000000 -0.100000
v 2.300000 2.000000 -0.100000
v 2.500000 -2.000000 0.100000
v 2.500000 2.000000 0.100000
v 2.500000 -2.000000 -0.100000
v 2.500000 2.000000 -0.100000
v 2.700001 -2.000000 0.100000
v 2.700001 2.000000 0.100000
v 2.700001 -2.000000 -0.100000
v 2.700001 2.000000 -0.100000
v 2.900001 -2.000000 0.100000
v 2.900001 2.000000 0.100000
v 2.900001 -2.000000 -0.100000
v 2.900001 2.000000 -0.100000
v 3.100001 -2.000000 0.100000
v 3.100001 2.000000 0.100000
v 3.100001 -2.000000 -0.100000
v 3.100001 2.000000 -0.100000
v 3.300001 -2.000000 0.100000
v 3.300001 2.000000 0.100000
v 3.300001 -2.000000 -0.100000
v 3.300001 2.000000 -0.100000
v 3.500001 -2.000000 0.100000
v 3.500001 2.000000 0.100000
v 3.500001 -2.000000 -0.100000
v 3.500001 2.000000 -0.100000
v 3.700001 -2.000000 0.100000
v 3.700001 2.000000 0.100000
v 3.700001 -2.000000 -0.100000
v 3.700001 2.000000 -0.100000
vn -1.0000 0.0000 0.0000
vn 0.0000 0.0000 -1.0000
vn 1.0000 0.0000 0.0000
vn 0.0000 0.0000 1.0000
vn 0.0000 -1.0000 0.0000
vn 0.0000 1.0000 0.0000
usemtl None
s off
f 1//1 2//1 4//1 3//1
f 3//2 4//2 8//2 7//2
f 7//3 8//3 6//3 5//3
f 5//4 6//4 2//4 1//4
f 3//5 7//5 5//5 1//5
f 8//6 4//6 2//6 6//6
f 9//1 10//1 12//1 11//1
f 11//2 12//2 16//2 15//2
f 15//3 16//3 14//3 13//3
f 13//4 14//4 10//4 9//4
f 11//5 15//5 13//5 9//5
f 16//6 12//6 10//6 14//6
f 17//1 18//1 20//1 19//1
f 19//2 20//2 24//2 23//2
f 23//3 24//3 22//3 21//3
f 21//4 22//4 18//4 17//4
f 19//5 23//5 21//5 17//5
f 24//6 20//6 18//6 22//6
f 25//1 26//1 28//1 27//1
f 27//2 28//2 32//2 31//2
f 31//3 32//3 30//3 29//3
f 29//4 30//4 26//4 25//4
f 27//5 31//5 29//5 25//5
f 32//6 28//6 26//6 30//6
f 33//1 34//1 36//1 35//1
f 35//2 36//2 40//2 39//2
f 39//3 40//3 38//3 37//3
f 37//4 38//4 34//4 33//4
f 35//5 39//5 37//5 33//5
f 40//6 36//6 34//6 38//6
f 41//1 42//1 44//1 43//1
f 43//2 44//2 48//2 47//2
f 47//3 48//3 46//3 45//3
f 45//4 46//4 42//4 41//4
f 43//5 47//5 45//5 41//5
f 48//6 44//6 42//6 46//6
f 49//1 50//1 52//1 51//1
f 51//2 52//2 56//2 55//2
f 55//3 56//3 54//3 53//3
f 53//4 54//4 50//4 49//4
f 51//5 55//5 53//5 49//5
f 56//6 52//6 50//6 54//6
f 57//1 58//1 60//1 59//1
f 59//2 60//2 64//2 63//2
f 63//3 64//3 62//3 61//3
f 61//4 62//4 58//4 57//4
f 59//5 63//5 61//5 57//5
f 64//6 60//6 58//6 62//6
f 65//1 66//1 68//1 67//1
f 67//2 68//2 72//2 71//2
f 71//3 72//3 70//3 69//3
f 69//4 70//4 66//4 65//4
f 67//5 71//5 69//5 65//5
f 72//6 68//6 66//6 70//6
f 73//1 74//1 76//1 75//1
f 75//2 76//2 80//2 79//2
f 79//3 80//3 78//3 77//3
f 77//4 78//4 74//4 73//4
f 75//5 79//5 77//5 73//5
f 80//6 76//6 74//6 78//6
f 81//4 82//4 84//4 83//4
f 83//1 84//1 88//1 87//1
f 87//2 88//2 86//2 85//2
f 85//3 86//3 82//3 81//3
f 83//5 87//5 85//5 81//5
f 88//6 84//6 82//6 86//6
f 89//4 90//4 92//4 91//4
f 91//1 92//1 96//1 95//1
f 95//2 96//2 94//2 93//2
f 93//3 94//3 90//3 89//3
f 91//5 95//5 93//5 89//5
f 96//6 92//6 90//6 94//6
f 97//4 98//4 100//4 99//4
f 99//1 100//1 104//1 103//1
f 103//2 104//2 102//2 101//2
f 101//3 102//3 98//3 97//3
f 99//5 103//5 101//5 97//5
f 104//6 100//6 98//6 102//6
f 105//4 106//4 108//4 107//4
f 107//1 108//1 112//1 111//1
f 111//2 112//2 110//2 109//2
f 109//3 110//3 106//3 105//3
f 107//5 111//5 109//5 105//5
f 112//6 108//6 106//6 110//6
f 113//4 114//4 116//4 115//4
f 115//1 116//1 120//1 119//1
f 119//2 120//2 118//2 117//2
f 117//3 118//3 114//3 113//3
f 115//5 119//5 117//5 113//5
f 120//6 116//6 114//6 118//6
f 121//4 122//4 124//4 123//4
f 123//1 124//1 128//1 127//1
f 127//2 128//2 126//2 125//2
f 125//3 126//3 122//3 121//3
f 123//5 127//5 125//5 121//5
f 128//6 124//6 122//6 126//6
f 129//4 130//4 132//4 131//4
f 131//1 132//1 136//1 135//1
f 135//2 136//2 134//2 133//2
f 133//3 134//3 130//3 129//3
f 131//5 135//5 133//5 129//5
f 136//6 132//6 130//6 134//6
f 137//4 138//4 140//4 139//4
f 139//1 140//1 144//1 143//1
f 143//2 144//2 142//2 141//2
f 141//3 142//3 138//3 137//3
f 139//5 143//5 141//5 137//5
f 144//6 140//6 138//6 142//6
f 145//4 146//4 148//4 147//4
f 147//1 148//1 152//1 151//1
f 151//2 152//2 150//2 149//2
f 149//3 150//3 146//3 145//3
f 147//5 151//5 149//5 145//5
f 152//6 148//6 146//6 150//6
f 153//4 154//4 156//4 155//4
f 155//1 156//1 160//1 159//1
f 159//2 160//2 158//2 157//2
f 157//3 158//3 154//3 153//3
f 155//5 159//5 157//5 153//5
f 160//6 156//6 154//6 158//6
f 161//4 162//4 164//4 163//4
f 163//1 164//1 168//1 167//1
f 167//2 168//2 166//2 165//2
f 165//3 166//3 162//3 161//3
f 163//5 167//5 165//5 161//5
f 168//6 164//6 162//6 166//6
f 169//4 170//4 172//4 171//4
f 171//1 172//1 176//1 175//1
f 175//2 176//2 174//2 173//2
f 173//3 174//3 170//3 169//3
f 171//5 175//5 173//5 169//5
f 176//6 172//6 170//6 174//6
f 177//4 178//4 180//4 179//4
f 179//1 180//1 184//1 183//1
f 183//2 184//2 182//2 181//2
f 181//3 182//3 178//3 177//3
f 179//5 183//5 181//5 177//5
f 184//6 180//6 178//6 182//6
f 185//4 186//4 188//4 187//4
f 187//1 188//1 192//1 191//1
f 191//2 192//2 190//2 189//2
f 189//3 190//3 186//3 185//3
f 187//5 191//5 189//5 185//5
f 192//6 188//6 186//6 190//6
f 193//4 194//4 196//4 195//4
f 195//1 196//1 200//1 199//1
f 199//2 200//2 198//2 197//2
f 197//3 198//3 194//3 193//3
f 195//5 199//5 197//5 193//5
f 200//6 196//6 194//6 198//6
f 201//4 202//4 204//4 203//4
f 203//1 204//1 208//1 207//1
f 207//2 208//2 206//2 205//2
f 205//3 206//3 202//3 201//3
f 203//5 207//5 205//5 201//5
f 208//6 204//6 202//6 206//6
f 209//4 210//4 212//4 211//4
f 211//1 212//1 216//1 215//1
f 215//2 216//2 214//2 213//2
f 213//3 214//3 210//3 209//3
f 211//5 215//5 213//5 209//5
f 216//6 212//6 210//6 214//6
f 217//4 218//4 220//4 219//4
f 219//1 220//1 224//1 223//1
f 223//2 224//2 222//2 221//2
f 221//3 222//3 218//3 217//3
f 219//5 223//5 221//5 217//5
f 224//6 220//6 218//6 222//6
f 225//4 226//4 228//4 227//4
f 227//1 228//1 232//1 231//1
f 231//2 232//2 230//2 229//2
f 229//3 230//3 226//3 225//3
f 227//5 231//5 229//5 225//5
f 232//6 228//6 226//6 230//6
f 233//4 234//4 236//4 235//4
f 235//1 236//1 240//1 239//1
f 239//2 240//2 238//2 237//2
f 237//3 238//3 234//3 233//3
f 235//5 239//5 237//5 233//5
f 240//6 236//6 234//6 238//6
f 241//1 242//1 244//1 243//1
f 243//2 244//2 248//2 247//2
f 247//3 248//3 246//3 245//3
f 245//4 246//4 242//4 241//4
f 243//5 247//5 245//5 241//5
f 248//6 244//6 242//6 246//6
f 249//1 250//1 252//1 251//1
f 251//2 252//2 256//2 255//2
f 255//3 256//3 254//3 253//3
f 253//4 254//4 250//4 249//4
f 251//5 255//5 253//5 249//5
f 256//6 252//6 250//6 254//6
f 257//1 258//1 260//1 259//1
f 259//2 260//2 264//2 263//2
f 263//3 264//3 262//3 261//3
f 261//4 262//4 258//4 257//4
f 259//5 263//5 261//5 257//5
f 264//6 260//6 258//6 262//6
f 265//1 266//1 268//1 267//1
f 267//2 268//2 272//2 271//2
f 271//3 272//3 270//3 269//3
f 269//4 270//4 266//4 265//4
f 267//5 271//5 269//5 265//5
f 272//6 268//6 266//6 270//6
f 273//1 274//1 276//1 275//1
f 275//2 276//2 280//2 279//2
f 279//3 280//3 278//3 277//3
f 277//4 278//4 274//4 273//4
f 275//5 279//5 277//5 273//5
f 280//6 276//6 274//6 278//6
f 281//1 282//1 284//1 283//1
f 283//2 284//2 288//2 287//2
f 287//3 288//3 286//3 285//3
f 285//4 286//4 282//4 281//4
f 283//5 287//5 285//5 281//5
f 288//6 284//6 282//6 286//6
f 289//1 290//1 292//1 291//1
f 291//2 292//2 296//2 295//2
f 295//3 296//3 294//3 293//3
f 293//4 294//4 290//4 289//4
f 291//5 295//5 293//5 289//5
f 296//6 292//6 290//6 294//6
f 297//1 298//1 300//1 299//1
f 299//2 300//2 304//2 303//2
f 303//3 304//3 302//3 301//3
f 301//4 302//4 298//4 297//4
f 299//5 303//5 301//5 297//5
f 304//6 300//6 298//6 302//6
f 305//1 306//1 308//1 307//1
f 307//2 308//2 312//2 311//2
f 311//3 312//3 310//3 309//3
f 309//4 310//4 306//4 305//4
f 307//5 311//5 309//5 305//5
f 312//6 308//6 306//6 310//6
f 313//1 314//1 316//1 315//1
f 315//2 316//2 320//2 319//2
f 319//3 320//3 318//3 317//3
f 317//4 318//4 314//4 313//4
f 315//5 319//5 317//5 313//5
f 320//6 316//6 314//6 318//6

99
TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Mesh/grid.obj.meta


fileFormatVersion: 2
guid: 93cc6f0669cbfbe4dad5c01034ca692f
ModelImporter:
serializedVersion: 23
fileIDToRecycleName:
100000: default
100002: //RootNode
400000: default
400002: //RootNode
2100000: defaultMat
2300000: default
3300000: default
4300000: default
externalObjects: {}
materials:
importMaterials: 1
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 1
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 0
addColliders: 0
useSRGBMaterialColor: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
optimizeMeshForGPU: 1
keepQuads: 0
weldVertices: 1
preserveHierarchy: 0
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVPackMargin: 4
useFileScale: 1
previousCalculatedGlobalScale: 1
hasPreviousCalculatedGlobalScale: 0
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
blendShapeNormalImportMode: 1
normalSmoothingSource: 0
importAnimation: 1
copyAvatar: 0
humanDescription:
serializedVersion: 2
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
rootMotionBoneName:
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
animationType: 0
humanoidOversampling: 1
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

232
TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Scene Settings Profile 1.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3}
m_Name: Scene Settings Profile 1
m_EditorClassIdentifier:
components:
- {fileID: 114471067201991602}
- {fileID: 114387209903557084}
- {fileID: 114498298653028708}
- {fileID: 114211980603783102}
--- !u!114 &114211980603783102
MonoBehaviour:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a81bcacc415a1f743bfdf703afc52027, type: 3}
m_Name: GradientSky
m_EditorClassIdentifier:
active: 1
rotation:
m_OverrideState: 1
m_Value: 0
min: 0
max: 360
skyIntensityMode:
m_OverrideState: 1
m_Value: 0
exposure:
m_OverrideState: 1
m_Value: 0
multiplier:
m_OverrideState: 1
m_Value: 1
min: 0
upperHemisphereLuxValue:
m_OverrideState: 1
m_Value: 1
min: 0
desiredLuxValue:
m_OverrideState: 1
m_Value: 20000
updateMode:
m_OverrideState: 1
m_Value: 0
updatePeriod:
m_OverrideState: 1
m_Value: 0
min: 0
includeSunInBaking:
m_OverrideState: 1
m_Value: 0
top:
m_OverrideState: 1
m_Value: {r: 0, g: 0, b: 0.21698111, a: 1}
hdr: 1
showAlpha: 0
showEyeDropper: 1
middle:
m_OverrideState: 1
m_Value: {r: 0, g: 0.15589753, b: 0.2735849, a: 1}
hdr: 1
showAlpha: 0
showEyeDropper: 1
bottom:
m_OverrideState: 1
m_Value: {r: 0, g: 0, b: 0, a: 1}
hdr: 1
showAlpha: 0
showEyeDropper: 1
gradientDiffusion:
m_OverrideState: 1
m_Value: 1
--- !u!114 &114387209903557084
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0d7593b3a9277ac4696b20006c21dde2, type: 3}
m_Name:
m_EditorClassIdentifier:
active: 1
skyType:
m_OverrideState: 1
m_Value: 3
fogType:
m_OverrideState: 1
m_Value: 0
--- !u!114 &114471067201991602
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7ddcec8a8eb2d684d833ac8f5d26aebd, type: 3}
m_Name:
m_EditorClassIdentifier:
active: 1
maxShadowDistance:
m_OverrideState: 1
m_Value: 500
min: 0
cascadeShadowSplitCount:
m_OverrideState: 1
m_Value: 4
min: 1
max: 4
cascadeShadowSplit0:
m_OverrideState: 1
m_Value: 0.05
min: 0
max: 1
cascadeShadowSplit1:
m_OverrideState: 1
m_Value: 0.15
min: 0
max: 1
cascadeShadowSplit2:
m_OverrideState: 1
m_Value: 0.3
min: 0
max: 1
cascadeShadowBorder0:
m_OverrideState: 1
m_Value: 0
min: 0
cascadeShadowBorder1:
m_OverrideState: 1
m_Value: 0
min: 0
cascadeShadowBorder2:
m_OverrideState: 1
m_Value: 0
min: 0
cascadeShadowBorder3:
m_OverrideState: 1
m_Value: 0
min: 0
--- !u!114 &114498298653028708
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3df29e7cc05fbec4aa43e06ea875565d, type: 3}
m_Name:
m_EditorClassIdentifier:
active: 1
rotation:
m_OverrideState: 1
m_Value: 0
min: 0
max: 360
skyIntensityMode:
m_OverrideState: 1
m_Value: 0
exposure:
m_OverrideState: 1
m_Value: 0
multiplier:
m_OverrideState: 1
m_Value: 1
min: 0
upperHemisphereLuxValue:
m_OverrideState: 1
m_Value: 1
min: 0
desiredLuxValue:
m_OverrideState: 1
m_Value: 20000
updateMode:
m_OverrideState: 1
m_Value: 0
updatePeriod:
m_OverrideState: 1
m_Value: 0
min: 0
includeSunInBaking:
m_OverrideState: 1
m_Value: 0
sunSize:
m_OverrideState: 1
m_Value: 0.04
min: 0
max: 1
sunSizeConvergence:
m_OverrideState: 1
m_Value: 5
min: 1
max: 10
atmosphereThickness:
m_OverrideState: 1
m_Value: 1
min: 0
max: 5
skyTint:
m_OverrideState: 1
m_Value: {r: 0.5, g: 0.5, b: 0.5, a: 1}
hdr: 0
showAlpha: 1
showEyeDropper: 1
groundColor:
m_OverrideState: 1
m_Value: {r: 0.369, g: 0.349, b: 0.341, a: 1}
hdr: 0
showAlpha: 1
showEyeDropper: 1
enableSunDisk:
m_OverrideState: 1
m_Value: 1

8
TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Scene Settings Profile 1.asset.meta


fileFormatVersion: 2
guid: 2425384557b54ba43b14e5f4ebf956d0
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

209
TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Scene Settings Profile.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3}
m_Name: Scene Settings Profile
m_EditorClassIdentifier:
components:
- {fileID: 114819794786776634}
- {fileID: 114562939638992126}
- {fileID: 114669149091383400}
- {fileID: 114730464019976864}
--- !u!114 &114562939638992126
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0d7593b3a9277ac4696b20006c21dde2, type: 3}
m_Name:
m_EditorClassIdentifier:
active: 1
skyType:
m_OverrideState: 1
m_Value: 3
fogType:
m_OverrideState: 1
m_Value: 0
--- !u!114 &114669149091383400
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2150ee00179b2f4418ea8b21a7e98eea, type: 3}
m_Name:
m_EditorClassIdentifier:
active: 1
colorMode:
m_OverrideState: 1
m_Value: 1
color:
m_OverrideState: 1
m_Value: {r: 0.5, g: 0.5, b: 0.5, a: 1}
hdr: 0
showAlpha: 1
showEyeDropper: 1
density:
m_OverrideState: 1
m_Value: 1
min: 0
max: 1
mipFogMaxMip:
m_OverrideState: 1
m_Value: 0.5
min: 0
max: 1
mipFogNear:
m_OverrideState: 1
m_Value: 0
min: 0
mipFogFar:
m_OverrideState: 1
m_Value: 1000
min: 0
fogDistance:
m_OverrideState: 1
m_Value: 200
min: 0
fogBaseHeight:
m_OverrideState: 1
m_Value: 0
fogHeightAttenuation:
m_OverrideState: 1
m_Value: 0.2
min: 0
max: 1
--- !u!114 &114730464019976864
MonoBehaviour:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a81bcacc415a1f743bfdf703afc52027, type: 3}
m_Name: GradientSky
m_EditorClassIdentifier:
active: 1
rotation:
m_OverrideState: 1
m_Value: 0
min: 0
max: 360
skyIntensityMode:
m_OverrideState: 1
m_Value: 0
exposure:
m_OverrideState: 1
m_Value: 0
multiplier:
m_OverrideState: 1
m_Value: 1
min: 0
upperHemisphereLuxValue:
m_OverrideState: 1
m_Value: 1
min: 0
desiredLuxValue:
m_OverrideState: 1
m_Value: 20000
updateMode:
m_OverrideState: 1
m_Value: 0
updatePeriod:
m_OverrideState: 1
m_Value: 0
min: 0
includeSunInBaking:
m_OverrideState: 1
m_Value: 0
top:
m_OverrideState: 1
m_Value: {r: 0, g: 0, b: 0.2830189, a: 1}
hdr: 1
showAlpha: 0
showEyeDropper: 1
middle:
m_OverrideState: 1
m_Value: {r: 0.0063634748, g: 0.072622456, b: 0.122641504, a: 1}
hdr: 1
showAlpha: 0
showEyeDropper: 1
bottom:
m_OverrideState: 1
m_Value: {r: 0, g: 0, b: 0, a: 1}
hdr: 1
showAlpha: 0
showEyeDropper: 1
gradientDiffusion:
m_OverrideState: 1
m_Value: 1
--- !u!114 &114819794786776634
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7ddcec8a8eb2d684d833ac8f5d26aebd, type: 3}
m_Name:
m_EditorClassIdentifier:
active: 1
maxShadowDistance:
m_OverrideState: 1
m_Value: 500
min: 0
cascadeShadowSplitCount:
m_OverrideState: 1
m_Value: 4
min: 1
max: 4
cascadeShadowSplit0:
m_OverrideState: 1
m_Value: 0.05
min: 0
max: 1
cascadeShadowSplit1:
m_OverrideState: 1
m_Value: 0.15
min: 0
max: 1
cascadeShadowSplit2:
m_OverrideState: 1
m_Value: 0.3
min: 0
max: 1
cascadeShadowBorder0:
m_OverrideState: 1
m_Value: 0
min: 0
cascadeShadowBorder1:
m_OverrideState: 1
m_Value: 0
min: 0
cascadeShadowBorder2:
m_OverrideState: 1
m_Value: 0
min: 0
cascadeShadowBorder3:
m_OverrideState: 1
m_Value: 0
min: 0

8
TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Scene Settings Profile.asset.meta


fileFormatVersion: 2
guid: 26942417c28e9de4fb9a3151cadb5334
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

233
TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Material/Mirror.mat


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Mirror
m_Shader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3}
m_ShaderKeywords: _NORMALMAP_TANGENT_SPACE
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 2000
stringTagMap: {}
disabledShaderPasses:
- DistortionVectors
- TransparentDepthPrepass
- TransparentDepthPostpass
- TransparentBackface
- MOTIONVECTORS
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _AnisotropyMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BaseColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BentNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BentNormalMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _CoatMaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DistortionVectorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissiveColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _HeightMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _IridescenceMaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _IridescenceThicknessMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecularColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SubsurfaceMaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TangentMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TangentMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ThicknessMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TransmittanceColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _AORemapMax: 1
- _AORemapMin: 0
- _ATDistance: 1
- _AlbedoAffectEmissive: 0
- _AlphaCutoff: 0.5
- _AlphaCutoffEnable: 0
- _AlphaCutoffPostpass: 0.5
- _AlphaCutoffPrepass: 0.5
- _Anisotropy: 0
- _BlendMode: 0
- _CoatMask: 0
- _CullMode: 2
- _CullModeForward: 2
- _Cutoff: 0.5
- _DepthOffsetEnable: 0
- _DetailAlbedoScale: 1
- _DetailNormalScale: 1
- _DetailSmoothnessScale: 1
- _DiffusionProfile: 0
- _DisplacementLockObjectScale: 1
- _DisplacementLockTilingScale: 1
- _DisplacementMode: 0
- _DistortionBlendMode: 0
- _DistortionBlurBlendMode: 0
- _DistortionBlurDstBlend: 1
- _DistortionBlurRemapMax: 1
- _DistortionBlurRemapMin: 0
- _DistortionBlurScale: 1
- _DistortionBlurSrcBlend: 1
- _DistortionDepthTest: 1
- _DistortionDstBlend: 1
- _DistortionEnable: 0
- _DistortionScale: 1
- _DistortionSrcBlend: 1
- _DistortionVectorBias: -1
- _DistortionVectorScale: 2
- _DoubleSidedEnable: 0
- _DoubleSidedNormalMode: 1
- _Drag: 1
- _DstBlend: 0
- _EmissiveColorMode: 1
- _EnableBlendModePreserveSpecularLighting: 1
- _EnableFogOnTransparent: 1
- _EnableGeometricSpecularAA: 0
- _EnableMotionVectorForVertexAnimation: 0
- _EnableSpecularOcclusion: 0
- _EnableWind: 0
- _EnergyConservingSpecularColor: 1
- _HdrpVersion: 2
- _HeightAmplitude: 0.02
- _HeightCenter: 0.5
- _HeightMapParametrization: 0
- _HeightMax: 1
- _HeightMin: -1
- _HeightOffset: 0
- _HeightPoMAmplitude: 2
- _HeightTessAmplitude: 2
- _HeightTessCenter: 0.5
- _InitialBend: 1
- _InvTilingScale: 1
- _Ior: 1
- _IridescenceMask: 1
- _IridescenceThickness: 1
- _LinkDetailsWithBase: 1
- _MaterialID: 1
- _Metallic: 1
- _NormalMapSpace: 0
- _NormalScale: 1
- _PPDLodThreshold: 5
- _PPDMaxSamples: 15
- _PPDMinSamples: 5
- _PPDPrimitiveLength: 1
- _PPDPrimitiveWidth: 1
- _PreRefractionPass: 0
- _RefractionModel: 0
- _SSRefractionProjectionModel: 0
- _ShiverDirectionality: 0.5
- _ShiverDrag: 0.2
- _Smoothness: 1
- _SmoothnessRemapMax: 1
- _SmoothnessRemapMin: 0
- _SpecularAAScreenSpaceVariance: 0.1
- _SpecularAAThreshold: 0.2
- _SrcBlend: 1
- _StencilRef: 2
- _StencilRefMV: 128
- _StencilWriteMask: 7
- _StencilWriteMaskMV: 128
- _Stiffness: 1
- _SubsurfaceMask: 1
- _SupportDecals: 1
- _SurfaceType: 0
- _TexWorldScale: 1
- _TexWorldScaleEmissive: 1
- _Thickness: 1
- _ThicknessMultiplier: 1
- _TransmissionEnable: 1
- _TransparentBackfaceEnable: 0
- _TransparentDepthPostpassEnable: 0
- _TransparentDepthPrepassEnable: 0
- _TransparentSortPriority: 0
- _UVBase: 0
- _UVDetail: 0
- _UVEmissive: 0
- _ZTestDepthEqualForOpaque: 3
- _ZTestGBuffer: 4
- _ZTestModeDistortion: 4
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
- _EmissiveColor: {r: 0, g: 0, b: 0, a: 1}
- _InvPrimScale: {r: 1, g: 1, b: 0, a: 0}
- _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
- _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
- _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1}
- _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0}
- _UVMappingMask: {r: 1, g: 0, b: 0, a: 0}
- _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0}

8
TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Material/Mirror.mat.meta


fileFormatVersion: 2
guid: 8de793d48fd3851479e39b84e5d5254b
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

235
TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Material/White.mat


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: White
m_Shader: {fileID: 4800000, guid: c4edd00ff2db5b24391a4fcb1762e459, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 2000
stringTagMap: {}
disabledShaderPasses:
- DistortionVectors
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _AnisotropyMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BaseColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BentNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BentNormalMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _CoatMaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DistortionVectorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissiveColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _HeightMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _IridescenceMaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _IridescenceThicknessMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecularColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SubsurfaceMaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TangentMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TangentMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ThicknessMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TransmittanceColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _UnlitColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _AORemapMax: 1
- _AORemapMin: 0
- _ATDistance: 1
- _AlbedoAffectEmissive: 0
- _AlphaCutoff: 0.5
- _AlphaCutoffEnable: 0
- _AlphaCutoffPostpass: 0.5
- _AlphaCutoffPrepass: 0.5
- _Anisotropy: 0
- _BlendMode: 0
- _CoatMask: 0
- _CullMode: 2
- _CullModeForward: 2
- _Cutoff: 0.5
- _DepthOffsetEnable: 0
- _DetailAlbedoScale: 1
- _DetailNormalScale: 1
- _DetailSmoothnessScale: 1
- _DiffusionProfile: 0
- _DisplacementLockObjectScale: 1
- _DisplacementLockTilingScale: 1
- _DisplacementMode: 0
- _DistortionBlendMode: 0
- _DistortionBlurBlendMode: 0
- _DistortionBlurDstBlend: 1
- _DistortionBlurRemapMax: 1
- _DistortionBlurRemapMin: 0
- _DistortionBlurScale: 1
- _DistortionBlurSrcBlend: 1
- _DistortionDepthTest: 1
- _DistortionDstBlend: 1
- _DistortionEnable: 0
- _DistortionOnly: 0
- _DistortionScale: 1
- _DistortionSrcBlend: 1
- _DistortionVectorBias: -1
- _DistortionVectorScale: 2
- _DoubleSidedEnable: 0
- _DoubleSidedNormalMode: 1
- _Drag: 1
- _DstBlend: 0
- _EmissiveColorMode: 1
- _EnableBlendModePreserveSpecularLighting: 1
- _EnableFogOnTransparent: 1
- _EnableGeometricSpecularAA: 0
- _EnableMotionVectorForVertexAnimation: 0
- _EnableSpecularOcclusion: 0
- _EnableWind: 0
- _EnergyConservingSpecularColor: 1
- _HdrpVersion: 2
- _HeightAmplitude: 0.02
- _HeightCenter: 0.5
- _HeightMapParametrization: 0
- _HeightMax: 1
- _HeightMin: -1
- _HeightOffset: 0
- _HeightPoMAmplitude: 2
- _HeightTessAmplitude: 2
- _HeightTessCenter: 0.5
- _InitialBend: 1
- _InvTilingScale: 1
- _Ior: 1
- _IridescenceMask: 1
- _IridescenceThickness: 1
- _LinkDetailsWithBase: 1
- _MaterialID: 1
- _Metallic: 0
- _NormalMapSpace: 0
- _NormalScale: 1
- _PPDLodThreshold: 5
- _PPDMaxSamples: 15
- _PPDMinSamples: 5
- _PPDPrimitiveLength: 1
- _PPDPrimitiveWidth: 1
- _PreRefractionPass: 0
- _RefractionModel: 0
- _SSRefractionProjectionModel: 0
- _ShiverDirectionality: 0.5
- _ShiverDrag: 0.2
- _Smoothness: 1
- _SmoothnessRemapMax: 1
- _SmoothnessRemapMin: 0
- _SpecularAAScreenSpaceVariance: 0.1
- _SpecularAAThreshold: 0.2
- _SrcBlend: 1
- _StencilRef: 2
- _StencilRefMV: 128
- _StencilWriteMask: 7
- _StencilWriteMaskMV: 128
- _Stiffness: 1
- _SubsurfaceMask: 1
- _SupportDecals: 1
- _SurfaceType: 0
- _TexWorldScale: 1
- _TexWorldScaleEmissive: 1
- _Thickness: 1
- _ThicknessMultiplier: 1
- _TransmissionEnable: 1
- _TransparentBackfaceEnable: 0
- _TransparentDepthPostpassEnable: 0
- _TransparentDepthPrepassEnable: 0
- _TransparentSortPriority: 0
- _UVBase: 0
- _UVDetail: 0
- _UVEmissive: 0
- _ZTestDepthEqualForOpaque: 4
- _ZTestGBuffer: 4
- _ZTestModeDistortion: 4
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 0, g: 0, b: 0, a: 1}
- _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
- _EmissiveColor: {r: 0, g: 0, b: 0, a: 1}
- _InvPrimScale: {r: 1, g: 1, b: 0, a: 0}
- _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
- _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
- _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1}
- _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0}
- _UVMappingMask: {r: 1, g: 0, b: 0, a: 0}
- _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0}
- _UnlitColor: {r: 1, g: 1, b: 1, a: 1}

8
TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Material/White.mat.meta


fileFormatVersion: 2
guid: fb73336fa83a81a47a031c47789b2cea
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

233
TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Material/DoubleSidedFlipMode.mat


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: DoubleSidedFlipMode
m_Shader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3}
m_ShaderKeywords: _DOUBLESIDED_ON _NORMALMAP_TANGENT_SPACE
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 1
m_CustomRenderQueue: 2000
stringTagMap: {}
disabledShaderPasses:
- DistortionVectors
- TransparentDepthPrepass
- TransparentDepthPostpass
- TransparentBackface
- MOTIONVECTORS
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _AnisotropyMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BaseColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BentNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BentNormalMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _CoatMaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DistortionVectorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissiveColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _HeightMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _IridescenceMaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _IridescenceThicknessMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecularColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SubsurfaceMaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TangentMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TangentMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ThicknessMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TransmittanceColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _AORemapMax: 1
- _AORemapMin: 0
- _ATDistance: 1
- _AlbedoAffectEmissive: 0
- _AlphaCutoff: 0.5
- _AlphaCutoffEnable: 0
- _AlphaCutoffPostpass: 0.5
- _AlphaCutoffPrepass: 0.5
- _Anisotropy: 0
- _BlendMode: 0
- _CoatMask: 0
- _CullMode: 0
- _CullModeForward: 0
- _Cutoff: 0.5
- _DepthOffsetEnable: 0
- _DetailAlbedoScale: 1
- _DetailNormalScale: 1
- _DetailSmoothnessScale: 1
- _DiffusionProfile: 0
- _DisplacementLockObjectScale: 1
- _DisplacementLockTilingScale: 1
- _DisplacementMode: 0
- _DistortionBlendMode: 0
- _DistortionBlurBlendMode: 0
- _DistortionBlurDstBlend: 1
- _DistortionBlurRemapMax: 1
- _DistortionBlurRemapMin: 0
- _DistortionBlurScale: 1
- _DistortionBlurSrcBlend: 1
- _DistortionDepthTest: 1
- _DistortionDstBlend: 1
- _DistortionEnable: 0
- _DistortionScale: 1
- _DistortionSrcBlend: 1
- _DistortionVectorBias: -1
- _DistortionVectorScale: 2
- _DoubleSidedEnable: 1
- _DoubleSidedNormalMode: 0
- _Drag: 1
- _DstBlend: 0
- _EmissiveColorMode: 1
- _EnableBlendModePreserveSpecularLighting: 1
- _EnableFogOnTransparent: 1
- _EnableGeometricSpecularAA: 0
- _EnableMotionVectorForVertexAnimation: 0
- _EnableSpecularOcclusion: 0
- _EnableWind: 0
- _EnergyConservingSpecularColor: 1
- _HdrpVersion: 2
- _HeightAmplitude: 0.02
- _HeightCenter: 0.5
- _HeightMapParametrization: 0
- _HeightMax: 1
- _HeightMin: -1
- _HeightOffset: 0
- _HeightPoMAmplitude: 2
- _HeightTessAmplitude: 2
- _HeightTessCenter: 0.5
- _InitialBend: 1
- _InvTilingScale: 1
- _Ior: 1
- _IridescenceMask: 1
- _IridescenceThickness: 1
- _LinkDetailsWithBase: 1
- _MaterialID: 1
- _Metallic: 0
- _NormalMapSpace: 0
- _NormalScale: 1
- _PPDLodThreshold: 5
- _PPDMaxSamples: 15
- _PPDMinSamples: 5
- _PPDPrimitiveLength: 1
- _PPDPrimitiveWidth: 1
- _PreRefractionPass: 0
- _RefractionModel: 0
- _SSRefractionProjectionModel: 0
- _ShiverDirectionality: 0.5
- _ShiverDrag: 0.2
- _Smoothness: 0
- _SmoothnessRemapMax: 1
- _SmoothnessRemapMin: 0
- _SpecularAAScreenSpaceVariance: 0.1
- _SpecularAAThreshold: 0.2
- _SrcBlend: 1
- _StencilRef: 2
- _StencilRefMV: 128
- _StencilWriteMask: 7
- _StencilWriteMaskMV: 128
- _Stiffness: 1
- _SubsurfaceMask: 1
- _SupportDecals: 1
- _SurfaceType: 0
- _TexWorldScale: 1
- _TexWorldScaleEmissive: 1
- _Thickness: 1
- _ThicknessMultiplier: 1
- _TransmissionEnable: 1
- _TransparentBackfaceEnable: 0
- _TransparentDepthPostpassEnable: 0
- _TransparentDepthPrepassEnable: 0
- _TransparentSortPriority: 0
- _UVBase: 0
- _UVDetail: 0
- _UVEmissive: 0
- _ZTestDepthEqualForOpaque: 3
- _ZTestGBuffer: 4
- _ZTestModeDistortion: 4
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _DoubleSidedConstants: {r: -1, g: -1, b: -1, a: 0}
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
- _EmissiveColor: {r: 0, g: 0, b: 0, a: 1}
- _InvPrimScale: {r: 1, g: 1, b: 0, a: 0}
- _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
- _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
- _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1}
- _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0}
- _UVMappingMask: {r: 1, g: 0, b: 0, a: 0}
- _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0}

8
TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Material/DoubleSidedFlipMode.mat.meta


fileFormatVersion: 2
guid: fae81e9f50976d9479309bb75067499a
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

233
TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Material/DoubleSidedMirrorMode.mat


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: DoubleSidedMirrorMode
m_Shader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3}
m_ShaderKeywords: _DOUBLESIDED_ON _NORMALMAP_TANGENT_SPACE
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 1
m_CustomRenderQueue: 2000
stringTagMap: {}
disabledShaderPasses:
- DistortionVectors
- TransparentDepthPrepass
- TransparentDepthPostpass
- TransparentBackface
- MOTIONVECTORS
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _AnisotropyMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BaseColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BentNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BentNormalMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _CoatMaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DistortionVectorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissiveColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _HeightMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _IridescenceMaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _IridescenceThicknessMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecularColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SubsurfaceMaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TangentMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TangentMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ThicknessMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TransmittanceColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _AORemapMax: 1
- _AORemapMin: 0
- _ATDistance: 1
- _AlbedoAffectEmissive: 0
- _AlphaCutoff: 0.5
- _AlphaCutoffEnable: 0
- _AlphaCutoffPostpass: 0.5
- _AlphaCutoffPrepass: 0.5
- _Anisotropy: 0
- _BlendMode: 0
- _CoatMask: 0
- _CullMode: 0
- _CullModeForward: 0
- _Cutoff: 0.5
- _DepthOffsetEnable: 0
- _DetailAlbedoScale: 1
- _DetailNormalScale: 1
- _DetailSmoothnessScale: 1
- _DiffusionProfile: 0
- _DisplacementLockObjectScale: 1
- _DisplacementLockTilingScale: 1
- _DisplacementMode: 0
- _DistortionBlendMode: 0
- _DistortionBlurBlendMode: 0
- _DistortionBlurDstBlend: 1
- _DistortionBlurRemapMax: 1
- _DistortionBlurRemapMin: 0
- _DistortionBlurScale: 1
- _DistortionBlurSrcBlend: 1
- _DistortionDepthTest: 1
- _DistortionDstBlend: 1
- _DistortionEnable: 0
- _DistortionScale: 1
- _DistortionSrcBlend: 1
- _DistortionVectorBias: -1
- _DistortionVectorScale: 2
- _DoubleSidedEnable: 1
- _DoubleSidedNormalMode: 1
- _Drag: 1
- _DstBlend: 0
- _EmissiveColorMode: 1
- _EnableBlendModePreserveSpecularLighting: 1
- _EnableFogOnTransparent: 1
- _EnableGeometricSpecularAA: 0
- _EnableMotionVectorForVertexAnimation: 0
- _EnableSpecularOcclusion: 0
- _EnableWind: 0
- _EnergyConservingSpecularColor: 1
- _HdrpVersion: 2
- _HeightAmplitude: 0.02
- _HeightCenter: 0.5
- _HeightMapParametrization: 0
- _HeightMax: 1
- _HeightMin: -1
- _HeightOffset: 0
- _HeightPoMAmplitude: 2
- _HeightTessAmplitude: 2
- _HeightTessCenter: 0.5
- _InitialBend: 1
- _InvTilingScale: 1
- _Ior: 1
- _IridescenceMask: 1
- _IridescenceThickness: 1
- _LinkDetailsWithBase: 1
- _MaterialID: 1
- _Metallic: 0
- _NormalMapSpace: 0
- _NormalScale: 1
- _PPDLodThreshold: 5
- _PPDMaxSamples: 15
- _PPDMinSamples: 5
- _PPDPrimitiveLength: 1
- _PPDPrimitiveWidth: 1
- _PreRefractionPass: 0
- _RefractionModel: 0
- _SSRefractionProjectionModel: 0
- _ShiverDirectionality: 0.5
- _ShiverDrag: 0.2
- _Smoothness: 0
- _SmoothnessRemapMax: 1
- _SmoothnessRemapMin: 0
- _SpecularAAScreenSpaceVariance: 0.1
- _SpecularAAThreshold: 0.2
- _SrcBlend: 1
- _StencilRef: 2
- _StencilRefMV: 128
- _StencilWriteMask: 7
- _StencilWriteMaskMV: 128
- _Stiffness: 1
- _SubsurfaceMask: 1
- _SupportDecals: 1
- _SurfaceType: 0
- _TexWorldScale: 1
- _TexWorldScaleEmissive: 1
- _Thickness: 1
- _ThicknessMultiplier: 1
- _TransmissionEnable: 1
- _TransparentBackfaceEnable: 0
- _TransparentDepthPostpassEnable: 0
- _TransparentDepthPrepassEnable: 0
- _TransparentSortPriority: 0
- _UVBase: 0
- _UVDetail: 0
- _UVEmissive: 0
- _ZTestDepthEqualForOpaque: 3
- _ZTestGBuffer: 4
- _ZTestModeDistortion: 4
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
- _EmissiveColor: {r: 0, g: 0, b: 0, a: 1}
- _InvPrimScale: {r: 1, g: 1, b: 0, a: 0}
- _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
- _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
- _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1}
- _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0}
- _UVMappingMask: {r: 1, g: 0, b: 0, a: 0}
- _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0}

8
TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Material/DoubleSidedMirrorMode.mat.meta


fileFormatVersion: 2
guid: f9c747e84a2052f4da4aa7f39bfee55a
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

233
TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Material/DoubleSidedNoneMode.mat


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: DoubleSidedNoneMode
m_Shader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3}
m_ShaderKeywords: _DOUBLESIDED_ON _NORMALMAP_TANGENT_SPACE
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 1
m_CustomRenderQueue: 2000
stringTagMap: {}
disabledShaderPasses:
- DistortionVectors
- TransparentDepthPrepass
- TransparentDepthPostpass
- TransparentBackface
- MOTIONVECTORS
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _AnisotropyMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BaseColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BentNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BentNormalMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _CoatMaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DistortionVectorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissiveColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _HeightMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _IridescenceMaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _IridescenceThicknessMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecularColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SubsurfaceMaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TangentMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TangentMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ThicknessMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TransmittanceColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _AORemapMax: 1
- _AORemapMin: 0
- _ATDistance: 1
- _AlbedoAffectEmissive: 0
- _AlphaCutoff: 0.5
- _AlphaCutoffEnable: 0
- _AlphaCutoffPostpass: 0.5
- _AlphaCutoffPrepass: 0.5
- _Anisotropy: 0
- _BlendMode: 0
- _CoatMask: 0
- _CullMode: 0
- _CullModeForward: 0
- _Cutoff: 0.5
- _DepthOffsetEnable: 0
- _DetailAlbedoScale: 1
- _DetailNormalScale: 1
- _DetailSmoothnessScale: 1
- _DiffusionProfile: 0
- _DisplacementLockObjectScale: 1
- _DisplacementLockTilingScale: 1
- _DisplacementMode: 0
- _DistortionBlendMode: 0
- _DistortionBlurBlendMode: 0
- _DistortionBlurDstBlend: 1
- _DistortionBlurRemapMax: 1
- _DistortionBlurRemapMin: 0
- _DistortionBlurScale: 1
- _DistortionBlurSrcBlend: 1
- _DistortionDepthTest: 1
- _DistortionDstBlend: 1
- _DistortionEnable: 0
- _DistortionScale: 1
- _DistortionSrcBlend: 1
- _DistortionVectorBias: -1
- _DistortionVectorScale: 2
- _DoubleSidedEnable: 1
- _DoubleSidedNormalMode: 2
- _Drag: 1
- _DstBlend: 0
- _EmissiveColorMode: 1
- _EnableBlendModePreserveSpecularLighting: 1
- _EnableFogOnTransparent: 1
- _EnableGeometricSpecularAA: 0
- _EnableMotionVectorForVertexAnimation: 0
- _EnableSpecularOcclusion: 0
- _EnableWind: 0
- _EnergyConservingSpecularColor: 1
- _HdrpVersion: 2
- _HeightAmplitude: 0.02
- _HeightCenter: 0.5
- _HeightMapParametrization: 0
- _HeightMax: 1
- _HeightMin: -1
- _HeightOffset: 0
- _HeightPoMAmplitude: 2
- _HeightTessAmplitude: 2
- _HeightTessCenter: 0.5
- _InitialBend: 1
- _InvTilingScale: 1
- _Ior: 1
- _IridescenceMask: 1
- _IridescenceThickness: 1
- _LinkDetailsWithBase: 1
- _MaterialID: 1
- _Metallic: 0
- _NormalMapSpace: 0
- _NormalScale: 1
- _PPDLodThreshold: 5
- _PPDMaxSamples: 15
- _PPDMinSamples: 5
- _PPDPrimitiveLength: 1
- _PPDPrimitiveWidth: 1
- _PreRefractionPass: 0
- _RefractionModel: 0
- _SSRefractionProjectionModel: 0
- _ShiverDirectionality: 0.5
- _ShiverDrag: 0.2
- _Smoothness: 0
- _SmoothnessRemapMax: 1
- _SmoothnessRemapMin: 0
- _SpecularAAScreenSpaceVariance: 0.1
- _SpecularAAThreshold: 0.2
- _SrcBlend: 1
- _StencilRef: 2
- _StencilRefMV: 128
- _StencilWriteMask: 7
- _StencilWriteMaskMV: 128
- _Stiffness: 1
- _SubsurfaceMask: 1
- _SupportDecals: 1
- _SurfaceType: 0
- _TexWorldScale: 1
- _TexWorldScaleEmissive: 1
- _Thickness: 1
- _ThicknessMultiplier: 1
- _TransmissionEnable: 1
- _TransparentBackfaceEnable: 0
- _TransparentDepthPostpassEnable: 0
- _TransparentDepthPrepassEnable: 0
- _TransparentSortPriority: 0
- _UVBase: 0
- _UVDetail: 0
- _UVEmissive: 0
- _ZTestDepthEqualForOpaque: 3
- _ZTestGBuffer: 4
- _ZTestModeDistortion: 4
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _DoubleSidedConstants: {r: 1, g: 1, b: 1, a: 0}
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
- _EmissiveColor: {r: 0, g: 0, b: 0, a: 1}
- _InvPrimScale: {r: 1, g: 1, b: 0, a: 0}
- _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
- _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
- _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1}
- _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0}
- _UVMappingMask: {r: 1, g: 0, b: 0, a: 0}
- _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0}

8
TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2206_ReflectionCulling/Material/DoubleSidedNoneMode.mat.meta


fileFormatVersion: 2
guid: a7a5d577661996b4d8610da4b048f59f
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

232
TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2207_ReflectionCullingStencil/Scene Settings Profile.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3}
m_Name: Scene Settings Profile
m_EditorClassIdentifier:
components:
- {fileID: 114149327644554012}
- {fileID: 114731676633086332}
- {fileID: 114265733008192460}
- {fileID: 114018577617376790}
--- !u!114 &114018577617376790
MonoBehaviour:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a81bcacc415a1f743bfdf703afc52027, type: 3}
m_Name: GradientSky
m_EditorClassIdentifier:
active: 1
rotation:
m_OverrideState: 1
m_Value: 0
min: 0
max: 360
skyIntensityMode:
m_OverrideState: 1
m_Value: 0
exposure:
m_OverrideState: 1
m_Value: 0
multiplier:
m_OverrideState: 1
m_Value: 1
min: 0
upperHemisphereLuxValue:
m_OverrideState: 1
m_Value: 1
min: 0
desiredLuxValue:
m_OverrideState: 1
m_Value: 20000
updateMode:
m_OverrideState: 1
m_Value: 0
updatePeriod:
m_OverrideState: 1
m_Value: 0
min: 0
includeSunInBaking:
m_OverrideState: 1
m_Value: 0
top:
m_OverrideState: 1
m_Value: {r: 0, g: 0, b: 0.3962264, a: 1}
hdr: 1
showAlpha: 0
showEyeDropper: 1
middle:
m_OverrideState: 1
m_Value: {r: 0.040939845, g: 0.23264207, b: 0.3773585, a: 1}
hdr: 1
showAlpha: 0
showEyeDropper: 1
bottom:
m_OverrideState: 1
m_Value: {r: 0, g: 0, b: 0, a: 1}
hdr: 1
showAlpha: 0
showEyeDropper: 1
gradientDiffusion:
m_OverrideState: 1
m_Value: 1
--- !u!114 &114149327644554012
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7ddcec8a8eb2d684d833ac8f5d26aebd, type: 3}
m_Name:
m_EditorClassIdentifier:
active: 1
maxShadowDistance:
m_OverrideState: 1
m_Value: 500
min: 0
cascadeShadowSplitCount:
m_OverrideState: 1
m_Value: 4
min: 1
max: 4
cascadeShadowSplit0:
m_OverrideState: 1
m_Value: 0.05
min: 0
max: 1
cascadeShadowSplit1:
m_OverrideState: 1
m_Value: 0.15
min: 0
max: 1
cascadeShadowSplit2:
m_OverrideState: 1
m_Value: 0.3
min: 0
max: 1
cascadeShadowBorder0:
m_OverrideState: 1
m_Value: 0
min: 0
cascadeShadowBorder1:
m_OverrideState: 1
m_Value: 0
min: 0
cascadeShadowBorder2:
m_OverrideState: 1
m_Value: 0
min: 0
cascadeShadowBorder3:
m_OverrideState: 1
m_Value: 0
min: 0
--- !u!114 &114265733008192460
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3df29e7cc05fbec4aa43e06ea875565d, type: 3}
m_Name:
m_EditorClassIdentifier:
active: 1
rotation:
m_OverrideState: 1
m_Value: 0
min: 0
max: 360
skyIntensityMode:
m_OverrideState: 1
m_Value: 0
exposure:
m_OverrideState: 1
m_Value: 0
multiplier:
m_OverrideState: 1
m_Value: 1
min: 0
upperHemisphereLuxValue:
m_OverrideState: 1
m_Value: 1
min: 0
desiredLuxValue:
m_OverrideState: 1
m_Value: 20000
updateMode:
m_OverrideState: 1
m_Value: 0
updatePeriod:
m_OverrideState: 1
m_Value: 0
min: 0
includeSunInBaking:
m_OverrideState: 1
m_Value: 0
sunSize:
m_OverrideState: 1
m_Value: 0.04
min: 0
max: 1
sunSizeConvergence:
m_OverrideState: 1
m_Value: 5
min: 1
max: 10
atmosphereThickness:
m_OverrideState: 1
m_Value: 1
min: 0
max: 5
skyTint:
m_OverrideState: 1
m_Value: {r: 0.5, g: 0.5, b: 0.5, a: 1}
hdr: 0
showAlpha: 1
showEyeDropper: 1
groundColor:
m_OverrideState: 1
m_Value: {r: 0.369, g: 0.349, b: 0.341, a: 1}
hdr: 0
showAlpha: 1
showEyeDropper: 1
enableSunDisk:
m_OverrideState: 1
m_Value: 1
--- !u!114 &114731676633086332
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0d7593b3a9277ac4696b20006c21dde2, type: 3}
m_Name:
m_EditorClassIdentifier:
active: 1
skyType:
m_OverrideState: 1
m_Value: 3
fogType:
m_OverrideState: 1
m_Value: 0

8
TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2207_ReflectionCullingStencil/Scene Settings Profile.asset.meta


fileFormatVersion: 2
guid: 9f9a78c5b4ec9fe4d9c3f748df425091
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

141
com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Volumetric/volumeTextureTool.cs


using System;
using UnityEngine;
using UnityEditor;
using UnityEngine.Rendering;
using UnityEngine.Experimental.Rendering.HDPipeline;
namespace UnityEditor.Experimental.Rendering {
public class VolumeTextureTool : EditorWindow
{
private Texture2D sourceTexture = null;
private string assetPath;
private string assetDirectory;
private int tileSize = 0;
private static GUIContent windowTitle = new GUIContent("Create Volume Texture");
private static GUIContent textureLabel = new GUIContent("Slice Texture");
private static GUIContent tileSizeLabel = new GUIContent("Texture Slice Size", "Dimensions of the created 3D Texture in pixels. Width, Height and Depth are all the same size");
private static GUIContent createLabel = new GUIContent("Create 3D Texture");
[MenuItem("Window/Render Pipeline/Create Volume Texture")]
static void Init()
{
VolumeTextureTool window = (VolumeTextureTool)EditorWindow.GetWindow(typeof(VolumeTextureTool));
window.titleContent = windowTitle;
window.Show();
}
private bool IsTileSizeValid()
{
int textureWidth = sourceTexture.width;
int textureHeight = sourceTexture.height;
return (tileSize > 0 && (textureWidth * textureHeight >= (tileSize*tileSize*tileSize)));
}
void OnGUI()
{
EditorGUILayout.LabelField(textureLabel, null);
EditorGUI.indentLevel++;
sourceTexture = ( EditorGUILayout.ObjectField((UnityEngine.Object)sourceTexture, typeof(Texture2D), false, null) as Texture2D);
EditorGUI.indentLevel--;
tileSize = EditorGUILayout.IntField(tileSizeLabel, tileSize, null);
bool validData = (sourceTexture != null && IsTileSizeValid());
bool create = false;
if (!validData)
{
if (tileSize > 0)
{
EditorGUILayout.HelpBox(String.Format("Source Texture too small to generate a volume Texture of {0}x{0}x{0} size", tileSize), MessageType.Warning);
}
else
{
EditorGUILayout.HelpBox("Tile size must be larger than 0", MessageType.Warning);
}
}
using (new EditorGUI.DisabledScope(!validData))
{
create = GUILayout.Button(createLabel, null);
}
if (create)
{
assetPath = AssetDatabase.GetAssetPath(sourceTexture);
assetDirectory = System.IO.Directory.GetParent(assetPath).ToString();
//Check if the texture is set to read write.
//Only need to do this since CopyTexture is currently broken on D3D11
//So need to make sure there is a CPU copy ready to copy to the 3D Texture
//The fix for this is coming soon. Need to revist once it's in.
TextureImporter importer = TextureImporter.GetAtPath(assetPath) as TextureImporter;
if (importer && !importer.isReadable)
{
importer.isReadable = true;
importer.SaveAndReimport();
}
BuildVolumeTexture();
}
}
private void BuildVolumeTexture()
{
//Check if the object we want to create is already in the AssetDatabase
string volumeTextureAssetPath = assetDirectory + "/" + sourceTexture.name + "_Texture3D.asset";
bool createNewAsset = false;
Texture3D volumeTexture = AssetDatabase.LoadAssetAtPath(volumeTextureAssetPath, typeof(Texture3D)) as Texture3D;
//If we already have the asset then we are just updating it. make sure it's the right size.
if (!volumeTexture || volumeTexture.width != tileSize || volumeTexture.height != tileSize || volumeTexture.depth != tileSize)
{
volumeTexture = new Texture3D(tileSize, tileSize, tileSize, sourceTexture.format, false);
volumeTexture.filterMode = sourceTexture.filterMode;
volumeTexture.mipMapBias = 0;
volumeTexture.anisoLevel = 0;
volumeTexture.wrapMode = sourceTexture.wrapMode;
volumeTexture.wrapModeU = sourceTexture.wrapModeU;
volumeTexture.wrapModeV = sourceTexture.wrapModeV;
volumeTexture.wrapModeW = sourceTexture.wrapModeW;
createNewAsset = true;
}
//Only need to do this since CopyTexture is currently broken on D3D11
//Proper fix on it's way for 18.3 or 19.1
Color [] colorArray = new Color[0];
int yTiles = sourceTexture.height / tileSize;
int xTiles = sourceTexture.width / tileSize;
for (int i = yTiles - 1; i >= 0; i--)
{
for (int j = 0; j < xTiles; j++)
{
Color [] sourceTile = sourceTexture.GetPixels(j * tileSize, i * tileSize, tileSize, tileSize);
Array.Resize(ref colorArray, colorArray.Length + sourceTile.Length);
Array.Copy(sourceTile, 0, colorArray, colorArray.Length - sourceTile.Length, sourceTile.Length);
}
}
volumeTexture.SetPixels(colorArray);
volumeTexture.Apply();
if (createNewAsset)
{
AssetDatabase.CreateAsset(volumeTexture, volumeTextureAssetPath);
}
else
{
AssetDatabase.SaveAssets();
//Asset can be currently used by Density Volume Manager so trigger refresh
DensityVolumeManager.manager.TriggerVolumeAtlasRefresh();
}
}
}
}

/com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Volumetric/volumeTextureTool.cs.meta → /com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Volumetric/Texture3DCreationEditor.cs.meta

正在加载...
取消
保存