浏览代码

Merge branch 'master' into prototype/decals_gpu_optimization

# Conflicts:
#	ScriptableRenderPipeline/HDRenderPipeline/HDRP/Decal/DecalSystem.cs
/main
Paul Melamed 7 年前
当前提交
19876ed2
共有 357 个文件被更改,包括 4190 次插入1552 次删除
  1. 1
      .gitignore
  2. 999
      ImageTemplates/HDRenderPipeline/Scenes/2xxx_Lighting/2301_Shadow_Mask.unity.png
  3. 365
      ImageTemplates/HDRenderPipeline/Scenes/3xxx_DebugView/3002_ObjectMotionVector.unity.png
  4. 953
      SampleScenes/HDTest/BasicProfiling.unity
  5. 14
      SampleScenes/HDTest/BasicProfiling/LightingData.asset
  6. 2
      SampleScenes/HDTest/BasicProfiling/ReflectionProbe-0.exr
  7. 5
      SampleScenes/HDTest/BasicProfiling/ReflectionProbe-1.exr
  8. 94
      SampleScenes/HDTest/BasicProfiling/ReflectionProbe-2.exr
  9. 24
      ScriptableRenderPipeline/Core/CoreRP/Camera/FreeCamera.cs
  10. 20
      ScriptableRenderPipeline/Core/CoreRP/Editor/CameraEditorUtils.cs
  11. 15
      ScriptableRenderPipeline/Core/CoreRP/Editor/CoreEditorDrawers.cs
  12. 23
      ScriptableRenderPipeline/Core/CoreRP/Editor/CoreEditorUtils.cs
  13. 3
      ScriptableRenderPipeline/Core/CoreRP/Editor/ShaderGenerator/CSharpToHLSL.cs
  14. 60
      ScriptableRenderPipeline/Core/CoreRP/ShaderLibrary/Common.hlsl
  15. 12
      ScriptableRenderPipeline/Core/CoreRP/ShaderLibrary/Debug.hlsl
  16. 9
      ScriptableRenderPipeline/Core/CoreRP/ShaderLibrary/VolumeRendering.hlsl
  17. 4
      ScriptableRenderPipeline/Core/package.json
  18. 14
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Camera/HDAdditionalCameraData.cs
  19. 19
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Camera/HDCamera.cs
  20. 101
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/DebugColorPicker.shader
  21. 5
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/DebugDisplay.cs
  22. 39
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/DebugDisplay.hlsl
  23. 48
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/DebugFullScreen.shader
  24. 5
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/DebugViewMaterialGBuffer.shader
  25. 10
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/DebugViewTiles.shader
  26. 5
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/LightingDebug.cs
  27. 1
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/LightingDebug.cs.hlsl
  28. 42
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/LightingDebugPanel.cs
  29. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Decal/DecalProjectorComponent.cs.meta
  30. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Decal/DecalSystem.cs
  31. 3
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/BaseUI.cs
  32. 14
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Camera/HDCameraUI.cs
  33. 7
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Material/LayeredLit/LayeredLitUI.cs
  34. 14
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Material/Lit/LitUI.cs
  35. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Material/Unlit/BaseUnlitUI.cs
  36. 4
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Material/Unlit/UnlitUI.cs
  37. 28
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/RenderLoopSettings/FrameSettingsUI.cs
  38. 12
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/RenderLoopSettings/GlobalLightLoopSettingsUI.cs
  39. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/RenderLoopSettings/LightLoopSettingsUI.cs
  40. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/RenderLoopSettings/SerializedFrameSettings.cs
  41. 9
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/RenderLoopSettings/SerializedGlobalLightLoopSettings.cs
  42. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/RenderLoopSettings/SerializedLightLoopSettings.cs
  43. 74
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDRenderPipeline.cs
  44. 7
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDRenderPipelineAsset.asset
  45. 12
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDRenderPipelineAsset.cs
  46. 9
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDStringConstants.cs
  47. 5
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Deferred.shader
  48. 7
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/DeferredDirectionalShadow.compute
  49. 283
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightDefinition.cs
  50. 325
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightDefinition.cs.hlsl
  51. 6
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/Deferred.compute
  52. 4
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/GlobalLightLoopSettings.cs
  53. 322
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/LightLoop.cs
  54. 24
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/LightLoop.hlsl
  55. 41
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/LightLoopDef.hlsl
  56. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/materialflags.compute
  57. 38
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightUtilities.hlsl
  58. 233
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumetrics/Resources/VolumetricLighting.compute
  59. 4
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumetrics/VolumetricLighting.cs
  60. 6
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/GGXConvolution/RuntimeFilterIBL.cs
  61. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/Lit.cs
  62. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/Lit.cs.hlsl
  63. 155
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/Lit.hlsl
  64. 4
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/Lit.shader
  65. 5
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/LitBuiltinData.hlsl
  66. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/LitData.hlsl
  67. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/LitTessellation.shader
  68. 9
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/RenderPipelineResources/CameraMotionVectors.shader
  69. 1
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/RenderPipelineResources/HDRenderPipelineResources.asset
  70. 5
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/ShaderPass/ShaderPassDBuffer.hlsl
  71. 3
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/ShaderPass/ShaderPassDepthOnly.hlsl
  72. 3
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/ShaderPass/ShaderPassDistortion.hlsl
  73. 3
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/ShaderPass/ShaderPassForward.hlsl
  74. 3
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/ShaderPass/ShaderPassForwardUnlit.hlsl
  75. 3
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/ShaderPass/ShaderPassGBuffer.hlsl
  76. 3
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/ShaderPass/ShaderPassLightTransport.hlsl
  77. 3
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/ShaderPass/ShaderPassVelocity.hlsl
  78. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Sky/AtmosphericScattering/AtmosphericScattering.hlsl
  79. 21
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Sky/OpaqueAtmosphericScattering.shader
  80. 6
      ScriptableRenderPipeline/HDRenderPipeline/package.json
  81. 95
      ScriptableRenderPipeline/LightweightPipeline/LWRP/Data/LightweightPipelineAsset.cs
  82. 2
      ScriptableRenderPipeline/LightweightPipeline/LWRP/Data/LightweightPipelineEditorResources.cs.meta
  83. 6
      ScriptableRenderPipeline/LightweightPipeline/package.json
  84. 4
      ScriptableRenderPipeline/master-package.json
  85. 4
      Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/CommonAssets/3DObjects/CornelBox/Cornell Box.fbx.meta
  86. 3
      Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/CommonAssets/3DObjects/Sphere/Sphere.fbx.meta
  87. 2
      Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/1xxx_Materials/1301_SubSurfaceScattering/ThicknessTest.MAT
  88. 665
      Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/1xxx_Materials/1302_SSS_MaxRadius.unity
  89. 6
      Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/1xxx_Materials/1302_SSS_MaxRadius/MaxRadius_1.mat
  90. 6
      Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/1xxx_Materials/1302_SSS_MaxRadius/MaxRadius_10.mat
  91. 6
      Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/1xxx_Materials/1302_SSS_MaxRadius/MaxRadius_15.mat
  92. 6
      Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/1xxx_Materials/1302_SSS_MaxRadius/MaxRadius_20.mat
  93. 6
      Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/1xxx_Materials/1302_SSS_MaxRadius/MaxRadius_5.mat
  94. 218
      Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/2xxx_Lighting/2301_Shadow_Mask.unity
  95. 3
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Assets/CommonAssets/Cornell Box.fbx.meta
  96. 3
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/LightweightPipelineAsset.asset
  97. 5
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/040_UpgradeScene/Models/Environment/Floor.fbx.meta
  98. 59
      Tests/Scripts/Editor/GraphicTests/Framework/TestFramework.cs
  99. 5
      Tests/Scripts/GraphicTests/Framework/SetupSceneForRenderPipelineTest.cs
  100. 4
      Tests/Scripts/GraphicTests/Framework/TestFrameworkTools.cs

1
.gitignore


*.aspx
*.sdf
*.userprefs
*.npmrc

999
ImageTemplates/HDRenderPipeline/Scenes/2xxx_Lighting/2301_Shadow_Mask.unity.png
文件差异内容过多而无法显示
查看文件

365
ImageTemplates/HDRenderPipeline/Scenes/3xxx_DebugView/3002_ObjectMotionVector.unity.png
文件差异内容过多而无法显示
查看文件

953
SampleScenes/HDTest/BasicProfiling.unity
文件差异内容过多而无法显示
查看文件

14
SampleScenes/HDTest/BasicProfiling/LightingData.asset
文件差异内容过多而无法显示
查看文件

2
SampleScenes/HDTest/BasicProfiling/ReflectionProbe-0.exr
文件差异内容过多而无法显示
查看文件

5
SampleScenes/HDTest/BasicProfiling/ReflectionProbe-1.exr


v/1channelschlist7BGRcompressioncompressiondataWindowbox2i�displayWindowbox2i�lineOrderlineOrderpixelAspectRatiofloat�?screenWindowCenterv2fscreenWindowWidthfloat�?Y�u��~@ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ ��~@ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������@��~@ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������`��~@ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������
v/1channelschlist7BGRcompressioncompressiondataWindowbox2i�displayWindowbox2i�lineOrderlineOrderpixelAspectRatiofloat�?screenWindowCenterv2fscreenWindowWidthfloat�?Y�����C�@BL0� V<�yX���c�Ǖ�+V<�yX���c�Ǖ�+V<�yX���c�Ǖ�+���������������������������������������������������������������������������������������������������������������������������������������������c�Ǎ�6<lx����c�Ǎ�6<lx����c�Ǎ�6<lx����������������������������������������������������������������������������������������������������������������������������������������������<,xX���c�Dž� <,xX���c�Dž� <,xX���c�Dž� ��������������������������������������������������������������������������������������������������������������������������������������������� ��C�@BL0� V<�yX���c�Ǖ�+V<�yX���c�Ǖ�+V<�yX���c�Ǖ�+���������������������������������������������������������������������������������������������������������������������������������������������c�Ǎ�6<lx����c�Ǎ�6<lx����c�Ǎ�6<lx����������������������������������������������������������������������������������������������������������������������������������������������<,xX���c�Dž� <,xX���c�Dž� <,xX���c�Dž� ���������������������������������������������������������������������������������������������������������������������������������������������@ ����?x�@�<x���,QFa�r a� �b ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������2�r$��r r q�aD(F�#Ǒ�c��1���Ǒ�c��1�`�0 y<�F�#Ǒ�c��1�`�0 y<�F�#�}�m�.����D��Wz�����*5�p a���R�á�Ã��T��3�PbT��LĩT�*i1*P��*����>�C�*�A.�挿��G�5Yw��".�iw��8d`������>|��ϟ8�)�cf� ����(4llk�r(O0Q$(P�r(O2د����g_/�7������w�u�{9|�����������?������_���g��@1e�?�����������?�����������?����������?���?�����������?�����������?�����������?�����������?�����������?�������k̀c̀c̀c̀b�z�� y� y� y� y� y� y� y� y� y� y� y� y� y� y� y� y�s/�Eop&�ou��(���,�Mu���(Q�ٕ�1f@?������� ��!��C$�� �0.&Di
�HI�"4���{
������� 'Փ��:�nh5���~�4�M���H�拷�(B� ������A�@!�a3@�a.@ 
�B�Ӈ����<4����d �9X�����Oo���^/����_/��x����������?������?�����������g���.��?�����������?�����������?������������� �������?�����������?�����������?�����������?�����������?�����������5��1��1��1��1����.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�/��ݷ��M��ޱT���`�~�_�Z���.�,����S�*T�86r�a���%%i��� �FF�H��H��FF�-� ���:��#Ո�N�[�6��MTA��#�zf�<��~���;&(����P�a��H$�dA ,H,��g ���g0X���� ����,ttt��������u�?�ߛ��z�ޯ7���s8�����������?������_����������������?�����������?�����������?�������x���p���?�����������?�����������?�����������?�����������?�����������?�����`��C�@BL0� V<�yX���c�Ǖ�+V<�yX���c�Ǖ�+V<�yX���c�Ǖ�+���������������������������������������������������������������������������������������������������������������������������������������������c�Ǎ�6<lx����c�Ǎ�6<lx����c�Ǎ�6<lx����������������������������������������������������������������������������������������������������������������������������������������������<,xX���c�Dž� <,xX���c�Dž� <,xX���c�Dž� ���������������������������������������������������������������������������������������������������������������������������������������������

94
SampleScenes/HDTest/BasicProfiling/ReflectionProbe-2.exr


v/1channelschlist7BGRcompressioncompressiondataWindowbox2i�displayWindowbox2i�lineOrderlineOrderpixelAspectRatiofloat�?screenWindowCenterv2fscreenWindowWidthfloat�?Y�u��~@ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ ��~@ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������@��~@ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������`��~@ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������
v/1channelschlist7BGRcompressioncompressiondataWindowbox2i�displayWindowbox2i�lineOrderlineOrderpixelAspectRatiofloat�?screenWindowCenterv2fscreenWindowWidthfloat�?Y� M�Ij ���@��?���
�G!#������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������2@ <x0�`��#��G�� <x0�`�[x���� �����|��&y ��2I2@I$�$0�`��#��G�� <��kқ�7�o��������_����ʮ�`��{=�f�{g�~�#F��o'4���R�0���7J~�O���$���]�������/��������������l��<�M$��?������������m����~���U��� ����g�{�o��ӥ�m斖�3������$�N����]�F _��������?��=�����������<�&d�&$�92I����)ӧN����� C_����]uX���`^������L�?���''''&�����ӧN�M�60+����뮰����o�������ߘP�f圚NM'���?� �ӧO������뮺��?��������`�o{`��/''&t�����N�?`��l4��]u�`���l{����?��?�|��2L$ɀ���t�������# ���}u�y�������~���"���K�������'O�O���$���_�]`�����?�������7,��90���������������������l����������~���?�����O��h��_��Y�����������6g�Mɓ�`���t��� ���}y���%�g���`�K��KKɀ��������������?������������_�L��,�l�0����߿�`���k���??����0n�����3����"��y990��������v,,�����?�� <0��#�� <0��#�� <0��#�}����
����g��<����3$�x`��G�x`������M��� _���^}`���l��?�6*z_�g��������_���M���%��_��>������{�y���������&��ܤܲs��?� +�M��������`2���_�`���f����{�f���������O��ZX���`�������q�����������`_��,�%fO=��r̓�ɀ��������6(+�����<�?�����g���2L���K������'����60+�����?�����=���,ޓ&i70���������� �_��__X���a[?��0
_�����?���O���
������� ����<�#�d���NL�?��
�����(�������6���(����������L��������0/=���#O�����FoI�&���������=������E��`�o{���`�'�`���L6����6�����1m��"�\�??���I�&���$����� �/���?��&�"��<���'�����G�����g�=���/�����0/=�����&I7��,ܳs��?� ���M0 z�"���`���g��"�d`D�K�������D�рEO������0��0��0��0��0������`���?��9$��3�2M�G�y�G�y�G�y�G���}?������8Z��+��_����`�?g���lT������Kɀ��������K��������?� �����jI6os�'�f���D�O���&�������6~�g��`�R���ϥ��� >�����'���_X���`_��������������,ϓ9����>�����������ų�`g��{ܹ�D������m�L*�`B�_����E��������l������f���W������ #_�������?� ?g���g� Q)�����`�������6,+��?���?�����7��~rfs��?� C��M�M
��?���?� [?����'G��?�`������x�������5���
2O?������?�������`���_�=�P�/�&���T�(���?� �`�fɞI��� �?��-�����`���0
�_��L���/��D���&������,���70���?���0�������T�������'����`�� z���@������'!D����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������1�1��1��1��1��1��1������< ��y���~y��fH�� ��� ��� ��� ���� }� `���?�?�7�VX1��� ��������������ƿ���M�$+��?������ʷ���� ij�M�I��?�?�8���� �`����)u�f �,��r`������1� ���?�?�8װj'?�O�NN`�����������3_���^y������`�Y�8K.`�����Sn���t-�V ����������Ѱg����1��:& ].`�����0m���� �����Bfy���f`���������r/����~�����0��o���}`�����`Ř4`ŏ�?�?�9� ������0o������ �w���`�I���rs���1T����������?����D?���������������?��� �������������h����`��������0c�� �`ǃ<1��� x0c�� �`ǀ�������&���I�1��� x0c�� �`ǃ�J�`�3�&�0��ql�tL���?�?�8t�`Ę3�$X?�?�8w���;�dI���>L�����¾�1����_�?�?�86`Ƙ3��?���X?�?�8$�����4?�������pk����'�`�����ְ��s��h�������`������`�����?�?�7���������� (����`���������������g�ɘ?�?�?�?�?�9f`�������& =`���������O�������>`� ��c�C�������0i��&��t��0��s����������������4����������0i��y�t0������0c��<��0c��<��0c��<���� x��'��g�c��<��0c��<���Ұn��-���?�0��p�����������ý� ��&`�����_����`�������������� ?�`���X?�?�85�`�ɟ�`������6��6����.�65������`��0��o��{X?�?�8 ������������ö ���������?��g_�������`� �������L����`������������������6������������$��?�?�?�?�?�?�?�?�?�?��@:3�������������_�����@�M��Q\���������P�,H��������������x�<�8��?��������������������x1��kAFr
$�L(�K,��(� ,��(��,��(��(� 0��0��0��,��(��0��(��(��(��,��(��(��,��,��0��,Œ,��(Š(��,�L,Š0� ,�K,� ,��,Ì,��0� 0��0‹,� ,� �L,�L8�L0�L0L0�L,� 0�L,�
4� 4�M4�N0� 4� 4�M�N0�;0�4É+�L0��$�M0�0�@8� 8ӌӎ0��4��4��0�I(��4Î8�� ,L� 0��� 0�Ë��@4�@4� ,��;�#? 8���8���,��7���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������;�s@4Ӽ4�8���ӿ4����}8{7����;4�� 8�4��~8� 4L,�L4� 0��7��4� 0�M�0��$� 4�8�N8ҍ��L4�M,@8� 8M4Ì0ӌ0�L8��4��0��$��4��,��(� 0�L0�M,� ,Ӎ0� (��,‹(�K0��(��0��0� ,��(��0��(��4�L0��,�K(��$��(��,��(��,��,��$��(��,�J(��(��(��(� (��,��(��0��$��(��(��(��(��(��,��(��(�K$C� �
#V!�zVJC����A"���s�}PyϨ{��N{�� �xRN&��U�-���1�������� ��l���h�[4x���<V�M+`&��G���~�f�ݛ
x ��O4x)�~�����~X��??��w����'���F�LrB �҂H�O��:C�O���xs��<��ȏ+`&��G�� ��l�� ���&�vĉ�eG�x��FB� R���[���&�(jk �� ���\ ��T��P�&BO�3OR�0��E��f8 ���Jm�d�M���z����@MD����&��2~s���3�?N���z� DH�^lsc��.w���$��c�� ��͈ �H�>�����1�B� #��TƤjGy� �B^Ǚ�+M�xG�^&��S�;�e��dY旉� %Ę$�Q&8��rgL�� �c�:#�:#�:9�V3`��� �(L�G��}�±G��}6�0Q#��>���&���U�P<�~p��*ǝ�:����}��Ht&G|</18q�*%C��U�NA�j�ӓ��C��Vn�rv�7�i����5�����Lκ��(`h�CC�6<�5�)�{Q��Pp��)JE���f#�a����>��U��)B�!�� k�`�`�?�2�S%�0S5K��g i�5��]@�i��h#Z5���J�x=.�H]UJ�+e�6 4�� ��z��nu$�-KRԵ-:�86@�5��CmkZ5����p �&��5� ���ư�r]JQ�s��`ƀ�RAZy��AD����N]K�8�'!�,��Aa��I��x;�(�����& ��i�<T��
�DD�"����M���b���j�������M/@$�P5R�FLO���7��8���DP��� ��k+:����E�6��S�s� �M��vJΩ�Ғx<�����/���sk��@��h 02�
>����G��`�� q( �~F�F˜S
aL)�0�£A�{D�� ������@MCw����i�P\ p�4&�КBhM �4&�k�t��ئ�
`��0YG�G��2Ɓ~x$��� ���_��/�k����~&IzT��5!�x�5Ȝ�rؐ���� b����*���4��}s������)�/�� �?|����4��k[����&�=���{�x ���<��@��ug������ ù(M�J�IcA&l��i w��xq�#���=
c\�%��>�:�s���������$$��(��P\�SH�0u*T�V�WV����* �̪G�!���+V�Z�jիVr �q�z� ��vȁ:5Pc��{����{�����R @�P}��U��vV�+U���T�Q͐�XS% Ҍ�� `ĭ�&���S��Pʞ-)HK�8��+���"Б���w����V^�^��������9h937�ic@M^x ��4��!�A~1��\aq������&!BFc��g�ɼeZ2�W����2D����JBBk�M������1�1��j6�m��m����ܞ����Vsa�9�1&$Ę�bLI�1&$Ęs:RP�&�<�����)
B��)
B��)
B��)
B��)
B�8�=
����q�l6�j6�l��l��lF�kƼk�M�0�&�"[?m��Fm:�� ����@R tɽq�<G�AY��A���<?�'x���p�借"�X���&�7���h �����~�4}����)7�@�ǗJ���{�\Bp��x�)�o���6�����Ȥs�wwU����7w;o6J�WV�Z�jիUӺ�Xc�����p� �����鎝���������Ӳzx]� � ��Iݾ�\��&���� O���kZֵ��2l�Hypf��<�N�իV�WV�GV�(�T��G�%�KЛ!�^ g�� R���\M�����c��}� �֡������m��( �T7�&��M&o��{@M@{�����i!���?M}}�����n��fE�(@Ā닸ᄩ�+���7;�^�G��G��vr?x �꺕FV���իN��;�0�P���ɣ�6�������=============;'�"��d�� ���V��&��d�;Zֵ�]��kZ�u�ֵ�?I����PHN�F�읓��j�eYZ���U�&��kV��3 �h���3�����ݟ��8��g����6ַۚ���ߋ�wK��A���*�U!���O�J@M�����������v�����w{��������3�(uH������~������@H"R'd�H�q�H�qN�*.����7K�]��&��꺵jիU�eYX�=�����������VOOOOLt잞���������vOU���:�P׀��4��h ����&���pAǃZ֮�Zֵ�kZֵ��ֵ�H��`f�� �Z���V�Z�YV���G�>�#Y v(�p� �H��2H�C�� A��Hm �Cl��n��k�� wCn�� gC=�GH\��P�a6z@M���>�o�o��i˷�������:��� D��u/S��:�N�S��z��j����@D��'��t��c��GgB=��i6 Z�j2�j�zw PJ
�O�?A��H'���ӺwOOOLt잘������c'�t�잫�d읓�s��ހ��5�&�4���[��3V뵫u�kZ֮�Zֵu��j�f���f9Ck�W��*��;*�ը�ի6:�6�~�`I���#�*.y�����AN A+i%krK�%��ݹ$���ݝ��wpswp�E-l�&�?��5������MԜ[gi�Ax����gn��3�gwzg��+���x}&��Д���m=���?ΐks�ë��K���jիV�� Џ���Ƙ�:�z��*ʲ��*���VOU����ej�zzvOOON��WU�u]WUβ�i�� ��O]�&���M=G��$B�V��5uٚ��]u�]v��u�κ٫���z������ը�ի6���5����qB�/�jP���t+Y
�B����n�[Н н Зt'B>��W��l858g��P�M���n���n����������P^s�<�u:�N��u:�N�Su.�n�Q��9ܰp�&́+�Y�lp��~ C� w#ݞk���+U˃�$���app]VN�իV�ZwV�Z�YZ�����jէejիV�Z�jӲ�p ���&�?}������L������۷�����Xp-ٚ�2�v��fj�u�]u�]u��g]l���뵝lu��v����h1Z�V���1ؠa.T����IR��o�r �f��fff!�� }����w����wq��y ����"��*d������m���j �������������O��s��s�ϋ|]�����Xo�A�߇��� „M@�?���C�����_ԫP%��R�� �l(��uj2�j�eYZ�j�ej2�jիU��U���էejիV�VV��d��7�h��Mx � 4i�&������fj�]�n�V뵫��3Zֳ���j�f��g]������9�s���{(��6)G9.- ��=��i�!��lҦ�T�TZS�Tr�����>�?*�E�Cܨ�K�M�6�ot�����)�7�����������{�������Ϩ+��9�'-�����'97��M�M�o�w���|���'7'8�v����'�>A��8���ZX ��E&Iq/�����/����^K�.`���p�틈���nżط��� pk�[���[�o-��.��ˉq.�pm�l�r��� ؽqz�2'7�h۴ѷh �n�F��&��䐫��qW,"�� a+د��W��]+�{���WJ�]+�t����W�]+�|����W��,%�U�aqW�*�9��� E;�&��~.�����u�z����[�K n� ��z_���Tpr������v�����h ���{����ݽ�w���<78�pv�=���C���=�����Sů��̀��7��������^i#;������� ��b�׷������M"k�������x ���&�?��4}�&�<������
�"랱%hA�A�.2A'���T7J� �4��N�I#*��*yG�k���
��G���&�.h��&�.h��&�.h��&�.h�R�o��[��G��h�R�����~I��J�����O�^r���ì?D �=�HI^��H��r;�)'A�B���\���M\���M����7�h�Ÿ��S�pMq&C��?AO$,8�9��5�\8S�g e\`� G`�#��i9�!�'� R�� �b�$��cbo��ր�����x �g�G��vs�vN��>Np���"g���p��L�8y�=�C������l��&2� 0 ���bP �'(1�-#Pt��t�>��Cd 38��] (8� �C��5q��b��r����,��p@M�����Rj�������i�c�8c�8c�p��G����Net�VeL��2�T�2���2�TqGq@M��J�dI�� ӘD��A�y���J�ÊD��Z ��$Nb6���D���
�� �|���-d�
�'�No��V��h �O���L�Z�h���>��˼@
��*����!��~J� O���P��`  L��R
��B�𵈢Q��lZ:�P� ����jK d:@�4ixҎ�s���/ T4�Ra Pi^���;�H��E�s����/�^@M����� ;��-KRԵ-KGx�Л! IjZ���h҅�`��% ��$�LR�:BLiRд���� (��':A�t��Zl��I�5�")e,�C�c�Da�g�[@��F"��� ���� &�jž RC�?�v� \X ��M[���5y�&��qA� u,��h�ⷕQ%4&��xH��!�0b���O��@g�a�zG�iHg
h*M���E p`�iQ�uGQ�9`p�¤+ � h�:����:����:T��7��4����ж����:���k�|ŀ��51�&�<Գ��Y}/������_K�}/�r��x�S��uGQ�uGQ�u h#��H_�8�GQ�uQ�P`2v a)!�hs ��4�Y�#|}��\����*)�!�k&��|sϷ ����R|S
A��9U��0�&�5�����������&��E�4�@���8���~q��5�>�x,��$Ї��7L�##nz�����rU;�a)�hss��"26��P�VPp�P`p4���ֵ�o��(��)�8~`mG8n.���ֵ�j���n8Oòo��G�5!�@MC"ࢌ(α����{����Y`�8ȹ��8Q��b^6�kZֵ��qxRp��� *
��lL��y&�s������o�f��h����b3������7�5�M›�7�r#@�7�j@MPx �'��HF���_|e���_Pt��$
@CF:�7��B��7�JE䚉�/'l&ft�����b�Y�1�Ƙ�c��1�<ș���"*R�ԙ3&d̙�2fLə3&d̙�2fL�5`&��M�7ʃ>g���3�|ϙ�>g���3�|ϙ�>g��w��G�"dLy�1�4Ƙ�b�Y�1f,o��o�M� �$8y����I�+�1!4S���P�8Cq ���?1��������k �j&�PO ��Jk �����HE�)M�0���)8er����2�9���W�"H`�zp�7����-'ˍ�y#xn䳼/9�x � kZ�]n��u�]u�p. +�"�,�[(�T�]GR�J�*W]u����q�M���z�5=�i�,A�kZֵ�k[�� ����\ź뭙�]u��뵭h � �uoV��Ox��48O
!�R ��PCL� :e��L��?O����ΙhӀ؞6�d�M���V����������&���p8��������ݺ��aA�G��d4�p�8A�|C8���}Wj���vx ��uڷ]n�������$pQ� ��2��JT��T��T�R�Z�j��*T�]I@$�&��M�
Ҍ�MkZ֮�ֵ�k:�kZ֝��V���P��f^.�u�]u�뵝m5�OZ։��妤���F%49C5(�����3���Z���������y)%K0Z+�<��x
����������o��h �n�����������k�N�9�6Ǡ�3ϩ��t�;?�������B~QìO҆p�:N7Q��~�>������`f]G]u��:�a�;F9y�b�7Q�:�J�*Te*T��ԩQ�e*T�Q��]Hn�,�T�� �f`C���kW]�kZֵ�kZ��kZ��`#?�i0ł�uun�뮸 �
��V��N�.QhE�CK�0g���l��Ι�9�:e��3�w�s������zP�� ��H����&�7����4m���Ѣ!g܃T�N�T�u:�N�]�>��ۉ(��
� Hr�9�Z��'NA������}W���뭔u��Tp,�����3��"���e*T��T��T�R�J�*T�R�VR�J��Q��Bo���h �n�GC�@� f��kV��ֵ�]v��j뭚���gXD&�8��h�)[��-�]p`�٠�*a�N�1<!�20y� �H���t���h'�$?��ܐ�'���M�7wp�@��b���4a�o���jC����{�M0��S�~�� ޙo�v���?�ww�{��|�gEQD8���
ٸ=��8��]��6u��:�b|vP�_�%9�Tu��*T���R�J�:�*T��u*Te*T�[�[���
�vo��G����H¸L �j�[����fkW]u�]u��u�k:�f���+����섅�O�ku�e�뀛��x=��,b��!��c7M٧f�t��/L�2�Ο���gO��>��Θ�4�j�]��� �M���h �����M0�!���:�N�R�:�N�S���u7S��S�7k�b�AU��5 �؃���Wӽ�&�����#8 �'��P��r�GR�R��������QԩR�J�*T�]J��R�Q��2���;��8��o���h �n�G�`!�V��]�n�V��5n�뮺뮺�f���j�fu�ζ4 ��o��4-� �]F\�,J��ˆD�����'(&�����;s��?��"{����������{���p�($>�M���0���������w�w�� �X� ���{|_��� ��!����e��#��K��;P/br`X�F�X� C������0s
1I��(�"V�e������Tu���R�]J�u�]u�]J���J��n�)[��-�)�p���v������i�~���o����:�R �k3Wj��uڷ]�]uֵٚ�u�kW[5u�:�]�� �:Ã�����n� �< !�E�?��#�a�+!�ś5ygj쇽ygj������;�f�f�gw,�C�Y����H�!���h �N�x �O��������Eb�6`"�Y^Y^X���˖<�卥�,ycye�c�-���'id�,_6\*M�_�qP�"��>�&����"#���F"YD�4Lc:&��YD�4MȚ%�4MȚ&��h�&��\c2&�q�Ș�dMD�&1���&��fD�s�o�����h �x � o�������X�DK�DK�DK�DK�D2"]��˺"��n]˺"��(�"��r�]�"��r���dD�dD�dD�dD�!_����'����烯�+xdp���V�� ��Aۅ�������߅~����������j����������7�]���^������ߗ����2��M������� ��ݿ���x ������x ���&ļѧ��r�����h ���&ſ����&�7�����&��\����}I�2Z�r7�x��l��s�{PjVKPhx�� �/�')�4R�)���5����K��h ��4y�&�4�怚<�G�h�@M
O�o���$�ऀ�<���{������8��<��E���y#%�-����Lt�����/����������&�4�怚<��&��M���<yq��xtG�:8!J��1:��<�
���v3J��*�Y ���,΂:N���J Ô�Œ>� �d���S$���7�o�S��=�4�T���C9R0��<���#2Q*x�ǟ("�
!��<�&��rm¨�+�&p �p�0 s�Y\p��i ��c��6��C��e�2��,B�X�A�`�AbX��.�>�t�Gн
�ڀ��7�����s�y��ˆ|G�|G�|H`�AI3jmM��6��;J#jm��6���6�bHۛ�nMɹ62X\�Bx��@�&g��H���C���ZAÜ�4
K���o�����
2;$��ZT�fiZO�^YIqt�+V;!�o�Ӧ����N5���j���J������ U�1���0���P��Z TP��#t\�U"&��@ ��!0!b<�* ��l���9�R.R ���c$�:�B�ZG\�1��
3�`�
ĸХ�z^���B`G#�Ñ���y���B�u$�� �f�t9�-KRԵ-KG �4�� +(�A�=��4 t#��� �h��_ ��B�­�V Q��f8Ȝ��q�pG &��- ��P\�N<�DD����>L�h� �))��?���DH�"f��7��<�.�(#��2��%7�o $�a�C��-�H��߂ܢ��}�P+���� B[�W"P��R1-&�Š�J�tbJ�,���# ��VH �eeFQ�e�1S=�0�@�FQ�eFQ�c�h�6#MDA����6��h�2��(�6����Jo��3�M��FѴmFѴmFѰ6 ���b #AuFѴmFQ�eF@� �i8�M�r��(�24��2l��RPBy
���P��2Ҵ������d�hR�R.H��
H����ҿ�%�^qS
AH>èt��59'7�ic@Mjx ��#��%#�`g����1�R�Pt�:)3,����1�������o@�A�}���?g$����q�~*$�c�A�e���-�:+����|����ߛ��*�bD`&��M�#�`�-�c��{����{�e�W��AC� ��Z&���{��i�PQ���x-� � ����`^ZA�KI����3���?��v#p�����$�:�x��?��3���>�F�HЄ���6��&���1��g�fq��gpy�)%��2 Ј��:�3���R�Q%���� y�6њ3Fh��4iF��iF��iFiP#����4��Ӥ�*J���*J���*JjMI�5$ 〛�4��&�4�SȡI�t�'I�t�'I�t�'I�t�'I�s�)� M)�4��$iF��iF��3Fh��4`&� >#�Xr�#ȿ�^:�V\�%(-�����9�4�1���/���W�n�Y���o���h ��JK�HOQڑ�Ύ�O�?���i���{(���8��9bƕ�c���a�V�O�$�&��m��ֵ��kFq�,��P�����]��u�]u�]u�]p�0����&瞥0���kZֵ�kƈT��0Fp.5�k;Zַ�Zր��}}w��y19 @�A�
��\��7��a�S�Ե^�W����w �™&(Lh ��f_��H�Ih?����}}�����n���w)NB�ˋ�����-��0e�U��׺��@M�m�ֵn֭�j��:,�X��2�u�[.��Vˮ�뮺뮺ٜ��u��&�?���w�@M% ����kWfkZֵ�v��kG�r!��+� ��hM]�뵬�k[��/ۂťG5eTbX�R�IM����jaʕ��i
���o����w��\���R�x'�*?�������5�������+�z��Ac�m��٘{�������������\]
�O�} 2 e��Aq��;w7]�߽�l V�jݙ��v`!���M� ��3���]l��W]u�u*T�]u�]uu���<1`&��M��њ�kZ��kZֵ�kZֵu�ִ�M�W�#ѠCL��u�:٭[4�:����v((Ir�$��9���y�%X�H'�?O�ޟ�j�^��};�[ϙE J
���Vo�Җ������&���I*F���R�:�S���u:�w����%�d��A�!�)�
���(`�v��R�7�����ٖ��u���%��(F�b�������W]J�u�]u�]u��uԮ��H���7�h��׷x ��R��Q��u�պ뵭kW]�kZ��f�u�Y��D���$N@.�E��g[5v��ML�13 XB��$����� p|��0�Bv�_�_�_�W��&�zE���8���,�&��Mh �����MPL�no���is�[靺g��������4���hO���/8g���l{����1�w����u��r�� �lH��+E��b�뮺��u�[.���u�]u��Te�[���u�I���3 &��M'v����4���p�-]�uٚ���j뮺뮻Zκ�g]l��p�`��H@� ��^��[.�\�-R�~'�T�D�cR���5��e��6�����^����^�W�ջ�ӻU��w3����Zžo�Ѧ��k ���FF���`oC.�S���Z�S���u7R���u�p�p��@�*�JD����i9���w���̻2�9�97�Äb���[.������e�u�뮺뮺뮣.��u�e�]s54x�h ��I�k@M%4ˣ4�vf�̷]�uٚ�]u�]u�]u�Y�[5u�:�g[��Lj��G#B$Z.λ<��)D�M�qD!���#0�=�� 6�K6Ӳݡ���_������{��2����´��t���6������Ch4�!扪���������/����}�9��>ww��V*�OB���J���~9��_���[7 ����B�-@H]u�]u�ˮ��uu�]u�]u�뮺뮣.���κ�D�n�M������v���������| P��fj�]�n�V뵫��3Zֳ���j�f��g]����r]/���� b}�m5�
"x5����3%A��{-�l�m�m�n[ph����-�m�m�n[r�����r�r�������@R?�&���������{������C��>���������-yk�^Z�ז����-w-yk�k�]�W�W�Gx�p��� ���ہE-������
��Q�/Y6�M��i��m6�M��m6�M��i��M��e���i��z���m6^�l�t�m6�/]5�R7��������������>�*�tU��-�T[��E�T[���*�t]EQTUEQT]E�*����EQtU��EQl���E�*|?��P�.k������ ��n�����On�ۦ�?�O~�N�Pq�7������5����ݿ��U�O�?���Mw���?���&��~� ��U���\��&��v�ݠ&������&��M���5a��v���7�l[�Mph ���`�4����@��?�����������>3&�!F��/�33�<0@3�N��Nÿ�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������;,��(�
(����(�0�L0��(�0��0�
(� ��,�J0� +�3@,�8�����?������x_<y�>xy�>x��C���G����G?������ �� � �� xPǀ xPǀ���_������������&�ə!rB��O��?�����s��</�<��<���<��!��#�����#��y�|� ��������������������?�����'�`����y�o�����?��<����?��^�����~��)���0�I����?����< s��x烼�w�����w��������ـ�كSf s�c����< ���x;�s��x;�{���M�jl�bl�����~����?����������I�l�k��5�9�o�����s�;�ߘ;���roSff M�5��x烜�7�y���9������sx97�������?�p'˗��,3���r~��R�d�4�YDL �
8L)��x1�3������� r&Œ�R�(d ���T�� JA�0M0VQs�S
q3� p��<#�;�vB<#�%�܉�� T�
e",)����p&Vo���`��g�?&I��E(LL�D�����TœL�7�#0�������`��7"l(�)�@�H�JA:@0�D�J��e0'0(�U0�0 ���#�<�d#�<"X0p ț
2J@��&R"�R�N� ,)!� FA�� A" J �N
R
�V
��D:"""" Z AdDDDD9���AX+PR
�A($�H�(#PB`E�����0B�F�J H�PL�pP��T��V���"!�X��Z """"!Ȉ�<<:
�X*��Q�� A$@� A"�#(��@�9|���3���|����\�# �`J���%�')H+a�xx�"�-��""""��C�à���)N ��A$ @��(!0"�\@�@��D�!H#P%�$A(&A8(AH*AX+C��興��,Ah-��DB`�AH(�pM�� J��A��B �jc�PBƨMQ�)mB������9 �#$�� !d�I!9�Q$&B�bHL�K�v8�,j�����/�?����3�P�22HY0@�I��Bd,�$��0��~�������������$�L�L�@)b�����P���Rڅ����?&r
&FI &B�"�Bs�HL���$�-@�q�X� �;-�_x����g ��dd��`�$,�)$'0
$��Y I �G��Q�q�uQ�FGQ�V:�28�[H�#R5#�:R8��8㎑��28�Tq�8��8㎪8���2�*�V�Gki�jF�q�GJGq�q�2:FG�������h�����G��Q�q�uQ�FGQ�V:�28�[H�#R5#�:R8��8㎑��28�Tq�8��8㎪8���2�*�V�Gki�jF�q�GJGq�q�2:FG ��7 ��/���^/��b�x�^9"�\�d\�2)�L�d6C d1��C8m �43����7����ؼ^/�H�"�!��dS"� ��C d1�o�������3����s$� ��7 ��/���^/��b�x�^9"�\�d\�2)�L�d6C d1��C8m �43����7����ؼ^/�H�"�!��dS"� ��C d1�ƨ�Tq�ddddq�FZ��V2;m���ZZF��JGhѣGq�2:FGj�5Gq�FFFGTe�ʵc#��m�5��jXԤqƍ4q�##�dp� ϗ����0���~�?rG��Q�q�����Uj2�X����c�ii�5)q�F�q�H��q�8�q�uQ��*Ռ��m�8֖��cR��4h��t�����z�5���>���>��oῄ2���@�d�ɓ��H��$��L���������?�!��� �!��'��$�>L�$�@ ��$�d�o�v�����3�?�<�2rL��z�5���>���>��oῄ2���@�d�ɓ��H��$��L���������?�!��� �!��'��$�>L�$�@ ��$�d��Udv�FGde��Q��m��m��ljXԱ�Gh��:R8㎪8�파�8��Q��-��m��m��Ա�cF�8ѭ�4t�q��._�/��`���O�''�q�G����j2�e��m��m���5,h��5�Ǝ��8㪎2;c##�22�e��m��m��m�5,jXѣ�4kc�)p�+�űaqV/E��5�������Ǒ����iȹ�)RH�E2�g��ذ�����k�������������H��d\�I�)$S"� f���3~���BO��O��\��$3���lX\U���f5�c��q�����||rG$ZE2.E$�G�)�L�2�qx�,.*����Ʊ��������>>9#�-"�"�E#�IȦCj8�������FZ���m��m��m��lkK5�q�F�:[Q�FFFFGV22Ռ��m��m��m��cZXѭ#�4h����<�._����)�0d�������޵ddddduc#-X�m��m��m��m�5���8ѣF�-��#####�j�[m��m��m��m��,h֑ƍ4h�a+�m�x��J������癙�f�Y$'3%$��@��䄬v-�m��a+m�����ffI�Jad��̔�I� � �'�x_{��?3����s<�2G$� &I��v-�m��a+m�����ffI�Jad��̔�I� ��ضٷ��������K��y��&a)��Bs2RHY$�.J��FFFF[j�n��o�����m�m���ѣF�m�[c####-�m�[m��[mm�ܶ�KlhѣF���\�~0ƌ���?�{�ldddde����m��Km���ۖ�im�4h��U�22222�V�u�������m�m��ƍ4km"�x�^.�c�������{�c��K$||g�$S"�^)�L����x�5�G���lsm�I���,����g�L�qx�E3 ����f��c�<����L�3�.\�H�^/��X�||}��1���������q�ȧ�dS"�x�^.�c�������{�c��K$||g�$S"�^)�L����[m�����m��m�ז�V�m)m�)J��mU��Km�-�����mym�m�Җ�R���>\�r�,�8I��''''ꪫmU��Km�-�����mym�m�Җ�R�����[m�����m��m�ז�V�m)m�)HB�B�mخj/��ſ��E��'"�1I�CNL!2Id,�+T!m�݊����[���_��r.s�$4��$��&B�7���?��������/2I3��'$��V�B� ��E�7x���?ȿ1��\�)6HiɄ&I!L���j�-�۱\�_�w�~?����NE�b�d���Bd�$�Ym����m��������o嶻m��lh��і���m��oKn�n����[k��m�ƍm���\�r�����0���99999#-����m�ޖ�����m���m��m��2�m��m�m�m�����mv�m��ѭ����V���o����{���r�v�t��$|S#2)1lz+GՏG7�o{����{ܹr;N:Ft�>)���pG�y�y���1'��$�r�˔�c�Z>�z9�s{����{��ˑ�q�3���L�Ȥű��V=�9��{����r���8��H��FdRmU�ۭץ���m��m���������J[Um��u�n�w�o��o��-���m�ҖK�.\�>_��eO�?|�����Z�m�[�KwK����-ymw-�m�����m������������^[]�r�m�,۫�!�� ���o��'<��rI&`<�\�L.`>�]��xk��������9�� s�I3����as/�����{����|�g��.d���Y�'$����{�_���������&a��I�&$� ��WxC����7����$6Ny3��L�y0�$�\�m���R��������myk�嵕m[m��m�������t����k�^_-��j�m���\�d�9?��0�'�?���I��'m��[MKwwK�[�����/��U�m��m���j[��]����m�-y|����m���ն9^���f���^ۗ/N�x�Y�FZIlsV��{�������{n\�:e�)f�i$p�����͛��~l�����3�f{32NO�)2G�ն9^���f���^ۗ/N�x�Y�FZIlsV��{�������{n\�:e�)f�i$}�֖ޖ��/K�ۿ�-���^WmvڹV�Mim�oM���������k��v�m��l8B�/�9��s��L����������9$�i�-�-��^�}��[-v�����r������ޛ��w�w�����k����W*�j�+^;x���>{���s��1�����I�2I 2I V�k�o�������|yf>��I1fI!�I0�����y�����~d�g��̓̓�$���lV�v��<|�����ǖc�1����d�d���׎�?�珞������}&9><�b̒CL�R�m�7z^�����m���~�k�U��ڥ���n��/��-��m�����|��m��g)~s����s �?�����$�Զ�{Mޗ������m��_����{m��m����/K�Km��k��k��*��m^=�����߷�ƞ����e鑗�3.^=�����߷�ƞ����e鑗�3.`��o3f�發���,�vd˖I&I�)3&^=�����߷�ƞ����e鑗�3.^=�����߷�ƞ����e鑗�3.kK�MK�w��`�7����YW�W5�ݦ����}���~�]��嫘pO)g���Y��������?���ޓޒNv֗v������� o���v����kK�MK�w��`�7����YW�W ����o���������?</������/�����7<�<����|��</�����������@$1�<��������������������� ��������������� �?�<�~x_<'� ������0����������7����b_��&|����7��?����y?����� 9��<s�g�K��s������x �097��x96`jy����<���x � s�_��x=�����&�vo&� O0� �����`��g��<���<��L 9��<s�g�K��s������x �097��x96`jy����<���x � s�_��x=�����&�vo&� O0�����/����������1�����d�N`�¦%���x�&����x3����A��s�l�b�)��&A�d(��&R ��@��y�LK���L L p/�� �g��83���9��� R��L�$�QH/`L�)�"��o0ș������pY(�/0��pba� �i�n�3�� �1��x3�g \�[ X�
@<���bę
)� ��� �P'0^aS���<��� �g�<�c�� �g �@���@�H�ya ʼn2R �)�D��LLID‘11$)B�$)B���R$��!P�TLLLL*
�1(Q
�(Q�(�Q���1(�LL(�1110�)D�0�LLI
D�I
D��*&�"aHT*
�B�DLJD¡DJD�DJ&D�baDLJ%
!DLL8"�_� d� 0Ɖ������LLID‘11$)B�$)B���R$��!P�TLLLL*
�1(Q
�(Q�(�Q���1(�LL(�1110�)D�0�LLI
D�I
D��*&�"aHT*
�B�DLJD¡DJD�DJ&D�baDLJ%
!DLL����k���/{;����矒 �M&f $ŒI$��FI3-�}�Z�a:� ���.��������I����1d��AI!d��L��>�0��&`�y�~Iॼ/� X�'V�{������<��_�i30X�&,��H)$,�2I�)o ���; հ^�w�w��/�?$��L�&I�$,�
I $��fڪ���Q��Vڶ�m���m��[im��K5)Km����Um�m�m�����m�������R��i����s��L�cd���Uj�-���m��o���m����cR�4jR��UQ���2�j�V�m���m��Km-�5)cF�)l^5�1t|]����>9��������������)ǑN-#$�d^5�1t|]����>9��������������)ǑN-#$�f)��c�<��<�1��_��^5�1t|]����>9��������������)ǑN-#$�d^5�1t|]����>9��������������)ǑN-#$�eU����[m��n���m��jۖ�m���5�*�de�2�m��u���m��Vܶ�m����ѭ)��_����O'���UX��le��m��m-��m���m��m����ZR��F[c-��m�[im��m�m�m��m�m�Ґ�� ��~��/xnx��s�x��1%��$�� O���$!<��� ��~��/xnx��s�x��1%��$�� O���$!<�o�����?����$�$��$����������� � M���ė�L� NL1>B$���B���������� � M���ė�L� NL1>B$���F[le��iiiu����+���[��Z��lkm�m���m�����[w����YnZ�j�m���6����������[le��iiiu����+���[��Z��lkm�m���m�����[w����YnZ�j�m���4V��(�ݶ�ls{o��f>2����i4�$y��L���e��m�om���l��[ټv�&�d�#��>)�o���?�4s/��<����e��m�om���l��[ټv�&�d�#��>)�Z>,��v�m����sm���{7�٤�l��|R��2�m��[�����-��k����rڶ�m��m��[�����-��k����rڶ�m�)��?�`�$�����m�������Km���oon\����m��m�������Km���oon\����m������턻 h%����<�$I2B��Ʌ� �&�������1���?�L�0�$� �g&$.d�p��/���?���<�<�<|�2O kcq�{� v�K���&y�H�d��3� �2L%�����l%�cA/����a"I�$�L.H\�6�m����{z[�m���mv����j�m��m����{z[�m���mv����j�m�� ���������|�m��[��������m���ok.\����m��[��������m���ok.\����V>9��m�s~����{�n_�q����I,��3��c��m���7�����v���K�)4��#:I�
f���`��3�ɜ�U��m��o߷�s{��ۗ��e/d��K$t��%X���m����{�7���~i�R�JM$�GHΒ]i�-5ԽԻ��m��o忖����Z�W-֚��]K�K����m��[�k/k.U��r��/���?��g ?���'�u����R�R��}��m���Z��˕j�\�ZkKMu/u.�w�m���o嬽��V�U��_����{������c�93��)91I9"ߋ�?��?�x������L�&q��'&)'&��������fe眞|�$�L[�~���������I����?����$��~/������������1����������]i{�K���k��e�j�ʹ�5֗�ԿoK`�6�~�^��\��p�����,�0I���'���5֗�ԿoK`�6�~�^��\���]i{�K���k��e�j�ʹ�7�o{7�~���{��iܶ�#)L���3��c��7��߿{����4�[{���GH��o�7���^d�����_&H��9�s{ٽ����{���N巹Jdt���|s�9���������s��r�܌�2:FX���]MM߻������m�������Z����jn��������k�/��*Հy�����0�������KMu57~���[���������˕j�Zk����w����m���_�VV\�V����������x�r~Hi̜�a ��d�;����������g�9���s'$�Bfy�0������`��2I3�O2O�$���o������3��O� 9��L!3<̐�~����������3��CNd��L�3&��zn���_������������5�{�t�����m���k��W�����y��?���3 p���?��~��{ޛ������m���_�������{���7w����m����/��w��[m��߶o�o~��{��-��~o{%$��߷�l���������[�2���JI��l������͞�����2��|���3m��o~ٿٽ����oܷ�e��씒�o~����{����߹o4��{�)%5/{�����`�7�/�]���U5/{�����`�7�/�]���V!��>�g��3333���?��'�}5/{�����`�7�/�]���U5/{�����`�7�/�]���T�{����{�����?s��I���2?������=��{���������I������{�������y�o<�<�<̓������������zO��s�fc$̏�o{���{����='�}9�31�fSSw���_�`�5����MMޗ����X���/k�VV�~s�|����,2�O�ϾJjn���K�,2ƿ��{]򲩩���}/�������w�ʽ��������s���������^���߿�{�������~Jv�0�Lٿ7���0�I�2&|�&r����߿�{�������~Jv�/f��������{���n}?�%;i������K��Km��k������]����w�������m����������`���/�����0� ����O����w���}/��-��m���_���wʦ�M���_��[m��_���/����_�������?���y�|����� �'������w��`�0ǘc�1���{�� xpǀ��<�$�_�������?���y�|����� �'������w��?�q������0�����7������3��?�p����`����������������?����w��� M���s�k��s�����������?���9��`57��`����O�3̐{�\����w�?������������7������x s�o������?����`;�?�����zl?�pE����O'��ɀ����� � ��+�[��� po�|���7�� ��5`.d�
��2vE #�1H��b`#�J`'03�S��n��5�� �o�|���7�k Հ���+�S d� � ��@� _0�O���i�������� � ��+�[��� po�|���7�� ��5`.d�
��2vE #�1H��b`#�J`'03�S��n��5�� �o�|���7�k Հ���+�S d� � ��@� _!�<:" �DCâtD<D<D: ���"!������DB"!DC�C�C�r"�DC���rCâ"tD<: �DC�C�C��x�"DD!�"�D<D<D9�!�!ȄD9��0������K'�����<:" �DCâtD<D<D: ���"!������DB"!DC�C�C�r"�DC���rCâ"tD<: �DC�C�C��x�"DD!�"�D<D<D9�!�!ȄD9�� Q�P��'] �7�������<��$ē$�L��3�^@���;\N�� o�����x1�fI�&I��&2f)0���y��0�M��{��:��q:�_x1���������&$�&2d�ɘ���u ��uо�c|��������2LI2Ld�0)�1I����m��Z[m-������ڶڵm��m��m��m--������om[mZ��m��h��ɀ2�m��m--������om[mZ��m��m��m����K{m��m�����[m��m�ǣ�v�m��7�������N<�v�&�I�Ǒ��y�G����m�o{����ޜyx��M&�I�#�8�4��� f����G����m�o{����ޜyx��M&�I�#�8�7���m���>������8���4�M&�G�q���m�]u��-�m���mv��˗-��m��m�]u��-�m���mv��˗-��l8B���� �������n�����n�m���k��.\�m��m��n�����n�m���k��.\�m��a����{��^x���b���x�1{1d�.rCI�1<����b���/<[�y���Y�_����y9!���L8s��`���'�'១��{��^x���b���x�1{1d�.rCI�1<����b���/<[�y���Y�_����y9!���Km�[m��������m���ۖ�����m��m��������m��{{rնܶ�`ß����<?�����ۭ���{{o��m��m���V�r�m��u��]oom��m������j�n[m�Ͷǣ�������{���;�;d�x��i$t�m�=���7��{�������%;�XΓI#������ ����ɟ#�m�G7����{����zw�v�N��3��H��lz9���o{����{ӽ��Jw���&�GMi����R����m���~��^շ.U�i����R����m���~��^շ.U�8��?��`�$����i����R����m���~��^շ.U�i����R����m���~��^շ.U�=�>��{�� p��9����<�L�I�$����{ox=`����3?0x��I��2B��`��4�d�?̓��<����{ox=`����3?0x��I��2B��`�x��m��1�{���g��I2Y&H\�M��뮥���w��o���o���.\�V�]u�R�v�������߷��˗.\� �?���Y�X�����i����{�~������o���e˗.U��]uԽݿn��m��������˗*�m��{����{������ӹ{%$����m��m�{߷���{��7�N�씒�RK&��7�����2����ɟ&m��m��{�����{����ܽ��RJId��m����������s�ӧr�JII)%������������mk���eeeZ�����������_���{YYYV������L2C'��?������Խ��/���k�^_/k++*�-555/wwK�-�8��ח����ʵ�����������7�����s��s���c��{������r��'��dg��0� ������d'�����ϓ~o�����������7�����s��s���c��{������r��'��dg��7�����~��n��m��_k��e�{{��n���w�����������V^�������)����'������{�M���.���������ח���������/���m��m��k�y|���c�����f�{�ѹs�Kzw/x�FR9�o{��o��`��>���r���e0��������y��y���������c��������cF�Ͻ-�ܽ�)H�9��{ٿ���4n\��ޝ��2���Խ�z_���`�����]�ef���K��/�� �������k+0������`�?��'ɩ�{���K�.�$-k�v����MKޗ��_�v!k�_k���VC_���������?�{�>L^gɘbI�I$�������������|��ϓ0ē��I�������������dɞ�3�|� ������������1y�&a�'�$���/�������ߙ�b�>L�O�I&��黾�K����m���k��|��Vjj^�������m��o�������ef |����`�$����'��zn�����m��m�����_+���������/���m���������YY~��o�����zt���i��~Jw�����~��1��K����ͷ�� �?����3s,��3��L߷�����7�ƞ�/�s�g6ߒ��{=�o߳{ i���79�sm�)�����K���2��k���򾛿~���]�@Z��~W߾V)�����f�?�O��M߿M���.� -��+��+���龗���d����}��q�����������������#�G����������g;��������0�ɼ�$��|�$|������y���7���s����������������������#�n�����3�������������� ��������?���0� �����~��~�w��f����]�w�����`��/��w�����7���{����ܥ����{����7���{����ܥ����`��7���� ��y��/�ϓ9o��������{���r����e���������{���r����e�M���M����m����W���WoM���M����m����W���W`��/��Y���0�'��O��O���������m������������������m����������

24
ScriptableRenderPipeline/Core/CoreRP/Camera/FreeCamera.cs


public float m_LookSpeedController = 120f;
public float m_LookSpeedMouse = 10.0f;
public float m_MoveSpeed = 10.0f;
public float m_MoveSpeedIncrement = 2.5f;
public float m_Turbo = 10.0f;
private static string kMouseX = "Mouse X";

private static string kVertical = "Vertical";
private static string kHorizontal = "Horizontal";
private static string kYAxis = "YAxis";
private static string kSpeedAxis = "Speed Axis";
void OnEnable()
{
RegisterInputs();

{
#if UNITY_EDITOR
List <InputManagerEntry> inputEntries = new List<InputManagerEntry>();
List<InputManagerEntry> inputEntries = new List<InputManagerEntry>();
inputEntries.Add(new InputManagerEntry { name = kYAxis, kind = InputManagerEntry.Kind.KeyOrButton, btnPositive = "page up", altBtnPositive = "joystick button 5", btnNegative = "page down", altBtnNegative = "joystick button 4", gravity = 1000.0f, deadZone = 0.001f, sensitivity = 1000.0f });
inputEntries.Add(new InputManagerEntry { name = kSpeedAxis, kind = InputManagerEntry.Kind.KeyOrButton, btnPositive = "home", btnNegative = "end", gravity = 1000.0f, deadZone = 0.001f, sensitivity = 1000.0f });
inputEntries.Add(new InputManagerEntry { name = kSpeedAxis, kind = InputManagerEntry.Kind.Axis, axis = InputManagerEntry.Axis.Seventh, gravity = 1000.0f, deadZone = 0.001f, sensitivity = 1000.0f });
InputRegistering.RegisterInputs(inputEntries);
#endif
}

// If the debug menu is running, we don't want to conflict with its inputs.
if(DebugMenuManager.instance.menuUI.isEnabled)
if (DebugMenuManager.instance.menuUI.isEnabled)
return;
float inputRotateAxisX = 0.0f;

inputRotateAxisX += (Input.GetAxis(kRightStickX) * m_LookSpeedController * Time.deltaTime);
inputRotateAxisY += (Input.GetAxis(kRightStickY) * m_LookSpeedController * Time.deltaTime);
float inputChangeSpeed = Input.GetAxis(kSpeedAxis);
if (inputChangeSpeed != 0.0f)
{
m_MoveSpeed += inputChangeSpeed * m_MoveSpeedIncrement;
if (m_MoveSpeed < m_MoveSpeedIncrement) m_MoveSpeed = m_MoveSpeedIncrement;
}
float inputYAxis = Input.GetAxis(kYAxis);
bool moved = inputRotateAxisX != 0.0f || inputRotateAxisY != 0.0f || inputVertical != 0.0f || inputHorizontal != 0.0f;
bool moved = inputRotateAxisX != 0.0f || inputRotateAxisY != 0.0f || inputVertical != 0.0f || inputHorizontal != 0.0f || inputYAxis != 0.0f;
if (moved)
{
float rotationX = transform.localEulerAngles.x;

moveSpeed *= Input.GetAxis("Fire1") > 0.0f ? m_Turbo : 1.0f;
transform.position += transform.forward * moveSpeed * inputVertical;
transform.position += transform.right * moveSpeed * inputHorizontal;
transform.position += Vector3.up * moveSpeed * inputYAxis;
}
}
}

20
ScriptableRenderPipeline/Core/CoreRP/Editor/CameraEditorUtils.cs


const float k_PreviewNormalizedSize = 0.2f;
internal static Material s_GUITextureBlit2SRGBMaterial;
internal static Material GUITextureBlit2SRGBMaterial
public static Material GUITextureBlit2SRGBMaterial
{
get
{

near[i] = camera.ViewportToWorldPoint(near[i]);
}
return true;
}
public static Vector3 PerspectiveClipToWorld(Matrix4x4 clipToWorld, Vector3 viewPositionWS, Vector3 positionCS)
{
var tempCS = new Vector3(positionCS.x, positionCS.y, 0.95f);
var result = clipToWorld.MultiplyPoint(tempCS);
var r = result - viewPositionWS;
return r.normalized * positionCS.z + viewPositionWS;
}
public static void GetFrustrumPlaneAt(Matrix4x4 clipToWorld, Vector3 viewPosition, float distance, Vector3[] points)
{
points[0] = new Vector3(-1, -1, distance); // leftBottomFar
points[1] = new Vector3(-1, 1, distance); // leftTopFar
points[2] = new Vector3(1, 1, distance); // rightTopFar
points[3] = new Vector3(1, -1, distance); // rightBottomFar
for (var i = 0; i < 4; ++i)
points[i] = PerspectiveClipToWorld(clipToWorld, viewPosition, points[i]);
}
static Vector3 MidPointPositionSlider(Vector3 position1, Vector3 position2, Vector3 direction)

15
ScriptableRenderPipeline/Core/CoreRP/Editor/CoreEditorDrawers.cs


using System;
using System.Security.Principal;
using UnityEditor.AnimatedValues;
using UnityEngine;

public static IDrawer Group(params IDrawer[] drawers)
{
return new GroupDrawerInternal(drawers);
}
public static IDrawer LabelWidth(float width, params IDrawer[] drawers)
{
return Action((s, d, o) =>
{
var l = EditorGUIUtility.labelWidth;
EditorGUIUtility.labelWidth = width;
for (var i = 0; i < drawers.Length; ++i)
drawers[i].Draw(s, d, o);
EditorGUIUtility.labelWidth = l;
}
);
}
public static IDrawer Action(params ActionDrawer[] drawers)

23
ScriptableRenderPipeline/Core/CoreRP/Editor/CoreEditorUtils.cs


using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Text;
using UnityEngine;

var members = new List<string>();
while (me != null)
{
members.Add(me.Member.Name);
// For field, get the field name
// For properties, get the name of the backing field
var name = me.Member is FieldInfo
? me.Member.Name
: "m_" + me.Member.Name.Substring(0, 1).ToUpper() + me.Member.Name.Substring(1);
members.Add(name);
me = me.Expression as MemberExpression;
}

}
// UI Helpers
public static void DrawMultipleFields(string label, SerializedProperty[] ppts, GUIContent[] lbls)
{
GUILayout.BeginHorizontal();
EditorGUILayout.PrefixLabel(GetContent(label));
GUILayout.BeginVertical();
var labelWidth = EditorGUIUtility.labelWidth;
EditorGUIUtility.labelWidth = 45;
for (var i = 0; i < ppts.Length; ++i)
EditorGUILayout.PropertyField(ppts[i], lbls[i]);
GUILayout.EndVertical();
GUILayout.EndHorizontal();
EditorGUIUtility.labelWidth = labelWidth;
}
public static void DrawSplitter()
{
var rect = GUILayoutUtility.GetRect(1f, 1f);

3
ScriptableRenderPipeline/Core/CoreRP/Editor/ShaderGenerator/CSharpToHLSL.cs


writer.Write("\n#endif\n");
var customFile = it.Key + ".custom.hlsl";
if (File.Exists(customFile))
writer.Write("#include \"{0}\"", Path.GetFileName(customFile));
}
}
}

60
ScriptableRenderPipeline/Core/CoreRP/ShaderLibrary/Common.hlsl


#ifndef INTRINSIC_WAVEREADFIRSTLANE
// Warning: for correctness, the argument must have the same value across the wave!
// Warning: for correctness, the argument's value must be the same across all lanes of the wave.
TEMPLATE_1_REAL(WaveReadFirstLane, scalarValue, return scalarValue)
TEMPLATE_1_INT(WaveReadFirstLane, scalarValue, return scalarValue)
#endif

return faceID;
}
#endif // INTRINSIC_CUBEMAP_FACE_ID
// Intrinsic isnan can't be used because it require /Gic to be enabled on fxc that we can't do. So use IsNAN instead
bool IsNAN(float n)
{
return (n < 0.0 || n > 0.0 || n == 0.0) ? false : true;
}
bool IsNAN(float2 v)
{
return (IsNAN(v.x) || IsNAN(v.y)) ? true : false;
}
bool IsNAN(float3 v)
{
return (IsNAN(v.x) || IsNAN(v.y) || IsNAN(v.z)) ? true : false;
}
bool IsNAN(float4 v)
{
return (IsNAN(v.x) || IsNAN(v.y) || IsNAN(v.z) || IsNAN(v.w)) ? true : false;
}
// ----------------------------------------------------------------------------
// Common math functions

// 'z' is the view-space Z position (linear depth).
// saturate() the output of the function to clamp them to the [0, 1] range.
// encodingParams = { n, log2(f/n), 1/n, 1/log2(f/n) }
// TODO: plot and modify the distribution to be a little more linear.
float EncodeLogarithmicDepth(float z, float4 encodingParams)
{
return log2(max(0, z * encodingParams.z)) * encodingParams.w;

// saturate(d) to clamp the output of the function to the [n, f] range.
// encodingParams = { n, log2(f/n), 1/n, 1/log2(f/n) }
// TODO: plot and modify the distribution to be a little more linear.
float DecodeLogarithmicDepth(float d, float4 encodingParams)
{
return encodingParams.x * exp2(d * encodingParams.y);

// (position = positionCS) => (clipSpaceTransform = use default)
// (position = positionVS) => (clipSpaceTransform = UNITY_MATRIX_P)
// (position = positionWS) => (clipSpaceTransform = UNITY_MATRIX_VP)
float2 ComputeNormalizedDeviceCoordinates(float3 position, float4x4 clipSpaceTransform = k_identity4x4)
float4 ComputeClipSpaceCoordinates(float3 position, float4x4 clipSpaceTransform = k_identity4x4)
{
float4 positionCS = mul(clipSpaceTransform, float4(position, 1.0));

positionCS.y = -positionCS.y;
#endif
return positionCS.xy * (rcp(positionCS.w) * 0.5) + 0.5;
return positionCS;
}
// Use case examples:
// (position = positionCS) => (clipSpaceTransform = use default)
// (position = positionVS) => (clipSpaceTransform = UNITY_MATRIX_P)
// (position = positionWS) => (clipSpaceTransform = UNITY_MATRIX_VP)
float2 ComputeNormalizedDeviceCoordinates(float3 position, float4x4 clipSpaceTransform = k_identity4x4)
{
float4 positionCS = ComputeClipSpaceCoordinates(position, clipSpaceTransform);
return positionCS.xy * (rcp(positionCS.w) * 0.5) + 0.5;
}
float4 ComputeClipSpacePosition(float2 positionNDC, float deviceDepth)

// From forward
// deviceDepth and linearDepth come directly from .zw of SV_Position
void UpdatePositionInput(float deviceDepth, float linearDepth, float3 positionWS, inout PositionInputs posInput)
PositionInputs GetPositionInput(float2 positionSS, float2 invScreenSize, float deviceDepth, float linearDepth, float3 positionWS, uint2 tileCoord)
PositionInputs posInput = GetPositionInput(positionSS, invScreenSize, tileCoord);
return posInput;
}
PositionInputs GetPositionInput(float2 positionSS, float2 invScreenSize, float deviceDepth, float linearDepth, float3 positionWS)
{
return GetPositionInput(positionSS, invScreenSize, deviceDepth, linearDepth, positionWS, uint2(0, 0));
void UpdatePositionInput(float deviceDepth, float4x4 invViewProjMatrix, float4x4 viewProjMatrix, inout PositionInputs posInput)
PositionInputs GetPositionInput(float2 positionSS, float2 invScreenSize, float deviceDepth, float4x4 invViewProjMatrix, float4x4 viewProjMatrix, uint2 tileCoord)
PositionInputs posInput = GetPositionInput(positionSS, invScreenSize, tileCoord);
return posInput;
}
PositionInputs GetPositionInput(float2 positionSS, float2 invScreenSize, float deviceDepth, float4x4 invViewProjMatrix, float4x4 viewProjMatrix)
{
return GetPositionInput(positionSS, invScreenSize, deviceDepth, invViewProjMatrix, viewProjMatrix, uint2(0, 0));
}
// The view direction 'V' points towards the camera.

12
ScriptableRenderPipeline/Core/CoreRP/ShaderLibrary/Debug.hlsl


else if (index == 8)
outColor = real3(0.75, 1.0, 0.25);
else if (index == 9)
outColor = real3(0.75, 0.25, 1.0);
outColor = real3(0.75, 0.25, 1.0);
outColor = real3(0.25, 1.0, 0.75);
outColor = real3(0.25, 1.0, 0.75);
outColor = real3(0.75, 0.75, 0.25);
outColor = real3(0.75, 0.75, 0.25);
outColor = real3(0.75, 0.25, 0.75);
outColor = real3(0.75, 0.25, 0.75);
outColor = real3(0.25, 0.75, 0.75);
outColor = real3(0.25, 0.75, 0.75);
outColor = real3(0.25, 0.25, 0.75);
outColor = real3(0.25, 0.25, 0.75);
else if (index == 15)
outColor = real3(0.75, 0.25, 0.25);

9
ScriptableRenderPipeline/Core/CoreRP/ShaderLibrary/VolumeRendering.hlsl


real HenyeyGreensteinPhasePartVarying(real asymmetry, real cosTheta)
{
real g = asymmetry;
real f = rsqrt(1 + g * g - 2 * g * cosTheta); // x^(-1/2)
return pow(abs(1 + g * g - 2 * g * cosTheta), -1.5);
return f * f * f; // x^(-3/2)
}
real HenyeyGreensteinPhaseFunction(real asymmetry, real cosTheta)

real CornetteShanksPhasePartVarying(real asymmetry, real cosTheta)
{
real g = asymmetry;
real f = rsqrt(1 + g * g - 2 * g * cosTheta); // x^(-1/2)
real h = (1 + cosTheta * cosTheta);
return (1 + cosTheta * cosTheta) * pow(abs(1 + g * g - 2 * g * cosTheta), -1.5);
return h * (f * f * f); // h * f^(-3/2)
}
// A better approximation of the Mie phase function.

real x = 1 - exp(-extinction * intervalLength);
// Avoid division by 0.
real rcpExt = extinction != 0 ? rcp(extinction) : 0;
real rcpExt = (extinction != 0) ? rcp(extinction) : 0;
weight = x * rcpExt;
offset = -log(1 - rndVal * x) * rcpExt;

4
ScriptableRenderPipeline/Core/package.json


{
"name": "com.unity.render-pipelines.core",
"description": "Core library for Unity render pipelines.",
"version": "0.1.25",
"version": "0.1.27",
"com.unity.postprocessing": "0.1.7"
"com.unity.postprocessing": "0.1.8"
}
}

14
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Camera/HDAdditionalCameraData.cs


[RequireComponent(typeof(Camera))]
public class HDAdditionalCameraData : MonoBehaviour, ISerializationCallbackReceiver
{
// The light culling use standard projection matrices (non-oblique)
// If the user overrides the projection matrix with an oblique one
// He must also provide a callback to get the equivalent non oblique for the culling
public delegate Matrix4x4 NonObliqueProjectionGetter(Camera camera);
#pragma warning disable 414 // CS0414 The private field '...' is assigned but its value is never used
// We can't rely on Unity for our additional data, we need to version it ourself.
[SerializeField]

m_frameSettingsIsDirty = false;
}
}
// For custom projection matrices
// Set the proper getter
public NonObliqueProjectionGetter nonObliqueProjectionGetter = GeometryUtils.CalculateProjectionMatrix;
public Matrix4x4 GetNonObliqueProjection(Camera camera)
{
return nonObliqueProjectionGetter(camera);
}
void RegisterDebug()

19
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Camera/HDCamera.cs


public Vector4 viewParam;
public PostProcessRenderContext postprocessRenderContext;
// Non oblique projection matrix (RHS)
public Matrix4x4 nonObliqueProjMatrix
{
get
{
return m_AdditionalCameraData != null
? m_AdditionalCameraData.GetNonObliqueProjection(camera)
: GeometryUtils.CalculateProjectionMatrix(camera);
}
}
public Matrix4x4 viewProjMatrix
{
get { return projMatrix * viewMatrix; }

static Dictionary<Camera, HDCamera> s_Cameras = new Dictionary<Camera, HDCamera>();
static List<Camera> s_Cleanup = new List<Camera>(); // Recycled to reduce GC pressure
HDAdditionalCameraData m_AdditionalCameraData;
public HDCamera(Camera cam)
{
camera = cam;

m_AdditionalCameraData = cam.GetComponent<HDAdditionalCameraData>();
Reset();
}

prevViewProjMatrix *= cameraDisplacement; // Now prevViewProjMatrix correctly transforms this frame's camera-relative positionWS
}
// Warning: near and far planes appear to be broken.
// Warning: near and far planes appear to be broken (or rather far plane seems broken)
GeometryUtility.CalculateFrustumPlanes(viewProjMatrix, frustumPlanes);
for (int i = 0; i < 4; i++)

}
// Near, far.
Vector4 forward = (camera.cameraType == CameraType.Reflection) ? camera.worldToCameraMatrix.GetRow(2) : new Vector4(camera.transform.forward.x, camera.transform.forward.y, camera.transform.forward.z, 0.0f);
Vector3 forward = viewParam.x < 0.0f ? camera.transform.forward : -camera.transform.forward;
forward = viewParam.x < 0.0f ? forward : -forward;
frustumPlaneEquations[4] = new Vector4( forward.x, forward.y, forward.z, -Vector3.Dot(forward, relPos) - camera.nearClipPlane);
frustumPlaneEquations[5] = new Vector4(-forward.x, -forward.y, -forward.z, Vector3.Dot(forward, relPos) + camera.farClipPlane);

101
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/DebugColorPicker.shader


int _ColorPickerMode;
float3 _ColorPickerFontColor;
float _ApplyLinearToSRGB;
float _RequireToFlipInputTexture;
struct Attributes
{

return output;
}
float4 DisplayPixelInformationAtMousePosition(Varyings input, float4 result, float4 mouseResult)
float4 DisplayPixelInformationAtMousePosition(Varyings input, float4 result, float4 mouseResult, float4 mousePixelCoord)
if (_MousePixelCoord.z >= 0.0 && _MousePixelCoord.z <= 1.0 && _MousePixelCoord.w >= 0 && _MousePixelCoord.w <= 1.0)
bool flipY = _RequireToFlipInputTexture > 0.0;
if (mousePixelCoord.z >= 0.0 && mousePixelCoord.z <= 1.0 && mousePixelCoord.w >= 0 && mousePixelCoord.w <= 1.0)
{
// As when we read with the color picker we don't go through the final blit (that current hardcode a conversion to sRGB)
// and as our material debug take it into account, we need to a transform here.

// Display message offset:
int displayTextOffsetX = 1.5 * DEBUG_FONT_TEXT_WIDTH;
#if UNITY_UV_STARTS_AT_TOP
int displayTextOffsetY = -DEBUG_FONT_TEXT_HEIGHT;
#else
int displayTextOffsetY = DEBUG_FONT_TEXT_HEIGHT;
#endif
int displayTextOffsetY;
if (flipY)
{
displayTextOffsetY = DEBUG_FONT_TEXT_HEIGHT;
}
else
{
displayTextOffsetY = -DEBUG_FONT_TEXT_HEIGHT;
}
uint2 displayUnormCoord = uint2(_MousePixelCoord.x + displayTextOffsetX, _MousePixelCoord.y + displayTextOffsetY);
uint2 displayUnormCoord = uint2(mousePixelCoord.x + displayTextOffsetX, mousePixelCoord.y + displayTextOffsetY);
uint2 unormCoord = input.positionCS.xy;
if (_ColorPickerMode == COLORPICKERDEBUGMODE_BYTE || _ColorPickerMode == COLORPICKERDEBUGMODE_BYTE4)

DrawCharacter('R', _ColorPickerFontColor, unormCoord, displayUnormCoord, result.rgb);
DrawCharacter(':', _ColorPickerFontColor, unormCoord, displayUnormCoord, result.rgb);
DrawInteger(mouseValue.x, _ColorPickerFontColor, unormCoord, displayUnormCoord, result.rgb);
DrawCharacter('R', _ColorPickerFontColor, unormCoord, displayUnormCoord, flipY, result.rgb);
DrawCharacter(':', _ColorPickerFontColor, unormCoord, displayUnormCoord, flipY, result.rgb);
DrawInteger(mouseValue.x, _ColorPickerFontColor, unormCoord, displayUnormCoord, flipY, result.rgb);
displayUnormCoord.x = _MousePixelCoord.x + displayTextOffsetX;
displayUnormCoord.x = mousePixelCoord.x + displayTextOffsetX;
DrawCharacter('G', _ColorPickerFontColor, unormCoord, displayUnormCoord, result.rgb);
DrawCharacter(':', _ColorPickerFontColor, unormCoord, displayUnormCoord, result.rgb);
DrawInteger(mouseValue.y, _ColorPickerFontColor, unormCoord, displayUnormCoord, result.rgb);
displayUnormCoord.x = _MousePixelCoord.x + displayTextOffsetX;
DrawCharacter('G', _ColorPickerFontColor, unormCoord, displayUnormCoord, flipY, result.rgb);
DrawCharacter(':', _ColorPickerFontColor, unormCoord, displayUnormCoord, flipY, result.rgb);
DrawInteger(mouseValue.y, _ColorPickerFontColor, unormCoord, displayUnormCoord, flipY, result.rgb);
displayUnormCoord.x = mousePixelCoord.x + displayTextOffsetX;
DrawCharacter('B', _ColorPickerFontColor, unormCoord, displayUnormCoord, result.rgb);
DrawCharacter(':', _ColorPickerFontColor, unormCoord, displayUnormCoord, result.rgb);
DrawInteger(mouseValue.z, _ColorPickerFontColor, unormCoord, displayUnormCoord, result.rgb);
displayUnormCoord.x = _MousePixelCoord.x + displayTextOffsetX;
DrawCharacter('B', _ColorPickerFontColor, unormCoord, displayUnormCoord, flipY, result.rgb);
DrawCharacter(':', _ColorPickerFontColor, unormCoord, displayUnormCoord, flipY, result.rgb);
DrawInteger(mouseValue.z, _ColorPickerFontColor, unormCoord, displayUnormCoord, flipY, result.rgb);
displayUnormCoord.x = mousePixelCoord.x + displayTextOffsetX;
DrawCharacter('A', _ColorPickerFontColor, unormCoord, displayUnormCoord, result.rgb);
DrawCharacter(':', _ColorPickerFontColor, unormCoord, displayUnormCoord, result.rgb);
DrawInteger(mouseValue.w, _ColorPickerFontColor, unormCoord, displayUnormCoord, result.rgb);
DrawCharacter('A', _ColorPickerFontColor, unormCoord, displayUnormCoord, flipY, result.rgb);
DrawCharacter(':', _ColorPickerFontColor, unormCoord, displayUnormCoord, flipY, result.rgb);
DrawInteger(mouseValue.w, _ColorPickerFontColor, unormCoord, displayUnormCoord, flipY, result.rgb);
DrawCharacter('X', _ColorPickerFontColor, unormCoord, displayUnormCoord, result.rgb);
DrawCharacter(':', _ColorPickerFontColor, unormCoord, displayUnormCoord, result.rgb);
DrawFloat(mouseResult.x, _ColorPickerFontColor, unormCoord, displayUnormCoord, result.rgb);
DrawCharacter('X', _ColorPickerFontColor, unormCoord, displayUnormCoord, flipY, result.rgb);
DrawCharacter(':', _ColorPickerFontColor, unormCoord, displayUnormCoord, flipY, result.rgb);
DrawFloat(mouseResult.x, _ColorPickerFontColor, unormCoord, displayUnormCoord, flipY, result.rgb);
displayUnormCoord.x = _MousePixelCoord.x + displayTextOffsetX;
displayUnormCoord.x = mousePixelCoord.x + displayTextOffsetX;
DrawCharacter('Y', _ColorPickerFontColor, unormCoord, displayUnormCoord, result.rgb);
DrawCharacter(':', _ColorPickerFontColor, unormCoord, displayUnormCoord, result.rgb);
DrawFloat(mouseResult.y, _ColorPickerFontColor, unormCoord, displayUnormCoord, result.rgb);
displayUnormCoord.x = _MousePixelCoord.x + displayTextOffsetX;
DrawCharacter('Y', _ColorPickerFontColor, unormCoord, displayUnormCoord, flipY, result.rgb);
DrawCharacter(':', _ColorPickerFontColor, unormCoord, displayUnormCoord, flipY, result.rgb);
DrawFloat(mouseResult.y, _ColorPickerFontColor, unormCoord, displayUnormCoord, flipY, result.rgb);
displayUnormCoord.x = mousePixelCoord.x + displayTextOffsetX;
DrawCharacter('Z', _ColorPickerFontColor, unormCoord, displayUnormCoord, result.rgb);
DrawCharacter(':', _ColorPickerFontColor, unormCoord, displayUnormCoord, result.rgb);
DrawFloat(mouseResult.z, _ColorPickerFontColor, unormCoord, displayUnormCoord, result.rgb);
displayUnormCoord.x = _MousePixelCoord.x + displayTextOffsetX;
DrawCharacter('Z', _ColorPickerFontColor, unormCoord, displayUnormCoord, flipY, result.rgb);
DrawCharacter(':', _ColorPickerFontColor, unormCoord, displayUnormCoord, flipY, result.rgb);
DrawFloat(mouseResult.z, _ColorPickerFontColor, unormCoord, displayUnormCoord, flipY, result.rgb);
displayUnormCoord.x = mousePixelCoord.x + displayTextOffsetX;
DrawCharacter('W', _ColorPickerFontColor, unormCoord, displayUnormCoord, result.rgb);
DrawCharacter(':', _ColorPickerFontColor, unormCoord, displayUnormCoord, result.rgb);
DrawFloat(mouseResult.w, _ColorPickerFontColor, unormCoord, displayUnormCoord, result.rgb);
DrawCharacter('W', _ColorPickerFontColor, unormCoord, displayUnormCoord, flipY, result.rgb);
DrawCharacter(':', _ColorPickerFontColor, unormCoord, displayUnormCoord, flipY, result.rgb);
DrawFloat(mouseResult.w, _ColorPickerFontColor, unormCoord, displayUnormCoord, flipY, result.rgb);
}
}
}

float4 Frag(Varyings input) : SV_Target
{
if (_RequireToFlipInputTexture > 0.0)
{
input.texcoord.y = 1.0 - input.texcoord.y;
}
float4 mouseResult = SAMPLE_TEXTURE2D(_DebugColorPickerTexture, sampler_DebugColorPickerTexture, _MousePixelCoord.zw);
float4 mousePixelCoord = _MousePixelCoord;
if (_RequireToFlipInputTexture > 0.0)
{
mousePixelCoord.y = _ScreenParams.y - mousePixelCoord.y;
// Note: We must not flip the mousePixelCoord.w coordinate
}
return DisplayPixelInformationAtMousePosition(input, result, mouseResult);
float4 mouseResult = SAMPLE_TEXTURE2D(_DebugColorPickerTexture, sampler_DebugColorPickerTexture, mousePixelCoord.zw);
float4 finalResult = DisplayPixelInformationAtMousePosition(input, result, mouseResult, mousePixelCoord);
return finalResult;
}
ENDHLSL

5
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/DebugDisplay.cs


public static string kShadowMaxValueDebug = "Shadow Range Max Value";
public static string kLightingDebugMode = "Lighting Debug Mode";
public static string kOverrideSmoothnessDebug = "Override Smoothness";
public static string kOverrideSmoothnessValueDebug = "Override Smoothness Value";
public static string kOverrideSmoothnessValueDebug = "Override Smoothness Value";
public static string kDebugEnvironmentProxyDepthScale = "Debug Environment Proxy Depth Scale";
public static string kDebugLightingAlbedo = "Debug Lighting Albedo";
public static string kFullScreenDebugMode = "Fullscreen Debug Mode";
public static string kFullScreenDebugMip = "Fullscreen Debug Mip";

DebugMenuManager.instance.AddDebugItem<LightingDebugPanel, float>(kSkyReflectionMipmapDebug, () => lightingDebugSettings.skyReflectionMipmap, (value) => lightingDebugSettings.skyReflectionMipmap = (float)value, DebugItemFlag.None, new DebugItemHandlerFloatMinMax(0.0f, 1.0f));
DebugMenuManager.instance.AddDebugItem<LightingDebugPanel, LightLoop.TileClusterDebug>(kTileClusterDebug,() => lightingDebugSettings.tileClusterDebug, (value) => lightingDebugSettings.tileClusterDebug = (LightLoop.TileClusterDebug)value);
DebugMenuManager.instance.AddDebugItem<LightingDebugPanel, LightLoop.TileClusterCategoryDebug>(kTileClusterCategoryDebug,() => lightingDebugSettings.tileClusterDebugByCategory, (value) => lightingDebugSettings.tileClusterDebugByCategory = (LightLoop.TileClusterCategoryDebug)value);
DebugMenuManager.instance.AddDebugItem<LightingDebugPanel, float>(kDebugEnvironmentProxyDepthScale, () => lightingDebugSettings.environmentProxyDepthScale, value => lightingDebugSettings.environmentProxyDepthScale = (float)value, DebugItemFlag.None, new DebugItemHandlerFloatMinMax(0.1f, 50f));
DebugMenuManager.instance.AddDebugItem<int>("Rendering", kFullScreenDebugMode, () => (int)fullScreenDebugMode, (value) => fullScreenDebugMode = (FullScreenDebugMode)value, DebugItemFlag.None, new DebugItemHandlerIntEnum(DebugDisplaySettings.renderingFullScreenDebugStrings, DebugDisplaySettings.renderingFullScreenDebugValues));
DebugMenuManager.instance.AddDebugItem<DebugMipMapMode>("Rendering", "MipMaps", () => mipMapDebugSettings.debugMipMapMode, (value) => SetMipMapMode((DebugMipMapMode)value));

39
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/DebugDisplay.hlsl


float4 _DebugLightingAlbedo; // xyz = albedo for diffuse, w unused
float4 _DebugLightingSmoothness; // x == bool override, y == override value
float4 _MousePixelCoord; // xy unorm, zw norm
float _DebugEnvironmentProxyDepthScale;
CBUFFER_END
TEXTURE2D(_DebugFont); // Debug font to write string in shader

// color is current screen color
// color of the font to use
// direction is 1 or -1 and indicate fixedUnormCoord block shift
void DrawCharacter(uint asciiValue, float3 fontColor, uint2 currentUnormCoord, inout uint2 fixedUnormCoord, inout float3 color, int direction)
void DrawCharacter(uint asciiValue, float3 fontColor, uint2 currentUnormCoord, inout uint2 fixedUnormCoord, bool flipY, inout float3 color, int direction)
#if UNITY_UV_STARTS_AT_TOP
localCharCoord.y = DEBUG_FONT_TEXT_HEIGHT - localCharCoord.y;
#endif
if (!flipY)
localCharCoord.y = DEBUG_FONT_TEXT_HEIGHT - localCharCoord.y;
asciiValue -= DEBUG_FONT_TEXT_ASCII_START; // Our font start at ASCII table 32;
uint2 asciiCoord = uint2(asciiValue % DEBUG_FONT_TEXT_COUNT_X, asciiValue / DEBUG_FONT_TEXT_COUNT_X);

}
// Shortcut to not have to file direction
void DrawCharacter(uint asciiValue, float3 fontColor, uint2 currentUnormCoord, inout uint2 fixedUnormCoord, inout float3 color)
void DrawCharacter(uint asciiValue, float3 fontColor, uint2 currentUnormCoord, inout uint2 fixedUnormCoord, bool flipY, inout float3 color)
DrawCharacter(asciiValue, fontColor, currentUnormCoord, fixedUnormCoord, color, 1);
DrawCharacter(asciiValue, fontColor, currentUnormCoord, fixedUnormCoord, flipY, color, 1);
void DrawInteger(int intValue, float3 fontColor, uint2 currentUnormCoord, inout uint2 fixedUnormCoord, inout float3 color)
void DrawInteger(int intValue, float3 fontColor, uint2 currentUnormCoord, inout uint2 fixedUnormCoord, bool flipY, inout float3 color)
{
const uint maxStringSize = 16;

for (uint i = 0; i < maxStringSize; ++i)
{
// Numeric value incurrent font start on the second row at 0
DrawCharacter((absIntValue % 10) + '0', fontColor, currentUnormCoord, fixedUnormCoord, color, -1);
DrawCharacter((absIntValue % 10) + '0', fontColor, currentUnormCoord, fixedUnormCoord, flipY, color, -1);
if (absIntValue < 10)
break;
absIntValue /= 10;

if (intValue < 0)
{
DrawCharacter('-', fontColor, currentUnormCoord, fixedUnormCoord, color, -1);
DrawCharacter('-', fontColor, currentUnormCoord, fixedUnormCoord, flipY, color, -1);
}
// 5. Reset cursor at end location

void DrawFloat(float floatValue, float3 fontColor, uint2 currentUnormCoord, inout uint2 fixedUnormCoord, inout float3 color)
void DrawFloat(float floatValue, float3 fontColor, uint2 currentUnormCoord, inout uint2 fixedUnormCoord, bool flipY, inout float3 color)
int intValue = int(floatValue);
DrawInteger(intValue, fontColor, currentUnormCoord, fixedUnormCoord, color);
DrawCharacter('.', fontColor, currentUnormCoord, fixedUnormCoord, color);
int fracValue = int(frac(floatValue) * 1e6); // 6 digit
DrawInteger(fracValue, fontColor, currentUnormCoord, fixedUnormCoord, color);
if (IsNAN(floatValue))
{
DrawCharacter('N', fontColor, currentUnormCoord, fixedUnormCoord, flipY, color);
DrawCharacter('a', fontColor, currentUnormCoord, fixedUnormCoord, flipY, color);
DrawCharacter('N', fontColor, currentUnormCoord, fixedUnormCoord, flipY, color);
}
else
{
int intValue = int(floatValue);
DrawInteger(intValue, fontColor, currentUnormCoord, fixedUnormCoord, flipY, color);
DrawCharacter('.', fontColor, currentUnormCoord, fixedUnormCoord, flipY, color);
int fracValue = int(frac(floatValue) * 1e6); // 6 digit
DrawInteger(fracValue, fontColor, currentUnormCoord, fixedUnormCoord, flipY, color);
}
}
#endif

48
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/DebugFullScreen.shader


#pragma fragment Frag
#include "CoreRP/ShaderLibrary/Common.hlsl"
#include "CoreRP/ShaderLibrary/Color.hlsl"
#include "../ShaderVariables.hlsl"
#include "../Debug/DebugDisplay.cs.hlsl"

float _RequireToFlipInputTexture;
struct Attributes
{

}
// Motion vector debug utilities
// >>>
float DistanceToLine(float2 p, float2 p1, float2 p2)
{
float2 center = (p1 + p2) * 0.5;

float2 SampleMotionVectors(float2 coords)
{
#if UNITY_UV_STARTS_AT_TOP
coords.y = 1.0 - coords.y;
#endif
float2 mv = SAMPLE_TEXTURE2D(_DebugFullScreenTexture, sampler_DebugFullScreenTexture, coords).xy;
#if UNITY_UV_STARTS_AT_TOP
mv.y *= -1.0;
#endif
return mv;
return SAMPLE_TEXTURE2D(_DebugFullScreenTexture, sampler_DebugFullScreenTexture, coords).xy;
// <<<
// end motion vector utilties
if (_RequireToFlipInputTexture > 0.0)
{
input.texcoord.y = 1.0 - input.texcoord.y;
}
// SSAO
if (_FullScreenDebugMode == FULLSCREENDEBUGMODE_SSAO)
{

{
#if UNITY_UV_STARTS_AT_TOP
input.texcoord.y = 1.0 - input.texcoord.y;
#endif
if (any(isnan(color)) || any(isinf(color)))
if (IsNAN(color) || any(isinf(color)))
color = float4(1.0, 0.0, 1.0, 1.0);
color = float4(1.0, 0.0, 0.0, 1.0);
// Dim the color buffer so we can see NaNs & Infs better
color.rgb *= 0.25;
color.rgb = Luminance(color.rgb).xxx;
}
return color;

float rows = floor(kGrid * _ScreenParams.y / _ScreenParams.x);
float cols = kGrid;
float2 size = _ScreenParams.xy / float2(cols, rows);
float body = min(size.x, size.y) / 1.4142135623730951; // sqrt(2)
float body = min(size.x, size.y) / sqrt(2.0);
float2 texcoord = input.positionCS.xy;
float2 center = (floor(texcoord / size) + 0.5) * size;
texcoord -= center;

if (_RequireToFlipInputTexture > 0.0)
{
arrow_coord.y = 1.0 - arrow_coord.y;
}
if (_RequireToFlipInputTexture == 0.0)
{
mv_arrow.y *= -1;
}
// Skip empty motion
float d = 0.0;

5
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/DebugViewMaterialGBuffer.shader


float4 Frag(Varyings input) : SV_Target
{
// input.positionCS is SV_Position
PositionInputs posInput = GetPositionInput(input.positionCS.xy, _ScreenSize.zw);
float depth = LOAD_TEXTURE2D(_MainDepthTexture, posInput.positionSS).x;
UpdatePositionInput(depth, UNITY_MATRIX_I_VP, UNITY_MATRIX_VP, posInput);
float depth = LOAD_TEXTURE2D(_MainDepthTexture, input.positionCS.xy).x;
PositionInputs posInput = GetPositionInput(input.positionCS.xy, _ScreenSize.zw, depth, UNITY_MATRIX_I_VP, UNITY_MATRIX_VP);
BSDFData bsdfData;
BakeLightingData bakeLightingData;

10
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/DebugViewTiles.shader


float4 Frag(Varyings input) : SV_Target
{
// positionCS is SV_Position
PositionInputs posInput = GetPositionInput(input.positionCS.xy, _ScreenSize.zw, uint2(input.positionCS.xy) / GetTileSize());
float depth = LOAD_TEXTURE2D(_MainDepthTexture, posInput.positionSS).x;
UpdatePositionInput(depth, UNITY_MATRIX_I_VP, UNITY_MATRIX_VP, posInput);
float depth = LOAD_TEXTURE2D(_MainDepthTexture, input.positionCS.xy).x;
PositionInputs posInput = GetPositionInput(input.positionCS.xy, _ScreenSize.zw, depth, UNITY_MATRIX_I_VP, UNITY_MATRIX_VP, uint2(input.positionCS.xy) / GetTileSize());
int2 pixelCoord = posInput.positionSS.xy;
int2 tileCoord = (float2)pixelCoord / GetTileSize();

int maxLights = 32;
if (tileCoord.y < LIGHTCATEGORY_COUNT && tileCoord.x < maxLights + 3)
{
PositionInputs mousePosInput = GetPositionInput(_MousePixelCoord.xy, _ScreenSize.zw, mouseTileCoord);
float depthMouse = LOAD_TEXTURE2D(_MainDepthTexture, mousePosInput.positionSS).x;
UpdatePositionInput(depthMouse, UNITY_MATRIX_I_VP, UNITY_MATRIX_VP, mousePosInput);
float depthMouse = LOAD_TEXTURE2D(_MainDepthTexture, _MousePixelCoord.xy).x;
PositionInputs mousePosInput = GetPositionInput(_MousePixelCoord.xy, _ScreenSize.zw, depthMouse, UNITY_MATRIX_I_VP, UNITY_MATRIX_VP, mouseTileCoord);
uint category = (LIGHTCATEGORY_COUNT - 1) - tileCoord.y;
uint start;

5
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/LightingDebug.cs


IndirectDiffuseOcclusionFromSsao,
IndirectDiffuseGtaoFromSsao,
IndirectSpecularOcclusionFromSsao,
IndirectSpecularGtaoFromSsao
IndirectSpecularGtaoFromSsao,
EnvironmentProxyVolume,
}
public enum ShadowMapDebugMode

public bool displaySkyReflection = false;
public float skyReflectionMipmap = 0.0f;
public float environmentProxyDepthScale = 20;
public LightLoop.TileClusterDebug tileClusterDebug = LightLoop.TileClusterDebug.None;
public LightLoop.TileClusterCategoryDebug tileClusterDebugByCategory = LightLoop.TileClusterCategoryDebug.Punctual;

1
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/LightingDebug.cs.hlsl


#define DEBUGLIGHTINGMODE_INDIRECT_DIFFUSE_GTAO_FROM_SSAO (6)
#define DEBUGLIGHTINGMODE_INDIRECT_SPECULAR_OCCLUSION_FROM_SSAO (7)
#define DEBUGLIGHTINGMODE_INDIRECT_SPECULAR_GTAO_FROM_SSAO (8)
#define DEBUGLIGHTINGMODE_ENVIRONMENT_PROXY_VOLUME (9)
#endif

42
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/LightingDebugPanel.cs


DebugItem lightingDebugModeItem = m_DebugPanel.GetDebugItem(DebugDisplaySettings.kLightingDebugMode);
lightingDebugModeItem.handler.OnEditorGUI();
if ((DebugLightingMode)lightingDebugModeItem.GetValue() == DebugLightingMode.SpecularLighting)
switch ((DebugLightingMode)lightingDebugModeItem.GetValue())
EditorGUI.indentLevel++;
DebugItem overrideSmoothnessItem = m_DebugPanel.GetDebugItem(DebugDisplaySettings.kOverrideSmoothnessDebug);
overrideSmoothnessItem.handler.OnEditorGUI();
if ((bool)overrideSmoothnessItem.GetValue())
{
m_DebugPanel.GetDebugItem(DebugDisplaySettings.kOverrideSmoothnessValueDebug).handler.OnEditorGUI();
}
EditorGUI.indentLevel--;
}
else if ((DebugLightingMode)lightingDebugModeItem.GetValue() == DebugLightingMode.DiffuseLighting)
{
EditorGUI.indentLevel++;
m_DebugPanel.GetDebugItem(DebugDisplaySettings.kDebugLightingAlbedo).handler.OnEditorGUI();
EditorGUI.indentLevel--;
case DebugLightingMode.SpecularLighting:
{
EditorGUI.indentLevel++;
DebugItem overrideSmoothnessItem = m_DebugPanel.GetDebugItem(DebugDisplaySettings.kOverrideSmoothnessDebug);
overrideSmoothnessItem.handler.OnEditorGUI();
if ((bool)overrideSmoothnessItem.GetValue())
{
m_DebugPanel.GetDebugItem(DebugDisplaySettings.kOverrideSmoothnessValueDebug).handler.OnEditorGUI();
}
EditorGUI.indentLevel--;
break;
}
case DebugLightingMode.DiffuseLighting:
{
EditorGUI.indentLevel++;
m_DebugPanel.GetDebugItem(DebugDisplaySettings.kDebugLightingAlbedo).handler.OnEditorGUI();
EditorGUI.indentLevel--;
break;
}
case DebugLightingMode.EnvironmentProxyVolume:
{
++EditorGUI.indentLevel;
m_DebugPanel.GetDebugItem(DebugDisplaySettings.kDebugEnvironmentProxyDepthScale).handler.OnEditorGUI();
--EditorGUI.indentLevel;
break;
}
}
var fullScreenDebugModeHandler = m_DebugPanel.GetDebugItem(DebugDisplaySettings.kFullScreenDebugMode);

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Decal/DecalProjectorComponent.cs.meta


serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
icon: {fileID: 2800000, guid: b057b73ec5a603e4aa80ccf4b34db0d3, type: 3}
userData:
assetBundleName:
assetBundleVariant:

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Decal/DecalSystem.cs


m_CachedTransforms[decal.CullIndex] = decal.transform.localToWorldMatrix;
Matrix4x4 decalRotation = Matrix4x4.Rotate(decal.transform.rotation);
// z/y axis swap for normal to decal space
// z/y axis swap for normal to decal space, Unity is column major
float y0 = decalRotation.m01;
float y1 = decalRotation.m11;
float y2 = decalRotation.m21;

3
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/BaseUI.cs


for (var i = 0; i < m_AnimBools.Length; ++i)
{
m_AnimBools[i].valueChanged.RemoveAllListeners();
m_AnimBools[i].valueChanged.AddListener(repaint);
if (repaint != null)
m_AnimBools[i].valueChanged.AddListener(repaint);
}
Update();

14
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Camera/HDCameraUI.cs


static void Drawer_FieldClippingPlanes(HDCameraUI s, SerializedHDCamera p, Editor owner)
{
GUILayout.BeginHorizontal();
EditorGUILayout.PrefixLabel(_.GetContent("Clipping Planes"));
GUILayout.BeginVertical();
var labelWidth = EditorGUIUtility.labelWidth;
EditorGUIUtility.labelWidth = 45;
EditorGUILayout.PropertyField(p.nearClippingPlane, _.GetContent("Near|The closest point relative to the camera that drawing will occur."));
EditorGUILayout.PropertyField(p.farClippingPlane, _.GetContent("Far|The furthest point relative to the camera that drawing will occur.\n"));
GUILayout.EndVertical();
GUILayout.EndHorizontal();
EditorGUIUtility.labelWidth = labelWidth;
_.DrawMultipleFields(
"Clipping Planes",
new[] { p.nearClippingPlane, p.farClippingPlane },
new[] { _.GetContent("Near|The closest point relative to the camera that drawing will occur."), _.GetContent("Far|The furthest point relative to the camera that drawing will occur.\n") });
}
static void Drawer_FieldNormalizedViewPort(HDCameraUI s, SerializedHDCamera p, Editor owner)

7
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Material/LayeredLit/LayeredLitUI.cs


string uvBase = string.Format("{0}{1}", kUVBase, i);
string uvDetail = string.Format("{0}{1}", kUVDetail, i);
if (((UVDetailMapping)material.GetFloat(uvDetail) == UVDetailMapping.UV2) ||
((UVBaseMapping)material.GetFloat(uvBase) == UVBaseMapping.UV2))
if (((UVDetailMapping)material.GetFloat(uvDetail) == UVDetailMapping.UV2) || ((UVBaseMapping)material.GetFloat(uvBase) == UVBaseMapping.UV2))
if (((UVDetailMapping)material.GetFloat(uvDetail) == UVDetailMapping.UV3) ||
((UVBaseMapping)material.GetFloat(uvBase) == UVBaseMapping.UV3))
if (((UVDetailMapping)material.GetFloat(uvDetail) == UVDetailMapping.UV3) || ((UVBaseMapping)material.GetFloat(uvBase) == UVBaseMapping.UV3))
{
needUV3 = true;
break; // If we find it UV3 let's early out

// NB RenderQueue editor is not shown on purpose: we want to override it based on blend mode
EditorGUI.indentLevel++;
m_MaterialEditor.EnableInstancingField();
m_MaterialEditor.ShaderProperty(enableSpecularOcclusion, Styles.enableSpecularOcclusionText);
EditorGUI.indentLevel--;
if (layerChanged || optionsChanged)

14
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Material/Lit/LitUI.cs


public static GUIContent specularOcclusionWarning = new GUIContent("Require a cosine weighted bent normal and ambient occlusion maps");
// Emissive
public static string lightingText = "Lighting Inputs";
public static string emissiveLabelText = "Emissive Inputs";
public static GUIContent emissiveText = new GUIContent("Emissive Color", "Emissive");
public static GUIContent emissiveIntensityText = new GUIContent("Emissive Intensity", "Emissive");
public static GUIContent albedoAffectEmissiveText = new GUIContent("Albedo Affect Emissive", "Specifies whether or not the emissive color is multiplied by the albedo.");

protected void DoEmissiveGUI(Material material)
{
EditorGUILayout.Space();
EditorGUILayout.LabelField(Styles.lightingText, EditorStyles.boldLabel);
EditorGUILayout.LabelField(Styles.emissiveLabelText, EditorStyles.boldLabel);
m_MaterialEditor.ShaderProperty(enableSpecularOcclusion, Styles.enableSpecularOcclusionText);
// TODO: display warning if we don't have bent normal (either OS or TS) and ambient occlusion
//if (enableSpecularOcclusion.floatValue > 0.0f)
{

DoLayerGUI(material, 0);
DoEmissiveGUI(material);
// The parent Base.ShaderPropertiesGUI will call DoEmissionArea
}
protected override void MaterialPropertiesAdvanceGUI(Material material)
{
m_MaterialEditor.ShaderProperty(enableSpecularOcclusion, Styles.enableSpecularOcclusionText);
}
protected override bool ShouldEmissionBeEnabled(Material mat)

CoreUtils.SetKeyword(material, "_THICKNESSMAP", material.GetTexture(kThicknessMap));
CoreUtils.SetKeyword(material, "_SPECULARCOLORMAP", material.GetTexture(kSpecularColorMap));
bool needUV2 = (UVDetailMapping)material.GetFloat(kUVDetail) == UVDetailMapping.UV2 && (UVBaseMapping)material.GetFloat(kUVBase) == UVBaseMapping.UV0;
bool needUV3 = (UVDetailMapping)material.GetFloat(kUVDetail) == UVDetailMapping.UV3 && (UVBaseMapping)material.GetFloat(kUVBase) == UVBaseMapping.UV0;
bool needUV2 = (UVDetailMapping)material.GetFloat(kUVDetail) == UVDetailMapping.UV2 || (UVBaseMapping)material.GetFloat(kUVBase) == UVBaseMapping.UV2;
bool needUV3 = (UVDetailMapping)material.GetFloat(kUVDetail) == UVDetailMapping.UV3 || (UVBaseMapping)material.GetFloat(kUVBase) == UVBaseMapping.UV3;
if (needUV3)
{

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Material/Unlit/BaseUnlitUI.cs


protected abstract void FindMaterialProperties(MaterialProperty[] props);
protected abstract void SetupMaterialKeywordsAndPassInternal(Material material);
protected abstract void MaterialPropertiesGUI(Material material);
protected abstract void MaterialPropertiesAdvanceGUI(Material material);
protected abstract void VertexAnimationPropertiesGUI();
// This function will say if emissive is used or not regarding enlighten/PVR
protected abstract bool ShouldEmissionBeEnabled(Material material);

// NB RenderQueue editor is not shown on purpose: we want to override it based on blend mode
EditorGUI.indentLevel++;
m_MaterialEditor.EnableInstancingField();
MaterialPropertiesAdvanceGUI(material);
EditorGUI.indentLevel--;
}

4
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Material/Unlit/UnlitUI.cs


}
}
protected override void MaterialPropertiesAdvanceGUI(Material material)
{
}
protected override void VertexAnimationPropertiesGUI()
{

28
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/RenderLoopSettings/FrameSettingsUI.cs


"Rendering Passes",
(s, p, o) => s.isSectionExpandedRenderingPasses,
true,
CED.Action(Drawer_SectionRenderingPasses));
CED.LabelWidth(200, CED.Action(Drawer_SectionRenderingPasses))
);
CED.Action(Drawer_FieldForwardRenderingOnly),
CED.FadeGroup(
(s, d, o, i) => s.isSectionExpandedUseForwardOnly,
false,
CED.Action(Drawer_FieldUseDepthPrepassWithDefferedRendering),
CED.LabelWidth(300,
CED.Action(Drawer_FieldForwardRenderingOnly),
(s, d, o, i) => s.isSectionExpandedUseDepthPrepass,
true,
CED.Action(Drawer_FieldRenderAlphaTestOnlyInDeferredPrepass))),
CED.Action(Drawer_SectionOtherRenderingSettings));
(s, d, o, i) => s.isSectionExpandedUseForwardOnly,
false,
CED.Action(Drawer_FieldUseDepthPrepassWithDefferedRendering),
CED.FadeGroup(
(s, d, o, i) => s.isSectionExpandedUseDepthPrepass,
true,
CED.Action(Drawer_FieldRenderAlphaTestOnlyInDeferredPrepass))),
CED.Action(Drawer_SectionOtherRenderingSettings)
)
);
public static CED.IDrawer SectionXRSettings = CED.FadeGroup(
(s, d, o, i) => s.isSectionExpandedXRSupported,

(s, p, o) => s.isSectionExpandedXRSettings,
true,
CED.Action(Drawer_FieldStereoEnabled)));
CED.LabelWidth(200, CED.Action(Drawer_FieldStereoEnabled))));
CED.Action(Drawer_SectionLightingSettings));
CED.LabelWidth(250, CED.Action(Drawer_SectionLightingSettings)));
public AnimBool isSectionExpandedRenderingPasses { get { return m_AnimBools[0]; } }
public AnimBool isSectionExpandedLightingSettings { get { return m_AnimBools[1]; } }

12
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/RenderLoopSettings/GlobalLightLoopSettingsUI.cs


namespace UnityEditor.Experimental.Rendering
using UnityEngine;
namespace UnityEditor.Experimental.Rendering
{
using _ = CoreEditorUtils;
using CED = CoreEditorDrawer<GlobalLightLoopSettingsUI, SerializedGlobalLightLoopSettings>;

EditorGUILayout.PropertyField(d.reflectionCacheCompressed, _.GetContent("Compress Reflection Probe Cache"));
EditorGUILayout.PropertyField(d.reflectionCubemapSize, _.GetContent("Reflection Cubemap Size"));
EditorGUILayout.PropertyField(d.reflectionProbeCacheSize, _.GetContent("Probe Cache Size"));
EditorGUILayout.Space();
EditorGUILayout.PropertyField(d.planarReflectionCacheCompressed, _.GetContent("Compress Planar Reflection Probe Cache"));
EditorGUILayout.PropertyField(d.planarReflectionCubemapSize, _.GetContent("Planar Reflection Texture Size"));
EditorGUILayout.PropertyField(d.planarReflectionProbeCacheSize, _.GetContent("Planar Probe Cache Size"));
EditorGUILayout.PropertyField(d.maxPlanarReflectionProbes, _.GetContent("Max Planar Probe Per Frame"));
d.maxPlanarReflectionProbes.intValue = Mathf.Max(1, d.maxPlanarReflectionProbes.intValue);
--EditorGUI.indentLevel;
}

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/RenderLoopSettings/LightLoopSettingsUI.cs


"Light Loop Settings",
(s, p, o) => s.isSectionExpandedLightLoopSettings,
true,
CED.Action(Drawer_SectionLightLoopSettings));
CED.LabelWidth(250, CED.Action(Drawer_SectionLightLoopSettings)));
public AnimBool isSectionExpandedLightLoopSettings { get { return m_AnimBools[0]; } }
public AnimBool isSectionExpandedEnableTileAndCluster { get { return m_AnimBools[1]; } }

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/RenderLoopSettings/SerializedFrameSettings.cs


namespace UnityEditor.Experimental.Rendering
{
class SerializedFrameSettings
public class SerializedFrameSettings
{
public SerializedProperty root;

9
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/RenderLoopSettings/SerializedGlobalLightLoopSettings.cs


public SerializedProperty reflectionProbeCacheSize;
public SerializedProperty reflectionCubemapSize;
public SerializedProperty reflectionCacheCompressed;
public SerializedProperty planarReflectionProbeCacheSize;
public SerializedProperty planarReflectionCubemapSize;
public SerializedProperty planarReflectionCacheCompressed;
public SerializedProperty maxPlanarReflectionProbes;
public SerializedProperty skyReflectionSize;
public SerializedProperty skyLightingOverrideLayerMask;

reflectionProbeCacheSize = root.Find((GlobalLightLoopSettings s) => s.reflectionProbeCacheSize);
reflectionCubemapSize = root.Find((GlobalLightLoopSettings s) => s.reflectionCubemapSize);
reflectionCacheCompressed = root.Find((GlobalLightLoopSettings s) => s.reflectionCacheCompressed);
planarReflectionProbeCacheSize = root.Find((GlobalLightLoopSettings s) => s.planarReflectionProbeCacheSize);
planarReflectionCubemapSize = root.Find((GlobalLightLoopSettings s) => s.planarReflectionTextureSize);
planarReflectionCacheCompressed = root.Find((GlobalLightLoopSettings s) => s.planarReflectionCacheCompressed);
maxPlanarReflectionProbes = root.Find((GlobalLightLoopSettings s) => s.maxPlanarReflectionProbes);
skyReflectionSize = root.Find((GlobalLightLoopSettings s) => s.skyReflectionSize);
skyLightingOverrideLayerMask = root.Find((GlobalLightLoopSettings s) => s.skyLightingOverrideLayerMask);

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/RenderLoopSettings/SerializedLightLoopSettings.cs


namespace UnityEditor.Experimental.Rendering
{
class SerializedLightLoopSettings
public class SerializedLightLoopSettings
{
public SerializedProperty root;

74
ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDRenderPipeline.cs


using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using UnityEngine.Rendering.PostProcessing;
namespace UnityEngine.Experimental.Rendering.HDPipeline

m_GPUCopy = new GPUCopy(asset.renderPipelineResources.copyChannelCS);
EncodeBC6H.DefaultInstance = EncodeBC6H.DefaultInstance ?? new EncodeBC6H(asset.renderPipelineResources.encodeBC6HCS);
m_ReflectionProbeCullResults = new ReflectionProbeCullResults(asset.reflectionSystemParameters);
ReflectionSystem.SetParameters(asset.reflectionSystemParameters);
// Scan material list and assign it
m_MaterialList = HDUtils.GetRenderPipelineMaterialList();
// Find first material that have non 0 Gbuffer count and assign it as deferredMaterial

};
m_DepthPyramidKernel = m_DepthPyramidCS.FindKernel("KMain");
m_DepthPyramidBuffer = HDShaderIDs._DepthPyramidTexture;
m_DepthPyramidBuffer = HDShaderIDs._PyramidDepthTexture;
m_DepthPyramidBufferRT = new RenderTargetIdentifier(m_DepthPyramidBuffer);
m_DepthPyramidBufferDesc = new RenderTextureDescriptor(2, 2, RenderTextureFormat.RFloat, 0)
{

}
CullResults m_CullResults;
ReflectionProbeCullResults m_ReflectionProbeCullResults;
public override void Render(ScriptableRenderContext renderContext, Camera[] cameras)
{
base.Render(renderContext, cameras);

m_FrameCount = Time.frameCount;
}
// TODO: Render only visible probes
var isReflection = cameras.Any(c => c.cameraType == CameraType.Reflection);
if (!isReflection)
ReflectionSystem.RenderAllRealtimeProbes(ReflectionProbeType.PlanarReflection);
// We first update the state of asset frame settings as they can be use by various camera
// but we keep the dirty state to correctly reset other camera that use RenderingPath.Default.
bool assetFrameSettingsIsDirty = m_Asset.frameSettingsIsDirty;

{
if (camera == null)
continue;
if (camera.cameraType != CameraType.Reflection)
// TODO: Render only visible probes
ReflectionSystem.RenderAllRealtimeViewerDependentProbesFor(ReflectionProbeType.PlanarReflection, camera);
// First, get aggregate of frame settings base on global settings, camera frame settings and debug settings
// Note: the SceneView camera will never have additionalCameraData

if (m_FrameSettings.enableDBuffer)
DecalSystem.instance.BeginCull(camera);
ReflectionSystem.PrepareCull(camera, m_ReflectionProbeCullResults);
m_ReflectionProbeCullResults.Cull();
m_DbufferManager.vsibleDecalCount = 0;
if (m_FrameSettings.enableDBuffer)

bool enableBakeShadowMask;
using (new ProfilingSample(cmd, "TP_PrepareLightsForGPU", CustomSamplerId.TPPrepareLightsForGPU.GetSampler()))
{
enableBakeShadowMask = m_LightLoop.PrepareLightsForGPU(cmd, m_ShadowSettings, m_CullResults, camera) && m_FrameSettings.enableShadowMask;
enableBakeShadowMask = m_LightLoop.PrepareLightsForGPU(cmd, m_ShadowSettings, m_CullResults, m_ReflectionProbeCullResults, camera) && m_FrameSettings.enableShadowMask;
}
ConfigureForShadowMask(enableBakeShadowMask, cmd);

// TODO: Try to arrange code so we can trigger this call earlier and use async compute here to run sky convolution during other passes (once we move convolution shader to compute).
UpdateSkyEnvironment(hdCamera, cmd);
RenderPyramidDepth(camera, cmd, renderContext, FullScreenDebugMode.DepthPyramid);
RenderPyramidDepth(hdCamera, cmd, renderContext, FullScreenDebugMode.DepthPyramid);
if (m_CurrentDebugDisplaySettings.IsDebugMaterialDisplayEnabled())

renderContext.ExecuteCommandBuffer(cmd);
cmd.Clear();
buildGPULightListsCompleteFence = m_LightLoop.BuildGPULightListsAsyncBegin(camera, renderContext, m_CameraDepthStencilBufferRT, m_CameraStencilBufferCopyRT, startFence, m_SkyManager.IsSkyValid());
buildGPULightListsCompleteFence = m_LightLoop.BuildGPULightListsAsyncBegin(hdCamera, renderContext, m_CameraDepthStencilBufferRT, m_CameraStencilBufferCopyRT, startFence, m_SkyManager.IsSkyValid());
}
using (new ProfilingSample(cmd, "Render shadows", CustomSamplerId.RenderShadows.GetSampler()))

{
using (new ProfilingSample(cmd, "Build Light list", CustomSamplerId.BuildLightList.GetSampler()))
{
m_LightLoop.BuildGPULightLists(camera, cmd, m_CameraDepthStencilBufferRT, m_CameraStencilBufferCopyRT, m_SkyManager.IsSkyValid());
m_LightLoop.BuildGPULightLists(hdCamera, cmd, m_CameraDepthStencilBufferRT, m_CameraStencilBufferCopyRT, m_SkyManager.IsSkyValid());
}
}

RenderForward(m_CullResults, hdCamera, renderContext, cmd, ForwardPass.PreRefraction);
RenderForwardError(m_CullResults, camera, renderContext, cmd, ForwardPass.PreRefraction);
RenderGaussianPyramidColor(camera, cmd, renderContext, true);
RenderGaussianPyramidColor(hdCamera, cmd, renderContext, true);
// Render all type of transparent forward (unlit, lit, complex (hair...)) to keep the sorting between transparent objects.
RenderForward(m_CullResults, hdCamera, renderContext, cmd, ForwardPass.Transparent);

RenderTransparentDepthPostpass(m_CullResults, camera, renderContext, cmd, ForwardPass.Transparent);
PushFullScreenDebugTexture(cmd, m_CameraColorBuffer, hdCamera, FullScreenDebugMode.NanTracker);
RenderGaussianPyramidColor(camera, cmd, renderContext, false);
RenderGaussianPyramidColor(hdCamera, cmd, renderContext, false);
PushFullScreenDebugTexture(cmd, m_CameraColorBuffer, hdCamera, FullScreenDebugMode.NanTracker);
// The final pass either postprocess of Blit will flip the screen (as it is reverse by default due to Unity openGL legacy)
// Postprocess system (that doesn't use cmd.Blit) handle it with configuration (and do not flip in SceneView) or it is automatically done in Blit
// Final blit
if (m_FrameSettings.enablePostprocess && CoreUtils.IsPostProcessingActive(postProcessLayer))
{

{
using (new ProfilingSample(cmd, "Blit to final RT", CustomSamplerId.BlitToFinalRT.GetSampler()))
{
// This Blit will flip the screen anything other than openGL
// Simple blit
cmd.Blit(m_CameraColorBufferRT, BuiltinRenderTextureType.CameraTarget);
}

// Caution: RenderDebug need to take into account that we have flip the screen (so anything capture before the flip will be flipped)
RenderDebug(hdCamera, cmd);
// Make sure to unbind every render texture here because in the next iteration of the loop we might have to reallocate render texture (if the camera size is different)

// Depth texture is now ready, bind it.
cmd.SetGlobalTexture(HDShaderIDs._MainDepthTexture, GetDepthTexture());
// for alpha compositing, color is cleared to 0, alpha to 1
// for alpha compositing, color is cleared to 0, alpha to 1
Color clearColor = new Color(0.0f, 0.0f, 0.0f, 1.0f);
Color clearColor = new Color(0.0f, 0.0f, 0.0f, 1.0f);
CoreUtils.SetRenderTarget(cmd, m_DbufferManager.GetDBuffers(), m_CameraDepthStencilBufferRT, ClearFlag.Color, clearColor);
// we need to do a separate clear for normals, because they are cleared to a different color

{
using (new ProfilingSample(cmd, "Blit DebugView Material Debug", CustomSamplerId.BlitDebugViewMaterialDebug.GetSampler()))
{
// This Blit will flip the screen anything other than openGL
cmd.Blit(m_CameraColorBufferRT, BuiltinRenderTextureType.CameraTarget);
}
}

}
}
void RenderGaussianPyramidColor(Camera camera, CommandBuffer cmd, ScriptableRenderContext renderContext, bool isPreRefraction)
void RenderGaussianPyramidColor(HDCamera hdCamera, CommandBuffer cmd, ScriptableRenderContext renderContext, bool isPreRefraction)
{
if (isPreRefraction)
{

last = HDShaderIDs._GaussianPyramidColorMips[i + 1];
}
PushFullScreenDebugTextureMip(cmd, m_GaussianPyramidColorBufferRT, lodCount, m_GaussianPyramidColorBufferDesc, isPreRefraction ? FullScreenDebugMode.PreRefractionColorPyramid : FullScreenDebugMode.FinalColorPyramid);
PushFullScreenDebugTextureMip(cmd, m_GaussianPyramidColorBufferRT, lodCount, m_GaussianPyramidColorBufferDesc, hdCamera, isPreRefraction ? FullScreenDebugMode.PreRefractionColorPyramid : FullScreenDebugMode.FinalColorPyramid);
cmd.SetGlobalTexture(HDShaderIDs._GaussianPyramidColorTexture, m_GaussianPyramidColorBuffer);

}
}
void RenderPyramidDepth(Camera camera, CommandBuffer cmd, ScriptableRenderContext renderContext, FullScreenDebugMode debugMode)
void RenderPyramidDepth(HDCamera hdCamera, CommandBuffer cmd, ScriptableRenderContext renderContext, FullScreenDebugMode debugMode)
if (!m_FrameSettings.enableRoughRefraction)
return;
using (new ProfilingSample(cmd, "Pyramid Depth", CustomSamplerId.PyramidDepth.GetSampler()))
{
var depthPyramidDesc = m_DepthPyramidBufferDesc;

cmd.CopyTexture(HDShaderIDs._DepthPyramidMips[i + 1], 0, 0, m_DepthPyramidBufferRT, 0, i + 1);
}
PushFullScreenDebugDepthMip(cmd, m_DepthPyramidBufferRT, lodCount, m_DepthPyramidBufferDesc, debugMode);
PushFullScreenDebugDepthMip(cmd, m_DepthPyramidBufferRT, lodCount, m_DepthPyramidBufferDesc, hdCamera, debugMode);
cmd.SetGlobalTexture(HDShaderIDs._DepthPyramidTexture, m_DepthPyramidBuffer);
cmd.SetGlobalTexture(HDShaderIDs._PyramidDepthTexture, m_DepthPyramidBuffer);
for (int i = 0; i < lodCount + 1; i++)
cmd.ReleaseTemporaryRT(HDShaderIDs._DepthPyramidMips[i]);

}
}
// allowFlip is false if we call the function after the FinalPass or cmd.Blit that flip the screen
public void PushColorPickerDebugTexture(CommandBuffer cmd, RenderTargetIdentifier textureID, HDCamera hdCamera)
{
if (m_CurrentDebugDisplaySettings.colorPickerDebugSettings.colorPickerMode != ColorPickerDebugMode.None)

}
}
void PushFullScreenDebugTextureMip(CommandBuffer cmd, RenderTargetIdentifier textureID, int lodCount, RenderTextureDescriptor desc, FullScreenDebugMode debugMode)
void PushFullScreenDebugTextureMip(CommandBuffer cmd, RenderTargetIdentifier textureID, int lodCount, RenderTextureDescriptor desc, HDCamera hdCamera, FullScreenDebugMode debugMode)
{
if (debugMode == m_CurrentDebugDisplaySettings.fullScreenDebugMode)
{

}
}
void PushFullScreenDebugDepthMip(CommandBuffer cmd, RenderTargetIdentifier textureID, int lodCount, RenderTextureDescriptor desc, FullScreenDebugMode debugMode)
void PushFullScreenDebugDepthMip(CommandBuffer cmd, RenderTargetIdentifier textureID, int lodCount, RenderTextureDescriptor desc, HDCamera hdCamera, FullScreenDebugMode debugMode)
{
if (debugMode == m_CurrentDebugDisplaySettings.fullScreenDebugMode)
{

cmd.SetGlobalTexture(HDShaderIDs._DebugFullScreenTexture, m_DebugFullScreenTempRT);
// TODO: Replace with command buffer call when available
m_DebugFullScreen.SetFloat(HDShaderIDs._FullScreenDebugMode, (float)m_CurrentDebugDisplaySettings.fullScreenDebugMode);
// Everything we have capture is flipped (as it happen before FinalPass/postprocess/Blit. So if we are not in SceneView
// (i.e. we have perform a flip, we need to flip the input texture)
m_DebugFullScreen.SetFloat(HDShaderIDs._RequireToFlipInputTexture, hdCamera.camera.cameraType != CameraType.SceneView ? 1.0f : 0.0f);
PushColorPickerDebugTexture(cmd, m_DebugFullScreenTempRT, hdCamera);
PushColorPickerDebugTexture(cmd, (RenderTargetIdentifier)BuiltinRenderTextureType.CameraTarget, hdCamera);
}
// Then overlays

// The material display debug perform sRGBToLinear conversion as the final blit currently hardcode a linearToSrgb conversion. As when we read with color picker this is not done,
// we perform it inside the color picker shader. But we shouldn't do it for HDR buffer.
m_DebugColorPicker.SetFloat(HDShaderIDs._ApplyLinearToSRGB, m_CurrentDebugDisplaySettings.IsDebugMaterialDisplayEnabled() ? 1.0f : 0.0f);
// Everything we have capture is flipped (as it happen before FinalPass/postprocess/Blit. So if we are not in SceneView
// (i.e. we have perform a flip, we need to flip the input texture) + we need to handle the case were we debug a fullscreen pass that have already perform the flip
m_DebugColorPicker.SetFloat(HDShaderIDs._RequireToFlipInputTexture, hdCamera.camera.cameraType != CameraType.SceneView ? 1.0f : 0.0f);
CoreUtils.DrawFullScreen(cmd, m_DebugColorPicker, (RenderTargetIdentifier)BuiltinRenderTextureType.CameraTarget);
}
}

7
ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDRenderPipelineAsset.asset


supportSubsurfaceScattering: 1
supportDBuffer: 1
supportMSAA: 0
supportAsyncCompute: 0
lightLoopSettings:
spotCookieSize: 128
cookieTexArraySize: 16

reflectionCubemapSize: 128
planarReflectionProbeCacheSize: 128
reflectionCubemapSize: 512
planarReflectionTextureSize: 512
planarReflectionCacheCompressed: 0
maxPlanarReflectionProbes: 128
skyReflectionSize: 256
skyLightingOverrideLayerMask:
serializedVersion: 2

12
ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDRenderPipelineAsset.cs


}
}
public ReflectionSystemParameters reflectionSystemParameters
{
get
{
return new ReflectionSystemParameters
{
maxPlanarReflectionProbes = renderPipelineSettings.lightLoopSettings.maxPlanarReflectionProbes,
planarReflectionProbeSize = renderPipelineSettings.lightLoopSettings.planarReflectionTextureSize
};
}
}
// Store the various RenderPipelineSettings for each platform (for now only one)
public RenderPipelineSettings renderPipelineSettings = new RenderPipelineSettings();

9
ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDStringConstants.cs


public static readonly int _CookieTextures = Shader.PropertyToID("_CookieTextures");
public static readonly int _CookieCubeTextures = Shader.PropertyToID("_CookieCubeTextures");
public static readonly int _EnvTextures = Shader.PropertyToID("_EnvTextures");
public static readonly int _EnvCubemapTextures = Shader.PropertyToID("_EnvCubemapTextures");
public static readonly int _Env2DTextures = Shader.PropertyToID("_Env2DTextures");
public static readonly int _Env2DCaptureVP = Shader.PropertyToID("_Env2DCaptureVP");
public static readonly int _DirectionalLightDatas = Shader.PropertyToID("_DirectionalLightDatas");
public static readonly int _DirectionalLightCount = Shader.PropertyToID("_DirectionalLightCount");
public static readonly int _LightDatas = Shader.PropertyToID("_LightDatas");

public static readonly int _EnvLightDatas = Shader.PropertyToID("_EnvLightDatas");
public static readonly int _EnvLightCount = Shader.PropertyToID("_EnvLightCount");
public static readonly int _EnvProxyCount = Shader.PropertyToID("_EnvProxyCount");
public static readonly int _ShadowDatas = Shader.PropertyToID("_ShadowDatas");
public static readonly int _NumTileFtplX = Shader.PropertyToID("_NumTileFtplX");
public static readonly int _NumTileFtplY = Shader.PropertyToID("_NumTileFtplY");

public static readonly int _MousePixelCoord = Shader.PropertyToID("_MousePixelCoord");
public static readonly int _DebugFont = Shader.PropertyToID("_DebugFont");
public static readonly int _DebugEnvironmentProxyDepthScale = Shader.PropertyToID("_DebugEnvironmentProxyDepthScale");
public static readonly int _DebugViewMaterial = Shader.PropertyToID("_DebugViewMaterial");
public static readonly int _DebugLightingMode = Shader.PropertyToID("_DebugLightingMode");
public static readonly int _DebugLightingAlbedo = Shader.PropertyToID("_DebugLightingAlbedo");

public static readonly int _ShadowMaskTexture = Shader.PropertyToID("_ShadowMaskTexture");
public static readonly int _DistortionTexture = Shader.PropertyToID("_DistortionTexture");
public static readonly int _GaussianPyramidColorTexture = Shader.PropertyToID("_GaussianPyramidColorTexture");
public static readonly int _DepthPyramidTexture = Shader.PropertyToID("_PyramidDepthTexture");
public static readonly int _PyramidDepthTexture = Shader.PropertyToID("_PyramidDepthTexture");
public static readonly int _GaussianPyramidColorMipSize = Shader.PropertyToID("_GaussianPyramidColorMipSize");
public static readonly int[] _GaussianPyramidColorMips =
{

public static readonly int _ColorPickerMode = Shader.PropertyToID("_ColorPickerMode");
public static readonly int _ApplyLinearToSRGB = Shader.PropertyToID("_ApplyLinearToSRGB");
public static readonly int _ColorPickerFontColor = Shader.PropertyToID("_ColorPickerFontColor");
public static readonly int _RequireToFlipInputTexture = Shader.PropertyToID("_RequireToFlipInputTexture");
public static readonly int _DebugFullScreenTexture = Shader.PropertyToID("_DebugFullScreenTexture");
public static readonly int _BlitTexture = Shader.PropertyToID("_BlitTexture");

5
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Deferred.shader


// This need to stay in sync with deferred.compute
// input.positionCS is SV_Position
PositionInputs posInput = GetPositionInput(input.positionCS.xy, _ScreenSize.zw, uint2(input.positionCS.xy) / GetTileSize());
float depth = LOAD_TEXTURE2D(_MainDepthTexture, posInput.positionSS).x;
UpdatePositionInput(depth, UNITY_MATRIX_I_VP, UNITY_MATRIX_VP, posInput);
float depth = LOAD_TEXTURE2D(_MainDepthTexture, input.positionCS.xy).x;
PositionInputs posInput = GetPositionInput(input.positionCS.xy, _ScreenSize.zw, depth, UNITY_MATRIX_I_VP, UNITY_MATRIX_VP, uint2(input.positionCS.xy) / GetTileSize());
float3 V = GetWorldSpaceNormalizeViewDir(posInput.positionWS);
BSDFData bsdfData;

7
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/DeferredDirectionalShadow.compute


uint2 pixelCoord = groupId * DEFERRED_SHADOW_TILE_SIZE + groupThreadId;
uint2 tileCoord = groupId;
PositionInputs posInput = GetPositionInput(pixelCoord.xy, _ScreenSize.zw, tileCoord);
float depth = LOAD_TEXTURE2D(_MainDepthTexture, pixelCoord.xy).x;
PositionInputs posInput = GetPositionInput(pixelCoord.xy, _ScreenSize.zw, depth, UNITY_MATRIX_I_VP, UNITY_MATRIX_VP, tileCoord);
float depth = LOAD_TEXTURE2D(_MainDepthTexture, posInput.positionSS).x;
UpdatePositionInput(depth, UNITY_MATRIX_I_VP, UNITY_MATRIX_VP, posInput);
ShadowContext shadowContext = InitShadowContext();
float shadow = GetDirectionalShadowAttenuation(shadowContext, posInput.positionWS, float3(0.0, 0.0, 0.0), (uint)_DirectionalShadowIndex, float3(0.0, 0.0, 0.0));

283
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightDefinition.cs


[GenerateHLSL]
public struct EnvLightData
{
public Vector3 positionWS;
public EnvShapeType envShapeType;
// Packing order depends on chronological access to avoid cache misses
// Proxy properties
public float capturePositionWSX;
public float capturePositionWSY;
public float capturePositionWSZ;
public EnvShapeType influenceShapeType;
// Box: extents = box extents
// Sphere: extents.x = sphere radius
public float proxyExtentsX;
public float proxyExtentsY;
public float proxyExtentsZ;
// User can chose if they use This is use in case we want to force infinite projection distance (i.e no projection);
public float minProjectionDistance;
public float proxyPositionWSX;
public float proxyPositionWSY;
public float proxyPositionWSZ;
public float proxyForwardX;
public float proxyForwardY;
public float proxyForwardZ;
public float proxyUpX;
public float proxyUpY;
public float proxyUpZ;
public float proxyRightX;
public float proxyRightY;
public float proxyRightZ;
// Influence properties
public float influencePositionWSX;
public float influencePositionWSY;
public float influencePositionWSZ;
public float influenceForwardX;
public float influenceForwardY;
public float influenceForwardZ;
public float influenceUpX;
public float influenceUpY;
public float influenceUpZ;
public float influenceRightX;
public float influenceRightY;
public float influenceRightZ;
public Vector3 forward;
public int envIndex;
public float influenceExtentsX;
public float influenceExtentsY;
public float influenceExtentsZ;
public float unused00;
public float blendDistancePositiveX;
public float blendDistancePositiveY;
public float blendDistancePositiveZ;
public float blendDistanceNegativeX;
public float blendDistanceNegativeY;
public float blendDistanceNegativeZ;
public float blendNormalDistancePositiveX;
public float blendNormalDistancePositiveY;
public float blendNormalDistancePositiveZ;
public float blendNormalDistanceNegativeX;
public float blendNormalDistanceNegativeY;
public float blendNormalDistanceNegativeZ;
public Vector3 up;
public float boxSideFadePositiveX;
public float boxSideFadePositiveY;
public float boxSideFadePositiveZ;
public float boxSideFadeNegativeX;
public float boxSideFadeNegativeY;
public float boxSideFadeNegativeZ;
public float unused01;
public Vector3 right;
// User can chose if they use This is use in case we want to force infinite projection distance (i.e no projection);
public float minProjectionDistance;
public float sampleDirectionDiscardWSX;
public float sampleDirectionDiscardWSY;
public float sampleDirectionDiscardWSZ;
// Sampling properties
public int envIndex;
public Vector3 influenceExtents; // extents of the env light
public float unused0;
public Vector3 capturePositionWS
{
get { return new Vector3(capturePositionWSX, capturePositionWSY, capturePositionWSZ); }
set
{
capturePositionWSX = value.x;
capturePositionWSY = value.y;
capturePositionWSZ = value.z;
}
}
public Vector3 proxyExtents
{
get { return new Vector3(proxyExtentsX, proxyExtentsY, proxyExtentsZ); }
set
{
proxyExtentsX = value.x;
proxyExtentsY = value.y;
proxyExtentsZ = value.z;
}
}
public Vector3 proxyPositionWS
{
get { return new Vector3(proxyPositionWSX, proxyPositionWSY, proxyPositionWSZ); }
set
{
proxyPositionWSX = value.x;
proxyPositionWSY = value.y;
proxyPositionWSZ = value.z;
}
}
public Vector3 proxyForward
{
get { return new Vector3(proxyForwardX, proxyForwardY, proxyForwardZ); }
set
{
proxyForwardX = value.x;
proxyForwardY = value.y;
proxyForwardZ = value.z;
}
}
public Vector3 proxyUp
{
get { return new Vector3(proxyUpX, proxyUpY, proxyUpZ); }
set
{
proxyUpX = value.x;
proxyUpY = value.y;
proxyUpZ = value.z;
}
}
public Vector3 proxyRight
{
get { return new Vector3(proxyRightX, proxyRightY, proxyRightZ); }
set
{
proxyRightX = value.x;
proxyRightY = value.y;
proxyRightZ = value.z;
}
}
public Vector3 offsetLS;
public float unused1;
public Vector3 influenceExtents
{
get { return new Vector3(influenceExtentsX, influenceExtentsY, influenceExtentsZ); }
set
{
influenceExtentsX = value.x;
influenceExtentsY = value.y;
influenceExtentsZ = value.z;
}
}
public Vector3 influencePositionWS
{
get { return new Vector3(influencePositionWSX, influencePositionWSY, influencePositionWSZ); }
set
{
influencePositionWSX = value.x;
influencePositionWSY = value.y;
influencePositionWSZ = value.z;
}
}
public Vector3 influenceForward
{
get { return new Vector3(influenceForwardX, influenceForwardY, influenceForwardZ); }
set
{
influenceForwardX = value.x;
influenceForwardY = value.y;
influenceForwardZ = value.z;
}
}
public Vector3 influenceUp
{
get { return new Vector3(influenceUpX, influenceUpY, influenceUpZ); }
set
{
influenceUpX = value.x;
influenceUpY = value.y;
influenceUpZ = value.z;
}
}
public Vector3 influenceRight
{
get { return new Vector3(influenceRightX, influenceRightY, influenceRightZ); }
set
{
influenceRightX = value.x;
influenceRightY = value.y;
influenceRightZ = value.z;
}
}
public Vector3 blendDistancePositive; //+X,+Y,+Z
public float unused2;
public Vector3 blendDistanceNegative; //-X,-Y,-Z
public float unused3;
public Vector3 blendNormalDistancePositive; //+X,+Y,+Z
public float unused4;
public Vector3 blendNormalDistanceNegative; //-X,-Y,-Z
public float unused5;
public Vector3 blendDistancePositive
{
get { return new Vector3(blendDistancePositiveX, blendDistancePositiveY, blendDistancePositiveZ); }
set
{
blendDistancePositiveX = value.x;
blendDistancePositiveY = value.y;
blendDistancePositiveZ = value.z;
}
}
public Vector3 blendDistanceNegative
{
get { return new Vector3(blendDistanceNegativeX, blendDistanceNegativeY, blendDistanceNegativeZ); }
set
{
blendDistanceNegativeX = value.x;
blendDistanceNegativeY = value.y;
blendDistanceNegativeZ = value.z;
}
}
public Vector3 blendNormalDistancePositive
{
get { return new Vector3(blendNormalDistancePositiveX, blendNormalDistancePositiveY, blendNormalDistancePositiveZ); }
set
{
blendNormalDistancePositiveX = value.x;
blendNormalDistancePositiveY = value.y;
blendNormalDistancePositiveZ = value.z;
}
}
public Vector3 blendNormalDistanceNegative
{
get { return new Vector3(blendNormalDistanceNegativeX, blendNormalDistanceNegativeY, blendNormalDistanceNegativeZ); }
set
{
blendNormalDistanceNegativeX = value.x;
blendNormalDistanceNegativeY = value.y;
blendNormalDistanceNegativeZ = value.z;
}
}
public Vector3 boxSideFadePositive
{
get { return new Vector3(boxSideFadePositiveX, boxSideFadePositiveY, boxSideFadePositiveZ); }
set
{
boxSideFadePositiveX = value.x;
boxSideFadePositiveY = value.y;
boxSideFadePositiveZ = value.z;
}
}
public Vector3 boxSideFadeNegative
{
get { return new Vector3(boxSideFadeNegativeX, boxSideFadeNegativeY, boxSideFadeNegativeZ); }
set
{
boxSideFadeNegativeX = value.x;
boxSideFadeNegativeY = value.y;
boxSideFadeNegativeZ = value.z;
}
}
public Vector3 boxSideFadePositive; //+X,+Y,+Z
public float unused6;
public Vector3 boxSideFadeNegative; //-X,-Y,-Z
public float unused7;
public Vector3 sampleDirectionDiscardWS
{
get { return new Vector3(sampleDirectionDiscardWSX, sampleDirectionDiscardWSY, sampleDirectionDiscardWSZ); }
set
{
sampleDirectionDiscardWSX = value.x;
sampleDirectionDiscardWSY = value.y;
sampleDirectionDiscardWSZ = value.z;
}
}
[GenerateHLSL]
public enum EnvCacheType
{
Texture2D,
Cubemap
}
// Usage of StencilBits.Lighting on 2 bits.
// We support both deferred and forward renderer. Here is the current usage of this 2 bits:

325
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightDefinition.cs.hlsl


#define ENVCONSTANTS_SPEC_CUBE_LOD_STEP (6)
//
// UnityEngine.Experimental.Rendering.HDPipeline.EnvCacheType: static fields
//
#define ENVCACHETYPE_TEXTURE2D (0)
#define ENVCACHETYPE_CUBEMAP (1)
//
// UnityEngine.Experimental.Rendering.HDPipeline.StencilLightingUsage: static fields
//
#define STENCILLIGHTINGUSAGE_NO_LIGHTING (0)

// PackingRules = Exact
struct EnvLightData
{
float3 positionWS;
int envShapeType;
float3 forward;
int envIndex;
float3 up;
float dimmer;
float3 right;
float capturePositionWSX;
float capturePositionWSY;
float capturePositionWSZ;
int influenceShapeType;
float proxyExtentsX;
float proxyExtentsY;
float proxyExtentsZ;
float3 influenceExtents;
float unused0;
float3 offsetLS;
float unused1;
float3 blendDistancePositive;
float unused2;
float3 blendDistanceNegative;
float unused3;
float3 blendNormalDistancePositive;
float unused4;
float3 blendNormalDistanceNegative;
float unused5;
float3 boxSideFadePositive;
float unused6;
float3 boxSideFadeNegative;
float unused7;
float proxyPositionWSX;
float proxyPositionWSY;
float proxyPositionWSZ;
float proxyForwardX;
float proxyForwardY;
float proxyForwardZ;
float proxyUpX;
float proxyUpY;
float proxyUpZ;
float proxyRightX;
float proxyRightY;
float proxyRightZ;
float influencePositionWSX;
float influencePositionWSY;
float influencePositionWSZ;
float influenceForwardX;
float influenceForwardY;
float influenceForwardZ;
float influenceUpX;
float influenceUpY;
float influenceUpZ;
float influenceRightX;
float influenceRightY;
float influenceRightZ;
float influenceExtentsX;
float influenceExtentsY;
float influenceExtentsZ;
float unused00;
float blendDistancePositiveX;
float blendDistancePositiveY;
float blendDistancePositiveZ;
float blendDistanceNegativeX;
float blendDistanceNegativeY;
float blendDistanceNegativeZ;
float blendNormalDistancePositiveX;
float blendNormalDistancePositiveY;
float blendNormalDistancePositiveZ;
float blendNormalDistanceNegativeX;
float blendNormalDistanceNegativeY;
float blendNormalDistanceNegativeZ;
float boxSideFadePositiveX;
float boxSideFadePositiveY;
float boxSideFadePositiveZ;
float boxSideFadeNegativeX;
float boxSideFadeNegativeY;
float boxSideFadeNegativeZ;
float dimmer;
float unused01;
float sampleDirectionDiscardWSX;
float sampleDirectionDiscardWSY;
float sampleDirectionDiscardWSZ;
int envIndex;
};
//

//
// Accessors for UnityEngine.Experimental.Rendering.HDPipeline.EnvLightData
//
float3 GetPositionWS(EnvLightData value)
float GetCapturePositionWSX(EnvLightData value)
return value.positionWS;
return value.capturePositionWSX;
int GetEnvShapeType(EnvLightData value)
float GetCapturePositionWSY(EnvLightData value)
return value.envShapeType;
return value.capturePositionWSY;
float3 GetForward(EnvLightData value)
float GetCapturePositionWSZ(EnvLightData value)
return value.forward;
return value.capturePositionWSZ;
int GetEnvIndex(EnvLightData value)
int GetInfluenceShapeType(EnvLightData value)
return value.envIndex;
return value.influenceShapeType;
float3 GetUp(EnvLightData value)
float GetProxyExtentsX(EnvLightData value)
return value.up;
return value.proxyExtentsX;
float GetDimmer(EnvLightData value)
float GetProxyExtentsY(EnvLightData value)
return value.dimmer;
return value.proxyExtentsY;
float3 GetRight(EnvLightData value)
float GetProxyExtentsZ(EnvLightData value)
return value.right;
return value.proxyExtentsZ;
float3 GetInfluenceExtents(EnvLightData value)
float GetProxyPositionWSX(EnvLightData value)
{
return value.proxyPositionWSX;
}
float GetProxyPositionWSY(EnvLightData value)
{
return value.proxyPositionWSY;
}
float GetProxyPositionWSZ(EnvLightData value)
{
return value.proxyPositionWSZ;
}
float GetProxyForwardX(EnvLightData value)
{
return value.proxyForwardX;
}
float GetProxyForwardY(EnvLightData value)
{
return value.proxyForwardY;
}
float GetProxyForwardZ(EnvLightData value)
{
return value.proxyForwardZ;
}
float GetProxyUpX(EnvLightData value)
{
return value.proxyUpX;
}
float GetProxyUpY(EnvLightData value)
{
return value.proxyUpY;
}
float GetProxyUpZ(EnvLightData value)
{
return value.proxyUpZ;
}
float GetProxyRightX(EnvLightData value)
{
return value.proxyRightX;
}
float GetProxyRightY(EnvLightData value)
{
return value.proxyRightY;
}
float GetProxyRightZ(EnvLightData value)
{
return value.proxyRightZ;
}
float GetInfluencePositionWSX(EnvLightData value)
{
return value.influencePositionWSX;
}
float GetInfluencePositionWSY(EnvLightData value)
{
return value.influencePositionWSY;
}
float GetInfluencePositionWSZ(EnvLightData value)
{
return value.influencePositionWSZ;
}
float GetInfluenceForwardX(EnvLightData value)
return value.influenceExtents;
return value.influenceForwardX;
}
float GetInfluenceForwardY(EnvLightData value)
{
return value.influenceForwardY;
float GetUnused0(EnvLightData value)
float GetInfluenceForwardZ(EnvLightData value)
return value.unused0;
return value.influenceForwardZ;
float3 GetOffsetLS(EnvLightData value)
float GetInfluenceUpX(EnvLightData value)
return value.offsetLS;
return value.influenceUpX;
float GetUnused1(EnvLightData value)
float GetInfluenceUpY(EnvLightData value)
return value.unused1;
return value.influenceUpY;
float3 GetBlendDistancePositive(EnvLightData value)
float GetInfluenceUpZ(EnvLightData value)
return value.blendDistancePositive;
return value.influenceUpZ;
float GetUnused2(EnvLightData value)
float GetInfluenceRightX(EnvLightData value)
return value.unused2;
return value.influenceRightX;
float3 GetBlendDistanceNegative(EnvLightData value)
float GetInfluenceRightY(EnvLightData value)
return value.blendDistanceNegative;
return value.influenceRightY;
float GetUnused3(EnvLightData value)
float GetInfluenceRightZ(EnvLightData value)
return value.unused3;
return value.influenceRightZ;
float3 GetBlendNormalDistancePositive(EnvLightData value)
float GetInfluenceExtentsX(EnvLightData value)
return value.blendNormalDistancePositive;
return value.influenceExtentsX;
float GetUnused4(EnvLightData value)
float GetInfluenceExtentsY(EnvLightData value)
return value.unused4;
return value.influenceExtentsY;
float3 GetBlendNormalDistanceNegative(EnvLightData value)
float GetInfluenceExtentsZ(EnvLightData value)
return value.blendNormalDistanceNegative;
return value.influenceExtentsZ;
float GetUnused5(EnvLightData value)
float GetUnused00(EnvLightData value)
return value.unused5;
return value.unused00;
float3 GetBoxSideFadePositive(EnvLightData value)
float GetBlendDistancePositiveX(EnvLightData value)
return value.boxSideFadePositive;
return value.blendDistancePositiveX;
float GetUnused6(EnvLightData value)
float GetBlendDistancePositiveY(EnvLightData value)
return value.unused6;
return value.blendDistancePositiveY;
float3 GetBoxSideFadeNegative(EnvLightData value)
float GetBlendDistancePositiveZ(EnvLightData value)
return value.boxSideFadeNegative;
return value.blendDistancePositiveZ;
float GetUnused7(EnvLightData value)
float GetBlendDistanceNegativeX(EnvLightData value)
return value.unused7;
return value.blendDistanceNegativeX;
}
float GetBlendDistanceNegativeY(EnvLightData value)
{
return value.blendDistanceNegativeY;
}
float GetBlendDistanceNegativeZ(EnvLightData value)
{
return value.blendDistanceNegativeZ;
}
float GetBlendNormalDistancePositiveX(EnvLightData value)
{
return value.blendNormalDistancePositiveX;
}
float GetBlendNormalDistancePositiveY(EnvLightData value)
{
return value.blendNormalDistancePositiveY;
}
float GetBlendNormalDistancePositiveZ(EnvLightData value)
{
return value.blendNormalDistancePositiveZ;
}
float GetBlendNormalDistanceNegativeX(EnvLightData value)
{
return value.blendNormalDistanceNegativeX;
}
float GetBlendNormalDistanceNegativeY(EnvLightData value)
{
return value.blendNormalDistanceNegativeY;
}
float GetBlendNormalDistanceNegativeZ(EnvLightData value)
{
return value.blendNormalDistanceNegativeZ;
}
float GetBoxSideFadePositiveX(EnvLightData value)
{
return value.boxSideFadePositiveX;
}
float GetBoxSideFadePositiveY(EnvLightData value)
{
return value.boxSideFadePositiveY;
}
float GetBoxSideFadePositiveZ(EnvLightData value)
{
return value.boxSideFadePositiveZ;
}
float GetBoxSideFadeNegativeX(EnvLightData value)
{
return value.boxSideFadeNegativeX;
}
float GetBoxSideFadeNegativeY(EnvLightData value)
{
return value.boxSideFadeNegativeY;
}
float GetBoxSideFadeNegativeZ(EnvLightData value)
{
return value.boxSideFadeNegativeZ;
}
float GetDimmer(EnvLightData value)
{
return value.dimmer;
}
float GetUnused01(EnvLightData value)
{
return value.unused01;
}
float GetSampleDirectionDiscardWSX(EnvLightData value)
{
return value.sampleDirectionDiscardWSX;
}
float GetSampleDirectionDiscardWSY(EnvLightData value)
{
return value.sampleDirectionDiscardWSY;
}
float GetSampleDirectionDiscardWSZ(EnvLightData value)
{
return value.sampleDirectionDiscardWSZ;
}
int GetEnvIndex(EnvLightData value)
{
return value.envIndex;
#include "LightDefinition.cs.custom.hlsl"

6
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/Deferred.compute


// This need to stay in sync with deferred.shader
PositionInputs posInput = GetPositionInput(pixelCoord.xy, _ScreenSize.zw, tileCoord);
float depth = LOAD_TEXTURE2D(_MainDepthTexture, posInput.positionSS).x;
float depth = LOAD_TEXTURE2D(_MainDepthTexture, pixelCoord.xy).x;
PositionInputs posInput = GetPositionInput(pixelCoord.xy, _ScreenSize.zw, depth, UNITY_MATRIX_I_VP, UNITY_MATRIX_VP, tileCoord);
// For indirect case: we can still overlap inside a tile with the sky/background, reject it
// Can't rely on stencil as we are in compute shader

return;
}
UpdatePositionInput(depth, UNITY_MATRIX_I_VP, UNITY_MATRIX_VP, posInput);
float3 V = GetWorldSpaceNormalizeViewDir(posInput.positionWS);
BSDFData bsdfData;

4
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/GlobalLightLoopSettings.cs


public int cubeCookieTexArraySize = 16;
public int reflectionProbeCacheSize = 128;
public int planarReflectionProbeCacheSize = 128;
public int planarReflectionTextureSize = 128;
public bool planarReflectionCacheCompressed = false;
public int maxPlanarReflectionProbes = 128;
public SkyResolution skyReflectionSize = SkyResolution.SkyResolution256;
public LayerMask skyLightingOverrideLayerMask = 0;
}

322
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/LightLoop.cs


using System;
using System.Collections.Generic;
using UnityEngine.Assertions;
using UnityEngine.Experimental.Rendering.HDPipeline.Internal;
using UnityEngine.Rendering;
using UnityEngine.Experimental.Rendering;

static HDAdditionalLightData defaultHDAdditionalLightData { get { return ComponentSingleton<HDAdditionalLightData>.instance; } }
static HDAdditionalCameraData defaultHDAdditionalCameraData { get { return ComponentSingleton<HDAdditionalCameraData>.instance; } }
PlanarReflectionProbeCache m_ReflectionPlanarProbeCache;
List<Matrix4x4> m_Env2DCaptureVP = new List<Matrix4x4>();
public class LightList
{

TextureFormat probeCacheFormat = gLightLoopSettings.reflectionCacheCompressed ? TextureFormat.BC6H : TextureFormat.RGBAHalf;
m_ReflectionProbeCache = new ReflectionProbeCache(iblFilterGGX, gLightLoopSettings.reflectionProbeCacheSize, gLightLoopSettings.reflectionCubemapSize, probeCacheFormat, true);
TextureFormat planarProbeCacheFormat = gLightLoopSettings.planarReflectionCacheCompressed ? TextureFormat.BC6H : TextureFormat.RGBAHalf;
m_ReflectionPlanarProbeCache = new PlanarReflectionProbeCache(iblFilterGGX, gLightLoopSettings.planarReflectionProbeCacheSize, gLightLoopSettings.planarReflectionTextureSize, planarProbeCacheFormat, true);
s_GenAABBKernel = buildScreenAABBShader.FindKernel("ScreenBoundsAABB");
s_AABBBoundsBuffer = new ComputeBuffer(2 * k_MaxLightsOnScreen, 3 * sizeof(float));

m_ReflectionProbeCache.Release();
m_ReflectionProbeCache = null;
}
if (m_ReflectionPlanarProbeCache != null)
{
m_ReflectionPlanarProbeCache.Release();
m_ReflectionPlanarProbeCache = null;
}
if (m_CookieTexArray != null)
{
m_CookieTexArray.Release();

m_CookieTexArray.NewFrame();
m_CubeCookieTexArray.NewFrame();
m_ReflectionProbeCache.NewFrame();
m_ReflectionPlanarProbeCache.NewFrame();
}
public bool NeedResize()

var nrBigTiles = nrBigTilesX * nrBigTilesY;
s_BigTileLightList = new ComputeBuffer(LightDefinitions.s_MaxNrBigTileLightsPlusOne * nrBigTiles, sizeof(uint));
}
}
static Matrix4x4 GetFlipMatrix()
{
Matrix4x4 flip = Matrix4x4.identity;
bool isLeftHand = ((int)LightDefinitions.s_UseLeftHandCameraSpace) != 0;
if (isLeftHand) flip.SetColumn(2, new Vector4(0.0f, 0.0f, -1.0f, 0.0f));
return flip;
return GetFlipMatrix() * camera.worldToCameraMatrix;
// camera.worldToCameraMatrix is RHS and Unity's transforms are LHS
// We need to flip it to work with transforms
return Matrix4x4.Scale(new Vector3(1, 1, -1)) * camera.worldToCameraMatrix;
static Matrix4x4 CameraProjection(Camera camera)
// For light culling system, we need non oblique projection matrices
static Matrix4x4 CameraProjectionNonObliqueLHS(HDCamera camera)
return camera.projectionMatrix * GetFlipMatrix();
// camera.projectionMatrix expect RHS data and Unity's transforms are LHS
// We need to flip it to work with transforms
return camera.nonObliqueProjMatrix * Matrix4x4.Scale(new Vector3(1, 1, -1));
}
public Vector3 GetLightColor(VisibleLight light)

m_lightList.lightVolumes.Add(lightVolumeData);
}
public bool GetEnvLightData(CommandBuffer cmd, Camera camera, VisibleReflectionProbe probe)
public bool GetEnvLightData(CommandBuffer cmd, Camera camera, ProbeWrapper probe)
var additionalData = GetHDAdditionalReflectionData(probe);
var extents = probe.bounds.extents;
var influenceBlendDistancePositive = Vector3.one * probe.blendDistance;
var influenceBlendDistanceNegative = Vector3.one * probe.blendDistance;
if (probe.probe.mode == ReflectionProbeMode.Realtime && camera.cameraType == CameraType.Reflection)
if (probe.mode == ReflectionProbeMode.Realtime && camera.cameraType == CameraType.Reflection)
int envIndex = m_ReflectionProbeCache.FetchSlice(cmd, probe.texture);
var capturePosition = Vector3.zero;
var influenceToWorld = probe.influenceToWorld;
var sampleDirectionDiscardWS = Vector3.zero;
// 31 bits index, 1 bit cache type
var envIndex = -1;
if (probe.planarReflectionProbe != null)
{
envIndex = m_ReflectionPlanarProbeCache.FetchSlice(cmd, probe.texture);
envIndex = envIndex << 1 | (int)EnvCacheType.Texture2D;
float nearClipPlane, farClipPlane, aspect, fov;
Color backgroundColor;
CameraClearFlags clearFlags;
Quaternion captureRotation;
Matrix4x4 worldToCamera, projection;
ReflectionSystem.CalculateCaptureCameraProperties(
probe.planarReflectionProbe,
out nearClipPlane, out farClipPlane,
out aspect, out fov, out clearFlags, out backgroundColor,
out worldToCamera, out projection, out capturePosition, out captureRotation,
camera);
var gpuProj = GL.GetGPUProjectionMatrix(projection, true); // Had to change this from 'false'
var gpuView = worldToCamera;
// We transform it to object space by translating the capturePosition
var vp = gpuProj * gpuView * Matrix4x4.Translate(capturePosition);
m_Env2DCaptureVP.Add(vp);
sampleDirectionDiscardWS = captureRotation * Vector3.forward;
}
else if (probe.reflectionProbe != null)
{
envIndex = m_ReflectionProbeCache.FetchSlice(cmd, probe.texture);
envIndex = envIndex << 1 | (int)EnvCacheType.Cubemap;
capturePosition = (Vector3)influenceToWorld.GetColumn(3) - probe.reflectionProbe.center;
}
// Build light data
// CAUTION: localToWorld is the transform for the widget of the reflection probe. i.e the world position of the point use to do the cubemap capture (mean it include the local offset)
envLightData.positionWS = probe.localToWorld.GetColumn(3);
envLightData.boxSideFadePositive = Vector3.one;
envLightData.boxSideFadeNegative = Vector3.one;
envLightData.minProjectionDistance = 0;
switch (additionalData.influenceShape)
{
case ReflectionInfluenceShape.Box:
{
envLightData.envShapeType = EnvShapeType.Box;
envLightData.boxSideFadePositive = additionalData.boxSideFadePositive;
envLightData.boxSideFadeNegative = additionalData.boxSideFadeNegative;
break;
}
case ReflectionInfluenceShape.Sphere:
envLightData.envShapeType = EnvShapeType.Sphere;
extents = Vector3.one * additionalData.influenceSphereRadius;
break;
}
if (probe.boxProjection == 0)
envLightData.minProjectionDistance = 65504.0f;
envLightData.dimmer = additionalData.dimmer;
envLightData.blendNormalDistancePositive = additionalData.blendNormalDistancePositive;
envLightData.blendNormalDistanceNegative = additionalData.blendNormalDistanceNegative;
influenceBlendDistancePositive = additionalData.blendDistancePositive;
influenceBlendDistanceNegative = additionalData.blendDistanceNegative;
envLightData.influenceShapeType = probe.influenceShapeType;
envLightData.dimmer = probe.dimmer;
envLightData.influenceExtents = probe.influenceExtents;
envLightData.blendNormalDistancePositive = probe.blendNormalDistancePositive;
envLightData.blendNormalDistanceNegative = probe.blendNormalDistanceNegative;
envLightData.blendDistancePositive = probe.blendDistancePositive;
envLightData.blendDistanceNegative = probe.blendDistanceNegative;
envLightData.boxSideFadePositive = probe.boxSideFadePositive;
envLightData.boxSideFadeNegative = probe.boxSideFadeNegative;
envLightData.sampleDirectionDiscardWS = sampleDirectionDiscardWS;
// remove scale from the matrix (Scale in this matrix is use to scale the widget)
envLightData.right = probe.localToWorld.GetColumn(0);
envLightData.right.Normalize();
envLightData.up = probe.localToWorld.GetColumn(1);
envLightData.up.Normalize();
envLightData.forward = probe.localToWorld.GetColumn(2);
envLightData.forward.Normalize();
envLightData.influenceRight = influenceToWorld.GetColumn(0).normalized;
envLightData.influenceUp = influenceToWorld.GetColumn(1).normalized;
envLightData.influenceForward = influenceToWorld.GetColumn(2).normalized;
envLightData.capturePositionWS = capturePosition;
envLightData.influencePositionWS = influenceToWorld.GetColumn(3);
// Artists prefer to have blend distance inside the volume!
// So we let the current UI but we assume blendDistance is an inside factor instead
// Blend distance can't be larger than the max radius
// probe.bounds.extents is BoxSize / 2
var blendDistancePositive = Vector3.Min(probe.bounds.extents, influenceBlendDistancePositive);
var blendDistanceNegative = Vector3.Min(probe.bounds.extents, influenceBlendDistanceNegative);
envLightData.influenceExtents = extents;
envLightData.offsetLS = probe.center; // center is misnamed, it is the offset (in local space) from center of the bounding box to the cubemap capture point
envLightData.blendDistancePositive = blendDistancePositive;
envLightData.blendDistanceNegative = blendDistanceNegative;
// Proxy data
var proxyToWorld = probe.proxyToWorld;
envLightData.proxyExtents = probe.proxyExtents;
envLightData.minProjectionDistance = probe.infiniteProjection ? 65504f : 0;
envLightData.proxyRight = proxyToWorld.GetColumn(0).normalized;
envLightData.proxyUp = proxyToWorld.GetColumn(1).normalized;
envLightData.proxyForward = proxyToWorld.GetColumn(2).normalized;
envLightData.proxyPositionWS = proxyToWorld.GetColumn(3);
m_lightList.envLights.Add(envLightData);

public void GetEnvLightVolumeDataAndBound(VisibleReflectionProbe probe, LightVolumeType lightVolumeType, Matrix4x4 worldToView)
public void GetEnvLightVolumeDataAndBound(ProbeWrapper probe, LightVolumeType lightVolumeType, Matrix4x4 worldToView)
var add = GetHDAdditionalReflectionData(probe);
var centerOffset = probe.center; // reflection volume offset relative to cube map capture point
var mat = probe.localToWorld;
Vector3 vx = mat.GetColumn(0);
Vector3 vy = mat.GetColumn(1);
Vector3 vz = mat.GetColumn(2);
Vector3 vw = mat.GetColumn(3);
vx.Normalize(); // Scale shouldn't affect the probe or its bounds
vy.Normalize();
vz.Normalize();
var influenceExtents = probe.bounds.extents; // 0.5f * Vector3.Max(-boxSizes[p], boxSizes[p]);
var centerWS = vx * centerOffset.x + vy * centerOffset.y + vz * centerOffset.z + vw;
var influenceExtents = probe.influenceExtents; // 0.5f * Vector3.Max(-boxSizes[p], boxSizes[p]);
// transform to camera space (becomes a left hand coordinate frame in Unity since Determinant(worldToView)<0)
vx = worldToView.MultiplyVector(vx);
vy = worldToView.MultiplyVector(vy);
vz = worldToView.MultiplyVector(vz);
var influenceToWorld = probe.influenceToWorld;
var centerVS = worldToView.MultiplyPoint(centerWS);
// transform to camera space (becomes a left hand coordinate frame in Unity since Determinant(worldToView)<0)
var influenceRightVS = worldToView.MultiplyVector(influenceToWorld.GetColumn(0).normalized);
var influenceUpVS = worldToView.MultiplyVector(influenceToWorld.GetColumn(1).normalized);
var influenceForwardVS = worldToView.MultiplyVector(influenceToWorld.GetColumn(2).normalized);
var influencePositionVS = worldToView.MultiplyPoint(influenceToWorld.GetColumn(3));
lightVolumeData.lightCategory = (uint)LightCategory.Env;
lightVolumeData.lightVolume = (uint)lightVolumeType;

{
case LightVolumeType.Sphere:
{
lightVolumeData.lightPos = centerVS;
lightVolumeData.radiusSq = add.influenceSphereRadius * add.influenceSphereRadius;
lightVolumeData.lightAxisX = vx;
lightVolumeData.lightAxisY = vy;
lightVolumeData.lightAxisZ = vz;
lightVolumeData.lightPos = influencePositionVS;
lightVolumeData.radiusSq = influenceExtents.x * influenceExtents.x;
lightVolumeData.lightAxisX = influenceRightVS;
lightVolumeData.lightAxisY = influenceUpVS;
lightVolumeData.lightAxisZ = influenceForwardVS;
bound.center = centerVS;
bound.boxAxisX = vx * add.influenceSphereRadius;
bound.boxAxisY = vy * add.influenceSphereRadius;
bound.boxAxisZ = vz * add.influenceSphereRadius;
bound.center = influencePositionVS;
bound.boxAxisX = influenceRightVS * influenceExtents.x;
bound.boxAxisY = influenceUpVS * influenceExtents.x;
bound.boxAxisZ = influenceForwardVS * influenceExtents.x;
bound.radius = add.influenceSphereRadius;
bound.radius = influenceExtents.x;
bound.center = centerVS;
bound.boxAxisX = influenceExtents.x * vx;
bound.boxAxisY = influenceExtents.y * vy;
bound.boxAxisZ = influenceExtents.z * vz;
bound.center = influencePositionVS;
bound.boxAxisX = influenceExtents.x * influenceRightVS;
bound.boxAxisY = influenceExtents.y * influenceUpVS;
bound.boxAxisZ = influenceExtents.z * influenceForwardVS;
bound.scaleXY.Set(1.0f, 1.0f);
bound.radius = influenceExtents.magnitude;

lightVolumeData.lightPos = centerVS;
lightVolumeData.lightAxisX = vx;
lightVolumeData.lightAxisY = vy;
lightVolumeData.lightAxisZ = vz;
lightVolumeData.lightPos = influencePositionVS;
lightVolumeData.lightAxisX = influenceRightVS;
lightVolumeData.lightAxisY = influenceUpVS;
lightVolumeData.lightAxisZ = influenceForwardVS;
lightVolumeData.boxInnerDist = influenceExtents - k_BoxCullingExtentThreshold;
lightVolumeData.boxInvRange.Set(1.0f / k_BoxCullingExtentThreshold.x, 1.0f / k_BoxCullingExtentThreshold.y, 1.0f / k_BoxCullingExtentThreshold.z);
break;

}
// Return true if BakedShadowMask are enabled
public bool PrepareLightsForGPU(CommandBuffer cmd, ShadowSettings shadowSettings, CullResults cullResults, Camera camera)
public bool PrepareLightsForGPU(CommandBuffer cmd, ShadowSettings shadowSettings, CullResults cullResults, ReflectionProbeCullResults reflectionProbeCullResults, Camera camera)
{
using (new ProfilingSample(cmd, "Prepare Lights For GPU"))
{

m_Env2DCaptureVP.Clear();
m_lightList.Clear();
Vector3 camPosWS = camera.transform.position;

// Redo everything but this time with envLights
int envLightCount = 0;
int probeCount = Math.Min(cullResults.visibleReflectionProbes.Count, k_MaxEnvLightsOnScreen);
var totalProbes = cullResults.visibleReflectionProbes.Count + reflectionProbeCullResults.visiblePlanarReflectionProbeCount;
int probeCount = Math.Min(totalProbes, k_MaxEnvLightsOnScreen);
for (int probeIndex = 0, numProbes = cullResults.visibleReflectionProbes.Count; (probeIndex < numProbes) && (sortCount < probeCount); probeIndex++)
for (int probeIndex = 0, numProbes = totalProbes; (probeIndex < numProbes) && (sortCount < probeCount); probeIndex++)
{
if (probeIndex < cullResults.visibleReflectionProbes.Count)
{
VisibleReflectionProbe probe = cullResults.visibleReflectionProbes[probeIndex];
HDAdditionalReflectionData additional = probe.probe.GetComponent<HDAdditionalReflectionData>();

}
LightVolumeType lightVolumeType = LightVolumeType.Box;
if (additional != null && additional.influenceShape == ReflectionInfluenceShape.Sphere)
if (additional != null && additional.influenceShape == ShapeType.Sphere)
float boxVolume = 8 * probe.bounds.extents.x * probe.bounds.extents.y * probe.bounds.extents.z;
float logVolume = Mathf.Clamp(256 + Mathf.Log(boxVolume, 1.05f), 0, 8191); // Allow for negative exponents
var logVolume = CalculateProbeLogVolume(probe.bounds);
sortKeys[sortCount++] = PackProbeKey(logVolume, lightVolumeType, 0u, probeIndex); // Sort by volume
}
else
{
var planarProbeIndex = probeIndex - cullResults.visibleReflectionProbes.Count;
var probe = reflectionProbeCullResults.visiblePlanarReflectionProbes[planarProbeIndex];
// probe.texture can be null when we are adding a reflection probe in the editor
if (probe.texture == null || envLightCount >= k_MaxEnvLightsOnScreen)
continue;
var lightVolumeType = LightVolumeType.Box;
if (probe.influenceVolume.shapeType == ShapeType.Sphere)
lightVolumeType = LightVolumeType.Sphere;
++envLightCount;
var logVolume = CalculateProbeLogVolume(probe.bounds);
// 13 bit volume, 3 bit LightVolumeType, 16 bit index
sortKeys[sortCount++] = (uint)logVolume << 19 | (uint)lightVolumeType << 16 | ((uint)probeIndex & 0xFFFF); // Sort by volume
sortKeys[sortCount++] = PackProbeKey(logVolume, lightVolumeType, 1u, planarProbeIndex); // Sort by volume
}
}
// Not necessary yet but call it for future modification with sphere influence volume

{
// In 1. we have already classify and sorted the light, we need to use this sorted order here
uint sortKey = sortKeys[sortIndex];
LightVolumeType lightVolumeType = (LightVolumeType)((sortKey >> 16) & 0x3);
int probeIndex = (int)(sortKey & 0xFFFF);
LightVolumeType lightVolumeType;
int probeIndex;
int listType;
UnpackProbeSortKey(sortKey, out lightVolumeType, out probeIndex, out listType);
VisibleReflectionProbe probe = cullResults.visibleReflectionProbes[probeIndex];
PlanarReflectionProbe planarProbe = null;
VisibleReflectionProbe probe = default(VisibleReflectionProbe);
if (listType == 0)
probe = cullResults.visibleReflectionProbes[probeIndex];
else
planarProbe = reflectionProbeCullResults.visiblePlanarReflectionProbes[probeIndex];
if (GetEnvLightData(cmd, camera, probe))
var probeWrapper = ProbeWrapper.Wrap(probe, planarProbe);
if (GetEnvLightData(cmd, camera, probeWrapper))
GetEnvLightVolumeDataAndBound(probe, lightVolumeType, worldToView);
GetEnvLightVolumeDataAndBound(probeWrapper, lightVolumeType, worldToView);
// We make the light position camera-relative as late as possible in order
// to allow the preceding code to work with the absolute world space coordinates.

int n = m_lightList.envLights.Count;
EnvLightData envLightData = m_lightList.envLights[n - 1];
envLightData.positionWS -= camPosWS;
envLightData.capturePositionWS -= camPosWS;
envLightData.influencePositionWS -= camPosWS;
envLightData.proxyPositionWS -= camPosWS;
m_lightList.envLights[n - 1] = envLightData;
}
}

}
}
static float CalculateProbeLogVolume(Bounds bounds)
{
float boxVolume = 8 * bounds.extents.x * bounds.extents.y * bounds.extents.z;
float logVolume = Mathf.Clamp(256 + Mathf.Log(boxVolume, 1.05f), 0, 4095); // Allow for negative exponents
return logVolume;
}
static void UnpackProbeSortKey(uint sortKey, out LightVolumeType lightVolumeType, out int probeIndex, out int listType)
{
lightVolumeType = (LightVolumeType)((sortKey >> 17) & 0x3);
probeIndex = (int)(sortKey & 0xFFFF);
listType = (int)((sortKey >> 16) & 1);
}
static uint PackProbeKey(float logVolume, LightVolumeType lightVolumeType, uint listType, int probeIndex)
{
// 12 bit volume, 3 bit LightVolumeType, 1 bit list type, 16 bit index
return (uint)logVolume << 20 | (uint)lightVolumeType << 17 | listType << 16 | ((uint)probeIndex & 0xFFFF);
}
void VoxelLightListGeneration(CommandBuffer cmd, Camera camera, Matrix4x4 projscr, Matrix4x4 invProjscr, RenderTargetIdentifier cameraDepthBufferRT)
{
// clear atomic offset index

cmd.DispatchCompute(buildPerVoxelLightListShader, s_GenListPerVoxelKernel, numTilesX, numTilesY, 1);
}
public void BuildGPULightListsCommon(Camera camera, CommandBuffer cmd, RenderTargetIdentifier cameraDepthBufferRT, RenderTargetIdentifier stencilTextureRT, bool skyEnabled)
public void BuildGPULightListsCommon(HDCamera hdCamera, CommandBuffer cmd, RenderTargetIdentifier cameraDepthBufferRT, RenderTargetIdentifier stencilTextureRT, bool skyEnabled)
var camera = hdCamera.camera;
cmd.BeginSample("Build Light List");
var w = camera.pixelWidth;

var numBigTilesY = (h + 63) / 64;
// camera to screen matrix (and it's inverse)
var proj = CameraProjection(camera);
var proj = CameraProjectionNonObliqueLHS(hdCamera);
var temp = new Matrix4x4();
temp.SetRow(0, new Vector4(0.5f * w, 0.0f, 0.0f, 0.5f * w));
temp.SetRow(1, new Vector4(0.0f, 0.5f * h, 0.0f, 0.5f * h));

cmd.EndSample("Build Light List");
}
public void BuildGPULightLists(Camera camera, CommandBuffer cmd, RenderTargetIdentifier cameraDepthBufferRT, RenderTargetIdentifier stencilTextureRT, bool skyEnabled)
public void BuildGPULightLists(HDCamera hdCamera, CommandBuffer cmd, RenderTargetIdentifier cameraDepthBufferRT, RenderTargetIdentifier stencilTextureRT, bool skyEnabled)
BuildGPULightListsCommon(camera, cmd, cameraDepthBufferRT, stencilTextureRT, skyEnabled);
PushGlobalParams(camera, cmd);
BuildGPULightListsCommon(hdCamera, cmd, cameraDepthBufferRT, stencilTextureRT, skyEnabled);
PushGlobalParams(hdCamera.camera, cmd);
public GPUFence BuildGPULightListsAsyncBegin(Camera camera, ScriptableRenderContext renderContext, RenderTargetIdentifier cameraDepthBufferRT, RenderTargetIdentifier stencilTextureRT, GPUFence startFence, bool skyEnabled)
public GPUFence BuildGPULightListsAsyncBegin(HDCamera hdCamera, ScriptableRenderContext renderContext, RenderTargetIdentifier cameraDepthBufferRT, RenderTargetIdentifier stencilTextureRT, GPUFence startFence, bool skyEnabled)
BuildGPULightListsCommon(camera, cmd, cameraDepthBufferRT, stencilTextureRT, skyEnabled);
BuildGPULightListsCommon(hdCamera, cmd, cameraDepthBufferRT, stencilTextureRT, skyEnabled);
GPUFence completeFence = cmd.CreateGPUFence();
renderContext.ExecuteCommandBufferAsync(cmd, ComputeQueueType.Background);
CommandBufferPool.Release(cmd);

add = defaultHDAdditionalReflectionData;
add.blendDistancePositive = Vector3.one * probe.blendDistance;
add.blendDistanceNegative = add.blendDistancePositive;
add.influenceShape = ReflectionInfluenceShape.Box;
add.influenceShape = ShapeType.Box;
}
return add;
}

cmd.SetGlobalTexture(HDShaderIDs._CookieTextures, m_CookieTexArray.GetTexCache());
cmd.SetGlobalTexture(HDShaderIDs._CookieCubeTextures, m_CubeCookieTexArray.GetTexCache());
cmd.SetGlobalTexture(HDShaderIDs._EnvTextures, m_ReflectionProbeCache.GetTexCache());
cmd.SetGlobalTexture(HDShaderIDs._EnvCubemapTextures, m_ReflectionProbeCache.GetTexCache());
cmd.SetGlobalTexture(HDShaderIDs._Env2DTextures, m_ReflectionPlanarProbeCache.GetTexCache());
if (m_Env2DCaptureVP.Count > 0)
cmd.SetGlobalMatrixArray(HDShaderIDs._Env2DCaptureVP, m_Env2DCaptureVP);
cmd.SetGlobalBuffer(HDShaderIDs._DirectionalLightDatas, s_DirectionalLightDatas);
cmd.SetGlobalInt(HDShaderIDs._DirectionalLightCount, m_lightList.directionalLights.Count);

public void RenderDebugOverlay(HDCamera hdCamera, CommandBuffer cmd, DebugDisplaySettings debugDisplaySettings, ref float x, ref float y, float overlaySize, float width)
{
LightingDebugSettings lightingDebug = debugDisplaySettings.lightingDebugSettings;
if (lightingDebug.debugLightingMode == DebugLightingMode.EnvironmentProxyVolume)
cmd.SetGlobalFloat(HDShaderIDs._DebugEnvironmentProxyDepthScale, lightingDebug.environmentProxyDepthScale);
using (new ProfilingSample(cmd, "Tiled/cluster Lighting Debug", CustomSamplerId.TPTiledLightingDebug.GetSampler()))
{

24
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/LightLoop.hlsl


#else
uint envLightIndex = i;
#endif
IndirectLighting lighting = EvaluateBSDF_Env( context, V, posInput, preLightData, _EnvLightDatas[envLightIndex], bsdfData, _EnvLightDatas[envLightIndex].envShapeType,
IndirectLighting lighting = EvaluateBSDF_Env( context, V, posInput, preLightData, _EnvLightDatas[envLightIndex], bsdfData,
_EnvLightDatas[envLightIndex].influenceShapeType,
GPUIMAGEBASEDLIGHTINGTYPE_REFLECTION, reflectionHierarchyWeight);
AccumulateIndirectLighting(lighting, aggregateLighting);
}

#else
uint envLightIndex = i;
#endif
IndirectLighting lighting = EvaluateBSDF_Env( context, V, posInput, preLightData, _EnvLightDatas[envLightIndex], bsdfData, _EnvLightDatas[envLightIndex].envShapeType,
IndirectLighting lighting = EvaluateBSDF_Env( context, V, posInput, preLightData, _EnvLightDatas[envLightIndex], bsdfData,
_EnvLightDatas[envLightIndex].influenceShapeType,
GPUIMAGEBASEDLIGHTINGTYPE_REFRACTION, refractionHierarchyWeight);
AccumulateIndirectLighting(lighting, aggregateLighting);
}

{
// The sky is a single cubemap texture separate from the reflection probe texture array (different resolution and compression)
context.sampleReflection = SINGLE_PASS_CONTEXT_SAMPLE_SKY;
EnvLightData envLightSky = InitSkyEnvLightData(0); // The sky data are generated on the fly so the compiler can optimize the code
IndirectLighting lighting = EvaluateBSDF_Env(context, V, posInput, preLightData, envLightSky, bsdfData, ENVSHAPETYPE_SKY, GPUIMAGEBASEDLIGHTINGTYPE_REFLECTION, reflectionHierarchyWeight);
// The sky data are generated on the fly so the compiler can optimize the code
EnvLightData envLightSky = InitSkyEnvLightData(0);
IndirectLighting lighting = EvaluateBSDF_Env( context, V, posInput, preLightData, envLightSky, bsdfData,
ENVSHAPETYPE_SKY,
GPUIMAGEBASEDLIGHTINGTYPE_REFLECTION, reflectionHierarchyWeight);
AccumulateIndirectLighting(lighting, aggregateLighting);
}

{
// The sky is a single cubemap texture separate from the reflection probe texture array (different resolution and compression)
context.sampleReflection = SINGLE_PASS_CONTEXT_SAMPLE_SKY;
EnvLightData envLightSky = InitSkyEnvLightData(0); // The sky data are generated on the fly so the compiler can optimize the code
IndirectLighting lighting = EvaluateBSDF_Env(context, V, posInput, preLightData, envLightSky, bsdfData, ENVSHAPETYPE_SKY, GPUIMAGEBASEDLIGHTINGTYPE_REFRACTION, refractionHierarchyWeight);
// The sky data are generated on the fly so the compiler can optimize the code
EnvLightData envLightSky = InitSkyEnvLightData(0);
IndirectLighting lighting = EvaluateBSDF_Env( context, V, posInput, preLightData, envLightSky, bsdfData,
ENVSHAPETYPE_SKY,
GPUIMAGEBASEDLIGHTINGTYPE_REFRACTION, refractionHierarchyWeight);
AccumulateIndirectLighting(lighting, aggregateLighting);
}
}

41
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/LightLoopDef.hlsl


StructuredBuffer<uint> g_vLightListGlobal; // don't support Buffer yet in unity
#define DWORD_PER_TILE 16 // See dwordsPerTile in LightLoop.cs, we have roomm for 31 lights and a number of light value all store on 16 bit (ushort)
#define MAX_ENV2D_LIGHT 32
CBUFFER_START(UnityTilePass)
uint _NumTileFtplX;

TEXTURECUBE_ARRAY_ABSTRACT(_CookieCubeTextures);
// Use texture array for reflection (or LatLong 2D array for mobile)
TEXTURECUBE_ARRAY_ABSTRACT(_EnvTextures);
TEXTURECUBE_ARRAY_ABSTRACT(_EnvCubemapTextures);
TEXTURE2D_ARRAY(_Env2DTextures);
float4x4 _Env2DCaptureVP[MAX_ENV2D_LIGHT];
TEXTURE2D(_DeferredShadowTexture);

uint _AreaLightCount;
uint _EnvLightCount;
uint _EnvProxyCount;
int _EnvLightSkyEnabled; // TODO: make it a bool
CBUFFER_END

#define SINGLE_PASS_CONTEXT_SAMPLE_REFLECTION_PROBES 0
#define SINGLE_PASS_CONTEXT_SAMPLE_SKY 1
#ifdef DEBUG_DISPLAY
float4 ApplyDebugProjectionVolume(float4 color, float3 radiusToProxy, float scale)
{
float l = length(radiusToProxy);
l = pow(l / (1 + l), scale);
return float4(l.xxx * 0.7 + color.rgb * 0.3, color.a);
}
#endif
// Cubemap : texCoord = direction vector
// Texture2D : texCoord = projectedPositionWS - lightData.capturePosition
// 31 bit index, 1 bit cache type
uint cacheType = index & 1;
index = index >> 1;
return SAMPLE_TEXTURECUBE_ARRAY_LOD_ABSTRACT(_EnvTextures, s_trilinear_clamp_sampler, texCoord, index, lod);
if (cacheType == ENVCACHETYPE_TEXTURE2D)
{
//_Env2DCaptureVP is in capture space
float4 ndc = ComputeClipSpaceCoordinates(texCoord, _Env2DCaptureVP[index]);
ndc *= rcp(ndc.w);
ndc.xy = ndc.xy * 0.5 + 0.5;
float4 color = SAMPLE_TEXTURE2D_ARRAY_LOD(_Env2DTextures, s_trilinear_clamp_sampler, ndc.xy, index, 0);
color.a = any(ndc.xyz < 0) || any(ndc.xyz > 1) ? 0 : 1;
return color;
}
else if (cacheType == ENVCACHETYPE_CUBEMAP)
{
float4 color = SAMPLE_TEXTURECUBE_ARRAY_LOD_ABSTRACT(_EnvCubemapTextures, s_trilinear_clamp_sampler, texCoord, index, lod);
color.a = 1;
return color;
}
return float4(0, 0, 0, 0);
}
else // SINGLE_PASS_SAMPLE_SKY
{

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/materialflags.compute


#pragma kernel MaterialFlagsGen_Write MATERIALFLAGSGEN=MaterialFlagsGen_Write
#pragma kernel MaterialFlagsGen_Write MATERIALFLAGSGEN=MaterialFlagsGen_Write
#pragma kernel MaterialFlagsGen_Or MATERIALFLAGSGEN=MaterialFlagsGen_Or USE_OR
// #pragma enable_d3d11_debug_symbols

38
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightUtilities.hlsl


#include "LightDefinition.cs.hlsl"
#define SETTER_FLOAT3(data, field, value)\
data.##field##X = value.x;\
data.##field##Y = value.y;\
data.##field##Z = value.z
output.envShapeType = ENVSHAPETYPE_SKY;
output.envIndex = envIndex;
output.forward = float3(0.0, 0.0, 1.0);
output.up = float3(0.0, 1.0, 0.0);
output.right = float3(1.0, 0.0, 0.0);
output.positionWS = float3(0.0, 0.0, 0.0);
output.offsetLS = float3(0.0, 0.0, 0.0);
output.influenceExtents = float3(0.0, 0.0, 0.0);
output.blendDistancePositive = float3(0.0, 0.0, 0.0);
output.blendDistanceNegative = float3(0.0, 0.0, 0.0);
output.blendNormalDistancePositive = float3(0.0, 0.0, 0.0);
output.blendNormalDistanceNegative = float3(0.0, 0.0, 0.0);
output.boxSideFadePositive = float3(0.0, 0.0, 0.0);
output.boxSideFadeNegative = float3(0.0, 0.0, 0.0);
output.dimmer = 1.0;
ZERO_INITIALIZE(EnvLightData, output);
output.influenceShapeType = ENVSHAPETYPE_SKY;
output.envIndex = envIndex;
SETTER_FLOAT3(output, influenceForward, float3(0.0, 0.0, 1.0));
SETTER_FLOAT3(output, influenceUp, float3(0.0, 1.0, 0.0));
SETTER_FLOAT3(output, influenceRight, float3(1.0, 0.0, 0.0));
SETTER_FLOAT3(output, influencePositionWS, float3(0.0, 0.0, 0.0));
output.dimmer = 1.0;
// proxy
SETTER_FLOAT3(output, proxyForward, float3(0.0, 0.0, 1.0));
SETTER_FLOAT3(output, proxyUp, float3(0.0, 1.0, 0.0));
SETTER_FLOAT3(output, proxyRight, float3(1.0, 0.0, 0.0));
output.minProjectionDistance = 65504.0f;
#undef SETTER_FLOAT3
#endif // UNITY_LIGHT_UTILITIES_INCLUDED

233
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumetrics/Resources/VolumetricLighting.compute


#pragma kernel VolumetricLightingClustered VolumetricLighting=VolumetricLightingClustered ENABLE_REPROJECTION=0 LIGHTLOOP_TILE_PASS USE_CLUSTERED_LIGHTLIST
#pragma kernel VolumetricLightingClusteredReproj VolumetricLighting=VolumetricLightingClusteredReproj ENABLE_REPROJECTION=1 LIGHTLOOP_TILE_PASS USE_CLUSTERED_LIGHTLIST
// #pragma debug
#define DEBUG_REPROJECTION 0
// #pragma enable_d3d11_debug_symbols
#include "../../../ShaderPass/ShaderPass.cs.hlsl"
#define SHADERPASS SHADERPASS_VOLUMETRIC_LIGHTING

#define VBUFFER_SLICE_COUNT 256
#endif
#define SUPPORT_ASYMMETRY 1 // Support asymmetric phase functions
#define GROUP_SIZE_1D 16
#define GROUP_SIZE_2D (GROUP_SIZE_1D * GROUP_SIZE_1D)

#include "CoreRP/ShaderLibrary/VolumeRendering.hlsl"
#include "CoreRP/ShaderLibrary/SpaceFillingCurves.hlsl"
#include "../../../ShaderVariables.hlsl"
#include "../../../ShaderVariables.hlsl"
#include "../VBuffer.hlsl"
#include "../../../Lighting/Lighting.hlsl" // Includes Material.hlsl
#include "../../../Lighting/LightEvaluation.hlsl"
#include "../../../Lighting/VBuffer.hlsl"
#include "../../Lighting.hlsl" // Includes Material.hlsl
#include "../../LightEvaluation.hlsl"
//--------------------------------------------------------------------------------------------------
// Inputs & outputs

// Implementation
//--------------------------------------------------------------------------------------------------
#define HG 0
struct Ray
struct DualRay
float3 directionWS; // Normalized, stratified
float ratioLenToZ; // 1 / ViewSpaceZ
float3 centerDirWS; // Not normalized, centered
float3 strataDirWS; // Normalized, tile-stratified
float3 centerDirWS; // Normalized, tile-centered
float strataDirInvViewZ; // 1 / ViewSpace(strataDirWS).z
float twoDirRatioViewZ; // ViewSpace(strataDirWS).z / ViewSpace(centerDirWS).z
float3 GetPointAtDistance(Ray ray, float t)
// Returns a point along the stratified direction.
float3 GetPointAtDistance(DualRay ray, float t)
return ray.originWS + t * ray.directionWS;
return ray.originWS + t * ray.strataDirWS;
float3 GetCenterAtDistance(Ray ray, float t)
// Returns a point along the centered direction. It has a special property:
// ViewSpace(GetPointAtDistance(ray, t)).z = ViewSpace(GetCenterAtDistance(ray, t)).z,
// e.i. both points computed from the same value of 't' reside on the same Z-plane in the view space.
float3 GetCenterAtDistance(DualRay ray, float t)
t *= ray.twoDirRatioViewZ; // Perform the Z-coordinate conversion
struct VoxelLighting
{
float3 radianceComplete;
float3 radianceNoPhase;
};
float3 EvaluateVoxelLighting(LightLoopContext context, uint featureFlags, PositionInputs posInput,
Ray ray, float t0, float t1, float dt, float rndVal, float extinction, float asymmetry
#ifdef LIGHTLOOP_TILE_PASS
, uint clusterIndices[2], float clusterDepths[2])
#else
)
#endif
VoxelLighting EvaluateVoxelLighting(LightLoopContext context, uint featureFlags, PositionInputs posInput, float3 centerWS,
DualRay ray, float t0, float t1, float dt, float rndVal, float extinction, float asymmetry
#ifdef LIGHTLOOP_TILE_PASS
, uint clusterIndices[2], float clusterDepths[2])
#else
)
#endif
float3 voxelRadiance = 0;
VoxelLighting lighting;
ZERO_INITIALIZE(VoxelLighting, lighting);
BakeLightingData unused; // Unused for now, so define once

EvaluateLight_Directional(context, posInput, light, unused, 0, L,
color, attenuation);
float cosTheta = dot(L, ray.directionWS);
#if HG
float phase = HenyeyGreensteinPhasePartVarying(asymmetry, cosTheta);
#else
// Important:
// Ideally, all scattering calculations should use the stratified versions
// of the sample position and the ray direction. However, correct reprojection
// of asymmetrically scattered lighting (affected by an anisotropic phase
// function) is not possible. We work around this issue by reprojecting
// lighting not affected by the phase function. This basically removes
// the phase function from the temporal integration process. It is a hack.
// The downside is that asymmetry no longer benefits from temporal averaging,
// and any temporal instability of asymmetry causes causes visible jitter.
// In order to stabilize the image, we use the voxel center for all
// asymmetry-related calculations.
float cosTheta = dot(L, ray.centerDirWS);
#endif
float intensity = attenuation * (phase * weight);
float intensity = attenuation * weight;
voxelRadiance += intensity * color;
lighting.radianceNoPhase += intensity * color;
lighting.radianceComplete += phase * intensity * color;
}
}

do
{
float tMin = max(t0, ray.ratioLenToZ * clusterDepths[cluster]);
float tMin = max(t0, ray.strataDirInvViewZ * clusterDepths[cluster]);
tMax = min(t1, ray.ratioLenToZ * clusterDepths[1]);
tMax = min(t1, ray.strataDirInvViewZ * clusterDepths[1]);
}
#else
float tMin = t0;

float3 coneAxisX = lenMul * light.right;
float3 coneAxisY = lenMul * light.up;
sampleLight = IntersectRayCone(ray.originWS, ray.directionWS,
sampleLight = IntersectRayCone(ray.originWS, ray.strataDirWS,
light.positionWS, light.forward,
coneAxisX, coneAxisY,
tMin, tMax, tEntr, tExit);

float t, distSq, rcpPdf;
ImportanceSamplePunctualLight(rndVal, light.positionWS,
ray.originWS, ray.directionWS,
ray.originWS, ray.strataDirWS,
tEntr, tExit, t, distSq, rcpPdf,
hackMinDistSq);

EvaluateLight_Punctual(context, posInput, light, unused, 0, L, lightToSample,
distances, color, attenuation);
float cosTheta = dot(L, ray.directionWS);
#if HG
float phase = HenyeyGreensteinPhasePartVarying(asymmetry, cosTheta);
#else
float phase = CornetteShanksPhasePartVarying(asymmetry, cosTheta);
#endif
// Important:
// Ideally, all scattering calculations should use the stratified versions
// of the sample position and the ray direction. However, correct reprojection
// of asymmetrically scattered lighting (affected by an anisotropic phase
// function) is not possible. We work around this issue by reprojecting
// lighting not affected by the phase function. This basically removes
// the phase function from the temporal integration process. It is a hack.
// The downside is that asymmetry no longer benefits from temporal averaging,
// and any temporal instability of asymmetry causes causes visible jitter.
// In order to stabilize the image, we use the voxel center for all
// asymmetry-related calculations.
float3 centerL = light.positionWS - centerWS;
float cosTheta = dot(centerL, ray.centerDirWS) * rsqrt(dot(centerL, centerL));
float phase = CornetteShanksPhasePartVarying(asymmetry, cosTheta);
float intensity = attenuation * (phase * rcpPdf);
float intensity = attenuation * rcpPdf;
voxelRadiance += color * intensity;
lighting.radianceNoPhase += intensity * color;
lighting.radianceComplete += phase * intensity * color;
}
light = FetchLight(lightStart, min(++i, last));

float3x3 rotMat = float3x3(light.right, light.up, light.forward);
float3 o = mul(rotMat, ray.originWS - light.positionWS);
float3 d = mul(rotMat, ray.directionWS);
float3 d = mul(rotMat, ray.strataDirWS);
float range = light.size.x;
float3 boxPt0 = float3(-1, -1, 0);

EvaluateLight_Punctual(context, posInput, light, unused, 0, L, lightToSample,
distances, color, attenuation);
float cosTheta = dot(L, ray.directionWS);
#if HG
float phase = HenyeyGreensteinPhasePartVarying(asymmetry, cosTheta);
#else
float phase = CornetteShanksPhasePartVarying(asymmetry, cosTheta);
#endif
// Important:
// Ideally, all scattering calculations should use the stratified versions
// of the sample position and the ray direction. However, correct reprojection
// of asymmetrically scattered lighting (affected by an anisotropic phase
// function) is not possible. We work around this issue by reprojecting
// lighting not affected by the phase function. This basically removes
// the phase function from the temporal integration process. It is a hack.
// The downside is that asymmetry no longer benefits from temporal averaging,
// and any temporal instability of asymmetry causes causes visible jitter.
// In order to stabilize the image, we use the voxel center for all
// asymmetry-related calculations.
float3 centerL = light.positionWS - centerWS;
float cosTheta = dot(centerL, ray.centerDirWS) * rsqrt(dot(centerL, centerL));
float phase = CornetteShanksPhasePartVarying(asymmetry, cosTheta);
float intensity = attenuation * (phase * weight);
float intensity = attenuation * weight;
voxelRadiance += intensity * color;
lighting.radianceNoPhase += intensity * color;
lighting.radianceComplete += phase * intensity * color;
}
}
}

} while ((cluster < 2) && (clusterIndices[0] != clusterIndices[1]));
#endif // LIGHTLOOP_TILE_PASS
return voxelRadiance;
return lighting;
PositionInputs posInput, Ray ray)
PositionInputs posInput, DualRay ray)
float z0 = _VBufferDepthEncodingParams.x; // Start integration from the near plane
float t0 = ray.ratioLenToZ * z0;
float de = rcp(VBUFFER_SLICE_COUNT); // Log-encoded distance between slices
float z0 = _VBufferDepthEncodingParams.x; // Start integration from the near plane
float t0 = ray.strataDirInvViewZ * z0; // Convert view space Z to distance along the stratified ray
float de = rcp(VBUFFER_SLICE_COUNT); // Log-encoded distance between slices
float3 totalRadiance = 0;
float opticalDepth = 0;

{
float e1 = slice * de + de; // (slice + 1) / sliceCount
float z1 = DecodeLogarithmicDepth(e1, _VBufferDepthEncodingParams);
float t1 = ray.ratioLenToZ * z1;
float t1 = ray.strataDirInvViewZ * z1; // Convert view space Z to distance along the stratified ray
float dt = t1 - t0;
#ifdef LIGHTLOOP_TILE_PASS

// Compute the -exact- position of the center of the voxel.
// It's important since the accumulated value of the integral is stored at the center.
// We will use it for participating media sampling and reprojection.
// We will use it for participating media sampling, asymmetric scattering and reprojection.
float tc = t0 + 0.5 * dt;
float3 centerWS = GetCenterAtDistance(ray, tc);

float rndVal = 0.5;
#endif
float3 voxelRadiance = EvaluateVoxelLighting(context, featureFlags, posInput,
ray, t0, t1, dt, rndVal, extinction, asymmetry
#ifdef LIGHTLOOP_TILE_PASS
, clusterIndices, clusterDepths);
#else
);
#endif
VoxelLighting lighting = EvaluateVoxelLighting(context, featureFlags, posInput, centerWS,
ray, t0, t1, dt, rndVal, extinction, asymmetry
#ifdef LIGHTLOOP_TILE_PASS
, clusterIndices, clusterDepths);
#else
);
#endif
#if (SUPPORT_ASYMMETRY == 0)
lighting.radianceComplete = lighting.radianceNoPhase;
#endif
#if ENABLE_REPROJECTION
// Reproject the history at 'centerWS'.

// Both radiance values are obtained by integrating over line segments of different length.
// Blending only makes sense if the length of both intervals is the same.
// Therefore, the reprojected radiance needs to be rescaled by (frame_dt / reproj_dt).
// Important: reprojection must be performed without the phase function! Otherwise,
// some kind of per-light angle correction is required, which is intractable in practice.
float3 blendedRadiance = (1 - blendFactor) * voxelRadiance + blendFactor * lengthScale * reprojRadiance;
float3 blendedRadiance = (1 - blendFactor) * lighting.radianceNoPhase + blendFactor * lengthScale * reprojRadiance;
// Store the feedback for the voxel.
// TODO: dynamic lights (which update their position, rotation, cookie or shadow at runtime)

_VBufferLightingFeedback[uint3(posInput.positionSS, slice)] = float4(blendedRadiance, dt);
// Extrapolate the influence of the phase function on the results of the current frame.
// TODO: how to ensure we do not divide by 0?
float3 phaseCurrFrame = lighting.radianceComplete / lighting.radianceNoPhase;
blendedRadiance *= phaseCurrFrame;
float3 blendedRadiance = voxelRadiance;
#endif
#if DEBUG_REPROJECTION
if (distance(voxelRadiance, reprojValue.rgb) > 0.1) blendedRadiance = float3(1000, 0, 0);
#endif
float3 blendedRadiance = lighting.radianceComplete;
#endif // ENABLE_REPROJECTION
#if HG
float phase = HenyeyGreensteinPhasePartConstant(asymmetry);
#if SUPPORT_ASYMMETRY
float phase = CornetteShanksPhasePartConstant(asymmetry);
float phase = CornetteShanksPhasePartConstant(asymmetry);
float phase = IsotropicPhaseFunction();
#endif
// Integral{a, b}{Transmittance(0, t) * L_s(t) dt} = Transmittance(0, a) * Integral{a, b}{Transmittance(0, t - a) * L_s(t) dt}.

float2 centerCoord = voxelCoord + 0.5;
#if ENABLE_REPROJECTION
float2 sampleCoord = centerCoord + _VBufferSampleOffset.xy;
float2 strataCoord = centerCoord + _VBufferSampleOffset.xy;
float2 sampleCoord = centerCoord;
float2 strataCoord = centerCoord;
// Compute the (stratified) ray direction s.t. its ViewSpaceZ = 1.
float3 rayDir = mul(-float3(sampleCoord, 1), (float3x3)_VBufferCoordToViewDirWS);
float lenSq = dot(rayDir, rayDir);
float lenRcp = rsqrt(lenSq);
float len = lenSq * lenRcp;
// Compute the (tile-stratified) ray direction s.t. its ViewSpace(rayDirWS).z = 1.
float3 strataDirWS = mul(-float3(strataCoord, 1), (float3x3)_VBufferCoordToViewDirWS);
float strataDirLenSq = dot(strataDirWS, strataDirWS);
float strataDirLenRcp = rsqrt(strataDirLenSq);
float strataDirLen = strataDirLenSq * strataDirLenRcp;
// Compute the (tile-centered) ray direction s.t. its ViewSpace(rayDirWS).z = 1.
float3 centerDirWS = mul(-float3(centerCoord, 1), (float3x3)_VBufferCoordToViewDirWS);
float centerDirLenSq = dot(centerDirWS, centerDirWS);
float centerDirLenRcp = rsqrt(centerDirLenSq);
float centerDirLen = centerDirLenSq * centerDirLenRcp;
#if ENABLE_REPROJECTION
// Compute the ray direction which passes through the center of the voxel s.t. its ViewSpaceZ = 1.
float3 rayCenterDir = mul(-float3(centerCoord, 1), (float3x3)_VBufferCoordToViewDirWS);
#else
float3 rayCenterDir = rayDir;
#endif
DualRay ray;
Ray ray;
ray.originWS = GetCurrentViewPosition();
ray.ratioLenToZ = len;
ray.directionWS = rayDir * lenRcp;
ray.centerDirWS = rayCenterDir * lenRcp;
ray.originWS = GetCurrentViewPosition();
ray.strataDirWS = strataDirWS * strataDirLenRcp; // Normalize
ray.centerDirWS = centerDirWS * centerDirLenRcp; // Normalize
ray.strataDirInvViewZ = strataDirLen; // View space Z
ray.twoDirRatioViewZ = centerDirLen * strataDirLenRcp; // View space Z ratio
// TODO
LightLoopContext context;

4
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumetrics/VolumetricLighting.cs


public void ResizeVBuffer(HDCamera camera, int screenWidth, int screenHeight)
{
if (preset == VolumetricLightingPreset.Off) return;
if (preset == VolumetricLightingPreset.Off) return;
int w = 0, h = 0, d = 0;
ComputeVBufferResolutionAndScale(preset, screenWidth, screenHeight, ref w, ref h, ref d);

6
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/GGXConvolution/RuntimeFilterIBL.cs


FilterCubemapCommon(cmd, source, target, m_faceWorldToViewMatrixMatrices);
}
public void FilterPlanarTexture(CommandBuffer cmd, Texture source, RenderTexture target)
{
// TODO: planar convolution
cmd.CopyTexture(source, 0, 0, target, 0, 0);
}
// Filters MIP map levels (other than 0) with GGX using multiple importance sampling.
public void FilterCubemapMIS( CommandBuffer cmd,
Texture source, RenderTexture target,

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/Lit.cs


// SpecularColor fold into fresnel0
// SSS
public int diffusionProfile;
public uint diffusionProfile;
public float subsurfaceMask;
// Transmission

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/Lit.cs.hlsl


float metallic;
float coatMask;
float3 specularColor;
int diffusionProfile;
uint diffusionProfile;
float subsurfaceMask;
float thickness;
float3 tangentWS;

155
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/Lit.hlsl


#define ENVMAP_FEATURE_PERFACEINFLUENCE
#define ENVMAP_FEATURE_INFLUENCENORMAL
#define ENVMAP_FEATURE_PERFACEFADE
// SurfaceData is define in Lit.cs which generate Lit.cs.hlsl
// SurfaceData is define in Lit.cs which generate Lit.cs.hlsl
#include "Lit.cs.hlsl"
#include "../SubsurfaceScattering/SubsurfaceScattering.hlsl"
#include "CoreRP/ShaderLibrary/VolumeRendering.hlsl"

#endif
#include "../../Lighting/LightEvaluation.hlsl"
#include "../../Lighting/Reflection/VolumeProjection.hlsl"
//-----------------------------------------------------------------------------
// Lighting structure for light accumulation

// _preIntegratedFGD and _CubemapLD are unique for each BRDF
IndirectLighting EvaluateBSDF_Env( LightLoopContext lightLoopContext,
float3 V, PositionInputs posInput,
PreLightData preLightData, EnvLightData lightData, BSDFData bsdfData, int envShapeType, int GPUImageBasedLightingType,
PreLightData preLightData, EnvLightData lightData, BSDFData bsdfData,
int influenceShapeType, int GPUImageBasedLightingType,
inout float hierarchyWeight)
{
IndirectLighting lighting;

// In Unity the cubemaps are capture with the localToWorld transform of the component.
// This mean that location and orientation matter. So after intersection of proxy volume we need to convert back to world.
// CAUTION: localToWorld is the transform use to convert the cubemap capture point to world space (mean it include the offset)
// the center of the bounding box is thus in locals space: positionLS - offsetLS
// We use this formulation as it is the one of legacy unity that was using only AABB box.
float3x3 worldToLocal = transpose(float3x3(lightData.right, lightData.up, lightData.forward)); // worldToLocal assume no scaling
float3 positionLS = positionWS - lightData.positionWS;
positionLS = mul(positionLS, worldToLocal).xyz - lightData.offsetLS; // We want to calculate the intersection from the center of the bounding box.
float3x3 worldToIS = WorldToInfluenceSpace(lightData);
float3 positionIS = WorldToInfluencePosition(lightData, worldToIS, positionWS);
float3 dirIS = mul(R, worldToIS);
// Note: using envShapeType instead of lightData.envShapeType allow to make compiler optimization in case the type is know (like for sky)
if (envShapeType == ENVSHAPETYPE_SPHERE)
{
// 1. First process the projection
float3 dirLS = mul(R, worldToLocal);
float sphereOuterDistance = lightData.influenceExtents.x;
float3x3 worldToPS = WorldToProxySpace(lightData);
float3 positionPS = WorldToProxyPosition(lightData, worldToPS, positionWS);
float3 dirPS = mul(R, worldToPS);
float projectionDistance = IntersectRaySphereSimple(positionLS, dirLS, sphereOuterDistance);
projectionDistance = max(projectionDistance, lightData.minProjectionDistance); // Setup projection to infinite if requested (mean no projection shape)
// We can reuse dist calculate in LS directly in WS as there is no scaling. Also the offset is already include in lightData.positionWS
R = (positionWS + projectionDistance * R) - lightData.positionWS;
float projectionDistance = 0;
// 1. First process the projection
// Note: using influenceShapeType and projectionShapeType instead of (lightData|proxyData).shapeType allow to make compiler optimization in case the type is know (like for sky)
if (influenceShapeType == ENVSHAPETYPE_SPHERE)
{
projectionDistance = IntersectSphereProxy(lightData, dirPS, positionPS);
// We can reuse dist calculate in LS directly in WS as there is no scaling. Also the offset is already include in lightData.capturePositionWS
float3 capturePositionWS = GetCapturePositionWS(lightData);
R = (positionWS + projectionDistance * R) - capturePositionWS;
dirLS = mul(coatR, worldToLocal);
projectionDistance = IntersectRaySphereSimple(positionLS, dirLS, sphereOuterDistance);
projectionDistance = max(projectionDistance, lightData.minProjectionDistance); // Setup projection to infinite if requested (mean no projection shape)
coatR = (positionWS + projectionDistance * coatR) - lightData.positionWS;
dirPS = mul(coatR, worldToPS);
projectionDistance = IntersectSphereProxy(lightData, dirPS, positionPS);
coatR = (positionWS + projectionDistance * coatR) - capturePositionWS;
// 2. Process the position influence
float lengthPositionLS = length(positionLS);
float sphereInfluenceDistance = lightData.influenceExtents.x - lightData.blendDistancePositive.x;
float distFade = max(lengthPositionLS - sphereInfluenceDistance, 0.0);
float alpha = saturate(1.0 - distFade / max(lightData.blendDistancePositive.x, 0.0001)); // avoid divide by zero
#if defined(ENVMAP_FEATURE_INFLUENCENORMAL)
// 3. Process the normal influence
float insideInfluenceNormalVolume = lengthPositionLS <= (lightData.influenceExtents.x - lightData.blendNormalDistancePositive.x) ? 1.0 : 0.0;
float insideWeight = InfluenceFadeNormalWeight(bsdfData.normalWS, normalize(positionWS - lightData.positionWS));
alpha *= insideInfluenceNormalVolume ? 1.0 : insideWeight;
#endif
weight = alpha;
weight = InfluenceSphereWeight(lightData, bsdfData, positionWS, positionIS, dirIS);
else if (envShapeType == ENVSHAPETYPE_BOX)
else if (influenceShapeType == ENVSHAPETYPE_BOX)
// 1. First process the projection
float3 dirLS = mul(R, worldToLocal);
float3 boxOuterDistance = lightData.influenceExtents;
float projectionDistance = IntersectRayAABBSimple(positionLS, dirLS, -boxOuterDistance, boxOuterDistance);
projectionDistance = max(projectionDistance, lightData.minProjectionDistance); // Setup projection to infinite if requested (mean no projection shape)
projectionDistance = IntersectBoxProxy(lightData, dirPS, positionPS);
// We can reuse dist calculate in LS directly in WS as there is no scaling. Also the offset is already include in lightData.positionWS
R = (positionWS + projectionDistance * R) - lightData.positionWS;
// We can reuse dist calculate in LS directly in WS as there is no scaling. Also the offset is already include in lightData.capturePositionWS
float3 capturePositionWS = GetCapturePositionWS(lightData);
R = (positionWS + projectionDistance * R) - capturePositionWS;
// TODO: add distance based roughness

dirLS = mul(coatR, worldToLocal);
projectionDistance = IntersectRayAABBSimple(positionLS, dirLS, -boxOuterDistance, boxOuterDistance);
projectionDistance = max(projectionDistance, lightData.minProjectionDistance); // Setup projection to infinite if requested (mean no projection shape)
coatR = (positionWS + projectionDistance * coatR) - lightData.positionWS;
dirPS = mul(coatR, worldToPS);
projectionDistance = IntersectBoxProxy(lightData, dirPS, positionPS);
coatR = (positionWS + projectionDistance * coatR) - capturePositionWS;
// 2. Process the position influence
// Calculate falloff value, so reflections on the edges of the volume would gradually blend to previous reflection.
#if defined(ENVMAP_FEATURE_PERFACEINFLUENCE) || defined(ENVMAP_FEATURE_INFLUENCENORMAL) || defined(ENVMAP_FEATURE_PERFACEFADE)
// Distance to each cube face
float3 negativeDistance = boxOuterDistance + positionLS;
float3 positiveDistance = boxOuterDistance - positionLS;
#endif
#if defined(ENVMAP_FEATURE_PERFACEINFLUENCE)
// Influence falloff for each face
float3 negativeFalloff = negativeDistance / max(0.0001, lightData.blendDistanceNegative);
float3 positiveFalloff = positiveDistance / max(0.0001, lightData.blendDistancePositive);
// Fallof is the min for all faces
float influenceFalloff = min(
min(min(negativeFalloff.x, negativeFalloff.y), negativeFalloff.z),
min(min(positiveFalloff.x, positiveFalloff.y), positiveFalloff.z));
float alpha = saturate(influenceFalloff);
#else
float distFace = DistancePointBox(positionLS, -lightData.influenceExtents + lightData.blendDistancePositive.x, lightData.influenceExtents - lightData.blendDistancePositive.x);
float alpha = saturate(1.0 - distFace / max(lightData.blendDistancePositive.x, 0.0001));
#endif
#if defined(ENVMAP_FEATURE_INFLUENCENORMAL)
// 3. Process the normal influence
// Calculate a falloff value to discard normals pointing outward the center of the environment light
float3 belowPositiveInfluenceNormalVolume = positiveDistance / max(0.0001, lightData.blendNormalDistancePositive);
float3 aboveNegativeInfluenceNormalVolume = negativeDistance / max(0.0001, lightData.blendNormalDistanceNegative);
float insideInfluenceNormalVolume = all(belowPositiveInfluenceNormalVolume >= 1.0) && all(aboveNegativeInfluenceNormalVolume >= 1.0) ? 1.0 : 0;
float insideWeight = InfluenceFadeNormalWeight(bsdfData.normalWS, normalize(positionWS - lightData.positionWS));
alpha *= insideInfluenceNormalVolume ? 1.0 : insideWeight;
#endif
weight = InfluenceBoxWeight(lightData, bsdfData, positionWS, positionIS, dirIS);
}
#if defined(ENVMAP_FEATURE_PERFACEFADE)
// 4. Fade specific cubemap faces
// For each axes (both positive and negative ones), we want to fade from the center of one face to another
// So we normalized the sample direction (R) and use its component to fade for each axis
// We consider R.x as cos(X) and then fade as angle from 60°(=acos(1/2)) to 75°(=acos(1/4))
// For positive axes: axisFade = (R - 1/4) / (1/2 - 1/4)
// <=> axisFace = 4 * R - 1;
R = normalize(R);
float3 faceFade = saturate((4 * R - 1) * lightData.boxSideFadePositive) + saturate((-4 * R - 1) * lightData.boxSideFadeNegative);
alpha *= saturate(faceFade.x + faceFade.y + faceFade.z);
#ifdef DEBUG_DISPLAY
float3 radiusToProxy = R;
weight = alpha;
}
// Smooth weighting
weight = Smoothstep01(weight);
// When we are rough, we tend to see outward shifting of the reflection when at the boundary of the projection volume
// Also it appear like more sharp. To avoid these artifact and at the same time get better match to reference we lerp to original unmodified reflection.
// Formula is empirical.

float3 sampleDirectionDiscardWS = GetSampleDirectionDiscardWS(lightData);
if (dot(sampleDirectionDiscardWS, R) < 0)
return lighting;
weight *= preLD.a;
#ifdef DEBUG_DISPLAY
if (_DebugLightingMode == DEBUGLIGHTINGMODE_ENVIRONMENT_PROXY_VOLUME)
preLD = ApplyDebugProjectionVolume(preLD, radiusToProxy, _DebugEnvironmentProxyDepthScale);
#endif
// Smooth weighting
weight = Smoothstep01(weight);
if (GPUImageBasedLightingType == GPUIMAGEBASEDLIGHTINGTYPE_REFLECTION)
{

4
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/Lit.shader


[Enum(Flip, 0, Mirror, 1)] _DoubleSidedNormalMode("Double sided normal mode", Float) = 1
[HideInInspector] _DoubleSidedConstants("_DoubleSidedConstants", Vector) = (1, 1, -1, 0)
[Enum(UV0, 0, Planar, 4, TriPlanar, 5)] _UVBase("UV Set for base", Float) = 0
[Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Planar, 4, Triplanar, 5)] _UVBase("UV Set for base", Float) = 0
_TexWorldScale("Scale to apply on world coordinate", Float) = 1.0
[HideInInspector] _InvTilingScale("Inverse tiling scale = 2 / (abs(_BaseColorMap_ST.x) + abs(_BaseColorMap_ST.y))", Float) = 1
[HideInInspector] _UVMappingMask("_UVMappingMask", Color) = (1, 0, 0, 0)

[ToggleUI] _LinkDetailsWithBase("LinkDetailsWithBase", Float) = 1.0
[Enum(Use Emissive Color, 0, Use Emissive Mask, 1)] _EmissiveColorMode("Emissive color mode", Float) = 1
[Enum(UV0, 0, Planar, 4, TriPlanar, 5)] _UVEmissive("UV Set for emissive", Float) = 0
[Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Planar, 4, Triplanar, 5)] _UVEmissive("UV Set for emissive", Float) = 0
_TexWorldScaleEmissive("Scale to apply on world coordinate", Float) = 1.0
[HideInInspector] _UVMappingMaskEmissive("_UVMappingMaskEmissive", Color) = (1, 0, 0, 0)

5
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/LitBuiltinData.hlsl


// Be sure that the compiler is aware that we don't use UV1 to UV3 for main layer so it can optimize code
#ifndef LAYERED_LIT_SHADER
ComputeLayerTexCoord(input.texCoord0, input.texCoord1, input.texCoord2, input.texCoord3, float4(1.0, 0.0, 0.0, 0.0), float4(1.0, 0.0, 0.0, 0.0),
ComputeLayerTexCoord(
ComputeLayerTexCoord0(input.texCoord0, input.texCoord1, input.texCoord2, input.texCoord3, _UVMappingMaskEmissive, _UVMappingMaskEmissive,
ComputeLayerTexCoord0(
input.texCoord0, input.texCoord1, input.texCoord2, input.texCoord3, _UVMappingMaskEmissive, _UVMappingMaskEmissive,
_EmissiveColorMap_ST.xy, _EmissiveColorMap_ST.zw, float2(0.0, 0.0), float2(0.0, 0.0), 1.0, false,
input.positionWS, _TexWorldScaleEmissive,
mappingType, layerTexCoord);

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/LitData.hlsl


#endif
// Be sure that the compiler is aware that we don't use UV1 to UV3 for main layer so it can optimize code
ComputeLayerTexCoord( texCoord0, texCoord1, texCoord2, texCoord3, float4(1.0, 0.0, 0.0, 0.0), _UVDetailsMappingMask,
ComputeLayerTexCoord( texCoord0, texCoord1, texCoord2, texCoord3, _UVMappingMask, _UVDetailsMappingMask,
_BaseColorMap_ST.xy, _BaseColorMap_ST.zw, _DetailMap_ST.xy, _DetailMap_ST.zw, 1.0, _LinkDetailsWithBase,
positionWS, _TexWorldScale,
mappingType, layerTexCoord);

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/LitTessellation.shader


[Enum(Flip, 0, Mirror, 1)] _DoubleSidedNormalMode("Double sided normal mode", Float) = 1
[HideInInspector] _DoubleSidedConstants("_DoubleSidedConstants", Vector) = (1, 1, -1, 0)
[Enum(UV0, 0, Planar, 4, TriPlanar, 5)] _UVBase("UV Set for base", Float) = 0
[Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Planar, 4, Triplanar, 5)] _UVBase("UV Set for base", Float) = 0
_TexWorldScale("Scale to apply on world coordinate", Float) = 1.0
[HideInInspector] _InvTilingScale("Inverse tiling scale = 2 / (abs(_BaseColorMap_ST.x) + abs(_BaseColorMap_ST.y))", Float) = 1
[HideInInspector] _UVMappingMask("_UVMappingMask", Color) = (1, 0, 0, 0)

9
ScriptableRenderPipeline/HDRenderPipeline/HDRP/RenderPipelineResources/CameraMotionVectors.shader


float4 Frag(Varyings input) : SV_Target
{
PositionInputs posInput = GetPositionInput(input.positionCS.xy, _ScreenSize.zw);
float depth = LOAD_TEXTURE2D(_MainDepthTexture, posInput.positionSS).x;
UpdatePositionInput(depth, UNITY_MATRIX_I_VP, UNITY_MATRIX_VP, posInput);
float depth = LOAD_TEXTURE2D(_MainDepthTexture, input.positionCS.xy).x;
PositionInputs posInput = GetPositionInput(input.positionCS.xy, _ScreenSize.zw, depth, UNITY_MATRIX_I_VP, UNITY_MATRIX_VP);
float4 worldPos = float4(posInput.positionWS, 1.0);
float4 prevPos = worldPos;

float2 previousPositionCS = (prevHPos + 1.0) / 2.0;
float2 positionCS = (curHPos + 1.0) / 2.0;
#if !UNITY_UV_STARTS_AT_TOP
#if UNITY_UV_STARTS_AT_TOP
previousPositionCS.y = 1.0 - previousPositionCS.y;
positionCS.y = 1.0 - positionCS.y;
#endif

1
ScriptableRenderPipeline/HDRenderPipeline/HDRP/RenderPipelineResources/HDRenderPipelineResources.asset


cameraMotionVectors: {fileID: 4800000, guid: 035941b63024d1943af48811c1db20d9, type: 3}
copyStencilBuffer: {fileID: 4800000, guid: 3d1574f1cdfa0ce4995f9bc79ed7f8ec, type: 3}
blit: {fileID: 4800000, guid: 370f7a9cc4e362d488af024d371091e8, type: 3}
blitFlipMip: {fileID: 4800000, guid: ef092fc4aaa1bb546a9ab4e457c4b07a, type: 3}
blitCubemap: {fileID: 4800000, guid: d05913e251bed7a4992c921c62e1b647, type: 3}
buildProbabilityTables: {fileID: 7200000, guid: b9f26cf340afe9145a699753531b2a4c,
type: 3}

5
ScriptableRenderPipeline/HDRenderPipeline/HDRP/ShaderPass/ShaderPassDBuffer.hlsl


)
{
FragInputs input = UnpackVaryingsMeshToFragInputs(packedInput.vmesh);
PositionInputs posInput = GetPositionInput(input.positionSS.xy, _ScreenSize.zw);
float depth = LOAD_TEXTURE2D(_MainDepthTexture, posInput.positionSS).x;
UpdatePositionInput(depth, UNITY_MATRIX_I_VP, UNITY_MATRIX_VP, posInput);
float depth = LOAD_TEXTURE2D(_MainDepthTexture, input.positionSS.xy).x;
PositionInputs posInput = GetPositionInput(input.positionSS.xy, _ScreenSize.zw, depth, UNITY_MATRIX_I_VP, UNITY_MATRIX_VP);
// Transform from world space to decal space (DS) to clip the decal.
// For this we must use absolute position.

3
ScriptableRenderPipeline/HDRenderPipeline/HDRP/ShaderPass/ShaderPassDepthOnly.hlsl


FragInputs input = UnpackVaryingsMeshToFragInputs(packedInput.vmesh);
// input.positionSS is SV_Position
PositionInputs posInput = GetPositionInput(input.positionSS.xy, _ScreenSize.zw);
UpdatePositionInput(input.positionSS.z, input.positionSS.w, input.positionWS, posInput);
PositionInputs posInput = GetPositionInput(input.positionSS.xy, _ScreenSize.zw, input.positionSS.z, input.positionSS.w, input.positionWS);
#ifdef VARYINGS_NEED_POSITION_WS
float3 V = GetWorldSpaceNormalizeViewDir(input.positionWS);

3
ScriptableRenderPipeline/HDRenderPipeline/HDRP/ShaderPass/ShaderPassDistortion.hlsl


FragInputs input = UnpackVaryingsMeshToFragInputs(packedInput.vmesh);
// input.positionSS is SV_Position
PositionInputs posInput = GetPositionInput(input.positionSS.xy, _ScreenSize.zw);
UpdatePositionInput(input.positionSS.z, input.positionSS.w, input.positionWS, posInput);
PositionInputs posInput = GetPositionInput(input.positionSS.xy, _ScreenSize.zw, input.positionSS.z, input.positionSS.w, input.positionWS);
#ifdef VARYINGS_NEED_POSITION_WS
float3 V = GetWorldSpaceNormalizeViewDir(input.positionWS);

3
ScriptableRenderPipeline/HDRenderPipeline/HDRP/ShaderPass/ShaderPassForward.hlsl


FragInputs input = UnpackVaryingsMeshToFragInputs(packedInput.vmesh);
// input.positionSS is SV_Position
PositionInputs posInput = GetPositionInput(input.positionSS.xy, _ScreenSize.zw, uint2(input.positionSS.xy) / GetTileSize());
UpdatePositionInput(input.positionSS.z, input.positionSS.w, input.positionWS, posInput);
PositionInputs posInput = GetPositionInput(input.positionSS.xy, _ScreenSize.zw, input.positionSS.z, input.positionSS.w, input.positionWS.xyz, uint2(input.positionSS.xy) / GetTileSize());
#ifdef VARYINGS_NEED_POSITION_WS
float3 V = GetWorldSpaceNormalizeViewDir(input.positionWS);

3
ScriptableRenderPipeline/HDRenderPipeline/HDRP/ShaderPass/ShaderPassForwardUnlit.hlsl


FragInputs input = UnpackVaryingsMeshToFragInputs(packedInput.vmesh);
// input.positionSS is SV_Position
PositionInputs posInput = GetPositionInput(input.positionSS.xy, _ScreenSize.zw);
UpdatePositionInput(input.positionSS.z, input.positionSS.w, input.positionWS, posInput);
PositionInputs posInput = GetPositionInput(input.positionSS.xy, _ScreenSize.zw, input.positionSS.z, input.positionSS.w, input.positionWS);
#ifdef VARYINGS_NEED_POSITION_WS
float3 V = GetWorldSpaceNormalizeViewDir(input.positionWS);

3
ScriptableRenderPipeline/HDRenderPipeline/HDRP/ShaderPass/ShaderPassGBuffer.hlsl


FragInputs input = UnpackVaryingsMeshToFragInputs(packedInput.vmesh);
// input.positionSS is SV_Position
PositionInputs posInput = GetPositionInput(input.positionSS.xy, _ScreenSize.zw);
UpdatePositionInput(input.positionSS.z, input.positionSS.w, input.positionWS, posInput);
PositionInputs posInput = GetPositionInput(input.positionSS.xy, _ScreenSize.zw, input.positionSS.z, input.positionSS.w, input.positionWS);
#ifdef VARYINGS_NEED_POSITION_WS
float3 V = GetWorldSpaceNormalizeViewDir(input.positionWS);

3
ScriptableRenderPipeline/HDRenderPipeline/HDRP/ShaderPass/ShaderPassLightTransport.hlsl


FragInputs input = UnpackVaryingsMeshToFragInputs(packedInput.vmesh);
// input.positionSS is SV_Position
PositionInputs posInput = GetPositionInput(input.positionSS.xy, _ScreenSize.zw);
UpdatePositionInput(input.positionSS.z, input.positionSS.w, input.positionWS, posInput);
PositionInputs posInput = GetPositionInput(input.positionSS.xy, _ScreenSize.zw, input.positionSS.z, input.positionSS.w, input.positionWS);
#ifdef VARYINGS_NEED_POSITION_WS
float3 V = GetWorldSpaceNormalizeViewDir(input.positionWS);

3
ScriptableRenderPipeline/HDRenderPipeline/HDRP/ShaderPass/ShaderPassVelocity.hlsl


FragInputs input = UnpackVaryingsMeshToFragInputs(packedInput.vmesh);
// input.positionSS is SV_Position
PositionInputs posInput = GetPositionInput(input.positionSS.xy, _ScreenSize.zw);
UpdatePositionInput(input.positionSS.z, input.positionSS.w, input.positionWS, posInput);
PositionInputs posInput = GetPositionInput(input.positionSS.xy, _ScreenSize.zw, input.positionSS.z, input.positionSS.w, input.positionWS);
#ifdef VARYINGS_NEED_POSITION_WS
float3 V = GetWorldSpaceNormalizeViewDir(input.positionWS);

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Sky/AtmosphericScattering/AtmosphericScattering.hlsl


#include "AtmosphericScattering.cs.hlsl"
#include "../SkyVariables.hlsl"
#include "../../ShaderVariables.hlsl"
#include "../../Lighting/VBuffer.hlsl"
#include "../../Lighting/Volumetrics/VBuffer.hlsl"
#if (SHADEROPTIONS_VOLUMETRIC_LIGHTING_PRESET != 0)
TEXTURE3D(_VBufferLighting);

21
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Sky/OpaqueAtmosphericScattering.shader


float4 Frag(Varyings input) : SV_Target
{
PositionInputs posInput = GetPositionInput(input.positionCS.xy, _ScreenSize.zw);
float depth = LOAD_TEXTURE2D(_MainDepthTexture, posInput.positionSS).x;
UpdatePositionInput(depth, UNITY_MATRIX_I_VP, UNITY_MATRIX_VP, posInput);
float depth = LOAD_TEXTURE2D(_MainDepthTexture, input.positionCS.xy).x;
PositionInputs posInput = GetPositionInput(input.positionCS.xy, _ScreenSize.zw, depth, UNITY_MATRIX_I_VP, UNITY_MATRIX_VP);
if (depth == UNITY_RAW_FAR_CLIP_VALUE)
{
// When a pixel is at far plane, the world space coordinate reconstruction is not reliable.
// So in order to have a valid position (for example for height fog) we just consider that the sky is a sphere centered on camera with a radius of 5km (arbitrarily chosen value!)
// And recompute the position on the sphere with the current camera direction.
float3 viewDirection = -GetWorldSpaceNormalizeViewDir(posInput.positionWS) * 5000.0f;
posInput.positionWS = GetPrimaryCameraPosition() + viewDirection;
}
if (depth == UNITY_RAW_FAR_CLIP_VALUE)
{
// When a pixel is at far plane, the world space coordinate reconstruction is not reliable.
// So in order to have a valid position (for example for height fog) we just consider that the sky is a sphere centered on camera with a radius of 5km (arbitrarily chosen value!)
// And recompute the position on the sphere with the current camera direction.
float3 viewDirection = -GetWorldSpaceNormalizeViewDir(posInput.positionWS) * 5000.0f;
posInput.positionWS = GetPrimaryCameraPosition() + viewDirection;
}
return EvaluateAtmosphericScattering(posInput);
}

6
ScriptableRenderPipeline/HDRenderPipeline/package.json


{
"name": "com.unity.render-pipelines.high-definition",
"description": "HD Render Pipeline for Unity.",
"version": "0.1.25",
"version": "0.1.27",
"com.unity.postprocessing": "0.1.7",
"com.unity.render-pipelines.core": "0.1.25"
"com.unity.postprocessing": "0.1.8",
"com.unity.render-pipelines.core": "0.1.27"
}
}

95
ScriptableRenderPipeline/LightweightPipeline/LWRP/Data/LightweightPipelineAsset.cs


[SerializeField] private Vector3 m_Cascade4Split = new Vector3(0.067f, 0.2f, 0.467f);
[SerializeField]
private LightweightPipelineResource m_ResourceAsset;
private LightweightPipelineResources m_ResourcesAsset;
private LightweightPipelineEditorResources m_EditorResourcesAsset;
[MenuItem("Assets/Create/Render Pipeline/Lightweight/Pipeline Asset", priority = CoreUtils.assetCreateMenuPriority1)]
static void CreateLightweightPipeline()
{

//[MenuItem("Assets/Create/Render Pipeline/Lightweight/Pipeline Resources", priority = CoreUtils.assetCreateMenuPriority1)]
static void CreateLightweightPipelineResources()
{
var instance = CreateInstance<LightweightPipelineResources>();
AssetDatabase.CreateAsset(instance, string.Format("Assets/{0}.asset", typeof(LightweightPipelineResources).Name));
}
//[MenuItem("Assets/Create/Render Pipeline/Lightweight/Pipeline Editor Resources", priority = CoreUtils.assetCreateMenuPriority1)]
static void CreateLightweightPipelineEditorResources()
{
var instance = CreateInstance<LightweightPipelineEditorResources>();
AssetDatabase.CreateAsset(instance, string.Format("Assets/{0}.asset", typeof(LightweightPipelineEditorResources).Name));
}
instance.LoadResourceFile();
instance.m_EditorResourcesAsset = LoadResourceFile<LightweightPipelineEditorResources>();
instance.m_ResourcesAsset = LoadResourceFile<LightweightPipelineResources>();
private void LoadResourceFile()
private static T LoadResourceFile<T>() where T : ScriptableObject
string[] guids = AssetDatabase.FindAssets("LightweightPipelineResource t:scriptableobject", m_SearchPaths);
LightweightPipelineResource resourceAsset = null;
T resourceAsset = null;
var guids = AssetDatabase.FindAssets(typeof(T).Name + " t:scriptableobject", m_SearchPaths);
m_ResourceAsset = AssetDatabase.LoadAssetAtPath<LightweightPipelineResource>(path);
if (m_ResourceAsset != null)
resourceAsset = AssetDatabase.LoadAssetAtPath<T>(path);
if (resourceAsset != null)
if (m_ResourceAsset == null)
if (resourceAsset == null)
{
string path = m_SearchPaths[PACKAGE_MANAGER_PATH_INDEX] + "/LWRP/Data/" + typeof(T).Name + ".asset";
resourceAsset = AssetDatabase.LoadAssetAtPath<T>(path);
}
return resourceAsset;
}
LightweightPipelineEditorResources editorResources
{
get
string path = m_SearchPaths[PACKAGE_MANAGER_PATH_INDEX] + "/LWRP/Data/LightweightPipelineResource.asset";
m_ResourceAsset = AssetDatabase.LoadAssetAtPath<LightweightPipelineResource>(path);
if (m_EditorResourcesAsset == null)
m_EditorResourcesAsset = LoadResourceFile<LightweightPipelineEditorResources>();
return m_EditorResourcesAsset;
LightweightPipelineResources resources
{
get
{
#if UNITY_EDITOR
if (m_ResourcesAsset == null)
m_ResourcesAsset = LoadResourceFile<LightweightPipelineResources>();
#endif
return m_ResourcesAsset;
}
}
protected override IRenderPipeline InternalCreatePipeline()
{

private Material GetMaterial(DefaultMaterialType materialType)
{
#if UNITY_EDITOR
if (m_ResourceAsset == null)
LoadResourceFile();
return m_ResourceAsset.DefaultMaterial;
return editorResources.DefaultMaterial;
return m_ResourceAsset.DefaultParticleMaterial;
return editorResources.DefaultParticleMaterial;
return m_ResourceAsset.DefaultTerrainMaterial;
return editorResources.DefaultTerrainMaterial;
// Unity Builtin Default
default:

public Shader BlitShader
{
get
{
#if UNITY_EDITOR
if (m_ResourceAsset == null)
LoadResourceFile();
#endif
if (m_ResourceAsset)
return m_ResourceAsset.BlitShader;
return null;
}
get { return resources != null ? resources.BlitShader : null; }
get
{
#if UNITY_EDITOR
if (m_ResourceAsset == null)
LoadResourceFile();
#endif
if (m_ResourceAsset)
return m_ResourceAsset.CopyDepthShader;
return null;
}
get { return resources != null ? resources.CopyDepthShader : null; }
}
}
}

2
ScriptableRenderPipeline/LightweightPipeline/LWRP/Data/LightweightPipelineEditorResources.cs.meta


fileFormatVersion: 2
guid: eb91b173ce266e040aa972ca9a561308
guid: 76e49a5b88430df478c504fe5a5c1a62
MonoImporter:
externalObjects: {}
serializedVersion: 2

6
ScriptableRenderPipeline/LightweightPipeline/package.json


{
"name": "com.unity.render-pipelines.lightweight",
"description": "Lightweight Render Pipeline for Unity.",
"version": "0.1.25",
"version": "0.1.27",
"com.unity.postprocessing": "0.1.7",
"com.unity.render-pipelines.core": "0.1.25"
"com.unity.postprocessing": "0.1.8",
"com.unity.render-pipelines.core": "0.1.27"
}
}

4
ScriptableRenderPipeline/master-package.json


{
"version": "0.1.25",
"version": "0.1.27",
"com.unity.postprocessing": "0.1.7"
"com.unity.postprocessing": "0.1.8"
},
"subPackages": [
"Core",

4
Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/CommonAssets/3DObjects/CornelBox/Cornell Box.fbx.meta


2186277476908879428: ImportLogs
2186277476908879430: ImportLogs
2186277476908879432: ImportLogs
2186277476908879434: ImportLogs
2186277476908879436: ImportLogs
externalObjects:
- first:
type: UnityEngine:Material

name: Cornell Box_red
second: {fileID: 2100000, guid: 9e230cd3dd687c74f9fd71088a260bb3, type: 2}
materials:
importMaterials: 1
importMaterials: 0
materialName: 0
materialSearch: 1
materialLocation: 0

3
Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/CommonAssets/3DObjects/Sphere/Sphere.fbx.meta


2186277476908879430: ImportLogs
2186277476908879432: ImportLogs
2186277476908879434: ImportLogs
2186277476908879436: ImportLogs
externalObjects: {}
materials:
importMaterials: 0

tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
importAnimation: 1
copyAvatar: 0

2
Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/1xxx_Materials/1301_SubSurfaceScattering/ThicknessTest.MAT


m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: FlatSkin
m_Name: ThicknessTest
m_Shader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3}
m_ShaderKeywords: _MATERIAL_FEATURE_SUBSURFACE_SCATTERING _MATERIAL_FEATURE_TRANSMISSION
_NORMALMAP_TANGENT_SPACE

665
Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/1xxx_Materials/1302_SSS_MaxRadius.unity


m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 2}
m_IsPrefabParent: 0
--- !u!1 &206350328
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 206350329}
- component: {fileID: 206350332}
- component: {fileID: 206350331}
- component: {fileID: 206350330}
m_Layer: 0
m_Name: Spot Light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &206350329
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 206350328}
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0.005, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1419573399}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
--- !u!114 &206350330
MonoBehaviour:
m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 206350328}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c6c2871f720b2af4e9210febdac74517, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Version: 1
shadowResolution: 512
shadowDimmer: 1
shadowFadeDistance: 10000
enableContactShadows: 0
contactShadowLength: 0
contactShadowDistanceScaleFactor: 0.5
contactShadowMaxDistance: 50
contactShadowFadeDistance: 5
contactShadowSampleCount: 8
shadowCascadeCount: 4
shadowCascadeRatios:
- 0.05
- 0.2
- 0.3
shadowCascadeBorders:
- 0.2
- 0.2
- 0.2
- 0.2
shadowAlgorithm: 0
shadowVariant: 0
shadowPrecision: 0
shadowData:
format: 0
data:
shadowDatas: []
--- !u!114 &206350331
MonoBehaviour:
m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 206350328}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Version: 1
m_InnerSpotPercent: 100
lightDimmer: 1
fadeDistance: 10000
affectDiffuse: 1
affectSpecular: 1
lightTypeExtent: 0
spotLightShape: 0
shapeWidth: 0.5
shapeHeight: 0.5
aspectRatio: 1
shapeRadius: 0
maxSmoothness: 1
applyRangeAttenuation: 1
useOldInspector: 0
featuresFoldout: 1
showAdditionalSettings: 0
--- !u!108 &206350332
Light:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 206350328}
m_Enabled: 1
serializedVersion: 8
m_Type: 0
m_Color: {r: 0.698, g: 0.698, b: 0.698, a: 1}
m_Intensity: 0.001
m_Range: 0.02
m_SpotAngle: 90
m_CookieSize: 10
m_Shadows:
m_Type: 0
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_Lightmapping: 4
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ColorTemperature: 6570
m_UseColorTemperature: 0
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!1 &340485232
GameObject:
m_ObjectHideFlags: 0

m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!1 &459634894
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 459634895}
- component: {fileID: 459634898}
- component: {fileID: 459634897}
- component: {fileID: 459634896}
m_Layer: 0
m_Name: Spot Light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &459634895
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 459634894}
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0.005, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1764583144}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
--- !u!114 &459634896
MonoBehaviour:
m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 459634894}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c6c2871f720b2af4e9210febdac74517, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Version: 1
shadowResolution: 512
shadowDimmer: 1
shadowFadeDistance: 10000
enableContactShadows: 0
contactShadowLength: 0
contactShadowDistanceScaleFactor: 0.5
contactShadowMaxDistance: 50
contactShadowFadeDistance: 5
contactShadowSampleCount: 8
shadowCascadeCount: 4
shadowCascadeRatios:
- 0.05
- 0.2
- 0.3
shadowCascadeBorders:
- 0.2
- 0.2
- 0.2
- 0.2
shadowAlgorithm: 0
shadowVariant: 0
shadowPrecision: 0
shadowData:
format: 0
data:
shadowDatas: []
--- !u!114 &459634897
MonoBehaviour:
m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 459634894}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Version: 1
m_InnerSpotPercent: 100
lightDimmer: 1
fadeDistance: 10000
affectDiffuse: 1
affectSpecular: 1
lightTypeExtent: 0
spotLightShape: 0
shapeWidth: 0.5
shapeHeight: 0.5
aspectRatio: 1
shapeRadius: 0
maxSmoothness: 1
applyRangeAttenuation: 1
useOldInspector: 0
featuresFoldout: 1
showAdditionalSettings: 0
--- !u!108 &459634898
Light:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 459634894}
m_Enabled: 1
serializedVersion: 8
m_Type: 0
m_Color: {r: 0.698, g: 0.698, b: 0.698, a: 1}
m_Intensity: 0.001
m_Range: 0.02
m_SpotAngle: 90
m_CookieSize: 10
m_Shadows:
m_Type: 0
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_Lightmapping: 4
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ColorTemperature: 6570
m_UseColorTemperature: 0
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!1 &489376175
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 489376176}
- component: {fileID: 489376179}
- component: {fileID: 489376178}
- component: {fileID: 489376177}
m_Layer: 0
m_Name: Spot Light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &489376176
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 489376175}
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0.005, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 962084888}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
--- !u!114 &489376177
MonoBehaviour:
m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 489376175}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c6c2871f720b2af4e9210febdac74517, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Version: 1
shadowResolution: 512
shadowDimmer: 1
shadowFadeDistance: 10000
enableContactShadows: 0
contactShadowLength: 0
contactShadowDistanceScaleFactor: 0.5
contactShadowMaxDistance: 50
contactShadowFadeDistance: 5
contactShadowSampleCount: 8
shadowCascadeCount: 4
shadowCascadeRatios:
- 0.05
- 0.2
- 0.3
shadowCascadeBorders:
- 0.2
- 0.2
- 0.2
- 0.2
shadowAlgorithm: 0
shadowVariant: 0
shadowPrecision: 0
shadowData:
format: 0
data:
shadowDatas: []
--- !u!114 &489376178
MonoBehaviour:
m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 489376175}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Version: 1
m_InnerSpotPercent: 100
lightDimmer: 1
fadeDistance: 10000
affectDiffuse: 1
affectSpecular: 1
lightTypeExtent: 0
spotLightShape: 0
shapeWidth: 0.5
shapeHeight: 0.5
aspectRatio: 1
shapeRadius: 0
maxSmoothness: 1
applyRangeAttenuation: 1
useOldInspector: 0
featuresFoldout: 1
showAdditionalSettings: 0
--- !u!108 &489376179
Light:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 489376175}
m_Enabled: 1
serializedVersion: 8
m_Type: 0
m_Color: {r: 0.698, g: 0.698, b: 0.698, a: 1}
m_Intensity: 0.001
m_Range: 0.02
m_SpotAngle: 90
m_CookieSize: 10
m_Shadows:
m_Type: 0
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_Lightmapping: 4
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ColorTemperature: 6570
m_UseColorTemperature: 0
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!1 &771994608
GameObject:
m_ObjectHideFlags: 0

m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &839916369
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 839916370}
- component: {fileID: 839916373}
- component: {fileID: 839916372}
- component: {fileID: 839916371}
m_Layer: 0
m_Name: Spot Light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &839916370
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 839916369}
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0.005, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1364754542}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
--- !u!114 &839916371
MonoBehaviour:
m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 839916369}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c6c2871f720b2af4e9210febdac74517, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Version: 1
shadowResolution: 512
shadowDimmer: 1
shadowFadeDistance: 10000
enableContactShadows: 0
contactShadowLength: 0
contactShadowDistanceScaleFactor: 0.5
contactShadowMaxDistance: 50
contactShadowFadeDistance: 5
contactShadowSampleCount: 8
shadowCascadeCount: 4
shadowCascadeRatios:
- 0.05
- 0.2
- 0.3
shadowCascadeBorders:
- 0.2
- 0.2
- 0.2
- 0.2
shadowAlgorithm: 0
shadowVariant: 0
shadowPrecision: 0
shadowData:
format: 0
data:
shadowDatas: []
--- !u!114 &839916372
MonoBehaviour:
m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 839916369}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Version: 1
m_InnerSpotPercent: 100
lightDimmer: 1
fadeDistance: 10000
affectDiffuse: 1
affectSpecular: 1
lightTypeExtent: 0
spotLightShape: 0
shapeWidth: 0.5
shapeHeight: 0.5
aspectRatio: 1
shapeRadius: 0
maxSmoothness: 1
applyRangeAttenuation: 1
useOldInspector: 0
featuresFoldout: 1
showAdditionalSettings: 0
--- !u!108 &839916373
Light:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 839916369}
m_Enabled: 1
serializedVersion: 8
m_Type: 0
m_Color: {r: 0.698, g: 0.698, b: 0.698, a: 1}
m_Intensity: 0.001
m_Range: 0.02
m_SpotAngle: 90
m_CookieSize: 10
m_Shadows:
m_Type: 0
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_Lightmapping: 4
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ColorTemperature: 6570
m_UseColorTemperature: 0
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!1 &842796397
GameObject:
m_ObjectHideFlags: 0

m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: e3d03de02188b88428c03d8dca44f18e, type: 3}
m_IsPrefabParent: 0
--- !u!1 &2070758265
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 2070758266}
- component: {fileID: 2070758269}
- component: {fileID: 2070758268}
- component: {fileID: 2070758267}
m_Layer: 0
m_Name: Spot Light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2070758266
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2070758265}
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0.005, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 2022456866}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
--- !u!114 &2070758267
MonoBehaviour:
m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2070758265}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c6c2871f720b2af4e9210febdac74517, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Version: 1
shadowResolution: 512
shadowDimmer: 1
shadowFadeDistance: 10000
enableContactShadows: 0
contactShadowLength: 0
contactShadowDistanceScaleFactor: 0.5
contactShadowMaxDistance: 50
contactShadowFadeDistance: 5
contactShadowSampleCount: 8
shadowCascadeCount: 4
shadowCascadeRatios:
- 0.05
- 0.2
- 0.3
shadowCascadeBorders:
- 0.2
- 0.2
- 0.2
- 0.2
shadowAlgorithm: 0
shadowVariant: 0
shadowPrecision: 0
shadowData:
format: 0
data:
shadowDatas: []
--- !u!114 &2070758268
MonoBehaviour:
m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2070758265}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Version: 1
m_InnerSpotPercent: 100
lightDimmer: 1
fadeDistance: 10000
affectDiffuse: 1
affectSpecular: 1
lightTypeExtent: 0
spotLightShape: 0
shapeWidth: 0.5
shapeHeight: 0.5
aspectRatio: 1
shapeRadius: 0
maxSmoothness: 1
applyRangeAttenuation: 1
useOldInspector: 0
featuresFoldout: 1
showAdditionalSettings: 0
--- !u!108 &2070758269
Light:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2070758265}
m_Enabled: 1
serializedVersion: 8
m_Type: 0
m_Color: {r: 0.698, g: 0.698, b: 0.698, a: 1}
m_Intensity: 0.001
m_Range: 0.02
m_SpotAngle: 90
m_CookieSize: 10
m_Shadows:
m_Type: 0
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_Lightmapping: 4
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ColorTemperature: 6570
m_UseColorTemperature: 0
m_ShadowRadius: 0
m_ShadowAngle: 0

6
Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/1xxx_Materials/1302_SSS_MaxRadius/MaxRadius_1.mat


m_PrefabInternal: {fileID: 0}
m_Name: MaxRadius_1
m_Shader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3}
m_ShaderKeywords: _EMISSIVE_COLOR_MAP _MATERIAL_FEATURE_SUBSURFACE_SCATTERING _MATERIAL_FEATURE_TRANSMISSION
m_ShaderKeywords: _MATERIAL_FEATURE_SUBSURFACE_SCATTERING _MATERIAL_FEATURE_TRANSMISSION
_NORMALMAP_TANGENT_SPACE
m_LightmapFlags: 4
m_EnableInstancingVariants: 0

m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissiveColorMap:
m_Texture: {fileID: 2800000, guid: 5b60d314cd850e54b91f1289069ccbbf, type: 3}
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _HeightMap:

- _Drag: 1
- _DstBlend: 0
- _EmissiveColorMode: 1
- _EmissiveIntensity: 1
- _EmissiveIntensity: 0
- _EnableBlendModePreserveSpecularLighting: 1
- _EnableFogOnTransparent: 1
- _EnableMotionVectorForVertexAnimation: 0

6
Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/1xxx_Materials/1302_SSS_MaxRadius/MaxRadius_10.mat


m_PrefabInternal: {fileID: 0}
m_Name: MaxRadius_10
m_Shader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3}
m_ShaderKeywords: _EMISSIVE_COLOR_MAP _MATERIAL_FEATURE_SUBSURFACE_SCATTERING _MATERIAL_FEATURE_TRANSMISSION
m_ShaderKeywords: _MATERIAL_FEATURE_SUBSURFACE_SCATTERING _MATERIAL_FEATURE_TRANSMISSION
_NORMALMAP_TANGENT_SPACE
m_LightmapFlags: 4
m_EnableInstancingVariants: 0

m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissiveColorMap:
m_Texture: {fileID: 2800000, guid: 5b60d314cd850e54b91f1289069ccbbf, type: 3}
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _HeightMap:

- _Drag: 1
- _DstBlend: 0
- _EmissiveColorMode: 1
- _EmissiveIntensity: 1
- _EmissiveIntensity: 0
- _EnableBlendModePreserveSpecularLighting: 1
- _EnableFogOnTransparent: 1
- _EnableMotionVectorForVertexAnimation: 0

6
Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/1xxx_Materials/1302_SSS_MaxRadius/MaxRadius_15.mat


m_PrefabInternal: {fileID: 0}
m_Name: MaxRadius_15
m_Shader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3}
m_ShaderKeywords: _EMISSIVE_COLOR_MAP _MATERIAL_FEATURE_SUBSURFACE_SCATTERING _MATERIAL_FEATURE_TRANSMISSION
m_ShaderKeywords: _MATERIAL_FEATURE_SUBSURFACE_SCATTERING _MATERIAL_FEATURE_TRANSMISSION
_NORMALMAP_TANGENT_SPACE
m_LightmapFlags: 4
m_EnableInstancingVariants: 0

m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissiveColorMap:
m_Texture: {fileID: 2800000, guid: 5b60d314cd850e54b91f1289069ccbbf, type: 3}
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _HeightMap:

- _Drag: 1
- _DstBlend: 0
- _EmissiveColorMode: 1
- _EmissiveIntensity: 1
- _EmissiveIntensity: 0
- _EnableBlendModePreserveSpecularLighting: 1
- _EnableFogOnTransparent: 1
- _EnableMotionVectorForVertexAnimation: 0

6
Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/1xxx_Materials/1302_SSS_MaxRadius/MaxRadius_20.mat


m_PrefabInternal: {fileID: 0}
m_Name: MaxRadius_20
m_Shader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3}
m_ShaderKeywords: _EMISSIVE_COLOR_MAP _MATERIAL_FEATURE_SUBSURFACE_SCATTERING _MATERIAL_FEATURE_TRANSMISSION
m_ShaderKeywords: _MATERIAL_FEATURE_SUBSURFACE_SCATTERING _MATERIAL_FEATURE_TRANSMISSION
_NORMALMAP_TANGENT_SPACE
m_LightmapFlags: 4
m_EnableInstancingVariants: 0

m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissiveColorMap:
m_Texture: {fileID: 2800000, guid: 5b60d314cd850e54b91f1289069ccbbf, type: 3}
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _HeightMap:

- _Drag: 1
- _DstBlend: 0
- _EmissiveColorMode: 1
- _EmissiveIntensity: 1
- _EmissiveIntensity: 0
- _EnableBlendModePreserveSpecularLighting: 1
- _EnableFogOnTransparent: 1
- _EnableMotionVectorForVertexAnimation: 0

6
Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/1xxx_Materials/1302_SSS_MaxRadius/MaxRadius_5.mat


m_PrefabInternal: {fileID: 0}
m_Name: MaxRadius_5
m_Shader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3}
m_ShaderKeywords: _EMISSIVE_COLOR_MAP _MATERIAL_FEATURE_SUBSURFACE_SCATTERING _MATERIAL_FEATURE_TRANSMISSION
m_ShaderKeywords: _MATERIAL_FEATURE_SUBSURFACE_SCATTERING _MATERIAL_FEATURE_TRANSMISSION
_NORMALMAP_TANGENT_SPACE
m_LightmapFlags: 4
m_EnableInstancingVariants: 0

m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissiveColorMap:
m_Texture: {fileID: 2800000, guid: 5b60d314cd850e54b91f1289069ccbbf, type: 3}
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _HeightMap:

- _Drag: 1
- _DstBlend: 0
- _EmissiveColorMode: 1
- _EmissiveIntensity: 1
- _EmissiveIntensity: 0
- _EnableBlendModePreserveSpecularLighting: 1
- _EnableFogOnTransparent: 1
- _EnableMotionVectorForVertexAnimation: 0

218
Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/2xxx_Lighting/2301_Shadow_Mask.unity


m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.018302627, g: 0.019231804, b: 0.021260915, a: 1}
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:

shadowResolution: 256
shadowDimmer: 0.5
shadowFadeDistance: 20
enableContactShadows: 0
contactShadowLength: 0
contactShadowDistanceScaleFactor: 0.5
contactShadowMaxDistance: 50
contactShadowFadeDistance: 5
contactShadowSampleCount: 8
shadowCascadeCount: 4
shadowCascadeRatios:
- 0.05

volumeLayerMask:
serializedVersion: 2
m_Bits: 4294967295
serializedFrameSettings:
m_FrameSettings:
enableContactShadows: 1
enableSSSAndTransmission: 1
enableSubsurfaceScattering: 1
enableTransmission: 1
diffuseGlobalDimmer: 1
specularGlobalDimmer: 1
enableForwardRenderingOnly: 0

m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 815655995}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1001 &911408450
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 4295600896743834, guid: 7dde90a97c3ee4d4da77e66970eb07eb, type: 2}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4295600896743834, guid: 7dde90a97c3ee4d4da77e66970eb07eb, type: 2}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4295600896743834, guid: 7dde90a97c3ee4d4da77e66970eb07eb, type: 2}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4295600896743834, guid: 7dde90a97c3ee4d4da77e66970eb07eb, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4295600896743834, guid: 7dde90a97c3ee4d4da77e66970eb07eb, type: 2}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4295600896743834, guid: 7dde90a97c3ee4d4da77e66970eb07eb, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4295600896743834, guid: 7dde90a97c3ee4d4da77e66970eb07eb, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4295600896743834, guid: 7dde90a97c3ee4d4da77e66970eb07eb, type: 2}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: 7dde90a97c3ee4d4da77e66970eb07eb, type: 2}
m_IsPrefabParent: 0
--- !u!1 &929288949
GameObject:
m_ObjectHideFlags: 0

shadowResolution: 512
shadowDimmer: 0.5
shadowFadeDistance: 20
enableContactShadows: 0
contactShadowLength: 0
contactShadowDistanceScaleFactor: 0.5
contactShadowMaxDistance: 50
contactShadowFadeDistance: 5
contactShadowSampleCount: 8
shadowCascadeCount: 4
shadowCascadeRatios:
- 0.05

m_Father: {fileID: 522989562}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: -90.00001}
--- !u!1 &1783632093
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 1673868521865844, guid: 7dde90a97c3ee4d4da77e66970eb07eb,
type: 2}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1783632096}
- component: {fileID: 1783632095}
- component: {fileID: 1783632094}
m_Layer: 0
m_Name: HDRP_Black_Sky
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1783632094
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 114663566010530930, guid: 7dde90a97c3ee4d4da77e66970eb07eb,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1783632093}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 441482e8936e35048a1dffac814e3ef8, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Profile: {fileID: 11400000, guid: 0d615c3f4f4e27d44af6c4fed3bb683c, type: 2}
m_BakingSkyUniqueID: 1
--- !u!114 &1783632095
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 114888363301181934, guid: 7dde90a97c3ee4d4da77e66970eb07eb,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1783632093}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3}
m_Name:
m_EditorClassIdentifier:
isGlobal: 1
priority: 0
blendDistance: 0
weight: 1
sharedProfile: {fileID: 11400000, guid: 3f489ba750e903447b0e64a9a0927b48, type: 2}
--- !u!4 &1783632096
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 4295600896743834, guid: 7dde90a97c3ee4d4da77e66970eb07eb,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1783632093}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1838647969
GameObject:
m_ObjectHideFlags: 0

m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1894174326}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &1978415242
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1978415246}
- component: {fileID: 1978415245}
- component: {fileID: 1978415244}
- component: {fileID: 1978415243}
m_Layer: 0
m_Name: Quad
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!64 &1978415243
MeshCollider:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1978415242}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 3
m_Convex: 0
m_CookingOptions: 14
m_SkinWidth: 0.01
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &1978415244
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1978415242}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 4294967295
m_Materials:
- {fileID: 2100000, guid: 3bcb0652d6d34764b958e6c0a44fb35b, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!33 &1978415245
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1978415242}
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &1978415246
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1978415242}
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0.01, z: -7.76}
m_LocalScale: {x: 12.537164, y: 12.537165, z: 12.537165}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
--- !u!1 &1998959825
GameObject:
m_ObjectHideFlags: 0

shadowResolution: 512
shadowDimmer: 1
shadowFadeDistance: 10000
enableContactShadows: 0
contactShadowLength: 0
contactShadowDistanceScaleFactor: 0.5
contactShadowMaxDistance: 50
contactShadowFadeDistance: 5
contactShadowSampleCount: 8
shadowCascadeCount: 4
shadowCascadeRatios:
- 0.05

3
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Assets/CommonAssets/Cornell Box.fbx.meta


2186277476908879414: ImportLogs
2186277476908879416: ImportLogs
2186277476908879418: ImportLogs
2186277476908879420: ImportLogs
externalObjects:
- first:
type: UnityEngine:Material

hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
animationType: 2
animationType: 0
humanoidOversampling: 1
additionalBone: 0
userData:

3
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/LightweightPipelineAsset.asset


m_ShadowCascades: 2
m_Cascade2Split: 0.25
m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467}
m_BlitShader: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3}
m_CopyDepthShader: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3}
m_ResourcesAsset: {fileID: 11400000, guid: aac5a08c32552a14c89394b703f1978a, type: 2}

5
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/040_UpgradeScene/Models/Environment/Floor.fbx.meta


2186277476908879414: ImportLogs
2186277476908879416: ImportLogs
2186277476908879418: ImportLogs
2186277476908879420: ImportLogs
externalObjects:
- first:
type: UnityEngine:Material

rootMotionBoneName:
rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1}
hasTranslationDoF: 0
hasExtraRoot: 0
hasExtraRoot: 1
animationType: 2
animationType: 0
humanoidOversampling: 1
additionalBone: 0
userData:

59
Tests/Scripts/Editor/GraphicTests/Framework/TestFramework.cs


[OneTimeSetUp]
public void OneTimeSetUp()
{
BackupSceneManagerSetup();
SetupRenderPipeAsset();
}

Debug.Log("OnTimeTearDown");
RestoreSceneManagerSetup();
}
public static RenderPipelineAsset GetRenderPipelineAsset(string _SRP_ID)

string filePath = Path.Combine(absolutePath, TestFrameworkTools.renderPipelineAssets[_SRP_ID] );
filePath = filePath.Replace(Application.dataPath, "");
filePath = filePath.Remove(0, 1);
//Debug.Log("Before combine: " + filePath);
filePath = Path.Combine("Assets", filePath);
//Debug.Log("RP Asset is at : " + filePath);
return (RenderPipelineAsset)AssetDatabase.LoadAssetAtPath(filePath, typeof(RenderPipelineAsset));
}

public void SetupRenderPipeAsset()
{
Debug.Log("Set " + _SRP_ID + " render pipeline.");
//Debug.Log("Set " + _SRP_ID + " render pipeline. Previous was "+ ( (UnityEngine.Rendering.GraphicsSettings.renderPipelineAsset == null)? "null":UnityEngine.Rendering.GraphicsSettings.renderPipelineAsset.name) );
//Debug.Log("RestoreRenderPipeAsset from " + wantedTestsRenderPipeAsset.name + " to " + ((beforeTestsRenderPipeAsset == null)?"null":beforeTestsRenderPipeAsset.name));
{
//Debug.Log("RestoreRenderPipeAsset -> Actual restore");
}
}
public static SceneSetup[] sceneManagerSetupBeforeTest;
public void BackupSceneManagerSetup()
{
sceneManagerSetupBeforeTest = EditorSceneManager.GetSceneManagerSetup();
}
public void RestoreSceneManagerSetup()
{
if ( (sceneManagerSetupBeforeTest == null) || ( sceneManagerSetupBeforeTest.Length == 0 ) )
{
EditorSceneManager.NewScene(NewSceneSetup.DefaultGameObjects, NewSceneMode.Single);
}
else
{
EditorSceneManager.RestoreSceneManagerSetup(sceneManagerSetupBeforeTest);
}
}

yield return null;
}
// Force rendering of all realtime reflection probes
ReflectionProbe[] probes = GameObject.FindObjectsOfType<ReflectionProbe>();
int[] renderIDs = new int[probes.Length];
for (int i=0; i<probes.Length; ++i)
{
if (probes[i].mode == UnityEngine.Rendering.ReflectionProbeMode.Realtime)
renderIDs[i] = probes[i].RenderProbe();
else
renderIDs[i] = -1;
}
for (int i=0; i<probes.Length; ++i)
{
if (renderIDs[i] != -1)
{
while (!probes[i].IsFinishedRendering(renderIDs[i])) yield return null;
}
}
testSetup.thingToDoBeforeTest.Invoke();
// Render the camera

var misMatchLocationTemplate = Path.Combine(failedPath, string.Format("{0}.template.{1}", testInfo.name, "png"));
var generated = captured.EncodeToPNG();
File.WriteAllBytes(misMatchLocationResult, generated);
File.Copy(dumpFileLocation, misMatchLocationTemplate);
File.Copy(dumpFileLocation, misMatchLocationTemplate, true);
}
Assert.IsTrue(areEqual, "Scene from {0}, did not match .template file.", testInfo.relativePath);

5
Tests/Scripts/GraphicTests/Framework/SetupSceneForRenderPipelineTest.cs


public void TearDown()
{
if ( GraphicsSettings.renderPipelineAsset != m_OriginalAsset ) GraphicsSettings.renderPipelineAsset = m_OriginalAsset;
if (GraphicsSettings.renderPipelineAsset != m_OriginalAsset)
{
GraphicsSettings.renderPipelineAsset = m_OriginalAsset;
}
//EditorApplication.isPaused = false;
//EditorApplication.isPlaying = false;

4
Tests/Scripts/GraphicTests/Framework/TestFrameworkTools.cs


public static Dictionary<string, string> renderPipelineAssets = new Dictionary<string, string>()
{
{ "HDRP", "Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/CommonAssets/HDRP_GraphicTests_Asset.asset" },
{ "LWRP", "Tests/GraphicsTests/RenderPipeline/LightweightPipeline/LightweightPipelineAsset.asset" }
{ "HDRP", "HDRenderPipeline/CommonAssets/HDRP_GraphicTests_Asset.asset" },
{ "LWRP", "LightweightPipeline/LightweightPipelineAsset.asset" }
};
// Renderpipeline assets used for the tests

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

正在加载...
取消
保存