浏览代码

Merge pull request #1766 from Unity-Technologies/HDRP/staging

Merge Hdrp/staging
/main
GitHub 7 年前
当前提交
0bf2f4dd
共有 28 个文件被更改,包括 1480 次插入2079 次删除
  1. 177
      TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9005_Decals-stress-test.unity
  2. 999
      TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/1401_StackLit.png
  3. 999
      TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/9005_Decals-stress-test.png
  4. 999
      TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/9201_Camera-relative-rendering.png
  5. 1
      com.unity.render-pipelines.high-definition/CHANGELOG.md
  6. 3
      com.unity.render-pipelines.high-definition/HDRP/Camera/HDAdditionalCameraData.cs
  7. 52
      com.unity.render-pipelines.high-definition/HDRP/Camera/HDCamera.cs
  8. 5
      com.unity.render-pipelines.high-definition/HDRP/Editor/Camera/HDCameraUI.cs
  9. 2
      com.unity.render-pipelines.high-definition/HDRP/Editor/Camera/SerializedHDCamera.cs
  10. 8
      com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/PlanarReflectionProbeUI.Handles.cs
  11. 2
      com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/SerializedHDReflectionProbe.cs
  12. 6
      com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/SerializedPlanarReflectionProbe.cs
  13. 4
      com.unity.render-pipelines.high-definition/HDRP/Editor/Sky/HDRISky/HDRISkyEditor.cs
  14. 5
      com.unity.render-pipelines.high-definition/HDRP/Editor/Sky/ProceduralSky/ProceduralSkyEditor.cs
  15. 40
      com.unity.render-pipelines.high-definition/HDRP/Editor/Sky/SkySettingsEditor.cs
  16. 2
      com.unity.render-pipelines.high-definition/HDRP/Lighting/LightLoop/LightLoop.cs
  17. 56
      com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/HDAdditionalReflectionData.cs
  18. 35
      com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/PlanarReflectionProbe.cs
  19. 16
      com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/ProbeWrapper.cs
  20. 48
      com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/HDRenderPipeline.cs
  21. 2
      com.unity.render-pipelines.high-definition/HDRP/Sky/HDRISky/HDRISkyRenderer.cs
  22. 25
      com.unity.render-pipelines.high-definition/HDRP/Sky/ProceduralSky/ProceduralSkyRenderer.cs
  23. 6
      com.unity.render-pipelines.high-definition/HDRP/Sky/SkyManager.cs
  24. 2
      com.unity.render-pipelines.high-definition/HDRP/Sky/SkyRenderer.cs
  25. 5
      com.unity.render-pipelines.high-definition/HDRP/Sky/SkyRenderingContext.cs
  26. 3
      com.unity.render-pipelines.high-definition/HDRP/Sky/SkySettings.cs
  27. 46
      com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/HDProbe.cs
  28. 11
      com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/HDProbe.cs.meta

177
TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9005_Decals-stress-test.unity


m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.07875386, g: 0.07704143, b: 0.066761576, a: 1}
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &74334710
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &127561052
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &173526623
GameObject:
m_ObjectHideFlags: 0

m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 4294967295
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 73c176f402d2c2f4d929aa5da7585d17, type: 2}
m_StaticBatchInfo:

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &225041350
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &243692027
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &250966354
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &260575850
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &286314541
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &294464788
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 0.16, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &332810623
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &338930937
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &341993383
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 0.16, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &369311313
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &374113650
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &399218098
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &404697366
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &414065951
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &435068001
GameObject:
m_ObjectHideFlags: 0

m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 4294967295
m_RendererPriority: 0
m_Materials:
- {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0}
m_StaticBatchInfo:

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &466355172
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &521922984
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &541365535
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &558484125
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &576360073
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &578980835
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &650886796
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 0.16, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &673193209
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 0.5, y: 0.5}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &691491257
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 0.16, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &723869257
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &730821749
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &748390694
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 35.9, y: 2.32}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &774909013
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &780717197
GameObject:
m_ObjectHideFlags: 0

m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 4294967295
m_RendererPriority: 0
m_Materials:
- {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0}
m_StaticBatchInfo:

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &792889985
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &800528687
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &853628977
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 0.16, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &858039326
GameObject:
m_ObjectHideFlags: 0

m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 4294967295
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 73c176f402d2c2f4d929aa5da7585d17, type: 2}
m_StaticBatchInfo:

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &916940777
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 0.16, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &928243931
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &970943824
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &993425094
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &1005978163
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &1046408022
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &1095346273
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 0.16, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &1112771833
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &1125739647
GameObject:
m_ObjectHideFlags: 0

serializedVersion: 3
m_Convex: 0
m_CookingOptions: 14
m_SkinWidth: 0.01
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &1125739649
MeshRenderer:

m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 4294967295
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 1667710fc698271409ff13c2d6a27dd4, type: 2}
m_StaticBatchInfo:

propertyPath: m_LocalEulerAnglesHint.x
value: 90
objectReference: {fileID: 0}
- target: {fileID: 20109210616973140, guid: c07ace9ab142ca9469fa377877c2f1e7,
type: 2}
- target: {fileID: 20109210616973140, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 2}
- target: {fileID: 20109210616973140, guid: c07ace9ab142ca9469fa377877c2f1e7,
type: 2}
- target: {fileID: 20109210616973140, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 2}
- target: {fileID: 20109210616973140, guid: c07ace9ab142ca9469fa377877c2f1e7,
type: 2}
- target: {fileID: 20109210616973140, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 2}
propertyPath: far clip plane
value: 80
objectReference: {fileID: 0}

m_UVScale: {x: 0.16, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &1254724135
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &1278989599
GameObject:
m_ObjectHideFlags: 0

m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 4294967295
m_RendererPriority: 0
m_Materials:
- {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0}
m_StaticBatchInfo:

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &1330830820
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &1359134011
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &1385914845
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &1388927182
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &1401264637
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &1417088810
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &1428726872
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &1430823196
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &1434343681
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &1461738263
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &1498584143
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 0.16, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &1563933641
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &1599307487
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &1599862839
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &1691808983
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &1697367095
GameObject:
m_ObjectHideFlags: 0

m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 4294967295
m_RendererPriority: 0
m_Materials:
- {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0}
m_StaticBatchInfo:

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &1761218374
GameObject:
m_ObjectHideFlags: 0

m_Name:
m_EditorClassIdentifier:
m_Profile: {fileID: 11400000, guid: 4f498417c99f5004da63865a022cb07d, type: 2}
m_BakingSkyUniqueID: 2
m_BakingSkyUniqueID: 1
--- !u!114 &1761218376
MonoBehaviour:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: c6c2871f720b2af4e9210febdac74517, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 1
m_Version: 1
shadowResolution: 512
shadowDimmer: 1
shadowFadeDistance: 10000

m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 1.1
version: 2
m_Version: 2
directionalIntensity: 3.1415927
punctualIntensity: 600
areaIntensity: 200

showAdditionalSettings: 0
displayLightIntensity: 3.1415927
displayAreaLightEmissiveMesh: 0
lightLayers: 1
--- !u!1 &1827502608
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &1878558920
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &1946326916
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &2003187185
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &2045259974
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &2058823762
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 0.16, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &2101771495
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &2109464410
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 0.16, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &2114125598
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &2121937319
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 0.16, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}
--- !u!1 &2125202485
GameObject:
m_ObjectHideFlags: 0

m_UVScale: {x: 1, y: 1}
m_UVBias: {x: 0, y: 0}
m_AffectsTransparency: 0
m_Offset: {x: 0, y: -0.5, z: 0}
m_Size: {x: 1, y: 1, z: 1}

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

999
TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/9005_Decals-stress-test.png
文件差异内容过多而无法显示
查看文件

999
TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/9201_Camera-relative-rendering.png
文件差异内容过多而无法显示
查看文件

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


- Decal material now supports draw order for decal projectors
- Added LightLayers support (Base on mask from renderers name RenderingLayers and mask from light name LightLayers - if they match, the light apply) - cost an extra GBuffer in deferred (more bandwidth)
- When LightLayers is enabled, the AmbientOclusion is store in the GBuffer in deferred path allowing to avoid double occlusion with SSAO. In forward the double occlusion is now always avoided.
- Added the possibility to add an override transform on the camera for volume interpolation
### Fixed
- Fixed an issue with PreIntegratedFGD texture being sometimes destroyed and not regenerated causing rendering to break

3
com.unity.render-pipelines.high-definition/HDRP/Camera/HDAdditionalCameraData.cs


public RenderingPath renderingPath = RenderingPath.Default;
[Tooltip("Layer Mask used for the volume interpolation for this camera.")]
public LayerMask volumeLayerMask = -1;
[Tooltip("Transform used for the volume interpolation for this camera.")]
public Transform volumeAnchorOverride;
// Physical parameters
public float aperture = 8f;

data.clearDepth = clearDepth;
data.renderingPath = renderingPath;
data.volumeLayerMask = volumeLayerMask;
data.volumeAnchorOverride = volumeAnchorOverride;
data.aperture = aperture;
data.shutterSpeed = shutterSpeed;
data.iso = iso;

52
com.unity.render-pipelines.high-definition/HDRP/Camera/HDCamera.cs


public Vector4 unity_OrthoParams;
public Vector4 projectionParams;
public Vector4 screenParams;
public int volumeLayerMask;
public Transform volumeAnchor;
public VolumetricLightingSystem.VBufferParameters[] vBufferParams; // Double-buffered

{
vlSys.UpdatePerCameraData(this);
}
UpdateVolumeParameters();
}
void UpdateVolumeParameters()
{
volumeAnchor = null;
volumeLayerMask = -1;
if (m_AdditionalCameraData != null)
{
volumeLayerMask = m_AdditionalCameraData.volumeLayerMask;
volumeAnchor = m_AdditionalCameraData.volumeAnchorOverride;
}
else
{
// Temporary hack:
// For scene view, by default, we use the "main" camera volume layer mask if it exists
// Otherwise we just remove the lighting override layers in the current sky to avoid conflicts
// This is arbitrary and should be editable in the scene view somehow.
if (camera.cameraType == CameraType.SceneView)
{
var mainCamera = Camera.main;
bool needFallback = true;
if (mainCamera != null)
{
var mainCamAdditionalData = mainCamera.GetComponent<HDAdditionalCameraData>();
if (mainCamAdditionalData != null)
{
volumeLayerMask = mainCamAdditionalData.volumeLayerMask;
volumeAnchor = mainCamAdditionalData.volumeAnchorOverride;
needFallback = false;
}
}
if (needFallback)
{
HDRenderPipeline hdPipeline = RenderPipelineManager.currentPipeline as HDRenderPipeline;
// If the override layer is "Everything", we fall-back to "Everything" for the current layer mask to avoid issues by having no current layer
// In practice we should never have "Everything" as an override mask as it does not make sense (a warning is issued in the UI)
if (hdPipeline.asset.renderPipelineSettings.lightLoopSettings.skyLightingOverrideLayerMask == -1)
volumeLayerMask = -1;
else
volumeLayerMask = (-1 & ~hdPipeline.asset.renderPipelineSettings.lightLoopSettings.skyLightingOverrideLayerMask);
}
}
}
// If no override is provided, use the camera transform.
if (volumeAnchor == null)
volumeAnchor = camera.transform;
}
// Stopgap method used to extract stereo combined matrix state.

5
com.unity.render-pipelines.high-definition/HDRP/Editor/Camera/HDCameraUI.cs


CED.Action(Drawer_FieldClearDepth),
CED.Action(Drawer_FieldCullingMask),
CED.Action(Drawer_FieldVolumeLayerMask),
CED.Action(Drawer_FieldVolumeAnchorOverride),
CED.space,
CED.Action(Drawer_Projection),
CED.Action(Drawer_FieldClippingPlanes),

static void Drawer_FieldVolumeLayerMask(HDCameraUI s, SerializedHDCamera p, Editor owner)
{
EditorGUILayout.PropertyField(p.volumeLayerMask, _.GetContent("Volume Layer Mask"));
}
static void Drawer_FieldVolumeAnchorOverride(HDCameraUI s, SerializedHDCamera p, Editor owner)
{
EditorGUILayout.PropertyField(p.volumeAnchorOverride, _.GetContent("Volume Anchor Override"));
}
static void Drawer_FieldCullingMask(HDCameraUI s, SerializedHDCamera p, Editor owner)

2
com.unity.render-pipelines.high-definition/HDRP/Editor/Camera/SerializedHDCamera.cs


public SerializedProperty renderingPath;
public SerializedProperty clearDepth;
public SerializedProperty volumeLayerMask;
public SerializedProperty volumeAnchorOverride;
public SerializedFrameSettings frameSettings;

renderingPath = serializedAdditionalDataObject.Find((HDAdditionalCameraData d) => d.renderingPath);
clearDepth = serializedAdditionalDataObject.Find((HDAdditionalCameraData d) => d.clearDepth);
volumeLayerMask = serializedAdditionalDataObject.Find((HDAdditionalCameraData d) => d.volumeLayerMask);
volumeAnchorOverride = serializedAdditionalDataObject.Find((HDAdditionalCameraData d) => d.volumeAnchorOverride);
frameSettings = new SerializedFrameSettings(serializedAdditionalDataObject.FindProperty("m_FrameSettings"));
}

8
com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/PlanarReflectionProbeUI.Handles.cs


Handles.matrix = m;
}
if (d.proxyVolumeReference != null)
ReflectionProxyVolumeComponentUI.DrawHandles_EditNone(s.reflectionProxyVolume, d.proxyVolumeReference);
if (d.proxyVolume != null)
ReflectionProxyVolumeComponentUI.DrawHandles_EditNone(s.reflectionProxyVolume, d.proxyVolume);
}
[DrawGizmo(GizmoType.Selected)]

}
}
if (d.proxyVolumeReference != null)
ReflectionProxyVolumeComponentUI.DrawGizmos_EditNone(s.reflectionProxyVolume, d.proxyVolumeReference);
if (d.proxyVolume != null)
ReflectionProxyVolumeComponentUI.DrawGizmos_EditNone(s.reflectionProxyVolume, d.proxyVolume);
var showFrustrum = s.showCaptureHandles
|| EditMode.editMode == EditCenter;

2
com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/SerializedHDReflectionProbe.cs


Apply();
}
proxyVolumeComponent = addso.Find((HDAdditionalReflectionData d) => d.proxyVolumeComponent);
proxyVolumeComponent = addso.Find((HDAdditionalReflectionData d) => d.proxyVolume);
}
public void Update()

6
com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/SerializedPlanarReflectionProbe.cs


{
this.serializedObject = serializedObject;
proxyVolumeReference = serializedObject.Find((PlanarReflectionProbe p) => p.proxyVolumeReference);
proxyVolumeReference = serializedObject.Find((PlanarReflectionProbe p) => p.proxyVolume);
influenceVolume = new SerializedInfluenceVolume(serializedObject.Find((PlanarReflectionProbe p) => p.influenceVolume));
captureLocalPosition = serializedObject.Find((PlanarReflectionProbe p) => p.captureLocalPosition);

var objs = new List<Object>();
for (var i = 0; i < serializedObject.targetObjects.Length; i++)
{
var p = ((PlanarReflectionProbe)serializedObject.targetObjects[i]).proxyVolumeReference;
var p = ((PlanarReflectionProbe)serializedObject.targetObjects[i]).proxyVolume;
if (p != null)
objs.Add(p);
}

var proxyVolumeTargets = reflectionProxyVolume.serializedObject.targetObjects;
for (var i = 0; i < serializedObject.targetObjects.Length; i++)
{
if (proxyVolumeTargets[i] != ((PlanarReflectionProbe)serializedObject.targetObjects[i]).proxyVolumeReference)
if (proxyVolumeTargets[i] != ((PlanarReflectionProbe)serializedObject.targetObjects[i]).proxyVolume)
{
updateProxyVolume = true;
break;

4
com.unity.render-pipelines.high-definition/HDRP/Editor/Sky/HDRISky/HDRISkyEditor.cs


{
base.OnEnable();
// HDRI sky does not have control over sun display.
m_CommonUIElementsMask = 0xFFFFFFFF & ~(uint)(SkySettingsUIElement.IncludeSunInBaking);
var o = new PropertyFetcher<HDRISky>(serializedObject);
m_hdriSky = Unpack(o.Find(x => x.hdriSky));
}

PropertyField(m_hdriSky);
EditorGUILayout.Space();
base.CommonSkySettingsGUI();
}
}

5
com.unity.render-pipelines.high-definition/HDRP/Editor/Sky/ProceduralSky/ProceduralSkyEditor.cs


{
base.OnEnable();
// Procedural sky orientation depends on the sun direction
m_CommonUIElementsMask = 0xFFFFFFFF & ~(uint)(SkySettingsUIElement.Rotation);
var o = new PropertyFetcher<ProceduralSky>(serializedObject);
m_SunSize = Unpack(o.Find(x => x.sunSize));

EditorGUILayout.Space();
base.CommonSkySettingsGUI(false);
base.CommonSkySettingsGUI();
}
}
}

40
com.unity.render-pipelines.high-definition/HDRP/Editor/Sky/SkySettingsEditor.cs


{
public abstract class SkySettingsEditor : VolumeComponentEditor
{
[System.Flags]
protected enum SkySettingsUIElement
{
Exposure = 1 << 0,
Multiplier = 1 << 1,
Rotation = 1 << 2,
UpdateMode = 1 << 3,
IncludeSunInBaking = 1 << 4
}
SerializedDataParameter m_IncludeSunInBaking;
protected uint m_CommonUIElementsMask = 0xFFFFFFFF;
public override void OnEnable()
{

m_SkyRotation = Unpack(o.Find(x => x.rotation));
m_EnvUpdateMode = Unpack(o.Find(x => x.updateMode));
m_EnvUpdatePeriod = Unpack(o.Find(x => x.updatePeriod));
m_IncludeSunInBaking = Unpack(o.Find(x => x.includeSunInBaking));
protected void CommonSkySettingsGUI(bool enableRotation = true)
protected void CommonSkySettingsGUI()
PropertyField(m_SkyExposure);
PropertyField(m_SkyMultiplier);
if (enableRotation)
if ((m_CommonUIElementsMask & (uint)SkySettingsUIElement.Exposure) != 0)
PropertyField(m_SkyExposure);
if ((m_CommonUIElementsMask & (uint)SkySettingsUIElement.Multiplier) != 0)
PropertyField(m_SkyMultiplier);
if ((m_CommonUIElementsMask & (uint)SkySettingsUIElement.Rotation) != 0)
PropertyField(m_EnvUpdateMode);
if (!m_EnvUpdateMode.value.hasMultipleDifferentValues && m_EnvUpdateMode.value.intValue == (int)EnvironementUpdateMode.Realtime)
if ((m_CommonUIElementsMask & (uint)SkySettingsUIElement.UpdateMode) != 0)
EditorGUI.indentLevel++;
PropertyField(m_EnvUpdatePeriod);
EditorGUI.indentLevel--;
PropertyField(m_EnvUpdateMode);
if (!m_EnvUpdateMode.value.hasMultipleDifferentValues && m_EnvUpdateMode.value.intValue == (int)EnvironementUpdateMode.Realtime)
{
EditorGUI.indentLevel++;
PropertyField(m_EnvUpdatePeriod);
EditorGUI.indentLevel--;
}
if ((m_CommonUIElementsMask & (uint)SkySettingsUIElement.IncludeSunInBaking) != 0)
PropertyField(m_IncludeSunInBaking);
}
}
}

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


var sinSpotOuterHalfAngle = Mathf.Sqrt(1.0f - cosSpotOuterHalfAngle * cosSpotOuterHalfAngle);
var cosSpotInnerHalfAngle = Mathf.Clamp(Mathf.Cos(spotAngle * 0.5f * innerConePercent * Mathf.Deg2Rad), 0.0f, 1.0f); // inner cone
var val = Mathf.Max(0.001f, (cosSpotInnerHalfAngle - cosSpotOuterHalfAngle));
var val = Mathf.Max(0.0001f, (cosSpotInnerHalfAngle - cosSpotOuterHalfAngle));
lightData.angleScale = 1.0f / val;
lightData.angleOffset = -cosSpotOuterHalfAngle * lightData.angleScale;

56
com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/HDAdditionalReflectionData.cs


using UnityEngine.Serialization;
using UnityEngine.Experimental.Rendering.HDPipeline;
using System;
using UnityEngine.Rendering;
public class HDAdditionalReflectionData : MonoBehaviour, ISerializationCallbackReceiver
public class HDAdditionalReflectionData : HDProbe, ISerializationCallbackReceiver
const int currentVersion = 1;
const int currentVersion = 2;
ReflectionProbe m_LegacyProbe;
ReflectionProbe legacyProbe { get { return m_LegacyProbe ?? (m_LegacyProbe = GetComponent<ReflectionProbe>()); } }
[FormerlySerializedAsAttribute("dimmer")]
public float multiplier = 1.0f;
[Range(0.0f, 1.0f)]
public float weight = 1.0f;
public float influenceSphereRadius = 3.0f;
public float sphereReprojectionVolumeRadius = 1.0f;
public bool useSeparateProjectionVolume = false;

[SerializeField] private float editorSimplifiedModeBlendNormalDistance;
[SerializeField] private bool editorAdvancedModeEnabled;
public ReflectionProxyVolumeComponent proxyVolumeComponent;
bool needMigrateToHDProbeChild = false;
public Vector3 boxBlendCenterOffset { get { return (blendDistanceNegative - blendDistancePositive) * 0.5f; } }
public Vector3 boxBlendSizeOffset { get { return -(blendDistancePositive + blendDistanceNegative); } }

if (m_Version != currentVersion)
{
// Add here data migration code
m_Version = currentVersion;
if (m_Version < 2)
{
needMigrateToHDProbeChild = true;
}
else
{
m_Version = currentVersion;
}
}
}
private void OnEnable()
{
if (needMigrateToHDProbeChild)
MigrateToHDProbeChild();
}
void MigrateToHDProbeChild()
{
mode = legacyProbe.mode;
refreshMode = legacyProbe.refreshMode;
m_Version = 2;
OnAfterDeserialize(); //continue migrating if needed
}
public override ReflectionProbeMode mode
{
set
{
base.mode = value;
legacyProbe.mode = value; //ensure compatibility till we capture without the legacy component
}
}
public override ReflectionProbeRefreshMode refreshMode
{
set
{
base.refreshMode = value;
legacyProbe.refreshMode = value; //ensure compatibility till we capture without the legacy component
}
}
}

35
com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/PlanarReflectionProbe.cs


namespace UnityEngine.Experimental.Rendering.HDPipeline
{
[ExecuteInEditMode]
public class PlanarReflectionProbe : MonoBehaviour, ISerializationCallbackReceiver
public class PlanarReflectionProbe : HDProbe, ISerializationCallbackReceiver
{
[HideInInspector]
const int currentVersion = 1;

}
[SerializeField]
ReflectionProxyVolumeComponent m_ProxyVolumeReference = null;
[SerializeField]
[FormerlySerializedAsAttribute("m_Dimmer")]
float m_Multiplier = 1.0f;
[SerializeField]
[Range(0.0f, 1.0f)]
float m_Weight = 1.0f;
[SerializeField]
ReflectionProbeMode m_Mode = ReflectionProbeMode.Baked;
[SerializeField]
ReflectionProbeRefreshMode m_RefreshMode = ReflectionProbeRefreshMode.OnAwake;
[SerializeField]
Texture m_CustomTexture;
[SerializeField]
Texture m_BakedTexture;

public bool overrideFieldOfView { get { return m_OverrideFieldOfView; } }
public float fieldOfViewOverride { get { return m_FieldOfViewOverride; } }
public ReflectionProxyVolumeComponent proxyVolumeReference { get { return m_ProxyVolumeReference; } }
public InfluenceVolume influenceVolume { get { return m_InfluenceVolume; } }
public BoundingSphere boundingSphere { get { return m_InfluenceVolume.GetBoundingSphereAt(transform); } }

{
switch (m_Mode)
switch (mode)
{
default:
case ReflectionProbeMode.Baked:

}
public Bounds bounds { get { return m_InfluenceVolume.GetBoundsAt(transform); } }
public Vector3 captureLocalPosition { get { return m_CaptureLocalPosition; } set { m_CaptureLocalPosition = value; } }
public float weight { get { return m_Weight; } }
public float multiplier { get { return m_Multiplier; } }
public ReflectionProbeMode mode { get { return m_Mode; } }
public Matrix4x4 influenceToWorld
{
get

public Texture customTexture { get { return m_CustomTexture; } set { m_CustomTexture = value; } }
public Texture bakedTexture { get { return m_BakedTexture; } set { m_BakedTexture = value; }}
public RenderTexture realtimeTexture { get { return m_RealtimeTexture; } internal set { m_RealtimeTexture = value; } }
public ReflectionProbeRefreshMode refreshMode { get { return m_RefreshMode; } }
public FrameSettings frameSettings { get { return m_FrameSettings; } }
public float captureNearPlane { get { return m_CaptureNearPlane; } }
public float captureFarPlane { get { return m_CaptureFarPlane; } }

{
get
{
return m_ProxyVolumeReference != null
? m_ProxyVolumeReference.transform.localToWorldMatrix
return proxyVolume != null
? proxyVolume.transform.localToWorldMatrix
: influenceToWorld;
}
}

{
return m_ProxyVolumeReference != null
? m_ProxyVolumeReference.proxyVolume.shapeType
return proxyVolume != null
? proxyVolume.proxyVolume.shapeType
: influenceVolume.shapeType;
}
}

{
return m_ProxyVolumeReference != null
? m_ProxyVolumeReference.proxyVolume.extents
return proxyVolume != null
? proxyVolume.proxyVolume.extents
public bool infiniteProjection { get { return m_ProxyVolumeReference != null && m_ProxyVolumeReference.proxyVolume.infiniteProjection; } }
public bool infiniteProjection { get { return proxyVolume != null && proxyVolume.proxyVolume.infiniteProjection; } }
public bool useMirrorPlane
{

16
com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/ProbeWrapper.cs


{
get
{
return additional.proxyVolumeComponent != null
? ConvertShape(additional.proxyVolumeComponent.proxyVolume.shapeType)
return additional.proxyVolume != null
? ConvertShape(additional.proxyVolume.proxyVolume.shapeType)
: influenceShapeType;
}
}

{
return additional.proxyVolumeComponent != null
? additional.proxyVolumeComponent.proxyVolume.extents
return additional.proxyVolume != null
? additional.proxyVolume.proxyVolume.extents
: influenceExtents;
}
}

get
{
return additional.proxyVolumeComponent != null
? additional.proxyVolumeComponent.proxyVolume.infiniteProjection
return additional.proxyVolume != null
? additional.proxyVolume.proxyVolume.infiniteProjection
: probe.boxProjection == 0;
}
}

get
{
return additional.proxyVolumeComponent != null
? additional.proxyVolumeComponent.transform.localToWorldMatrix
return additional.proxyVolume != null
? additional.proxyVolume.transform.localToWorldMatrix
: influenceToWorld;
}
}

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


{
CoreUtils.SetKeyword(cmd, "LIGHT_LAYERS", enableLightLayers);
cmd.SetGlobalInt(HDShaderIDs._EnableLightLayers, enableLightLayers ? 1 : 0);
}
}
public void ConfigureForDecal(CommandBuffer cmd)
{

m_CurrentDebugDisplaySettings = m_DebugDisplaySettings;
}
using (new ProfilingSample(cmd, "Volume Update", CustomSamplerId.VolumeUpdate.GetSampler()))
{
LayerMask layerMask = -1;
if (additionalCameraData != null)
{
layerMask = additionalCameraData.volumeLayerMask;
}
else
{
// Temporary hack:
// For scene view, by default, we use the "main" camera volume layer mask if it exists
// Otherwise we just remove the lighting override layers in the current sky to avoid conflicts
// This is arbitrary and should be editable in the scene view somehow.
if (camera.cameraType == CameraType.SceneView)
{
var mainCamera = Camera.main;
bool needFallback = true;
if (mainCamera != null)
{
var mainCamAdditionalData = mainCamera.GetComponent<HDAdditionalCameraData>();
if (mainCamAdditionalData != null)
{
layerMask = mainCamAdditionalData.volumeLayerMask;
needFallback = false;
}
}
if (needFallback)
{
// If the override layer is "Everything", we fall-back to "Everything" for the current layer mask to avoid issues by having no current layer
// In practice we should never have "Everything" as an override mask as it does not make sense (a warning is issued in the UI)
if (m_Asset.renderPipelineSettings.lightLoopSettings.skyLightingOverrideLayerMask == -1)
layerMask = -1;
else
layerMask = (-1 & ~m_Asset.renderPipelineSettings.lightLoopSettings.skyLightingOverrideLayerMask);
}
}
}
VolumeManager.instance.Update(camera.transform, layerMask);
}
var postProcessLayer = camera.GetComponent<PostProcessLayer>();
// Disable post process if we enable debug mode or if the post process layer is disabled

// From this point, we should only use frame settings from the camera
hdCamera.Update(currentFrameSettings, postProcessLayer, m_VolumetricLightingSystem);
using (new ProfilingSample(cmd, "Volume Update", CustomSamplerId.VolumeUpdate.GetSampler()))
{
VolumeManager.instance.Update(hdCamera.volumeAnchor, hdCamera.volumeLayerMask);
}
Resize(hdCamera);

2
com.unity.render-pipelines.high-definition/HDRP/Sky/HDRISky/HDRISkyRenderer.cs


}
}
public override void RenderSky(BuiltinSkyParameters builtinParams, bool renderForCubemap)
public override void RenderSky(BuiltinSkyParameters builtinParams, bool renderForCubemap, bool renderSunDisk)
{
m_SkyHDRIMaterial.SetTexture(HDShaderIDs._Cubemap, m_HdriSkyParams.hdriSky);
m_SkyHDRIMaterial.SetVector(HDShaderIDs._SkyParam, new Vector4(GetExposure(m_HdriSkyParams, builtinParams.debugSettings), m_HdriSkyParams.multiplier, -m_HdriSkyParams.rotation, 0.0f)); // -rotation to match Legacy...

25
com.unity.render-pipelines.high-definition/HDRP/Sky/ProceduralSky/ProceduralSkyRenderer.cs


}
}
public override void RenderSky(BuiltinSkyParameters builtinParams, bool renderForCubemap)
public override void RenderSky(BuiltinSkyParameters builtinParams, bool renderForCubemap, bool renderSunDisk)
// Default values when no sun is provided
float sunSize = 0.0f;
sunSize = m_ProceduralSkyParams.sunSize;
m_ProceduralSkyMaterial.SetVector(HDShaderIDs._SkyParam, new Vector4(GetExposure(m_ProceduralSkyParams, builtinParams.debugSettings), m_ProceduralSkyParams.multiplier, 0.0f, 0.0f));
m_ProceduralSkyMaterial.SetFloat(_SunSizeParam, m_ProceduralSkyParams.sunSize);
m_ProceduralSkyMaterial.SetFloat(_SunSizeConvergenceParam, m_ProceduralSkyParams.sunSizeConvergence);
m_ProceduralSkyMaterial.SetFloat(_AtmoshpereThicknessParam, m_ProceduralSkyParams.atmosphereThickness);
m_ProceduralSkyMaterial.SetColor(_SkyTintParam, m_ProceduralSkyParams.skyTint);
m_ProceduralSkyMaterial.SetColor(_GroundColorParam, m_ProceduralSkyParams.groundColor);
m_ProceduralSkyMaterial.SetColor(_SunColorParam, sunColor);
m_ProceduralSkyMaterial.SetVector(_SunDirectionParam, sunDirection);
if (!renderSunDisk)
sunSize = 0.0f;
// This matrix needs to be updated at the draw call frequency.
m_PropertyBlock.SetVector(HDShaderIDs._SkyParam, new Vector4(GetExposure(m_ProceduralSkyParams, builtinParams.debugSettings), m_ProceduralSkyParams.multiplier, 0.0f, 0.0f));
m_PropertyBlock.SetFloat(_SunSizeParam, sunSize);
m_PropertyBlock.SetFloat(_SunSizeConvergenceParam, m_ProceduralSkyParams.sunSizeConvergence);
m_PropertyBlock.SetFloat(_AtmoshpereThicknessParam, m_ProceduralSkyParams.atmosphereThickness);
m_PropertyBlock.SetColor(_SkyTintParam, m_ProceduralSkyParams.skyTint);
m_PropertyBlock.SetColor(_GroundColorParam, m_ProceduralSkyParams.groundColor);
m_PropertyBlock.SetColor(_SunColorParam, sunColor);
m_PropertyBlock.SetVector(_SunDirectionParam, sunDirection);
m_PropertyBlock.SetMatrix(HDShaderIDs._PixelCoordToViewDirWS, builtinParams.pixelCoordToViewDirMatrix);
CoreUtils.DrawFullScreen(builtinParams.commandBuffer, m_ProceduralSkyMaterial, m_PropertyBlock, renderForCubemap ? 0 : 1);

6
com.unity.render-pipelines.high-definition/HDRP/Sky/SkyManager.cs


m_BakingSky.skySettings = SkyManager.GetBakingSkySettings();
// Update needs to happen before testing if the component is active other internal data structure are not properly updated yet.
VolumeManager.instance.Update(m_LightingOverrideVolumeStack, hdCamera.camera.transform, m_LightingOverrideLayerMask);
VolumeManager.instance.Update(m_LightingOverrideVolumeStack, hdCamera.volumeAnchor, m_LightingOverrideLayerMask);
if (VolumeManager.instance.IsComponentActiveInMask<VisualEnvironment>(m_LightingOverrideLayerMask))
{
SkySettings newSkyOverride = GetSkySetting(m_LightingOverrideVolumeStack);

m_NeedUpdateRealtimeEnv = false;
}
// For the baking sky, we don't want to take the sun into account because we usually won't include it (this would cause double highlight in the reflection for example).
// So we pass null so that's it doesn't affect the hash and the rendering.
m_NeedUpdateBakingSky = m_BakingSkyRenderingContext.UpdateEnvironment(m_BakingSky, camera, null, m_UpdateRequired, cmd);
m_NeedUpdateBakingSky = m_BakingSkyRenderingContext.UpdateEnvironment(m_BakingSky, camera, sunLight, m_UpdateRequired, cmd);
SkyUpdateContext currentSky = m_LightingOverrideSky.IsValid() ? m_LightingOverrideSky : m_VisualSky;
m_NeedUpdateRealtimeEnv = m_SkyRenderingContext.UpdateEnvironment(currentSky, camera, sunLight, m_UpdateRequired, cmd);

2
com.unity.render-pipelines.high-definition/HDRP/Sky/SkyRenderer.cs


public abstract void Cleanup();
public abstract void SetRenderTargets(BuiltinSkyParameters builtinParams);
// renderForCubemap: When rendering into a cube map, no depth buffer is available so user has to make sure not to use depth testing or the depth texture.
public abstract void RenderSky(BuiltinSkyParameters builtinParams, bool renderForCubemap);
public abstract void RenderSky(BuiltinSkyParameters builtinParams, bool renderForCubemap, bool renderSunDisk);
public abstract bool IsValid();
protected float GetExposure(SkySettings skySettings, DebugDisplaySettings debugSettings)

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


m_BuiltinParameters.hdCamera = null;
CoreUtils.SetRenderTarget(m_BuiltinParameters.commandBuffer, m_SkyboxCubemapRT, ClearFlag.None, 0, (CubemapFace)i);
skyContext.renderer.RenderSky(m_BuiltinParameters, true);
skyContext.renderer.RenderSky(m_BuiltinParameters, true, skyContext.skySettings.includeSunInBaking);
}
// Generate mipmap for our cubemap

m_BuiltinParameters.debugSettings = debugSettings;
skyContext.renderer.SetRenderTargets(m_BuiltinParameters);
skyContext.renderer.RenderSky(m_BuiltinParameters, false);
// When rendering the visual sky for reflection probes, we need to remove the sun disk if skySettings.includeSunInBaking is false.
skyContext.renderer.RenderSky(m_BuiltinParameters, false, hdCamera.camera.cameraType != CameraType.Reflection || skyContext.skySettings.includeSunInBaking);
}
}
}

3
com.unity.render-pipelines.high-definition/HDRP/Sky/SkySettings.cs


public EnvUpdateParameter updateMode = new EnvUpdateParameter(EnvironementUpdateMode.OnChanged);
[Tooltip("If environment update is set to realtime, period in seconds at which it is updated (0.0 means every frame).")]
public MinFloatParameter updatePeriod = new MinFloatParameter(0.0f, 0.0f);
[Tooltip("If set to true, the sun disk will be used in baked lighting (ambient and reflection probes).")]
public BoolParameter includeSunInBaking = new BoolParameter(false);
// Unused for now. In the future we might want to expose this option for very high range skies.
bool m_useMIS = false;

//<<<
hash = hash * 23 + updatePeriod.GetHashCode();
hash = hash * 23 + includeSunInBaking.GetHashCode();
return hash;
}
}

46
com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/HDProbe.cs


using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Serialization;
namespace UnityEngine.Experimental.Rendering.HDPipeline
{
public abstract class HDProbe : MonoBehaviour
{
[SerializeField, FormerlySerializedAs("proxyVolumeComponent"), FormerlySerializedAs("m_ProxyVolumeReference")]
ReflectionProxyVolumeComponent m_ProxyVolume = null;
[SerializeField, FormerlySerializedAsAttribute("dimmer"), FormerlySerializedAsAttribute("m_Dimmer"), FormerlySerializedAsAttribute("multiplier")]
float m_Multiplier = 1.0f;
[SerializeField, FormerlySerializedAsAttribute("weight")]
[Range(0.0f, 1.0f)]
float m_Weight = 1.0f;
[SerializeField]
ReflectionProbeMode m_Mode = ReflectionProbeMode.Baked;
[SerializeField]
ReflectionProbeRefreshMode m_RefreshMode = ReflectionProbeRefreshMode.OnAwake;
/// <summary>ProxyVolume currently used by this probe.</summary>
public ReflectionProxyVolumeComponent proxyVolume { get { return m_ProxyVolume; } }
/// <summary>Multiplier factor of reflection (non PBR parameter).</summary>
public float multiplier { get { return m_Multiplier; } }
/// <summary>Weight for blending amongst probes (non PBR parameter).</summary>
public float weight { get { return m_Weight; } }
/// <summary>The capture mode.</summary>
public virtual ReflectionProbeMode mode
{
get { return m_Mode; }
set { m_Mode = value; }
}
/// <summary>Refreshing rate of the capture for Realtime capture mode.</summary>
public virtual ReflectionProbeRefreshMode refreshMode
{
get { return m_RefreshMode; }
set { m_RefreshMode = value; }
}
}
}

11
com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/HDProbe.cs.meta


fileFormatVersion: 2
guid: 843017cb1cb3fa441a28e5a674bfea8e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存