diff --git a/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/101_ReflectionsPerfFullRes.png b/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/101_ReflectionsPerfFullRes.png index c8ca173e2db..5d822e278e9 100644 --- a/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/101_ReflectionsPerfFullRes.png +++ b/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/101_ReflectionsPerfFullRes.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fda7ffe4224937278c9385bb315506d827d1936c7e1559bbaaec1e8d2f816078 -size 73039 +oid sha256:05c8df6e8c4e6fca5eab5a9171bed258311926d5121a728ae6cc6496098aee43 +size 81606 diff --git a/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/102_ReflectionsPerfHalfRes.png b/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/102_ReflectionsPerfHalfRes.png index 4de911b30b7..332e8ab9ebf 100644 --- a/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/102_ReflectionsPerfHalfRes.png +++ b/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/102_ReflectionsPerfHalfRes.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c0a090174d200bbf162672e5bd138ca0b3e99e5e69183023c395c3d6cce4028b -size 88268 +oid sha256:137dc73ae4b5267944b8dc9c69b3bd408dfdfeeecefa9d9c5981a1b77d50fd97 +size 98841 diff --git a/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/103_ReflectionsQuality.png b/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/103_ReflectionsQuality.png index 97a1e1b5e79..3c2a60a7cbb 100644 --- a/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/103_ReflectionsQuality.png +++ b/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/103_ReflectionsQuality.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d55ded9649ae41d7f14500813f529b0577f01ad2b5c6f2569b576381046d5484 -size 72700 +oid sha256:18d1132e50a3ffa0bb97fb259fd7c01972a6d822d8ab73ffbcdbd23cf2bf32ea +size 82847 diff --git a/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/900_Materials_AlphaTest_SG.png b/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/900_Materials_AlphaTest_SG.png index d92340d1d24..9d11cc33e99 100644 --- a/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/900_Materials_AlphaTest_SG.png +++ b/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/900_Materials_AlphaTest_SG.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f53a1a08febd962bd12f5313b166b57a0b6f0bec9e099056637f9d61931bdd0f -size 321422 +oid sha256:7028642ee8abd16539530829876eaa0a6b44e13c82f0af02585ecb5818b11895 +size 342170 diff --git a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/RayTracedReflectionsData/EyeSG.shadergraph b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/RayTracedReflectionsData/EyeSG.shadergraph new file mode 100644 index 00000000000..ae84dbb28ae --- /dev/null +++ b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/RayTracedReflectionsData/EyeSG.shadergraph @@ -0,0 +1,1118 @@ +{ + "m_SGVersion": 2, + "m_Type": "UnityEditor.ShaderGraph.GraphData", + "m_ObjectId": "d484cd98a1e34584adc40eac0e93a57b", + "m_Properties": [ + { + "m_Id": "ae20c9f56dff4c199c2832dedf04ef20" + }, + { + "m_Id": "cf2fddf7f8cf47dd9ea5b0282a065d6f" + } + ], + "m_Keywords": [], + "m_Nodes": [ + { + "m_Id": "b490a8b74e294be7b90d07e5aef20e58" + }, + { + "m_Id": "6f8542f3b2154a9c8f2e65e6b45f3158" + }, + { + "m_Id": "f56cc6d8099b4acbb037c355281ad626" + }, + { + "m_Id": "919c8e0c29bb41b1b5f7c7b58bc809da" + }, + { + "m_Id": "642bf1c8acd34428ae24058a8ddc5ea1" + }, + { + "m_Id": "37857958d34b4c9e80cb1c50e4f8c8f8" + }, + { + "m_Id": "47bfe850bc4b402da86a83d1236daafc" + }, + { + "m_Id": "60d25075fab94bbe91051ba71c6f0a1b" + }, + { + "m_Id": "9f99591ff2704a94a2619e8148876272" + }, + { + "m_Id": "b07d8e7fd2e24bed98f471ba49ab3159" + }, + { + "m_Id": "f4223096ae1b436d8112a78c747cfa43" + }, + { + "m_Id": "0de7f713160c4224858440120a43dc12" + }, + { + "m_Id": "a6820bbcce4e4eeeb2180ba517d0b4b0" + }, + { + "m_Id": "3eb0dcf4b8ac4c4b8b34db3d5112e276" + }, + { + "m_Id": "fb11f9189be24a9da6067d6931dd7e10" + } + ], + "m_GroupDatas": [], + "m_StickyNoteDatas": [], + "m_Edges": [ + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "3eb0dcf4b8ac4c4b8b34db3d5112e276" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "919c8e0c29bb41b1b5f7c7b58bc809da" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "fb11f9189be24a9da6067d6931dd7e10" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "60d25075fab94bbe91051ba71c6f0a1b" + }, + "m_SlotId": 0 + } + } + ], + "m_VertexContext": { + "m_Position": { + "x": 0.0, + "y": 0.0 + }, + "m_Blocks": [ + { + "m_Id": "b490a8b74e294be7b90d07e5aef20e58" + }, + { + "m_Id": "6f8542f3b2154a9c8f2e65e6b45f3158" + }, + { + "m_Id": "f56cc6d8099b4acbb037c355281ad626" + } + ] + }, + "m_FragmentContext": { + "m_Position": { + "x": 0.0, + "y": 200.0 + }, + "m_Blocks": [ + { + "m_Id": "919c8e0c29bb41b1b5f7c7b58bc809da" + }, + { + "m_Id": "642bf1c8acd34428ae24058a8ddc5ea1" + }, + { + "m_Id": "37857958d34b4c9e80cb1c50e4f8c8f8" + }, + { + "m_Id": "47bfe850bc4b402da86a83d1236daafc" + }, + { + "m_Id": "60d25075fab94bbe91051ba71c6f0a1b" + }, + { + "m_Id": "9f99591ff2704a94a2619e8148876272" + }, + { + "m_Id": "b07d8e7fd2e24bed98f471ba49ab3159" + }, + { + "m_Id": "f4223096ae1b436d8112a78c747cfa43" + }, + { + "m_Id": "0de7f713160c4224858440120a43dc12" + }, + { + "m_Id": "a6820bbcce4e4eeeb2180ba517d0b4b0" + } + ] + }, + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" + } + }, + "m_Path": "Shader Graphs", + "m_ConcretePrecision": 0, + "m_OutputNode": { + "m_Id": "" + }, + "m_ActiveTargets": [ + { + "m_Id": "321d6bea54ae4c8cadddde0de0737aef" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "0de7f713160c4224858440120a43dc12", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Emission", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "8e32e8d3bfc54e6e86280801ec7bbfdc" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Emission" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", + "m_ObjectId": "2d1521301e0e46009e00569561c1caa4", + "m_Id": 0, + "m_DisplayName": "Normal", + "m_SlotType": 0, + "m_Priority": 2147483647, + "m_Hidden": false, + "m_ShaderOutputName": "Normal", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.LightingData", + "m_ObjectId": "31f849218e9a42f580097f81e87ec36b", + "m_NormalDropOffSpace": 0, + "m_BlendPreserveSpecular": true, + "m_ReceiveDecals": true, + "m_ReceiveSSR": true, + "m_ReceiveSSRTransparent": false, + "m_SpecularAA": false, + "m_SpecularOcclusionMode": 0, + "m_OverrideBakedGI": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.HDTarget", + "m_ObjectId": "321d6bea54ae4c8cadddde0de0737aef", + "m_ActiveSubTarget": { + "m_Id": "4d56dde5af30471ab1e5c72f0e584632" + }, + "m_Datas": [ + { + "m_Id": "81edd832e6744271943046c0b34aeddb" + }, + { + "m_Id": "31f849218e9a42f580097f81e87ec36b" + }, + { + "m_Id": "a3832fb586384529a66efac3defbcacf" + }, + { + "m_Id": "c485d3e49aed41718c9a0dacc79eebd7" + } + ], + "m_CustomEditorGUI": "" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "37857958d34b4c9e80cb1c50e4f8c8f8", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.IrisNormalTS", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "b2d32b6120694915b7e75a0bbd878bf3" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.IrisNormalTS" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "3eb0dcf4b8ac4c4b8b34db3d5112e276", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -395.0, + "y": 120.0, + "width": 107.0, + "height": 34.0 + } + }, + "m_Slots": [ + { + "m_Id": "7ce766a5b2eb4de087448ef693ee1352" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "ae20c9f56dff4c199c2832dedf04ef20" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "47bfe850bc4b402da86a83d1236daafc", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.BentNormal", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "5ea5c9b72a4f42abb7973693743bbf81" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.BentNormal" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.EyeSubTarget", + "m_ObjectId": "4d56dde5af30471ab1e5c72f0e584632" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", + "m_ObjectId": "5ea5c9b72a4f42abb7973693743bbf81", + "m_Id": 0, + "m_DisplayName": "Bent Normal", + "m_SlotType": 0, + "m_Priority": 2147483647, + "m_Hidden": false, + "m_ShaderOutputName": "BentNormal", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 3 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "5f097157741042c88a0e2480e5235e94", + "m_Id": 0, + "m_DisplayName": "IOR", + "m_SlotType": 0, + "m_Priority": 2147483647, + "m_Hidden": false, + "m_ShaderOutputName": "IOR", + "m_StageCapability": 2, + "m_Value": 1.399999976158142, + "m_DefaultValue": 1.399999976158142, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "5f6fb3b92a734de5bbe8cdac273f3deb", + "m_Id": 0, + "m_DisplayName": "Ambient Occlusion", + "m_SlotType": 0, + "m_Priority": 2147483647, + "m_Hidden": false, + "m_ShaderOutputName": "Occlusion", + "m_StageCapability": 2, + "m_Value": 1.0, + "m_DefaultValue": 1.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "60d25075fab94bbe91051ba71c6f0a1b", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Smoothness", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "79d5812e9da44d0b8a1a7af829585307" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Smoothness" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "642bf1c8acd34428ae24058a8ddc5ea1", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.NormalTS", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "fea1e8bf7a154f93b3c8f4f2915b9536" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.NormalTS" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "6f8542f3b2154a9c8f2e65e6b45f3158", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.Normal", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "2d1521301e0e46009e00569561c1caa4" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Normal" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "79d5812e9da44d0b8a1a7af829585307", + "m_Id": 0, + "m_DisplayName": "Smoothness", + "m_SlotType": 0, + "m_Priority": 2147483647, + "m_Hidden": false, + "m_ShaderOutputName": "Smoothness", + "m_StageCapability": 2, + "m_Value": 0.5, + "m_DefaultValue": 0.5, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "7ce766a5b2eb4de087448ef693ee1352", + "m_Id": 0, + "m_DisplayName": "BaseColor", + "m_SlotType": 1, + "m_Priority": 2147483647, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.BuiltinData", + "m_ObjectId": "81edd832e6744271943046c0b34aeddb", + "m_Distortion": false, + "m_DistortionMode": 0, + "m_DistortionDepthTest": true, + "m_AddPrecomputedVelocity": false, + "m_TransparentWritesMotionVec": false, + "m_AlphaToMask": false, + "m_DepthOffset": false, + "m_TransparencyFog": true, + "m_AlphaTestShadow": false, + "m_BackThenFrontRendering": false, + "m_TransparentDepthPrepass": false, + "m_TransparentDepthPostpass": false, + "m_SupportLodCrossFade": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", + "m_ObjectId": "86f2916501dc4ea9bb461367af777baf", + "m_Id": 0, + "m_DisplayName": "Base Color", + "m_SlotType": 0, + "m_Priority": 2147483647, + "m_Hidden": false, + "m_ShaderOutputName": "BaseColor", + "m_StageCapability": 2, + "m_Value": { + "x": 0.5, + "y": 0.5, + "z": 0.5 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_ColorMode": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", + "m_ObjectId": "8e32e8d3bfc54e6e86280801ec7bbfdc", + "m_Id": 0, + "m_DisplayName": "Emission", + "m_SlotType": 0, + "m_Priority": 2147483647, + "m_Hidden": false, + "m_ShaderOutputName": "Emission", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_ColorMode": 1 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "919c8e0c29bb41b1b5f7c7b58bc809da", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.BaseColor", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "86f2916501dc4ea9bb461367af777baf" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.BaseColor" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.TangentMaterialSlot", + "m_ObjectId": "9e37c157b286445b9f54d80f5203196c", + "m_Id": 0, + "m_DisplayName": "Tangent", + "m_SlotType": 0, + "m_Priority": 2147483647, + "m_Hidden": false, + "m_ShaderOutputName": "Tangent", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "9f99591ff2704a94a2619e8148876272", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.IOR", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "5f097157741042c88a0e2480e5235e94" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.IOR" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "a14173a3b5d545a191fede71d29c4e42", + "m_Id": 0, + "m_DisplayName": "Alpha", + "m_SlotType": 0, + "m_Priority": 2147483647, + "m_Hidden": false, + "m_ShaderOutputName": "Alpha", + "m_StageCapability": 2, + "m_Value": 1.0, + "m_DefaultValue": 1.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.SystemData", + "m_ObjectId": "a3832fb586384529a66efac3defbcacf", + "m_MaterialNeedsUpdateHash": 0, + "m_SurfaceType": 0, + "m_RenderingPass": 1, + "m_BlendMode": 0, + "m_ZTest": 4, + "m_ZWrite": false, + "m_TransparentCullMode": 2, + "m_OpaqueCullMode": 2, + "m_SortPriority": 0, + "m_AlphaTest": false, + "m_TransparentDepthPrepass": false, + "m_TransparentDepthPostpass": false, + "m_SupportLodCrossFade": false, + "m_DoubleSidedMode": 0, + "m_DOTSInstancing": false, + "m_Version": 0, + "m_FirstTimeMigrationExecuted": true, + "inspectorFoldoutMask": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "a6820bbcce4e4eeeb2180ba517d0b4b0", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Alpha", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "a14173a3b5d545a191fede71d29c4e42" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Alpha" +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.ColorShaderProperty", + "m_ObjectId": "ae20c9f56dff4c199c2832dedf04ef20", + "m_Guid": { + "m_GuidSerialized": "9dad96db-f8df-4584-8e81-7b1a98342689" + }, + "m_Name": "BaseColor", + "m_DefaultReferenceName": "Color_ae20c9f56dff4c199c2832dedf04ef20", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_Precision": 0, + "m_GPUInstanced": false, + "m_Hidden": false, + "m_Value": { + "r": 0.0, + "g": 0.0, + "b": 0.0, + "a": 0.0 + }, + "m_ColorMode": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "b07d8e7fd2e24bed98f471ba49ab3159", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Occlusion", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "5f6fb3b92a734de5bbe8cdac273f3deb" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Occlusion" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", + "m_ObjectId": "b2d32b6120694915b7e75a0bbd878bf3", + "m_Id": 0, + "m_DisplayName": "Iris Normal (Tangent Space)", + "m_SlotType": 0, + "m_Priority": 2147483647, + "m_Hidden": false, + "m_ShaderOutputName": "IrisNormalTS", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 3 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "b490a8b74e294be7b90d07e5aef20e58", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.Position", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "d9e3d5fe4a13482c9c88c259505baf1f" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Position" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.EyeData", + "m_ObjectId": "c485d3e49aed41718c9a0dacc79eebd7", + "m_MaterialType": 0, + "m_SubsurfaceScattering": false, + "m_IrisNormal": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "c785cc33bdaf457fb0925cb0cec9f811", + "m_Id": 0, + "m_DisplayName": "Smoothness", + "m_SlotType": 1, + "m_Priority": 2147483647, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "cf2fddf7f8cf47dd9ea5b0282a065d6f", + "m_Guid": { + "m_GuidSerialized": "9d64c58a-4e44-4aac-a505-a3b975369d2b" + }, + "m_Name": "Smoothness", + "m_DefaultReferenceName": "Vector1_cf2fddf7f8cf47dd9ea5b0282a065d6f", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_Precision": 0, + "m_GPUInstanced": false, + "m_Hidden": false, + "m_Value": 0.0, + "m_FloatType": 0, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PositionMaterialSlot", + "m_ObjectId": "d9e3d5fe4a13482c9c88c259505baf1f", + "m_Id": 0, + "m_DisplayName": "Position", + "m_SlotType": 0, + "m_Priority": 2147483647, + "m_Hidden": false, + "m_ShaderOutputName": "Position", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "e5e101f971f34d32bd64ccd97980c4e4", + "m_Id": 0, + "m_DisplayName": "Mask", + "m_SlotType": 0, + "m_Priority": 2147483647, + "m_Hidden": false, + "m_ShaderOutputName": "Mask", + "m_StageCapability": 2, + "m_Value": { + "x": 1.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "f4223096ae1b436d8112a78c747cfa43", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Mask", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "e5e101f971f34d32bd64ccd97980c4e4" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Mask" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "f56cc6d8099b4acbb037c355281ad626", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.Tangent", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "9e37c157b286445b9f54d80f5203196c" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Tangent" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "fb11f9189be24a9da6067d6931dd7e10", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -381.0, + "y": 329.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "c785cc33bdaf457fb0925cb0cec9f811" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "cf2fddf7f8cf47dd9ea5b0282a065d6f" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", + "m_ObjectId": "fea1e8bf7a154f93b3c8f4f2915b9536", + "m_Id": 0, + "m_DisplayName": "Normal (Tangent Space)", + "m_SlotType": 0, + "m_Priority": 2147483647, + "m_Hidden": false, + "m_ShaderOutputName": "NormalTS", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 3 +} + diff --git a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/RayTracedReflectionsData/EyeSG.shadergraph.meta b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/RayTracedReflectionsData/EyeSG.shadergraph.meta new file mode 100644 index 00000000000..1577857b812 --- /dev/null +++ b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/RayTracedReflectionsData/EyeSG.shadergraph.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 67c981429dcf7664d97d2d5bd65d7479 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} diff --git a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/RayTracedReflectionsData/M_EyeSG.mat b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/RayTracedReflectionsData/M_EyeSG.mat new file mode 100644 index 00000000000..8bd2be3e4a8 --- /dev/null +++ b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/RayTracedReflectionsData/M_EyeSG.mat @@ -0,0 +1,105 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: M_EyeSG + m_Shader: {fileID: -6465566751694194690, guid: 67c981429dcf7664d97d2d5bd65d7479, + type: 3} + m_ShaderKeywords: _DISABLE_SSR_TRANSPARENT + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2225 + stringTagMap: + MotionVector: User + disabledShaderPasses: + - MOTIONVECTORS + - TransparentDepthPrepass + - TransparentDepthPostpass + - TransparentBackface + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - Vector1_cf2fddf7f8cf47dd9ea5b0282a065d6f: 0.75 + - _AddPrecomputedVelocity: 0 + - _AlphaCutoffEnable: 0 + - _AlphaDstBlend: 0 + - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 + - _AlphaToMaskInspectorValue: 0 + - _BlendMode: 0 + - _CullMode: 2 + - _CullModeForward: 2 + - _DepthOffsetEnable: 0 + - _DoubleSidedEnable: 0 + - _DoubleSidedNormalMode: 2 + - _DstBlend: 0 + - _EnableBlendModePreserveSpecularLighting: 1 + - _EnableFogOnTransparent: 1 + - _OpaqueCullMode: 2 + - _ReceivesSSR: 1 + - _ReceivesSSRTransparent: 0 + - _RenderQueueType: 1 + - _RequireSplitLighting: 0 + - _SrcBlend: 1 + - _StencilRef: 0 + - _StencilRefDepth: 8 + - _StencilRefDistortionVec: 4 + - _StencilRefGBuffer: 10 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 + - _StencilWriteMaskDistortionVec: 4 + - _StencilWriteMaskGBuffer: 14 + - _StencilWriteMaskMV: 40 + - _SupportDecals: 1 + - _SurfaceType: 0 + - _TransparentBackfaceEnable: 0 + - _TransparentCullMode: 2 + - _TransparentDepthPostpassEnable: 0 + - _TransparentDepthPrepassEnable: 0 + - _TransparentSortPriority: 0 + - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 + - _UseShadowThreshold: 0 + - _ZTestDepthEqualForOpaque: 3 + - _ZTestGBuffer: 4 + - _ZTestTransparent: 4 + - _ZWrite: 1 + m_Colors: + - Color_ae20c9f56dff4c199c2832dedf04ef20: {r: 0.777015, g: 0.7924528, b: 0.115877524, + a: 0} + - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} + - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} + m_BuildTextureStacks: [] +--- !u!114 &4942899784943701917 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 9 diff --git a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/RayTracedReflectionsData/M_EyeSG.mat.meta b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/RayTracedReflectionsData/M_EyeSG.mat.meta new file mode 100644 index 00000000000..3388bf35d56 --- /dev/null +++ b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/RayTracedReflectionsData/M_EyeSG.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 60b7aef1f0622fd49acceb24666a6503 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/RayTracedReflectionsData/MaterialCollection.prefab b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/RayTracedReflectionsData/MaterialCollection.prefab index 33318eee0f9..e37a0871c88 100644 --- a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/RayTracedReflectionsData/MaterialCollection.prefab +++ b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/RayTracedReflectionsData/MaterialCollection.prefab @@ -192,6 +192,102 @@ MeshCollider: m_Convex: 0 m_CookingOptions: 30 m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1585587604497181121 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1422695313859916334} + - component: {fileID: 4159540982299857323} + - component: {fileID: 6240267259823558717} + - component: {fileID: 6432890278668456426} + m_Layer: 0 + m_Name: EyeSG + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1422695313859916334 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1585587604497181121} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -8, y: 2, z: 2} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 4268232187021217667} + m_Father: {fileID: 8401416846743860938} + m_RootOrder: 18 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &4159540982299857323 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1585587604497181121} + m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &6240267259823558717 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1585587604497181121} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 60b7aef1f0622fd49acceb24666a6503, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!65 &6432890278668456426 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1585587604497181121} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} --- !u!1 &1661099919569048474 GameObject: m_ObjectHideFlags: 0 @@ -384,6 +480,101 @@ BoxCollider: serializedVersion: 2 m_Size: {x: 1, y: 1, z: 1} m_Center: {x: 0, y: 0, z: 0} +--- !u!1 &4217812889297754221 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4268232187021217667} + - component: {fileID: 2435701198074234481} + - component: {fileID: 6277922286514885049} + m_Layer: 0 + m_Name: text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4268232187021217667 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4217812889297754221} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.6775, y: -1.82125, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1422695313859916334} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &2435701198074234481 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4217812889297754221} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!102 &6277922286514885049 +TextMesh: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4217812889297754221} + m_Text: Eye SG + m_OffsetZ: 0 + m_CharacterSize: 0.05 + m_LineSpacing: 1 + m_Anchor: 0 + m_Alignment: 0 + m_TabSize: 4 + m_FontSize: 64 + m_FontStyle: 0 + m_RichText: 1 + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_Color: + serializedVersion: 2 + rgba: 4294967295 --- !u!1 &4307500840075600929 GameObject: m_ObjectHideFlags: 0 @@ -907,6 +1098,7 @@ Transform: - {fileID: 8991192067351909759} - {fileID: 1227134734225696504} - {fileID: 2948013597145328879} + - {fileID: 1422695313859916334} m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -1096,6 +1288,7 @@ Light: m_UseColorTemperature: 0 m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 m_ShadowRadius: 0 m_ShadowAngle: 0 --- !u!114 &8401416846860372386 @@ -1110,7 +1303,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3} m_Name: m_EditorClassIdentifier: - m_Version: 10 + m_Version: 11 m_ObsoleteShadowResolutionTier: 1 m_ObsoleteUseShadowQualitySettings: 0 m_ObsoleteCustomShadowResolution: 512 @@ -1122,6 +1315,7 @@ MonoBehaviour: m_EnableSpotReflector: 0 m_LuxAtDistance: 1 m_InnerSpotPercent: 0 + m_SpotIESCutoffPercent: 100 m_LightDimmer: 1 m_VolumetricDimmer: 1 m_LightUnit: 0 @@ -1140,6 +1334,8 @@ MonoBehaviour: m_ApplyRangeAttenuation: 1 m_DisplayAreaLightEmissiveMesh: 0 m_AreaLightCookie: {fileID: 0} + m_IESPoint: {fileID: 0} + m_IESSpot: {fileID: 0} m_AreaLightShadowCone: 120 m_UseScreenSpaceShadows: 0 m_InteractsWithSky: 1 @@ -1189,8 +1385,13 @@ MonoBehaviour: m_NormalBias: 0.75 m_SlopeBias: 0.5 m_ShadowUpdateMode: 0 + m_AlwaysDrawDynamicShadows: 0 + m_UpdateShadowOnLightMovement: 0 + m_CachedShadowTranslationThreshold: 0.01 + m_CachedShadowAngularThreshold: 0.5 m_BarnDoorAngle: 90 m_BarnDoorLength: 0.05 + m_preserveCachedShadow: 0 m_ShadowCascadeRatios: - 0.05 - 0.2 @@ -1209,6 +1410,7 @@ MonoBehaviour: showAdditionalSettings: 0 m_AreaLightEmissiveMeshShadowCastingMode: 0 m_AreaLightEmissiveMeshMotionVectorGenerationMode: 0 + m_AreaLightEmissiveMeshLayer: -1 --- !u!1 &8401416847009048942 GameObject: m_ObjectHideFlags: 0 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1900_AlphaTest_SG/Materials/Shader Graphs_AlphaTest_HDRP_LitSG_transparent_post.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1900_AlphaTest_SG/Materials/Shader Graphs_AlphaTest_HDRP_LitSG_transparent_post.mat index 7ae06ab74aa..22cd8d85c07 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1900_AlphaTest_SG/Materials/Shader Graphs_AlphaTest_HDRP_LitSG_transparent_post.mat +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1900_AlphaTest_SG/Materials/Shader Graphs_AlphaTest_HDRP_LitSG_transparent_post.mat @@ -15,7 +15,7 @@ Material: m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 + m_CustomRenderQueue: 3000 stringTagMap: MotionVector: User RenderType: Transparent @@ -34,6 +34,18 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} m_Floats: - _AddPrecomputedVelocity: 0 - _AlphaCutoffEnable: 1 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/3x_DebugView/3004_QuadOverdraw.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/3x_DebugView/3004_QuadOverdraw.unity index f802d5bb9af..98c039e392b 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/3x_DebugView/3004_QuadOverdraw.unity +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/3x_DebugView/3004_QuadOverdraw.unity @@ -271,11 +271,6 @@ PrefabInstance: propertyPath: doBeforeTest.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName value: DebugViewController, Unity.RenderPipelines.HighDefinition-Tests.Runtime objectReference: {fileID: 0} - - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, - type: 3} - propertyPath: xrCompatible - value: 0 - objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} --- !u!1 &1167715396 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/3x_DebugView/3004_QuadOverdraw/Sceneobjects.prefab b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/3x_DebugView/3004_QuadOverdraw/Sceneobjects.prefab index 23a628a32b6..1251a25dd4c 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/3x_DebugView/3004_QuadOverdraw/Sceneobjects.prefab +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/3x_DebugView/3004_QuadOverdraw/Sceneobjects.prefab @@ -1508,7 +1508,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: 0f769a963f31add41a59027ba7d0ad68, type: 2} + - {fileID: 2100000, guid: a7a5d577661996b4d8610da4b048f59f, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/3x_DebugView/3005_VertexDensity.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/3x_DebugView/3005_VertexDensity.unity index 85ba305c45a..5f96b91ace7 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/3x_DebugView/3005_VertexDensity.unity +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/3x_DebugView/3005_VertexDensity.unity @@ -271,11 +271,6 @@ PrefabInstance: propertyPath: doBeforeTest.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName value: DebugViewController, Unity.RenderPipelines.HighDefinition-Tests.Runtime objectReference: {fileID: 0} - - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, - type: 3} - propertyPath: xrCompatible - value: 0 - objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} --- !u!1 &1167715396 diff --git a/com.unity.render-pipelines.core/Runtime/Camera/FreeCamera.cs b/com.unity.render-pipelines.core/Runtime/Camera/FreeCamera.cs index 02496e004e8..6f6ba2ada95 100644 --- a/com.unity.render-pipelines.core/Runtime/Camera/FreeCamera.cs +++ b/com.unity.render-pipelines.core/Runtime/Camera/FreeCamera.cs @@ -151,7 +151,6 @@ void UpdateInputs() leftShift = Input.GetKeyDown(KeyCode.LeftShift); fire1 = Input.GetAxis("Fire1") > 0.0f; - Debug.Log(fire1); inputChangeSpeed = Input.GetAxis(kSpeedAxis); @@ -166,7 +165,7 @@ void Update() // If the debug menu is running, we don't want to conflict with its inputs. if (DebugManager.instance.displayRuntimeUI) return; - + UpdateInputs(); if (inputChangeSpeed != 0.0f) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 71f85371b6d..b9344a039db 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -37,6 +37,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Added scalability settings for the planar reflection resolution. - Added tests for AOV stacking and UI rendering in the graphics compositor. - Added a new ray tracing only function that samples the specular part of the materials. +- Adding missing marker for ray tracing profiling (RaytracingDeferredLighting) +- Added the support of eye shader for ray tracing. ### Fixed - Fixed several issues with physically-based DoF (TAA ghosting of the CoC buffer, smooth layer transitions, etc) @@ -159,6 +161,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed profiling scope for quality RTGI. - Fixed the denoising and multi-sample not being used for smooth multibounce RTReflections. - Fixed issue where multiple cameras would cause GC each frame. +- Fixed after post process rendering pass options not showing for unlit ShaderGraphs. +- Fixed a migration issue with the rendering queue in ShaderGraph when upgrading to 10.x; +- Fixed null reference in the Undo callback of the graphics compositor +- Fixed cullmode for SceneSelectionPass. ### Changed - Preparation pass for RTSSShadows to be supported by render graph. @@ -194,6 +200,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Remove a rendergraph debug option to clear resources on release from UI. - added SV_PrimitiveID in the VaryingMesh structure for fulldebugscreenpass as well as primitiveID in FragInputs - Changed which local frame is used for multi-bounce RTReflections. +- Move System Generated Values semantics out of VaryingsMesh structure. +- Other forms of FSAA are silently deactivated, when path tracing is on. ## [10.0.0] - 2019-06-10 diff --git a/com.unity.render-pipelines.high-definition/Editor/Compositor/CompositorWindow.cs b/com.unity.render-pipelines.high-definition/Editor/Compositor/CompositorWindow.cs index 95215eeaad0..eee3264a789 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Compositor/CompositorWindow.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Compositor/CompositorWindow.cs @@ -206,6 +206,8 @@ void UndoCallback() s_SelectionIndex = m_Editor.selectionIndex; CompositionManager compositor = CompositionManager.GetInstance(); + // The compositor might be null even if the CompositionManagerEditor is not (in case the user switches from a scene with a compositor to a scene without one) + if (compositor) { // Some properties were changed, mark the profile as dirty so it can be saved if the user saves the scene EditorUtility.SetDirty(compositor); diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyeSubTarget.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyeSubTarget.cs index 2f31c806be2..a57578af5d4 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyeSubTarget.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyeSubTarget.cs @@ -32,8 +32,7 @@ sealed partial class EyeSubTarget : LightingSubTarget, ILegacyTarget, IRequiresD protected override ShaderID shaderID => HDShaderUtils.ShaderID.SG_Eye; protected override string subShaderInclude => "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Eye/Eye.hlsl"; protected override FieldDescriptor subShaderField => new FieldDescriptor(kSubShader, "Eye SubShader", ""); - - protected override bool supportRaytracing => false; + protected override string raytracingInclude => CoreIncludes.kEyeRaytracing; protected override bool requireSplitLighting => eyeData.subsurfaceScattering; EyeData m_EyeData; @@ -53,6 +52,16 @@ public EyeData eyeData public static FieldDescriptor Eye = new FieldDescriptor(kMaterial, "Eye", "_MATERIAL_FEATURE_EYE 1"); public static FieldDescriptor EyeCinematic = new FieldDescriptor(kMaterial, "EyeCinematic", "_MATERIAL_FEATURE_EYE_CINEMATIC 1"); + protected override SubShaderDescriptor GetRaytracingSubShaderDescriptor() + { + var descriptor = base.GetRaytracingSubShaderDescriptor(); + + if (eyeData.subsurfaceScattering) + descriptor.passes.Add(HDShaderPasses.GenerateRaytracingSubsurface()); + + return descriptor; + } + public override void GetFields(ref TargetFieldContext context) { base.GetFields(ref context); diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyeSurfaceOptionPropertyBlock.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyeSurfaceOptionPropertyBlock.cs index e317f10df6e..81133c2e116 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyeSurfaceOptionPropertyBlock.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyeSurfaceOptionPropertyBlock.cs @@ -18,7 +18,7 @@ class EyeSurfaceOptionPropertyBlock : SurfaceOptionPropertyBlock { class Styles { - public static GUIContent materialType = new GUIContent("Material Type", "TODO"); + public static GUIContent materialType = new GUIContent("Material Type", "Allow to select the type of lighting model used with this Eye Material."); public static GUIContent irisNormalType = new GUIContent("Iris Normal", "Override the iris normal"); } diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricSurfaceOptionPropertyBlock.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricSurfaceOptionPropertyBlock.cs index 706ab693062..f87a00d9e50 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricSurfaceOptionPropertyBlock.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricSurfaceOptionPropertyBlock.cs @@ -18,7 +18,7 @@ class FabricSurfaceOptionPropertyBlock : SurfaceOptionPropertyBlock { class Styles { - public static GUIContent materialType = new GUIContent("Material Type", "TODO"); + public static GUIContent materialType = new GUIContent("Material Type", "Allow to select the type of lighting model used with this Fabric Material. Either for cooton wood or for Silk."); } FabricData fabricData; diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/AdvancedOptionsPropertyBlock.cs b/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/AdvancedOptionsPropertyBlock.cs index 154cf4248eb..64fac6c2368 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/AdvancedOptionsPropertyBlock.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/AdvancedOptionsPropertyBlock.cs @@ -17,8 +17,8 @@ class AdvancedOptionsPropertyBlock : SubTargetPropertyBlock { class Styles { - public static GUIContent overrideBakedGI = new GUIContent("Override Baked GI", "TODO"); - public static GUIContent supportLodCrossFade = new GUIContent("Support LOD CrossFade", "TODO"); + public static GUIContent overrideBakedGI = new GUIContent("Override Baked GI", "When enabled, inputs to override the current GI are exposed on the master node."); + public static GUIContent supportLodCrossFade = new GUIContent("Support LOD CrossFade", "When enabled, allow to use the animated transition for LOD feature on this material."); } protected override string title => "Advanced Options"; diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/HDStructFields.cs b/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/HDStructFields.cs index 095d72ef187..f02bc399bf6 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/HDStructFields.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/HDStructFields.cs @@ -54,10 +54,6 @@ public struct VaryingsMeshToPS subscriptOptions : StructFieldOptions.Optional); public static FieldDescriptor instanceID = new FieldDescriptor(VaryingsMeshToPS.name, "instanceID", "", ShaderValueType.Uint, "CUSTOM_INSTANCE_ID", "UNITY_ANY_INSTANCING_ENABLED"); - public static FieldDescriptor primitiveID = new FieldDescriptor(VaryingsMeshToPS.name, "primitiveID", "VARYINGS_NEED_PRIMITIVEID", ShaderValueType.Uint, - "SV_PrimitiveID", "defined(PLATFORM_SUPPORTS_PRIMITIVE_ID_IN_PIXEL_SHADER) && defined(SHADER_STAGE_FRAGMENT) && (defined(VARYINGS_NEED_PRIMITIVEID) || (SHADERPASS == SHADERPASS_FULLSCREEN_DEBUG))", StructFieldOptions.Generated & StructFieldOptions.Optional); - public static FieldDescriptor cullFace = new FieldDescriptor(VaryingsMeshToPS.name, "cullFace", "VARYINGS_NEED_CULLFACE", "FRONT_FACE_TYPE", - "FRONT_FACE_SEMANTIC", "defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)", StructFieldOptions.Generated & StructFieldOptions.Optional); } public struct VaryingsMeshToDS diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/HDStructs.cs b/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/HDStructs.cs index 46ca5619aa2..c13d46f41be 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/HDStructs.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/HDStructs.cs @@ -41,8 +41,6 @@ static class HDStructs HDStructFields.VaryingsMeshToPS.texCoord3, HDStructFields.VaryingsMeshToPS.color, HDStructFields.VaryingsMeshToPS.instanceID, - HDStructFields.VaryingsMeshToPS.primitiveID, - HDStructFields.VaryingsMeshToPS.cullFace, } }; diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/HDTarget.cs b/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/HDTarget.cs index 0ee0fc37c8c..befd7bb5f07 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/HDTarget.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/HDTarget.cs @@ -407,8 +407,6 @@ static class CoreFieldDependencies new FieldDependency(HDStructFields.FragInputs.texCoord2, HDStructFields.VaryingsMeshToPS.texCoord2), new FieldDependency(HDStructFields.FragInputs.texCoord3, HDStructFields.VaryingsMeshToPS.texCoord3), new FieldDependency(HDStructFields.FragInputs.color, HDStructFields.VaryingsMeshToPS.color), - new FieldDependency(HDStructFields.FragInputs.primitiveID, HDStructFields.VaryingsMeshToPS.primitiveID), - new FieldDependency(HDStructFields.FragInputs.IsFrontFace, HDStructFields.VaryingsMeshToPS.cullFace), }; public static DependencyCollection VertexDescription = new DependencyCollection @@ -598,6 +596,7 @@ public static class Uniforms public static RenderStateCollection SceneSelection = new RenderStateCollection { + { RenderState.Cull(Cull.Off) }, { RenderState.ColorMask("ColorMask 0") }, }; @@ -876,6 +875,7 @@ static class CoreIncludes public const string kLitRaytracing = "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitRaytracing.hlsl"; public const string kUnlitRaytracing = "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/UnlitRaytracing.hlsl"; public const string kFabricRaytracing = "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Fabric/FabricRaytracing.hlsl"; + public const string kEyeRaytracing = "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Eye/EyeRaytracing.hlsl"; public const string kStackLitRaytracing = "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/StackLit/StackLitRaytracing.hlsl"; public const string kHairRaytracing = "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Hair/HairRaytracing.hlsl"; public const string kRaytracingLightLoop = "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/RaytracingLightLoop.hlsl"; diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/SurfaceOptionPropertyBlock.cs b/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/SurfaceOptionPropertyBlock.cs index 5e316819096..36d031ee8f8 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/SurfaceOptionPropertyBlock.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/SurfaceOptionPropertyBlock.cs @@ -27,8 +27,8 @@ public enum Features class Styles { - public static GUIContent fragmentNormalSpace = new GUIContent("Fragment Normal Space", "TODO"); - public static GUIContent doubleSidedModeText = new GUIContent("Double Sided Mode", "TODO"); + public static GUIContent fragmentNormalSpace = new GUIContent("Fragment Normal Space", "Select the space use for normal map in Fragment shader in this shader graph."); + public static GUIContent doubleSidedModeText = new GUIContent("Double Sided Mode", "Select the double sided mode to use with this Material."); } Features enabledFeatures; @@ -46,7 +46,7 @@ protected override void CreatePropertyGUI() }); context.globalIndentLevel++; - var renderingPassList = HDSubShaderUtilities.GetRenderingPassList(systemData.surfaceType == SurfaceType.Opaque, false); + var renderingPassList = HDSubShaderUtilities.GetRenderingPassList(systemData.surfaceType == SurfaceType.Opaque, enabledFeatures == Features.Unlit); // Show after post process for unlit shaders var renderingPassValue = systemData.surfaceType == SurfaceType.Opaque ? HDRenderQueue.GetOpaqueEquivalent(systemData.renderingPass) : HDRenderQueue.GetTransparentEquivalent(systemData.renderingPass); var renderQueueType = systemData.surfaceType == SurfaceType.Opaque ? HDRenderQueue.RenderQueueType.Opaque : HDRenderQueue.RenderQueueType.Transparent; context.AddProperty(renderingPassText, new PopupField(renderingPassList, renderQueueType, HDSubShaderUtilities.RenderQueueName, HDSubShaderUtilities.RenderQueueName) { value = renderingPassValue }, (evt) => diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/Templates/SharedCode.template.hlsl b/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/Templates/SharedCode.template.hlsl index 7c7ea414bfd..ef3dfcd18d1 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/Templates/SharedCode.template.hlsl +++ b/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/Templates/SharedCode.template.hlsl @@ -17,14 +17,6 @@ FragInputs BuildFragInputs(VaryingsMeshToPS input) $FragInputs.texCoord3: output.texCoord3 = input.texCoord3; $FragInputs.color: output.color = input.color; - #if defined(PLATFORM_SUPPORTS_PRIMITIVE_ID_IN_PIXEL_SHADER) && defined(SHADER_STAGE_FRAGMENT) && (defined(VARYINGS_NEED_PRIMITIVEID) || (SHADERPASS == SHADERPASS_FULLSCREEN_DEBUG)) - output.primitiveID = input.primitiveID; - #endif - - #if defined(VARYINGS_NEED_CULLFACE) && SHADER_STAGE_FRAGMENT - output.isFrontFace = IS_FRONT_VFACE(input.cullFace, true, false); - #endif - return output; } diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitSurfaceOptionPropertyBlock.cs b/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitSurfaceOptionPropertyBlock.cs index d0ca6631734..35bfe88b371 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitSurfaceOptionPropertyBlock.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitSurfaceOptionPropertyBlock.cs @@ -18,7 +18,7 @@ class StackLitSurfaceOptionPropertyBlock : SurfaceOptionPropertyBlock { class Styles { - public static GUIContent materialType = new GUIContent("Material Type", "TODO"); + public static GUIContent materialType = new GUIContent("Material Type", "Allow to select the lighting model to used with this Material."); } StackLitData stackLitData; diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitSurfaceOptionPropertyBlock.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitSurfaceOptionPropertyBlock.cs index 7b1a9b1f558..8b6a13af74f 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitSurfaceOptionPropertyBlock.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitSurfaceOptionPropertyBlock.cs @@ -18,7 +18,7 @@ class HDUnlitSurfaceOptionPropertyBlock : SurfaceOptionPropertyBlock { class Styles { - public static GUIContent shadowMatte = new GUIContent("Shadow Matte", "TODO"); + public static GUIContent shadowMatte = new GUIContent("Shadow Matte", "When enabled, shadow matte inputs are exposed on the master node."); } HDUnlitData unlitData; diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineMenuItems.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineMenuItems.cs index b2193797804..c15f087eae6 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineMenuItems.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineMenuItems.cs @@ -107,14 +107,18 @@ internal static void UpgradeDefaultRenderingLayerMask() foreach (var mesh in meshRenderers) { + Undo.RecordObject(mesh, "MeshRenderer Layer Mask update"); mesh.renderingLayerMask |= (ShaderVariablesGlobal.DefaultRenderingLayerMask & ShaderVariablesGlobal.RenderingDecalLayersMask); + EditorUtility.SetDirty(mesh); } var terrains = Resources.FindObjectsOfTypeAll(); foreach (var terrain in terrains) { + Undo.RecordObject(terrain, "Terrain Layer Mask update"); terrain.renderingLayerMask |= (ShaderVariablesGlobal.DefaultRenderingLayerMask & ShaderVariablesGlobal.RenderingDecalLayersMask); + EditorUtility.SetDirty(terrain); } } @@ -131,13 +135,17 @@ internal static void UpgradeDefaultRenderingLayerMaskForSelection() MeshRenderer mesh; if (gameObj.TryGetComponent(out mesh)) { + Undo.RecordObject(mesh, "MeshRenderer Layer Mask update"); mesh.renderingLayerMask |= (ShaderVariablesGlobal.DefaultRenderingLayerMask & ShaderVariablesGlobal.RenderingDecalLayersMask); + EditorUtility.SetDirty(mesh); } Terrain terrain; if (gameObj.TryGetComponent(out terrain)) { + Undo.RecordObject(terrain, "Terrain Layer Mask update"); terrain.renderingLayerMask |= (ShaderVariablesGlobal.DefaultRenderingLayerMask & ShaderVariablesGlobal.RenderingDecalLayersMask); + EditorUtility.SetDirty(terrain); } } } diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs index 0e4a2b811a9..be814317d7d 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs @@ -16,6 +16,7 @@ public class GeneralSection public static readonly GUIContent renderPipelineEditorResourcesContent = EditorGUIUtility.TrTextContent("Render Pipeline Editor Resources", "Set of resources that need to be loaded for working in editor"); public static readonly GUIContent shaderVariantLogLevel = EditorGUIUtility.TrTextContent("Shader Variant Log Level", "Controls the level logging in of shader variants information is outputted when a build is performed. Information appears in the Unity Console when the build finishes."); public static readonly GUIContent lensAttenuationModeContent = EditorGUIUtility.TrTextContent("Lens Attenuation Mode", "Set the attenuation mode of the lens that is used to compute exposure. With imperfect lens some energy is lost when converting from EV100 to the exposure multiplier."); + public static readonly GUIContent useRenderGraphContent = EditorGUIUtility.TrTextContent("Use Render Graph", "Use the render graph code path internally. This toggle can be used to revert back to the regular code path in case of regression."); } public static readonly GUIContent generalSectionTitle = EditorGUIUtility.TrTextContent("General"); @@ -117,7 +118,7 @@ public class GeneralSection public static readonly GUIContent decalLayerName7 = EditorGUIUtility.TrTextContent("Decal Layer Name 7", "The display name for Decal Layer 7. This is purely cosmetic, and can be used to articulate intended use of Decal Layer 7"); public static readonly GUIContent supportMotionVectorContent = EditorGUIUtility.TrTextContent("Motion Vectors", "When enabled, HDRP allocates memory for processing motion vectors which it uses for Motion Blur, TAA, and temporal re-projection of various effect like SSR."); public static readonly GUIContent supportRuntimeDebugDisplayContent = EditorGUIUtility.TrTextContent("Runtime Debug Display", "When disabled, HDRP removes all debug display Shader variants when you build for the Unity Player. This decreases build time."); - public static readonly GUIContent supportRuntimeAOVAPIContent = EditorGUIUtility.TrTextContent("Runtime AOV API", "When disabled, HDRP removes all AOV API Shader variants when you build for the Unity Player. This decreases build time."); + public static readonly GUIContent supportRuntimeAOVAPIContent = EditorGUIUtility.TrTextContent("Runtime AOV API", "When disabled, HDRP removes all AOV API Shader variants when you build for the Unity Player. This decreases build time."); public static readonly GUIContent supportDitheringCrossFadeContent = EditorGUIUtility.TrTextContent("Dithering Cross-fade", "When disabled, HDRP removes all dithering cross fade Shader variants when you build for the Unity Player. This decreases build time."); public static readonly GUIContent supportTerrainHoleContent = EditorGUIUtility.TrTextContent("Terrain Hole", "When disabled, HDRP removes all Terrain hole Shader variants when you build for the Unity Player. This decreases build time."); public static readonly GUIContent supportDistortion = EditorGUIUtility.TrTextContent("Distortion", "When disabled, HDRP removes all distortion Shader variants when you build for the Unity Player. This decreases build time."); diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs index 33097221915..fc4e5a940df 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs @@ -192,6 +192,7 @@ static void Drawer_SectionGeneral(SerializedHDRenderPipelineAsset serialized, Ed EditorGUILayout.PropertyField(serialized.shaderVariantLogLevel, Styles.GeneralSection.shaderVariantLogLevel); EditorGUILayout.PropertyField(serialized.lensAttenuation, Styles.GeneralSection.lensAttenuationModeContent); + EditorGUILayout.PropertyField(serialized.useRenderGraph, Styles.GeneralSection.useRenderGraphContent); m_ShowLightLayerNames = EditorGUILayout.Foldout(m_ShowLightLayerNames, Styles.lightLayerNamesText, true); if (m_ShowLightLayerNames) diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/DefaultSettingsPanel.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/DefaultSettingsPanel.cs index 5ca0d8271ba..54c708f5766 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/DefaultSettingsPanel.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/DefaultSettingsPanel.cs @@ -69,6 +69,12 @@ public class Styles public void DoGUI(string searchContext) { + if (HDRenderPipeline.defaultAsset == null) + { + EditorGUILayout.HelpBox("Base SRP Asset is not a HDRenderPipelineAsset.", MessageType.Warning); + return; + } + m_SerializeHDRPAsset.Update(); m_ScrollViewPosition = GUILayout.BeginScrollView(m_ScrollViewPosition, EditorStyles.largeLabel); @@ -98,6 +104,9 @@ public void DoGUI(string searchContext) /// public void OnActivate(string searchContext, VisualElement rootElement) { + if (HDRenderPipeline.defaultAsset == null) + return; + m_ScrollViewPosition = Vector2.zero; InitializeCustomPostProcessesLists(); @@ -201,7 +210,7 @@ void Draw_GeneralSettings() var hdrpAsset = HDRenderPipeline.defaultAsset; if (hdrpAsset == null) { - EditorGUILayout.HelpBox("Base SRP Asset is not an HDRenderPipelineAsset.", MessageType.Warning); + EditorGUILayout.HelpBox("Base SRP Asset is not a HDRenderPipelineAsset.", MessageType.Warning); return; } diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedHDRenderPipelineAsset.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedHDRenderPipelineAsset.cs index 14bd07f7241..523453e1259 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedHDRenderPipelineAsset.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedHDRenderPipelineAsset.cs @@ -17,6 +17,7 @@ class SerializedHDRenderPipelineAsset public SerializedProperty enableSRPBatcher; public SerializedProperty shaderVariantLogLevel; public SerializedProperty lensAttenuation; + public SerializedProperty useRenderGraph; public SerializedRenderPipelineSettings renderPipelineSettings; public SerializedFrameSettings defaultFrameSettings; public SerializedFrameSettings defaultBakedOrCustomReflectionFrameSettings; @@ -61,6 +62,7 @@ public SerializedHDRenderPipelineAsset(SerializedObject serializedObject) enableSRPBatcher = serializedObject.Find((HDRenderPipelineAsset s) => s.enableSRPBatcher); shaderVariantLogLevel = serializedObject.Find((HDRenderPipelineAsset s) => s.shaderVariantLogLevel); lensAttenuation = serializedObject.FindProperty("m_LensAttenuation"); + useRenderGraph = serializedObject.FindProperty("m_UseRenderGraph"); renderPipelineSettings = new SerializedRenderPipelineSettings(serializedObject.FindProperty("m_RenderPipelineSettings")); defaultFrameSettings = new SerializedFrameSettings(serializedObject.FindProperty("m_RenderingPathDefaultCameraFrameSettings"), null); //no overrides in HDRPAsset diff --git a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs index 9e5ead2a1bd..5ecaa6689e3 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs @@ -775,6 +775,7 @@ void EnableProfilingRecordersRT() m_RecordedSamplersRT.Add(ProfilingSampler.Get(HDProfileId.ForwardPreRefraction)); m_RecordedSamplersRT.Add(ProfilingSampler.Get(HDProfileId.RayTracingRecursiveRendering)); m_RecordedSamplersRT.Add(ProfilingSampler.Get(HDProfileId.RayTracingPrepass)); + m_RecordedSamplersRT.Add(ProfilingSampler.Get(HDProfileId.RaytracingDeferredLighting)); } void DisableProfilingRecordersRT() diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs index c6ef20ac895..ca7c4930573 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs @@ -2788,17 +2788,20 @@ internal void UpdateAreaLightEmissiveMesh(bool fromTimeLine = false) } // Update Mesh - switch (areaLightShape) + if (HDRenderPipeline.defaultAsset != null) { - case AreaLightShape.Tube: - if (m_EmissiveMeshFilter.sharedMesh != HDRenderPipeline.defaultAsset.renderPipelineResources.assets.emissiveCylinderMesh) - m_EmissiveMeshFilter.sharedMesh = HDRenderPipeline.defaultAsset.renderPipelineResources.assets.emissiveCylinderMesh; - break; - case AreaLightShape.Rectangle: - default: - if (m_EmissiveMeshFilter.sharedMesh != HDRenderPipeline.defaultAsset.renderPipelineResources.assets.emissiveQuadMesh) - m_EmissiveMeshFilter.sharedMesh = HDRenderPipeline.defaultAsset.renderPipelineResources.assets.emissiveQuadMesh; - break; + switch (areaLightShape) + { + case AreaLightShape.Tube: + if (m_EmissiveMeshFilter.sharedMesh != HDRenderPipeline.defaultAsset.renderPipelineResources.assets.emissiveCylinderMesh) + m_EmissiveMeshFilter.sharedMesh = HDRenderPipeline.defaultAsset.renderPipelineResources.assets.emissiveCylinderMesh; + break; + case AreaLightShape.Rectangle: + default: + if (m_EmissiveMeshFilter.sharedMesh != HDRenderPipeline.defaultAsset.renderPipelineResources.assets.emissiveQuadMesh) + m_EmissiveMeshFilter.sharedMesh = HDRenderPipeline.defaultAsset.renderPipelineResources.assets.emissiveQuadMesh; + break; + } } // Update light area size with clamping diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxF.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxF.shader index a9f78c77f0e..e22d60871c9 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxF.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxF.shader @@ -221,7 +221,7 @@ Shader "HDRP/AxF" Name "SceneSelectionPass" Tags { "LightMode" = "SceneSelectionPass" } - Cull[_CullMode] + Cull Off HLSLPROGRAM diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.hlsl index 675878b71a9..39c22b59120 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.hlsl @@ -29,8 +29,6 @@ // So same motion vectors buffer is use for all scenario, so if deferred define a motion vectors buffer, the same is reuse for forward case. // THis is similar to NormalBuffer -// TODO: CAUTION: current DecodeMotionVector is not used in motion vector / TAA pass as it come from Postprocess stack -// This will be fix when postprocess will be integrated into HD, but it mean that we must not change the // EncodeMotionVector / DecodeMotionVector code for now, i.e it must do nothing like it is doing currently. // Design note: We assume that motion vector/distortion fit into a single buffer (i.e not spread on several buffer) void EncodeMotionVector(float2 motionVector, out float4 outBuffer) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Eye/EyeRaytracing.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Eye/EyeRaytracing.hlsl new file mode 100644 index 00000000000..8b4d16911e8 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Eye/EyeRaytracing.hlsl @@ -0,0 +1,54 @@ +float3 SampleSpecularBRDF(BSDFData bsdfData, float2 sample, float3 viewWS) +{ + float roughness = PerceptualRoughnessToRoughness(bsdfData.perceptualRoughness); + float3x3 localToWorld = GetLocalFrame(bsdfData.normalWS); + float NdotL, NdotH, VdotH; + float3 sampleDir; + SampleGGXDir(sample, viewWS, localToWorld, roughness, sampleDir, NdotL, NdotH, VdotH); + return sampleDir; +} + +#ifdef HAS_LIGHTLOOP +IndirectLighting EvaluateBSDF_RaytracedReflection(LightLoopContext lightLoopContext, + BSDFData bsdfData, + PreLightData preLightData, + float3 reflection) +{ + IndirectLighting lighting; + ZERO_INITIALIZE(IndirectLighting, lighting); + lighting.specularReflected = reflection.rgb * preLightData.specularFGD; + return lighting; +} + + +IndirectLighting EvaluateBSDF_RaytracedRefraction(LightLoopContext lightLoopContext, + PreLightData preLightData, + float3 transmittedColor) +{ + IndirectLighting lighting; + ZERO_INITIALIZE(IndirectLighting, lighting); + return lighting; +} + +float RecursiveRenderingReflectionPerceptualSmoothness(BSDFData bsdfData) +{ + return PerceptualRoughnessToPerceptualSmoothness(bsdfData.perceptualRoughness); +} +#endif + +#if (SHADERPASS == SHADERPASS_RAYTRACING_GBUFFER) +void FitToStandardLit( SurfaceData surfaceData + , BuiltinData builtinData + , uint2 positionSS + , out StandardBSDFData outStandardlit) +{ + outStandardlit.baseColor = surfaceData.baseColor; + outStandardlit.specularOcclusion = surfaceData.specularOcclusion; + outStandardlit.normalWS = surfaceData.normalWS; + outStandardlit.perceptualRoughness = PerceptualSmoothnessToPerceptualRoughness(surfaceData.perceptualSmoothness); + outStandardlit.fresnel0 = IorToFresnel0(surfaceData.IOR).xxx; + outStandardlit.coatMask = 0.0; + outStandardlit.emissiveAndBaked = builtinData.bakeDiffuseLighting * surfaceData.ambientOcclusion + builtinData.emissiveColor; + outStandardlit.isUnlit = 0; +} +#endif diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Eye/EyeRaytracing.hlsl.meta b/com.unity.render-pipelines.high-definition/Runtime/Material/Eye/EyeRaytracing.hlsl.meta new file mode 100644 index 00000000000..eb35fdd635b --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Eye/EyeRaytracing.hlsl.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: a056724d08b3f744ba7a15e5398cd2e3 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLit.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLit.shader index e76a18f01ba..96062fd3663 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLit.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLit.shader @@ -528,7 +528,7 @@ Shader "HDRP/LayeredLit" Name "SceneSelectionPass" Tags{ "LightMode" = "SceneSelectionPass" } - Cull[_CullMode] + Cull Off HLSLPROGRAM diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitTessellation.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitTessellation.shader index 2e032c70e79..da0726989bd 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitTessellation.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitTessellation.shader @@ -546,7 +546,7 @@ Shader "HDRP/LayeredLitTessellation" Name "SceneSelectionPass" Tags{ "LightMode" = "SceneSelectionPass" } - Cull[_CullMode] + Cull Off ZWrite On diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader index ec0a2c2c6b3..dca1e9f2cd8 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader @@ -356,7 +356,7 @@ Shader "HDRP/Lit" Name "SceneSelectionPass" Tags { "LightMode" = "SceneSelectionPass" } - Cull[_CullMode] + Cull Off HLSLPROGRAM diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitTessellation.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitTessellation.shader index 94dfc7edcb2..ae72203e1ca 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitTessellation.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitTessellation.shader @@ -370,7 +370,7 @@ Shader "HDRP/LitTessellation" Name "SceneSelectionPass" Tags { "LightMode" = "SceneSelectionPass" } - Cull[_CullMode] + Cull Off HLSLPROGRAM diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/TerrainLit/TerrainLit.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/TerrainLit/TerrainLit.shader index 7537dc128dd..bbecdd8688c 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/TerrainLit/TerrainLit.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/TerrainLit/TerrainLit.shader @@ -271,7 +271,7 @@ Shader "HDRP/TerrainLit" Name "SceneSelectionPass" Tags { "LightMode" = "SceneSelectionPass" } - Cull[_CullMode] + Cull Off HLSLPROGRAM diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.shader index 23b591aa62f..3da0773be9f 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.shader @@ -150,7 +150,7 @@ Shader "HDRP/Unlit" Name "SceneSelectionPass" Tags{ "LightMode" = "SceneSelectionPass" } - Cull[_CullMode] + Cull Off ZWrite On diff --git a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/PostProcessSystem.cs b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/PostProcessSystem.cs index 9f61527ced3..957da59a98a 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/PostProcessSystem.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/PostProcessSystem.cs @@ -92,6 +92,7 @@ private enum SMAAStage ShadowsMidtonesHighlights m_ShadowsMidtonesHighlights; ColorCurves m_Curves; FilmGrain m_FilmGrain; + PathTracing m_PathTracing; // Prefetched frame settings (updated on every frame) bool m_ExposureControlFS; @@ -367,6 +368,7 @@ public void BeginFrame(CommandBuffer cmd, HDCamera camera, HDRenderPipeline hdIn m_ShadowsMidtonesHighlights = stack.GetComponent(); m_Curves = stack.GetComponent(); m_FilmGrain = stack.GetComponent(); + m_PathTracing = stack.GetComponent(); // Prefetch frame settings - these aren't free to pull so we want to do it only once // per frame @@ -386,6 +388,9 @@ public void BeginFrame(CommandBuffer cmd, HDCamera camera, HDRenderPipeline hdIn m_DitheringFS = frameSettings.IsEnabled(FrameSettingsField.Dithering); m_AntialiasingFS = frameSettings.IsEnabled(FrameSettingsField.Antialiasing); + // Override full screen anti-aliasing when doing path tracing (which is naturally anti-aliased already) + m_AntialiasingFS &= !m_PathTracing.enable.value; + m_DebugExposureCompensation = m_HDInstance.m_CurrentDebugDisplaySettings.data.lightingDebugSettings.debugExposure; CheckRenderTexturesValidity(); @@ -584,7 +589,7 @@ void PoolSource(ref RTHandle src, RTHandle dst) // If Path tracing is enabled, then DoF is computed in the path tracer by sampling the lens aperure (when using the physical camera mode) bool isDoFPathTraced = (camera.frameSettings.IsEnabled(FrameSettingsField.RayTracing) && - camera.volumeStack.GetComponent().enable.value && + m_PathTracing.enable.value && camera.camera.cameraType != CameraType.Preview && m_DepthOfField.focusMode == DepthOfFieldMode.UsePhysicalCamera); @@ -1383,6 +1388,7 @@ void PrepareExposureCurveData(out float min, out float max) filterMode = FilterMode.Bilinear, wrapMode = TextureWrapMode.Clamp }; + m_ExposureCurveTexture.hideFlags = HideFlags.HideAndDontSave; } bool minCurveHasPoints = minCurve.length > 0; diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.Prepass.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.Prepass.cs index e2aa5304a96..6909ed7b786 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.Prepass.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.Prepass.cs @@ -846,6 +846,13 @@ void RenderDBuffer(RenderGraph renderGraph, HDCamera hdCamera, TextureHandle dec void DecalNormalPatch(RenderGraph renderGraph, HDCamera hdCamera, ref PrepassOutput output) { + // Integrated Intel GPU on Mac don't support the texture format use for normal (RGBA_8UNORM) for SetRandomWriteTarget + // So on Metal for now we don't patch normal buffer if we detect an intel GPU + if (SystemInfo.graphicsDeviceType == GraphicsDeviceType.Metal && SystemInfo.graphicsDeviceName.Contains("Intel")) + { + return; + } + if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.Decals) && !hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA)) // MSAA not supported { @@ -876,7 +883,7 @@ class DownsampleDepthForLowResPassData public TextureHandle depthTexture; public TextureHandle downsampledDepthBuffer; - // Data needed for potentially writing + // Data needed for potentially writing public Vector2Int mip0Offset; public bool computesMip1OfAtlas; } diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs index 646a98a090c..6bddb91693b 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -588,8 +588,7 @@ public HDRenderPipeline(HDRenderPipelineAsset asset, HDRenderPipelineAsset defau InitializeProbeVolumes(); CustomPassUtils.Initialize(); - if (enableNonRenderGraphTests) - EnableRenderGraph(false); + EnableRenderGraph(defaultAsset.useRenderGraph && !enableNonRenderGraphTests); } #if UNITY_EDITOR @@ -817,7 +816,7 @@ void DestroyRenderTextures() RTHandles.Release(m_DistortionBuffer); RTHandles.Release(m_ContactShadowBuffer); - + RTHandles.Release(m_LowResTransparentBuffer); // RTHandles.Release(m_SsrDebugTexture); @@ -2766,7 +2765,7 @@ void Callback(CommandBuffer c, HDGPUAsyncTaskParams a) void AsyncSSAODispatch(CommandBuffer c, HDGPUAsyncTaskParams a) => m_AmbientOcclusionSystem.Dispatch(c, a.hdCamera, depthTexture, normalBuffer, motionVectors, a.frameCount); } - + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.RenderShadowMaps))) { // This call overwrites camera properties passed to the shader system. @@ -3897,7 +3896,7 @@ void DecalNormalPatch(HDCamera hdCamera, CommandBuffer cmd) { // Integrated Intel GPU on Mac don't support the texture format use for normal (RGBA_8UNORM) for SetRandomWriteTarget // So on Metal for now we don't patch normal buffer if we detect an intel GPU - if (SystemInfo.graphicsDeviceType == GraphicsDeviceType.Metal /* && SystemInfo.graphicsDeviceName.Contains("Intel") */) + if (SystemInfo.graphicsDeviceType == GraphicsDeviceType.Metal && SystemInfo.graphicsDeviceName.Contains("Intel")) { return; } diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs index 4ff08d28c85..9ca7f8a5bd7 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs @@ -31,7 +31,7 @@ public partial class HDRenderPipelineAsset : RenderPipelineAsset, IVirtualTextur HDRenderPipelineAsset() { - + } void Reset() => OnValidate(); @@ -93,6 +93,13 @@ internal LensAttenuationMode lensAttenuationMode set => m_LensAttenuation = value; } + [SerializeField] private bool m_UseRenderGraph = true; + + internal bool useRenderGraph + { + get => m_UseRenderGraph; + set => m_UseRenderGraph = value; + } #if UNITY_EDITOR [SerializeField] private VolumeProfile m_DefaultLookDevProfile; diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassDecal.hlsl b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassDecal.hlsl index a7d812d0f23..46eb2404733 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassDecal.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassDecal.hlsl @@ -35,7 +35,7 @@ void Frag( PackedVaryingsToPS packedInput, ) { UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(packedInput); - FragInputs input = UnpackVaryingsMeshToFragInputs(packedInput.vmesh); + FragInputs input = UnpackVaryingsToFragInputs(packedInput); DecalSurfaceData surfaceData; float clipValue = 1.0; float angleFadeFactor = 1.0; diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassDepthOnly.hlsl b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassDepthOnly.hlsl index 1fd88d5b4b2..b3d5b0aa701 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassDepthOnly.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassDepthOnly.hlsl @@ -78,7 +78,7 @@ void Frag( PackedVaryingsToPS packedInput ) { UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(packedInput); - FragInputs input = UnpackVaryingsMeshToFragInputs(packedInput.vmesh); + FragInputs input = UnpackVaryingsToFragInputs(packedInput); // input.positionSS is SV_Position PositionInputs posInput = GetPositionInput(input.positionSS.xy, _ScreenSize.zw, input.positionSS.z, input.positionSS.w, input.positionRWS); diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassDistortion.hlsl b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassDistortion.hlsl index f18472e5e30..2b8623e181b 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassDistortion.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassDistortion.hlsl @@ -27,7 +27,7 @@ PackedVaryingsToPS VertTesselation(VaryingsToDS input) float4 Frag(PackedVaryingsToPS packedInput) : SV_Target { UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(packedInput); - FragInputs input = UnpackVaryingsMeshToFragInputs(packedInput.vmesh); + FragInputs input = UnpackVaryingsToFragInputs(packedInput); // input.positionSS is SV_Position PositionInputs posInput = GetPositionInput(input.positionSS.xy, _ScreenSize.zw, input.positionSS.z, input.positionSS.w, input.positionRWS); diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForward.hlsl b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForward.hlsl index 4a392bdfc40..b4b8f76bc69 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForward.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForward.hlsl @@ -110,7 +110,7 @@ void Frag(PackedVaryingsToPS packedInput, #endif UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(packedInput); - FragInputs input = UnpackVaryingsMeshToFragInputs(packedInput.vmesh); + FragInputs input = UnpackVaryingsToFragInputs(packedInput); // We need to readapt the SS position as our screen space positions are for a low res buffer, but we try to access a full res buffer. input.positionSS.xy = _OffScreenRendering > 0 ? (input.positionSS.xy * _OffScreenDownsampleFactor) : input.positionSS.xy; diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForwardUnlit.hlsl b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForwardUnlit.hlsl index ed87044cb27..8627bbae2f3 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForwardUnlit.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForwardUnlit.hlsl @@ -83,7 +83,7 @@ void Frag(PackedVaryingsToPS packedInput, #endif UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(packedInput); - FragInputs input = UnpackVaryingsMeshToFragInputs(packedInput.vmesh); + FragInputs input = UnpackVaryingsToFragInputs(packedInput); // input.positionSS is SV_Position PositionInputs posInput = GetPositionInput(input.positionSS.xy, _ScreenSize.zw, input.positionSS.z, input.positionSS.w, input.positionRWS); diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassFullScreenDebug.hlsl b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassFullScreenDebug.hlsl index 5f12722297b..8c02b2222d4 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassFullScreenDebug.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassFullScreenDebug.hlsl @@ -34,7 +34,7 @@ PackedVaryingsToPS VertTesselation(VaryingsToDS input) void Frag(PackedVaryingsToPS packedInput) { UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(packedInput); - FragInputs input = UnpackVaryingsMeshToFragInputs(packedInput.vmesh); + FragInputs input = UnpackVaryingsToFragInputs(packedInput); PositionInputs posInput = GetPositionInput(input.positionSS.xy, _ScreenSize.zw, input.positionSS.z, input.positionSS.w, input.positionRWS.xyz); diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassGBuffer.hlsl b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassGBuffer.hlsl index 852cb2afa6d..a38189a69bb 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassGBuffer.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassGBuffer.hlsl @@ -47,7 +47,7 @@ void Frag( PackedVaryingsToPS packedInput, ) { UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(packedInput); - FragInputs input = UnpackVaryingsMeshToFragInputs(packedInput.vmesh); + FragInputs input = UnpackVaryingsToFragInputs(packedInput); // input.positionSS is SV_Position PositionInputs posInput = GetPositionInput(input.positionSS.xy, _ScreenSize.zw, input.positionSS.z, input.positionSS.w, input.positionRWS); diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassLightTransport.hlsl b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassLightTransport.hlsl index 2d1a54569e1..5d31efaff62 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassLightTransport.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassLightTransport.hlsl @@ -74,7 +74,7 @@ PackedVaryingsToPS Vert(AttributesMesh inputMesh) float4 Frag(PackedVaryingsToPS packedInput) : SV_Target { - FragInputs input = UnpackVaryingsMeshToFragInputs(packedInput.vmesh); + FragInputs input = UnpackVaryingsToFragInputs(packedInput); // input.positionSS is SV_Position PositionInputs posInput = GetPositionInput(input.positionSS.xy, _ScreenSize.zw, input.positionSS.z, input.positionSS.w, input.positionRWS); diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassMotionVectors.hlsl b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassMotionVectors.hlsl index 485bc983a0a..ac30500b291 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassMotionVectors.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassMotionVectors.hlsl @@ -76,7 +76,7 @@ void Frag( PackedVaryingsToPS packedInput #endif ) { - FragInputs input = UnpackVaryingsMeshToFragInputs(packedInput.vmesh); + FragInputs input = UnpackVaryingsToFragInputs(packedInput); // input.positionSS is SV_Position PositionInputs posInput = GetPositionInput(input.positionSS.xy, _ScreenSize.zw, input.positionSS.z, input.positionSS.w, input.positionRWS); diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/VaryingMesh.hlsl b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/VaryingMesh.hlsl index d98d5781043..58895bb51c3 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/VaryingMesh.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/VaryingMesh.hlsl @@ -85,22 +85,7 @@ struct PackedVaryingsMeshToPS float4 interpolators5 : TEXCOORD5; #endif - // In order to compile on all HDRP target platform we need to respect the following order for semantic: - // - SV_RenderTargetArrayIndex // use for stereo instancing - Must be declare before SV_IsFrontFace - // - SV_PrimitiveID // Must be declare before SV_IsFrontFace and after SV_RenderTargetArrayIndex - // - SV_IsFrontFace - UNITY_VERTEX_INPUT_INSTANCE_ID - -#ifdef PLATFORM_SUPPORTS_PRIMITIVE_ID_IN_PIXEL_SHADER -#if (defined(VARYINGS_NEED_PRIMITIVEID) || (SHADERPASS == SHADERPASS_FULLSCREEN_DEBUG)) && SHADER_STAGE_FRAGMENT - uint primitiveID : SV_PrimitiveID; -#endif -#endif - -#if defined(VARYINGS_NEED_CULLFACE) && SHADER_STAGE_FRAGMENT - FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC; -#endif }; // Functions to pack data to use as few interpolator as possible, the ShaderGraph should generate these functions @@ -180,16 +165,6 @@ FragInputs UnpackVaryingsMeshToFragInputs(PackedVaryingsMeshToPS input) output.color = input.interpolators5; #endif -#ifdef PLATFORM_SUPPORTS_PRIMITIVE_ID_IN_PIXEL_SHADER -#if (defined(VARYINGS_NEED_PRIMITIVEID) || (SHADERPASS == SHADERPASS_FULLSCREEN_DEBUG)) && SHADER_STAGE_FRAGMENT - output.primitiveID = input.primitiveID; -#endif -#endif - -#if defined(VARYINGS_NEED_CULLFACE) && SHADER_STAGE_FRAGMENT - output.isFrontFace = IS_FRONT_VFACE(input.cullFace, true, false); -#endif - return output; } diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/VertMesh.hlsl b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/VertMesh.hlsl index ebdd67829d4..df2ab7d8c66 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/VertMesh.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/VertMesh.hlsl @@ -11,9 +11,23 @@ struct PackedVaryingsToPS #ifdef VARYINGS_NEED_PASS PackedVaryingsPassToPS vpass; #endif + PackedVaryingsMeshToPS vmesh; + // SGVs must be packed after all non-SGVs have been packed. + // If there are several SGVs, they are packed in the order of HLSL declaration. + UNITY_VERTEX_OUTPUT_STEREO + +#if defined(PLATFORM_SUPPORTS_PRIMITIVE_ID_IN_PIXEL_SHADER) && SHADER_STAGE_FRAGMENT +#if (defined(VARYINGS_NEED_PRIMITIVEID) || (SHADERPASS == SHADERPASS_FULLSCREEN_DEBUG)) + uint primitiveID : SV_PrimitiveID; +#endif +#endif + +#if defined(VARYINGS_NEED_CULLFACE) && SHADER_STAGE_FRAGMENT + FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC; +#endif }; PackedVaryingsToPS PackVaryingsToPS(VaryingsToPS input) @@ -28,6 +42,23 @@ PackedVaryingsToPS PackVaryingsToPS(VaryingsToPS input) return output; } +FragInputs UnpackVaryingsToFragInputs(PackedVaryingsToPS packedInput) +{ + FragInputs input = UnpackVaryingsMeshToFragInputs(packedInput.vmesh); + +#if defined(PLATFORM_SUPPORTS_PRIMITIVE_ID_IN_PIXEL_SHADER) && SHADER_STAGE_FRAGMENT +#if (defined(VARYINGS_NEED_PRIMITIVEID) || (SHADERPASS == SHADERPASS_FULLSCREEN_DEBUG)) + input.primitiveID = packedInput.primitiveID; +#endif +#endif + +#if defined(VARYINGS_NEED_CULLFACE) && SHADER_STAGE_FRAGMENT + input.isFrontFace = IS_FRONT_VFACE(packedInput.cullFace, true, false); +#endif + + return input; +} + #ifdef TESSELLATION_ON diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/HDRISky/HDRISkyRenderer.cs b/com.unity.render-pipelines.high-definition/Runtime/Sky/HDRISky/HDRISkyRenderer.cs index b95d0cc8f3e..7d26e2bc9d3 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Sky/HDRISky/HDRISkyRenderer.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/HDRISky/HDRISkyRenderer.cs @@ -1,3 +1,7 @@ +#if UNITY_EDITOR +using UnityEditor; +#endif + namespace UnityEngine.Rendering.HighDefinition { class HDRISkyRenderer : SkyRenderer @@ -149,8 +153,14 @@ public override void RenderSky(BuiltinSkyParameters builtinParams, bool renderFo m_SkyHDRIMaterial.SetVector(HDShaderIDs._FlowmapParam, flowmapParam); - scrollFactor += hdriSky.scrollSpeed.value * (Time.time - lastTime) * 0.01f; - lastTime = Time.time; +#if UNITY_EDITOR + // Time.time is not always updated in editor + float time = (float)EditorApplication.timeSinceStartup; +#else + float time = Time.time; +#endif + scrollFactor += hdriSky.scrollSpeed.value * (time - lastTime) * 0.01f; + lastTime = time; } else m_SkyHDRIMaterial.DisableKeyword("SKY_MOTION"); diff --git a/com.unity.template-hd/Packages/manifest.json b/com.unity.template-hd/Packages/manifest.json index c9118637ad5..8841455719d 100644 --- a/com.unity.template-hd/Packages/manifest.json +++ b/com.unity.template-hd/Packages/manifest.json @@ -1,11 +1,11 @@ { "dependencies": { - "com.unity.cinemachine": "2.6.1", + "com.unity.cinemachine": "2.6.3", "com.unity.ide.rider": "2.0.7", "com.unity.ide.visualstudio": "2.0.2", "com.unity.ide.vscode": "1.2.1", "com.unity.render-pipelines.high-definition": "10.1.0", - "com.unity.timeline": "1.4.2", + "com.unity.timeline": "1.4.3", "com.unity.ugui": "1.0.0", "com.unity.modules.ai": "1.0.0", "com.unity.modules.androidjni": "1.0.0",