浏览代码
Merge branch 'master' of https://github.com/Unity-Technologies/ScriptableRenderPipeline into gpu-terrain
/main
Merge branch 'master' of https://github.com/Unity-Technologies/ScriptableRenderPipeline into gpu-terrain
/main
Yao Xiao Ling
6 年前
当前提交
6302a183
共有 311 个文件被更改,包括 5002 次插入 和 2591 次删除
-
2README.md
-
999TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/2203_PlanarProbes.png
-
999TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/2207_ReflectionProbeVFace.png
-
3TestProjects/HDRP_Tests/ProjectSettings/EditorBuildSettings.asset
-
3TestProjects/LWGraphicsTest/ProjectSettings/EditorBuildSettings.asset
-
29com.unity.render-pipelines.core/CoreRP/Editor/CoreEditorUtils.cs
-
4com.unity.render-pipelines.core/CoreRP/ShaderLibrary/ImageBasedLighting.hlsl
-
2com.unity.render-pipelines.high-definition/CHANGELOG.md
-
6com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/HDLightEditor.cs
-
3com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/EditorReflectionSystem.cs
-
2com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDReflectionProbeEditor.Gizmos.cs
-
34com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDReflectionProbeEditor.Preview.cs
-
2com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDReflectionProbeEditor.ProbeUtility.cs
-
133com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDReflectionProbeEditor.cs
-
532com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDReflectionProbeUI.Drawers.cs
-
102com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDReflectionProbeUI.cs
-
89com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/PlanarReflectionProbeEditor.cs
-
2com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/PlanarReflectionProbeEditor.cs.meta
-
212com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/PlanarReflectionProbeUI.Handles.cs
-
2com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/PlanarReflectionProbeUI.Handles.cs.meta
-
121com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/PlanarReflectionProbeUI.cs
-
2com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/PlanarReflectionProbeUI.cs.meta
-
109com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/SerializedHDReflectionProbe.cs
-
81com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/SerializedPlanarReflectionProbe.cs
-
163com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/Volume/InfluenceVolumeUI.Drawers.cs
-
311com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/Volume/InfluenceVolumeUI.Handles.cs
-
20com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/Volume/InfluenceVolumeUI.cs
-
135com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/Volume/ProxyVolumeUI.cs
-
9com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/Volume/ReflectionProxyVolumeComponentUI.cs
-
29com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/Volume/SerializedInfluenceVolume.cs
-
1com.unity.render-pipelines.high-definition/HDRP/Lighting/LightDefinition.cs
-
1com.unity.render-pipelines.high-definition/HDRP/Lighting/LightDefinition.cs.hlsl
-
1com.unity.render-pipelines.high-definition/HDRP/Lighting/LightLoop/LightLoop.cs
-
14com.unity.render-pipelines.high-definition/HDRP/Lighting/LightLoop/LightLoop.hlsl
-
1com.unity.render-pipelines.high-definition/HDRP/Lighting/LightLoop/LightLoopDef.hlsl
-
61com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/HDAdditionalReflectionData.cs
-
36com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/HDProbe.cs
-
19com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/PlanarReflectionProbe.cs
-
34com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/ProbeWrapper.cs
-
10com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/ReflectionSystem.cs
-
167com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/ReflectionSystemInternal.cs
-
14com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/ReflectionSystemParameters.cs
-
16com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/Volumes/InfluenceVolume.cs
-
8com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/HDRenderPipeline.cs
-
4com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/HDRenderPipelineAsset.cs
-
12com.unity.render-pipelines.lightweight/CHANGELOG.md
-
97com.unity.render-pipelines.lightweight/LWRP/DefaultRendererSetup.cs
-
2com.unity.render-pipelines.lightweight/LWRP/Editor/ShaderGUI/LightweightShaderGUI.cs
-
2com.unity.render-pipelines.lightweight/LWRP/IRendererSetup.cs
-
1com.unity.render-pipelines.lightweight/LWRP/LightweightAdditionalCameraData.cs
-
277com.unity.render-pipelines.lightweight/LWRP/LightweightPipeline.cs
-
2com.unity.render-pipelines.lightweight/LWRP/Passes/BeginXRRenderingPass.cs
-
4com.unity.render-pipelines.lightweight/LWRP/Passes/CopyColorPass.cs
-
8com.unity.render-pipelines.lightweight/LWRP/Passes/CopyDepthPass.cs
-
4com.unity.render-pipelines.lightweight/LWRP/Passes/CreateLightweightRenderTexturesPass.cs
-
6com.unity.render-pipelines.lightweight/LWRP/Passes/DepthOnlyPass.cs
-
2com.unity.render-pipelines.lightweight/LWRP/Passes/DirectionalShadowsPass.cs
-
21com.unity.render-pipelines.lightweight/LWRP/Passes/DrawSkyboxPass.cs
-
2com.unity.render-pipelines.lightweight/LWRP/Passes/EndXRRenderingPass.cs
-
2com.unity.render-pipelines.lightweight/LWRP/Passes/FinalBlitPass.cs
-
14com.unity.render-pipelines.lightweight/LWRP/Passes/LightweightForwardPass.cs
-
2com.unity.render-pipelines.lightweight/LWRP/Passes/LocalShadowsPass.cs
-
2com.unity.render-pipelines.lightweight/LWRP/Passes/OpaquePostProcessPass.cs
-
2com.unity.render-pipelines.lightweight/LWRP/Passes/RenderOpaqueForwardPass.cs
-
2com.unity.render-pipelines.lightweight/LWRP/Passes/RenderTransparentForwardPass.cs
-
2com.unity.render-pipelines.lightweight/LWRP/Passes/SceneViewDepthCopy.cs
-
2com.unity.render-pipelines.lightweight/LWRP/Passes/ScreenSpaceShadowResolvePass.cs
-
2com.unity.render-pipelines.lightweight/LWRP/Passes/ScriptableRenderPass.cs
-
2com.unity.render-pipelines.lightweight/LWRP/Passes/SetupForwardRenderingPass.cs
-
50com.unity.render-pipelines.lightweight/LWRP/Passes/SetupLightweightConstanstPass.cs
-
10com.unity.render-pipelines.lightweight/LWRP/Passes/TransparentPostProcessPass.cs
-
15com.unity.render-pipelines.lightweight/LWRP/ShaderLibrary/Core.hlsl
-
9com.unity.render-pipelines.lightweight/LWRP/ShaderLibrary/Input.hlsl
-
2com.unity.render-pipelines.lightweight/LWRP/ScriptableRenderer.cs.meta
-
15com.unity.render-pipelines.lightweight/LWRP/ScriptableRenderer.cs
-
26com.unity.testing.srp.lightweight/Tests/Scenes/028_PostProcessing_Custom/Scripts/InvertOpaque.cs
-
8com.unity.testing.srp.lightweight/Tests/Scenes/045_CustomLWPipe/CustomLWPipe.cs
-
447TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1213_Lit_Anisotropy.unity
-
7TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1213_Lit_Anisotropy.unity.meta
-
8TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1213_Lit_anisotropy.meta
-
1001TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/1213_Lit_Anisotropy.png
-
88TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/1213_Lit_Anisotropy.png.meta
-
23com.unity.render-pipelines.core/CoreRP/Editor/SettingsDisableScope.cs
-
11com.unity.render-pipelines.core/CoreRP/Editor/SettingsDisableScope.cs.meta
-
80com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDProbeEditor.cs
-
11com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDProbeEditor.cs.meta
-
45com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDProbeUI.ContextualMenu.cs
-
11com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDProbeUI.ContextualMenu.cs.meta
-
304com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDProbeUI.Drawers.cs
-
11com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDProbeUI.Drawers.cs.meta
-
101com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDProbeUI.Handles.cs
-
11com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDProbeUI.Handles.cs.meta
-
80com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDProbeUI.Skin.cs
-
11com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDProbeUI.Skin.cs.meta
-
90com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDProbeUI.cs
-
11com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDProbeUI.cs.meta
-
61com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/SerializedHDProbe.cs
-
11com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/SerializedHDProbe.cs.meta
-
36com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/Volume/InfluenceVolumeUI.Skin.cs
999
TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/2203_PlanarProbes.png
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
999
TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/2207_ReflectionProbeVFace.png
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
using System; |
|||
using UnityEditor.AnimatedValues; |
|||
using UnityEngine.Events; |
|||
using UnityEngine.Experimental.Rendering.HDPipeline; |
|||
using UnityEngine.Rendering; |
|||
|
|||
partial class PlanarReflectionProbeUI : BaseUI<SerializedPlanarReflectionProbe> |
|||
using UnityEngine; |
|||
using UnityEngine.Experimental.Rendering.HDPipeline; |
|||
using UnityEngine.Rendering; |
|||
using CED = CoreEditorDrawer<HDProbeUI, SerializedHDProbe>; |
|||
|
|||
partial class PlanarReflectionProbeUI : HDProbeUI |
|||
const int k_AnimBoolFields = 6; |
|||
static readonly int k_ReflectionProbeModeModeCount = Enum.GetValues(typeof(ReflectionProbeMode)).Length; |
|||
static readonly int k_AnimBoolTotal = k_AnimBoolFields + k_ReflectionProbeModeModeCount; |
|||
static readonly GUIContent overrideFieldOfViewContent = CoreEditorUtils.GetContent("Override Field Of View"); |
|||
static readonly GUIContent fieldOfViewSolidAngleContent = CoreEditorUtils.GetContent("Field Of View"); |
|||
public InfluenceVolumeUI influenceVolume = new InfluenceVolumeUI(); |
|||
public FrameSettingsUI frameSettings = new FrameSettingsUI(); |
|||
public ReflectionProxyVolumeComponentUI reflectionProxyVolume = new ReflectionProxyVolumeComponentUI(); |
|||
public static CED.IDrawer Inspector; |
|||
|
|||
public static readonly CED.IDrawer SectionFoldoutCaptureSettings = CED.FoldoutGroup( |
|||
"Capture Settings", |
|||
(s, d, o) => s.isSectionExpandedCaptureSettings, |
|||
FoldoutOption.Indent, |
|||
CED.Action(Drawer_SectionCaptureSettings) |
|||
); |
|||
public AnimBool isSectionExpandedInfluenceSettings { get { return m_AnimBools[k_ReflectionProbeModeModeCount]; } } |
|||
public AnimBool isSectionExpandedCaptureSettings { get { return m_AnimBools[k_ReflectionProbeModeModeCount + 1]; } } |
|||
|
|||
public AnimBool isSectionExpandedCaptureMirrorSettings { get { return m_AnimBools[k_ReflectionProbeModeModeCount + 2]; } } |
|||
public AnimBool isSectionExpandedCaptureStaticSettings { get { return m_AnimBools[k_ReflectionProbeModeModeCount + 3]; } } |
|||
public AnimBool isSectionExpendedProxyVolume { get { return m_AnimBools[k_ReflectionProbeModeModeCount + 4]; } } |
|||
public AnimBool isSectionExpendedAdditionalSettings { get { return m_AnimBools[k_ReflectionProbeModeModeCount + 5]; } } |
|||
|
|||
public bool showCaptureHandles { get; set; } |
|||
|
|||
public PlanarReflectionProbeUI() |
|||
: base(k_AnimBoolTotal) |
|||
static PlanarReflectionProbeUI() |
|||
isSectionExpandedInfluenceSettings.value = true; |
|||
isSectionExpandedCaptureSettings.value = true; |
|||
isSectionExpendedProxyVolume.value = true; |
|||
isSectionExpendedAdditionalSettings.value = false; |
|||
Inspector = CED.Group( |
|||
CED.Action(Drawer_Toolbars), |
|||
CED.space, |
|||
ProxyVolumeSettings, |
|||
CED.Select( |
|||
(s, d, o) => s.influenceVolume, |
|||
(s, d, o) => d.influenceVolume, |
|||
InfluenceVolumeUI.SectionFoldoutShapePlanar |
|||
), |
|||
CED.Action(Drawer_DifferentShapeError), |
|||
SectionFoldoutCaptureSettings, |
|||
SectionFoldoutAdditionalSettings, |
|||
CED.Select( |
|||
(s, d, o) => s.frameSettings, |
|||
(s, d, o) => d.frameSettings, |
|||
FrameSettingsUI.Inspector |
|||
), |
|||
CED.space, |
|||
CED.Action(Drawer_SectionBakeButton) |
|||
); |
|||
public AnimBool IsSectionExpandedReflectionProbeMode(ReflectionProbeMode mode) |
|||
protected static void Drawer_SectionCaptureSettings(HDProbeUI s, SerializedHDProbe d, Editor o) |
|||
return m_AnimBools[(int)mode]; |
|||
SerializedPlanarReflectionProbe serialized = (SerializedPlanarReflectionProbe)d; |
|||
var hdrp = GraphicsSettings.renderPipelineAsset as HDRenderPipelineAsset; |
|||
GUI.enabled = false; |
|||
EditorGUILayout.LabelField( |
|||
CoreEditorUtils.GetContent("Probe Texture Size (Set By HDRP)"), |
|||
CoreEditorUtils.GetContent(hdrp.renderPipelineSettings.lightLoopSettings.planarReflectionTextureSize.ToString()), |
|||
EditorStyles.label); |
|||
EditorGUILayout.Toggle( |
|||
CoreEditorUtils.GetContent("Probe Compression (Set By HDRP)"), |
|||
hdrp.renderPipelineSettings.lightLoopSettings.planarReflectionCacheCompressed); |
|||
GUI.enabled = true; |
|||
|
|||
bool on = serialized.overrideFieldOfView.boolValue; |
|||
EditorGUI.BeginChangeCheck(); |
|||
on = EditorGUILayout.Toggle(overrideFieldOfViewContent, on); |
|||
if (on) |
|||
{ |
|||
serialized.fieldOfViewOverride.floatValue = EditorGUILayout.FloatField(fieldOfViewSolidAngleContent, serialized.fieldOfViewOverride.floatValue); |
|||
} |
|||
if (EditorGUI.EndChangeCheck()) |
|||
{ |
|||
serialized.overrideFieldOfView.boolValue = on; |
|||
serialized.Apply(); |
|||
} |
|||
|
|||
//GUI.enabled = false;
|
|||
//EditorGUILayout.LabelField(resolutionContent, CoreEditorUtils.GetContent(((int)hdrp.GetRenderPipelineSettings().lightLoopSettings.reflectionCubemapSize).ToString()));
|
|||
//EditorGUILayout.LabelField(shadowDistanceContent, EditorStyles.label);
|
|||
//EditorGUILayout.LabelField(cullingMaskContent, EditorStyles.label);
|
|||
//EditorGUILayout.LabelField(useOcclusionCullingContent, EditorStyles.label);
|
|||
//EditorGUILayout.LabelField(nearClipCullingContent, EditorStyles.label);
|
|||
//EditorGUILayout.LabelField(farClipCullingContent, EditorStyles.label);
|
|||
//GUI.enabled = true;
|
|||
public override void Reset(SerializedPlanarReflectionProbe data, UnityAction repaint) |
|||
internal PlanarReflectionProbeUI() |
|||
reflectionProxyVolume.Reset(data.reflectionProxyVolume, repaint); |
|||
frameSettings.Reset(data.frameSettings, repaint); |
|||
influenceVolume.Reset(data.influenceVolume, repaint); |
|||
base.Reset(data, repaint); |
|||
toolBars = new[] { ToolBar.InfluenceShape | ToolBar.Blend }; |
|||
for (var i = 0; i < k_ReflectionProbeModeModeCount; i++) |
|||
m_AnimBools[i].target = i == data.mode.intValue; |
|||
|
|||
isSectionExpandedCaptureMirrorSettings.target = data.isMirrored; |
|||
isSectionExpandedCaptureStaticSettings.target = !data.isMirrored; |
|||
|
|||
reflectionProxyVolume.Update(); |
|||
frameSettings.Update(); |
|||
influenceVolume.Update(); |
|||
SerializedPlanarReflectionProbe serialized = data as SerializedPlanarReflectionProbe; |
|||
isSectionExpandedCaptureMirrorSettings.target = serialized.isMirrored; |
|||
isSectionExpandedCaptureStaticSettings.target = !serialized.isMirrored; |
|||
base.Update(); |
|||
} |
|||
} |
|
|||
using UnityEngine.Rendering; |
|||
|
|||
public override void Execute(LightweightForwardRenderer renderer, ref ScriptableRenderContext context, |
|||
|
|||
private RenderTargetHandle colorAttachmentHandle { get; set; } |
|||
private RenderTargetHandle depthAttachmentHandle { get; set; } |
|||
|
|||
public void Setup(RenderTargetHandle colorHandle, RenderTargetHandle depthHandle) |
|||
{ |
|||
this.colorAttachmentHandle = colorHandle; |
|||
this.depthAttachmentHandle = depthHandle; |
|||
} |
|||
|
|||
public override void Execute(ScriptableRenderer renderer, ref ScriptableRenderContext context, |
|||
|
|||
CommandBuffer cmd = CommandBufferPool.Get("Draw Skybox (Set RT's)"); |
|||
cmd.SetRenderTarget(colorAttachmentHandle.Identifier(), depthAttachmentHandle.Identifier()); |
|||
context.ExecuteCommandBuffer(cmd); |
|||
CommandBufferPool.Release(cmd); |
|||
|
|||
|
|||
} |
|||
} |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!29 &1 |
|||
OcclusionCullingSettings: |
|||
m_ObjectHideFlags: 0 |
|||
serializedVersion: 2 |
|||
m_OcclusionBakeSettings: |
|||
smallestOccluder: 5 |
|||
smallestHole: 0.25 |
|||
backfaceThreshold: 100 |
|||
m_SceneGUID: 00000000000000000000000000000000 |
|||
m_OcclusionCullingData: {fileID: 0} |
|||
--- !u!104 &2 |
|||
RenderSettings: |
|||
m_ObjectHideFlags: 0 |
|||
serializedVersion: 9 |
|||
m_Fog: 0 |
|||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} |
|||
m_FogMode: 3 |
|||
m_FogDensity: 0.01 |
|||
m_LinearFogStart: 0 |
|||
m_LinearFogEnd: 300 |
|||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} |
|||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} |
|||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} |
|||
m_AmbientIntensity: 1 |
|||
m_AmbientMode: 0 |
|||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} |
|||
m_SkyboxMaterial: {fileID: 0} |
|||
m_HaloStrength: 0.5 |
|||
m_FlareStrength: 1 |
|||
m_FlareFadeSpeed: 3 |
|||
m_HaloTexture: {fileID: 0} |
|||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} |
|||
m_DefaultReflectionMode: 0 |
|||
m_DefaultReflectionResolution: 128 |
|||
m_ReflectionBounces: 1 |
|||
m_ReflectionIntensity: 1 |
|||
m_CustomReflection: {fileID: 0} |
|||
m_Sun: {fileID: 0} |
|||
m_IndirectSpecularColor: {r: 0.13314511, g: 0.18438525, b: 0.2460813, a: 1} |
|||
m_UseRadianceAmbientProbe: 0 |
|||
--- !u!157 &3 |
|||
LightmapSettings: |
|||
m_ObjectHideFlags: 0 |
|||
serializedVersion: 11 |
|||
m_GIWorkflowMode: 1 |
|||
m_GISettings: |
|||
serializedVersion: 2 |
|||
m_BounceScale: 1 |
|||
m_IndirectOutputScale: 1 |
|||
m_AlbedoBoost: 1 |
|||
m_TemporalCoherenceThreshold: 1 |
|||
m_EnvironmentLightingMode: 0 |
|||
m_EnableBakedLightmaps: 1 |
|||
m_EnableRealtimeLightmaps: 1 |
|||
m_LightmapEditorSettings: |
|||
serializedVersion: 10 |
|||
m_Resolution: 2 |
|||
m_BakeResolution: 40 |
|||
m_AtlasSize: 1024 |
|||
m_AO: 0 |
|||
m_AOMaxDistance: 1 |
|||
m_CompAOExponent: 1 |
|||
m_CompAOExponentDirect: 0 |
|||
m_Padding: 2 |
|||
m_LightmapParameters: {fileID: 0} |
|||
m_LightmapsBakeMode: 1 |
|||
m_TextureCompression: 1 |
|||
m_FinalGather: 0 |
|||
m_FinalGatherFiltering: 1 |
|||
m_FinalGatherRayCount: 256 |
|||
m_ReflectionCompression: 2 |
|||
m_MixedBakeMode: 2 |
|||
m_BakeBackend: 1 |
|||
m_PVRSampling: 1 |
|||
m_PVRDirectSampleCount: 32 |
|||
m_PVRSampleCount: 500 |
|||
m_PVRBounces: 2 |
|||
m_PVRFilterTypeDirect: 0 |
|||
m_PVRFilterTypeIndirect: 0 |
|||
m_PVRFilterTypeAO: 0 |
|||
m_PVRFilteringMode: 1 |
|||
m_PVRCulling: 1 |
|||
m_PVRFilteringGaussRadiusDirect: 1 |
|||
m_PVRFilteringGaussRadiusIndirect: 5 |
|||
m_PVRFilteringGaussRadiusAO: 2 |
|||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5 |
|||
m_PVRFilteringAtrousPositionSigmaIndirect: 2 |
|||
m_PVRFilteringAtrousPositionSigmaAO: 1 |
|||
m_ShowResolutionOverlay: 1 |
|||
m_LightingDataAsset: {fileID: 0} |
|||
m_UseShadowmask: 1 |
|||
--- !u!196 &4 |
|||
NavMeshSettings: |
|||
serializedVersion: 2 |
|||
m_ObjectHideFlags: 0 |
|||
m_BuildSettings: |
|||
serializedVersion: 2 |
|||
agentTypeID: 0 |
|||
agentRadius: 0.5 |
|||
agentHeight: 2 |
|||
agentSlope: 45 |
|||
agentClimb: 0.4 |
|||
ledgeDropHeight: 0 |
|||
maxJumpAcrossDistance: 0 |
|||
minRegionArea: 2 |
|||
manualCellSize: 0 |
|||
cellSize: 0.16666667 |
|||
manualTileSize: 0 |
|||
tileSize: 256 |
|||
accuratePlacement: 0 |
|||
debug: |
|||
m_Flags: 0 |
|||
m_NavMeshData: {fileID: 0} |
|||
--- !u!1001 &150555373 |
|||
PrefabInstance: |
|||
m_ObjectHideFlags: 0 |
|||
serializedVersion: 2 |
|||
m_Modification: |
|||
m_TransformParent: {fileID: 0} |
|||
m_Modifications: |
|||
- target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} |
|||
propertyPath: m_LocalPosition.x |
|||
value: -6.237743 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} |
|||
propertyPath: m_LocalPosition.y |
|||
value: 10.1327915 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} |
|||
propertyPath: m_LocalPosition.z |
|||
value: -11.384525 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} |
|||
propertyPath: m_LocalRotation.x |
|||
value: -0.26558536 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} |
|||
propertyPath: m_LocalRotation.y |
|||
value: -0.0023166116 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} |
|||
propertyPath: m_LocalRotation.z |
|||
value: 0.0006380343 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} |
|||
propertyPath: m_LocalRotation.w |
|||
value: -0.9640844 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} |
|||
propertyPath: m_RootOrder |
|||
value: 0 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} |
|||
propertyPath: m_LocalEulerAnglesHint.x |
|||
value: 90.00001 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} |
|||
propertyPath: m_LocalEulerAnglesHint.y |
|||
value: 0 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} |
|||
propertyPath: m_LocalEulerAnglesHint.z |
|||
value: 0 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 1132393308280272, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} |
|||
propertyPath: m_Name |
|||
value: HDRP_Test_Camera |
|||
objectReference: {fileID: 0} |
|||
m_RemovedComponents: [] |
|||
m_SourcePrefab: {fileID: 100100000, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} |
|||
--- !u!1 &760537692 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 760537696} |
|||
- component: {fileID: 760537695} |
|||
- component: {fileID: 760537694} |
|||
- component: {fileID: 760537693} |
|||
m_Layer: 0 |
|||
m_Name: Directional Light |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!114 &760537693 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 760537692} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: c6c2871f720b2af4e9210febdac74517, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
m_Version: 1 |
|||
shadowResolution: 512 |
|||
shadowDimmer: 1 |
|||
shadowFadeDistance: 10000 |
|||
contactShadows: 0 |
|||
viewBiasMin: 0.2 |
|||
viewBiasMax: 100 |
|||
viewBiasScale: 1 |
|||
normalBiasMin: 0.5 |
|||
normalBiasMax: 0.5 |
|||
normalBiasScale: 1 |
|||
sampleBiasScale: 0 |
|||
edgeLeakFixup: 1 |
|||
edgeToleranceNormal: 1 |
|||
edgeTolerance: 1 |
|||
shadowCascadeCount: 4 |
|||
shadowCascadeRatios: |
|||
- 0.05 |
|||
- 0.2 |
|||
- 0.3 |
|||
shadowCascadeBorders: |
|||
- 0.2 |
|||
- 0.2 |
|||
- 0.2 |
|||
- 0.2 |
|||
shadowAlgorithm: 0 |
|||
shadowVariant: 0 |
|||
shadowPrecision: 0 |
|||
shadowData: |
|||
format: 0 |
|||
data: |
|||
shadowDatas: [] |
|||
--- !u!114 &760537694 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 760537692} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
version: 2 |
|||
m_Version: 2 |
|||
directionalIntensity: 3.1415927 |
|||
punctualIntensity: 600 |
|||
areaIntensity: 200 |
|||
enableSpotReflector: 0 |
|||
m_InnerSpotPercent: 0 |
|||
lightDimmer: 1 |
|||
volumetricDimmer: 1 |
|||
lightUnit: 2 |
|||
fadeDistance: 10000 |
|||
affectDiffuse: 1 |
|||
affectSpecular: 1 |
|||
nonLightmappedOnly: 0 |
|||
lightTypeExtent: 0 |
|||
spotLightShape: 0 |
|||
shapeWidth: 0.5 |
|||
shapeHeight: 0.5 |
|||
aspectRatio: 1 |
|||
shapeRadius: 0 |
|||
maxSmoothness: 1 |
|||
applyRangeAttenuation: 1 |
|||
useOldInspector: 0 |
|||
featuresFoldout: 1 |
|||
showAdditionalSettings: 0 |
|||
displayLightIntensity: 3.1415927 |
|||
displayAreaLightEmissiveMesh: 0 |
|||
lightLayers: 1 |
|||
--- !u!108 &760537695 |
|||
Light: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 760537692} |
|||
m_Enabled: 1 |
|||
serializedVersion: 8 |
|||
m_Type: 1 |
|||
m_Color: {r: 1, g: 1, b: 1, a: 1} |
|||
m_Intensity: 3.1415927 |
|||
m_Range: 10 |
|||
m_SpotAngle: 30 |
|||
m_CookieSize: 10 |
|||
m_Shadows: |
|||
m_Type: 0 |
|||
m_Resolution: -1 |
|||
m_CustomResolution: -1 |
|||
m_Strength: 1 |
|||
m_Bias: 0.05 |
|||
m_NormalBias: 0.4 |
|||
m_NearPlane: 0.2 |
|||
m_Cookie: {fileID: 0} |
|||
m_DrawHalo: 0 |
|||
m_Flare: {fileID: 0} |
|||
m_RenderMode: 0 |
|||
m_CullingMask: |
|||
serializedVersion: 2 |
|||
m_Bits: 4294967295 |
|||
m_Lightmapping: 4 |
|||
m_LightShadowCasterMode: 2 |
|||
m_AreaSize: {x: 1, y: 1} |
|||
m_BounceIntensity: 1 |
|||
m_ColorTemperature: 6570 |
|||
m_UseColorTemperature: 0 |
|||
m_ShadowRadius: 0 |
|||
m_ShadowAngle: 0 |
|||
--- !u!4 &760537696 |
|||
Transform: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 760537692} |
|||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} |
|||
m_LocalPosition: {x: 1.3850813, y: 10.78, z: -0.414073} |
|||
m_LocalScale: {x: 1, y: 1, z: 1} |
|||
m_Children: [] |
|||
m_Father: {fileID: 0} |
|||
m_RootOrder: 2 |
|||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} |
|||
--- !u!1 &2109457463 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 2109457466} |
|||
- component: {fileID: 2109457465} |
|||
- component: {fileID: 2109457464} |
|||
m_Layer: 0 |
|||
m_Name: Scene Settings |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!114 &2109457464 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 2109457463} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 441482e8936e35048a1dffac814e3ef8, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
m_Profile: {fileID: 11400000, guid: 877ee5097ab34a94b92316009a8295a0, type: 2} |
|||
m_BakingSkyUniqueID: 2 |
|||
--- !u!114 &2109457465 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 2109457463} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
isGlobal: 1 |
|||
priority: 0 |
|||
blendDistance: 0 |
|||
weight: 1 |
|||
sharedProfile: {fileID: 11400000, guid: 877ee5097ab34a94b92316009a8295a0, type: 2} |
|||
--- !u!4 &2109457466 |
|||
Transform: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 2109457463} |
|||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
|||
m_LocalPosition: {x: 0, y: 0, z: 0} |
|||
m_LocalScale: {x: 1, y: 1, z: 1} |
|||
m_Children: [] |
|||
m_Father: {fileID: 0} |
|||
m_RootOrder: 1 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
|||
--- !u!1001 &1275563729146576701 |
|||
PrefabInstance: |
|||
m_ObjectHideFlags: 0 |
|||
serializedVersion: 2 |
|||
m_Modification: |
|||
m_TransformParent: {fileID: 0} |
|||
m_Modifications: |
|||
- target: {fileID: 6880039408237096682, guid: 128b2cbeebc1c094e81e9bb209c5967b, type: 3} |
|||
propertyPath: m_LocalPosition.x |
|||
value: -6.381103 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 6880039408237096682, guid: 128b2cbeebc1c094e81e9bb209c5967b, type: 3} |
|||
propertyPath: m_LocalPosition.y |
|||
value: 5.229407 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 6880039408237096682, guid: 128b2cbeebc1c094e81e9bb209c5967b, type: 3} |
|||
propertyPath: m_LocalPosition.z |
|||
value: -0.72239685 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 6880039408237096682, guid: 128b2cbeebc1c094e81e9bb209c5967b, type: 3} |
|||
propertyPath: m_LocalRotation.x |
|||
value: 0 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 6880039408237096682, guid: 128b2cbeebc1c094e81e9bb209c5967b, type: 3} |
|||
propertyPath: m_LocalRotation.y |
|||
value: 0 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 6880039408237096682, guid: 128b2cbeebc1c094e81e9bb209c5967b, type: 3} |
|||
propertyPath: m_LocalRotation.z |
|||
value: 0 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 6880039408237096682, guid: 128b2cbeebc1c094e81e9bb209c5967b, type: 3} |
|||
propertyPath: m_LocalRotation.w |
|||
value: 1 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 6880039408237096682, guid: 128b2cbeebc1c094e81e9bb209c5967b, type: 3} |
|||
propertyPath: m_RootOrder |
|||
value: 3 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 6880039408237096682, guid: 128b2cbeebc1c094e81e9bb209c5967b, type: 3} |
|||
propertyPath: m_LocalEulerAnglesHint.x |
|||
value: 0 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 6880039408237096682, guid: 128b2cbeebc1c094e81e9bb209c5967b, type: 3} |
|||
propertyPath: m_LocalEulerAnglesHint.y |
|||
value: 0 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 6880039408237096682, guid: 128b2cbeebc1c094e81e9bb209c5967b, type: 3} |
|||
propertyPath: m_LocalEulerAnglesHint.z |
|||
value: 0 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 331744688631616955, guid: 128b2cbeebc1c094e81e9bb209c5967b, type: 3} |
|||
propertyPath: m_Name |
|||
value: SphereGroups |
|||
objectReference: {fileID: 0} |
|||
m_RemovedComponents: [] |
|||
m_SourcePrefab: {fileID: 100100000, guid: 128b2cbeebc1c094e81e9bb209c5967b, type: 3} |
|
|||
fileFormatVersion: 2 |
|||
guid: e0ebb398c814c2645af130d8b2e6b9aa |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 8bc3ee3419898e94f9395f4d95281855 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
1001
TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/1213_Lit_Anisotropy.png
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: bd8831e1f55353a41b290e481bffc7a8 |
|||
TextureImporter: |
|||
fileIDToRecycleName: {} |
|||
externalObjects: {} |
|||
serializedVersion: 7 |
|||
mipmaps: |
|||
mipMapMode: 0 |
|||
enableMipMap: 0 |
|||
sRGBTexture: 1 |
|||
linearTexture: 0 |
|||
fadeOut: 0 |
|||
borderMipMap: 0 |
|||
mipMapsPreserveCoverage: 0 |
|||
alphaTestReferenceValue: 0.5 |
|||
mipMapFadeDistanceStart: 1 |
|||
mipMapFadeDistanceEnd: 3 |
|||
bumpmap: |
|||
convertToNormalMap: 0 |
|||
externalNormalMap: 0 |
|||
heightScale: 0.25 |
|||
normalMapFilter: 0 |
|||
isReadable: 1 |
|||
streamingMipmaps: 0 |
|||
streamingMipmapsPriority: 0 |
|||
grayScaleToAlpha: 0 |
|||
generateCubemap: 6 |
|||
cubemapConvolution: 0 |
|||
seamlessCubemap: 0 |
|||
textureFormat: 1 |
|||
maxTextureSize: 2048 |
|||
textureSettings: |
|||
serializedVersion: 2 |
|||
filterMode: -1 |
|||
aniso: -1 |
|||
mipBias: -100 |
|||
wrapU: -1 |
|||
wrapV: -1 |
|||
wrapW: -1 |
|||
nPOTScale: 0 |
|||
lightmap: 0 |
|||
compressionQuality: 50 |
|||
spriteMode: 0 |
|||
spriteExtrude: 1 |
|||
spriteMeshType: 1 |
|||
alignment: 0 |
|||
spritePivot: {x: 0.5, y: 0.5} |
|||
spritePixelsToUnits: 100 |
|||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} |
|||
spriteGenerateFallbackPhysicsShape: 1 |
|||
alphaUsage: 1 |
|||
alphaIsTransparency: 0 |
|||
spriteTessellationDetail: -1 |
|||
textureType: 0 |
|||
textureShape: 1 |
|||
singleChannelComponent: 0 |
|||
maxTextureSizeSet: 0 |
|||
compressionQualitySet: 0 |
|||
textureFormatSet: 0 |
|||
platformSettings: |
|||
- serializedVersion: 2 |
|||
buildTarget: DefaultTexturePlatform |
|||
maxTextureSize: 2048 |
|||
resizeAlgorithm: 0 |
|||
textureFormat: -1 |
|||
textureCompression: 0 |
|||
compressionQuality: 50 |
|||
crunchedCompression: 0 |
|||
allowsAlphaSplitting: 0 |
|||
overridden: 0 |
|||
androidETC2FallbackOverride: 0 |
|||
spriteSheet: |
|||
serializedVersion: 2 |
|||
sprites: [] |
|||
outline: [] |
|||
physicsShape: [] |
|||
bones: [] |
|||
spriteID: |
|||
vertices: [] |
|||
indices: |
|||
edges: [] |
|||
weights: [] |
|||
spritePackingTag: |
|||
pSDRemoveMatte: 0 |
|||
pSDShowRemoveMatteOption: 0 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System; |
|||
using UnityEngine; |
|||
|
|||
namespace UnityEditor.Experimental.Rendering |
|||
{ |
|||
public class SettingsDisableScope : IDisposable |
|||
{ |
|||
bool enable; |
|||
|
|||
public SettingsDisableScope(bool enable) |
|||
{ |
|||
this.enable = enable; |
|||
if (!enable) |
|||
GUI.enabled = false; |
|||
} |
|||
|
|||
public void Dispose() |
|||
{ |
|||
if (!enable) |
|||
GUI.enabled = true; |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: b066eb8bfc3d4cd4a8181437643343d2 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Reflection; |
|||
using UnityEditor.Callbacks; |
|||
using UnityEngine; |
|||
using UnityEngine.Experimental.Rendering; |
|||
using UnityEngine.Experimental.Rendering.HDPipeline; |
|||
using Object = UnityEngine.Object; |
|||
|
|||
namespace UnityEditor.Experimental.Rendering.HDPipeline |
|||
{ |
|||
abstract class HDProbeEditor : Editor |
|||
{ |
|||
static Dictionary<HDProbe, HDProbeUI> s_StateMap = new Dictionary<HDProbe, HDProbeUI>(); |
|||
|
|||
internal static bool TryGetUIStateFor(HDProbe p, out HDProbeUI r) |
|||
{ |
|||
return s_StateMap.TryGetValue(p, out r); |
|||
} |
|||
|
|||
internal abstract HDProbe GetTarget(Object editorTarget); |
|||
|
|||
protected SerializedHDProbe m_SerializedHDProbe; |
|||
HDProbeUI m_UIState; |
|||
HDProbeUI[] m_UIHandleState; |
|||
protected HDProbe[] m_TypedTargets; |
|||
|
|||
protected virtual void OnEnable() |
|||
{ |
|||
if(m_UIState == null) |
|||
{ |
|||
m_UIState = HDProbeUI.CreateFor(this); |
|||
} |
|||
m_UIState.Reset(m_SerializedHDProbe, Repaint); |
|||
|
|||
m_TypedTargets = new HDProbe[targets.Length]; |
|||
m_UIHandleState = new HDProbeUI[m_TypedTargets.Length]; |
|||
for (var i = 0; i < m_TypedTargets.Length; i++) |
|||
{ |
|||
m_TypedTargets[i] = GetTarget(targets[i]); |
|||
m_UIHandleState[i] = HDProbeUI.CreateFor(m_TypedTargets[i]); |
|||
m_UIHandleState[i].Reset(m_SerializedHDProbe, null); |
|||
|
|||
s_StateMap[m_TypedTargets[i]] = m_UIHandleState[i]; |
|||
} |
|||
} |
|||
|
|||
protected virtual void OnDisable() |
|||
{ |
|||
for (var i = 0; i < m_TypedTargets.Length; i++) |
|||
s_StateMap.Remove(m_TypedTargets[i]); |
|||
} |
|||
|
|||
protected abstract void Draw(HDProbeUI s, SerializedHDProbe serialized, Editor owner); |
|||
|
|||
public override void OnInspectorGUI() |
|||
{ |
|||
var s = m_UIState; |
|||
var d = m_SerializedHDProbe; |
|||
var o = this; |
|||
|
|||
s.Update(); |
|||
d.Update(); |
|||
|
|||
Draw(s, d, o); |
|||
|
|||
d.Apply(); |
|||
} |
|||
|
|||
protected virtual void OnSceneGUI() |
|||
{ |
|||
//mandatory update as for strange reason the serialized rollback one update here
|
|||
m_UIState.Update(); |
|||
m_SerializedHDProbe.Update(); |
|||
|
|||
HDProbeUI.DrawHandles(m_UIState, m_SerializedHDProbe, this); |
|||
m_UIState.DoShortcutKey(this); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 7f189b572cf7bf04d9f1976dcc75c942 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System.IO; |
|||
using UnityEngine; |
|||
using UnityEngine.Rendering; |
|||
using UnityEngine.Experimental.Rendering; |
|||
using UnityEngine.Experimental.Rendering.HDPipeline; |
|||
|
|||
namespace UnityEditor.Experimental.Rendering.HDPipeline |
|||
{ |
|||
partial class HDProbeUI |
|||
{ |
|||
[MenuItem("GameObject/3D Object/Mirror", priority = CoreUtils.gameObjectMenuPriority)] |
|||
static void CreateMirrorGameObject(MenuCommand menuCommand) |
|||
{ |
|||
GameObject plane = GameObject.CreatePrimitive(PrimitiveType.Plane); |
|||
GameObjectUtility.SetParentAndAlign(plane, menuCommand.context as GameObject); |
|||
Undo.RegisterCreatedObjectUndo(plane, "Create " + plane.name); |
|||
Selection.activeObject = plane; |
|||
|
|||
var planarProbe = plane.AddComponent<PlanarReflectionProbe>(); |
|||
planarProbe.influenceVolume.boxSize = new Vector3(10, 0.01f, 10); |
|||
|
|||
var hdrp = GraphicsSettings.renderPipelineAsset as HDRenderPipelineAsset; |
|||
var material = hdrp != null ? hdrp.GetDefaultMirrorMaterial() : null; |
|||
|
|||
if (material) |
|||
{ |
|||
plane.GetComponent<MeshRenderer>().sharedMaterial = material; |
|||
} |
|||
} |
|||
|
|||
[MenuItem("GameObject/Light/Planar Reflection Probe", priority = CoreUtils.gameObjectMenuPriority)] |
|||
static void CreatePlanarReflectionGameObject(MenuCommand menuCommand) |
|||
{ |
|||
var parent = menuCommand.context as GameObject; |
|||
var go = CoreEditorUtils.CreateGameObject(parent, "Planar Reflection"); |
|||
var planarProbe = go.AddComponent<PlanarReflectionProbe>(); |
|||
planarProbe.influenceVolume.boxSize = new Vector3(1, 0.01f, 1); |
|||
// Ensure it gets re-parented if this was a context click (otherwise does nothing)
|
|||
GameObjectUtility.SetParentAndAlign(go, menuCommand.context as GameObject); |
|||
// Register the creation in the undo system
|
|||
Undo.RegisterCreatedObjectUndo(go, "Create " + go.name); |
|||
Selection.activeObject = go; |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: f9ddf94c77394c14986865eb30c51d79 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System; |
|||
using System.Collections.Generic; |
|||
using UnityEditorInternal; |
|||
using UnityEngine; |
|||
using UnityEngine.Experimental.Rendering; |
|||
using UnityEngine.Experimental.Rendering.HDPipeline; |
|||
using UnityEngine.Rendering; |
|||
|
|||
namespace UnityEditor.Experimental.Rendering.HDPipeline |
|||
{ |
|||
using _ = CoreEditorUtils; |
|||
using CED = CoreEditorDrawer<HDProbeUI, SerializedHDProbe>; |
|||
|
|||
partial class HDProbeUI |
|||
{ |
|||
public static readonly CED.IDrawer SectionProbeModeSettings; |
|||
public static readonly CED.IDrawer ProxyVolumeSettings = CED.FoldoutGroup( |
|||
proxySettingsHeader, |
|||
(s, d, o) => s.isSectionExpendedProxyVolume, |
|||
FoldoutOption.Indent, |
|||
CED.Action(Drawer_SectionProxySettings) |
|||
); |
|||
public static readonly CED.IDrawer SectionProbeModeBakedSettings = CED.noop; |
|||
public static readonly CED.IDrawer SectionProbeModeRealtimeSettings = CED.Action(Drawer_SectionProbeModeRealtimeSettings); |
|||
public static readonly CED.IDrawer SectionBakeButton = CED.Action(Drawer_SectionBakeButton); |
|||
|
|||
public static readonly CED.IDrawer SectionFoldoutAdditionalSettings = CED.FoldoutGroup( |
|||
additionnalSettingsHeader, |
|||
(s, d, o) => s.isSectionExpendedAdditionalSettings, |
|||
FoldoutOption.Indent, |
|||
CED.Action(Drawer_SectionCustomSettings) |
|||
); |
|||
|
|||
static HDProbeUI() |
|||
{ |
|||
SectionProbeModeSettings = CED.Group( |
|||
CED.Action(Drawer_FieldCaptureType), |
|||
CED.FadeGroup( |
|||
(s, d, o, i) => s.IsSectionExpandedReflectionProbeMode((ReflectionProbeMode)i), |
|||
FadeOption.Indent, |
|||
SectionProbeModeBakedSettings, |
|||
SectionProbeModeRealtimeSettings |
|||
) |
|||
); |
|||
} |
|||
|
|||
protected static void Drawer_DifferentShapeError(HDProbeUI s, SerializedHDProbe d, Editor o) |
|||
{ |
|||
var proxy = d.proxyVolumeReference.objectReferenceValue as ReflectionProxyVolumeComponent; |
|||
if (proxy != null |
|||
&& (int)proxy.proxyVolume.shape != d.influenceVolume.shape.enumValueIndex |
|||
&& proxy.proxyVolume.shape != ProxyShape.Infinite) |
|||
{ |
|||
EditorGUILayout.HelpBox( |
|||
proxyInfluenceShapeMismatchHelpBoxText, |
|||
MessageType.Error, |
|||
true |
|||
); |
|||
} |
|||
} |
|||
|
|||
static GUIStyle disabled; |
|||
static void PropertyField(SerializedProperty prop, GUIContent content) |
|||
{ |
|||
if(prop != null) |
|||
{ |
|||
EditorGUILayout.PropertyField(prop, content); |
|||
} |
|||
else |
|||
{ |
|||
if(disabled == null) |
|||
{ |
|||
disabled = new GUIStyle(GUI.skin.label); |
|||
disabled.onNormal.textColor *= 0.5f; |
|||
} |
|||
EditorGUILayout.LabelField(content, disabled); |
|||
} |
|||
} |
|||
|
|||
protected static void Drawer_SectionBakeButton(HDProbeUI s, SerializedHDProbe d, Editor o) |
|||
{ |
|||
if (d.target is HDAdditionalReflectionData) |
|||
EditorReflectionSystemGUI.DrawBakeButton((ReflectionProbeMode)d.mode.intValue, ((HDAdditionalReflectionData)d.target).reflectionProbe); |
|||
else //PlanarReflectionProbe
|
|||
EditorReflectionSystemGUI.DrawBakeButton((ReflectionProbeMode)d.mode.intValue, d.target as PlanarReflectionProbe); |
|||
} |
|||
|
|||
static void Drawer_SectionProbeModeRealtimeSettings(HDProbeUI s, SerializedHDProbe d, Editor o) |
|||
{ |
|||
GUI.enabled = false; |
|||
EditorGUILayout.PropertyField(d.refreshMode, _.GetContent("Refresh Mode")); |
|||
GUI.enabled = true; |
|||
} |
|||
|
|||
protected static void Drawer_SectionProxySettings(HDProbeUI s, SerializedHDProbe d, Editor o) |
|||
{ |
|||
EditorGUILayout.PropertyField(d.proxyVolumeReference, proxyVolumeContent); |
|||
|
|||
if (d.target.proxyVolume == null) |
|||
{ |
|||
EditorGUI.BeginChangeCheck(); |
|||
d.infiniteProjection.boolValue = !EditorGUILayout.Toggle(useInfiniteProjectionContent, !d.infiniteProjection.boolValue); |
|||
if(EditorGUI.EndChangeCheck()) |
|||
{ |
|||
d.Apply(); |
|||
} |
|||
} |
|||
|
|||
if (d.proxyVolumeReference.objectReferenceValue != null) |
|||
{ |
|||
var proxy = (ReflectionProxyVolumeComponent)d.proxyVolumeReference.objectReferenceValue; |
|||
if ((int)proxy.proxyVolume.shape != d.influenceVolume.shape.enumValueIndex |
|||
&& proxy.proxyVolume.shape != ProxyShape.Infinite) |
|||
EditorGUILayout.HelpBox( |
|||
proxyInfluenceShapeMismatchHelpBoxText, |
|||
MessageType.Error, |
|||
true |
|||
); |
|||
} |
|||
else |
|||
{ |
|||
EditorGUILayout.HelpBox( |
|||
d.infiniteProjection.boolValue ? noProxyInfiniteHelpBoxText : noProxyHelpBoxText, |
|||
MessageType.Info, |
|||
true |
|||
); |
|||
} |
|||
} |
|||
|
|||
protected static void Drawer_SectionCustomSettings(HDProbeUI s, SerializedHDProbe d, Editor o) |
|||
{ |
|||
var hdPipeline = RenderPipelineManager.currentPipeline as HDRenderPipeline; |
|||
using (new SettingsDisableScope(hdPipeline.asset.renderPipelineSettings.supportLightLayers)) |
|||
{ |
|||
d.lightLayers.intValue = Convert.ToInt32(EditorGUILayout.EnumFlagsField(lightLayersContent, (LightLayerEnum)d.lightLayers.intValue)); |
|||
} |
|||
|
|||
EditorGUILayout.PropertyField(d.weight, weightContent); |
|||
|
|||
EditorGUI.BeginChangeCheck(); |
|||
EditorGUILayout.PropertyField(d.multiplier, multiplierContent); |
|||
if (EditorGUI.EndChangeCheck()) |
|||
d.multiplier.floatValue = Mathf.Max(0.0f, d.multiplier.floatValue); |
|||
} |
|||
|
|||
static void Drawer_FieldCaptureType(HDProbeUI s, SerializedHDProbe d, Editor o) |
|||
{ |
|||
GUI.enabled = false; |
|||
EditorGUILayout.PropertyField(d.mode, fieldCaptureTypeContent); |
|||
GUI.enabled = true; |
|||
} |
|||
|
|||
|
|||
[Flags] |
|||
internal enum ToolBar |
|||
{ |
|||
InfluenceShape = 1<<0, |
|||
Blend = 1<<1, |
|||
NormalBlend = 1<<2, |
|||
CapturePosition = 1<<3 |
|||
} |
|||
protected ToolBar[] toolBars = null; |
|||
|
|||
protected const EditMode.SceneViewEditMode EditBaseShape = EditMode.SceneViewEditMode.ReflectionProbeBox; |
|||
protected const EditMode.SceneViewEditMode EditInfluenceShape = EditMode.SceneViewEditMode.GridBox; |
|||
protected const EditMode.SceneViewEditMode EditInfluenceNormalShape = EditMode.SceneViewEditMode.Collider; |
|||
protected const EditMode.SceneViewEditMode EditCenter = EditMode.SceneViewEditMode.GridMove; |
|||
//Note: EditMode.SceneViewEditMode.ReflectionProbeOrigin is still used
|
|||
//by legacy reflection probe and have its own mecanism that we don't want
|
|||
|
|||
internal static bool IsProbeEditMode(EditMode.SceneViewEditMode editMode) |
|||
{ |
|||
return editMode == EditBaseShape |
|||
|| editMode == EditInfluenceShape |
|||
|| editMode == EditInfluenceNormalShape |
|||
|| editMode == EditCenter; |
|||
} |
|||
|
|||
static Dictionary<ToolBar, EditMode.SceneViewEditMode> s_Toolbar_Mode = null; |
|||
protected static Dictionary<ToolBar, EditMode.SceneViewEditMode> toolbar_Mode |
|||
{ |
|||
get |
|||
{ |
|||
return s_Toolbar_Mode ?? (s_Toolbar_Mode = new Dictionary<ToolBar, EditMode.SceneViewEditMode> |
|||
{ |
|||
{ ToolBar.InfluenceShape, EditBaseShape }, |
|||
{ ToolBar.Blend, EditInfluenceShape }, |
|||
{ ToolBar.NormalBlend, EditInfluenceNormalShape }, |
|||
{ ToolBar.CapturePosition, EditCenter } |
|||
}); |
|||
} |
|||
} |
|||
|
|||
//[TODO] change this to be modifiable shortcuts
|
|||
static Dictionary<KeyCode, ToolBar> s_Toolbar_ShortCutKey = null; |
|||
protected static Dictionary<KeyCode, ToolBar> toolbar_ShortCutKey |
|||
{ |
|||
get |
|||
{ |
|||
return s_Toolbar_ShortCutKey ?? (s_Toolbar_ShortCutKey = new Dictionary<KeyCode, ToolBar> |
|||
{ |
|||
{ KeyCode.Alpha1, ToolBar.InfluenceShape }, |
|||
{ KeyCode.Alpha2, ToolBar.Blend }, |
|||
{ KeyCode.Alpha3, ToolBar.NormalBlend }, |
|||
{ KeyCode.Alpha4, ToolBar.CapturePosition } |
|||
}); |
|||
} |
|||
} |
|||
|
|||
protected static void Drawer_Toolbars(HDProbeUI s, SerializedHDProbe d, Editor o) |
|||
{ |
|||
GUILayout.BeginHorizontal(); |
|||
GUILayout.FlexibleSpace(); |
|||
GUI.changed = false; |
|||
|
|||
foreach(ToolBar toolBar in s.toolBars) |
|||
{ |
|||
List<EditMode.SceneViewEditMode> listMode = new List<EditMode.SceneViewEditMode>(); |
|||
List<GUIContent> listContent = new List<GUIContent>(); |
|||
if ((toolBar & ToolBar.InfluenceShape) > 0) |
|||
{ |
|||
listMode.Add(toolbar_Mode[ToolBar.InfluenceShape]); |
|||
listContent.Add(toolbar_Contents[ToolBar.InfluenceShape]); |
|||
} |
|||
if ((toolBar & ToolBar.Blend) > 0) |
|||
{ |
|||
listMode.Add(toolbar_Mode[ToolBar.Blend]); |
|||
listContent.Add(toolbar_Contents[ToolBar.Blend]); |
|||
} |
|||
if ((toolBar & ToolBar.NormalBlend) > 0) |
|||
{ |
|||
listMode.Add(toolbar_Mode[ToolBar.NormalBlend]); |
|||
listContent.Add(toolbar_Contents[ToolBar.NormalBlend]); |
|||
} |
|||
if ((toolBar & ToolBar.CapturePosition) > 0) |
|||
{ |
|||
listMode.Add(toolbar_Mode[ToolBar.CapturePosition]); |
|||
listContent.Add(toolbar_Contents[ToolBar.CapturePosition]); |
|||
} |
|||
EditMode.DoInspectorToolbar(listMode.ToArray(), listContent.ToArray(), GetBoundsGetter(o), o); |
|||
} |
|||
GUILayout.FlexibleSpace(); |
|||
GUILayout.EndHorizontal(); |
|||
} |
|||
|
|||
|
|||
static internal void Drawer_ToolBarButton(ToolBar button, Editor owner, params GUILayoutOption[] options) |
|||
{ |
|||
bool enabled = toolbar_Mode[button] == EditMode.editMode; |
|||
EditorGUI.BeginChangeCheck(); |
|||
enabled = GUILayout.Toggle(enabled, toolbar_Contents[button], EditorStyles.miniButton, options); |
|||
if (EditorGUI.EndChangeCheck()) |
|||
{ |
|||
EditMode.SceneViewEditMode targetMode = EditMode.editMode == toolbar_Mode[button] ? EditMode.SceneViewEditMode.None : toolbar_Mode[button]; |
|||
EditMode.ChangeEditMode(targetMode, GetBoundsGetter(owner)(), owner); |
|||
} |
|||
} |
|||
|
|||
static Func<Bounds> GetBoundsGetter(Editor o) |
|||
{ |
|||
return () => |
|||
{ |
|||
var bounds = new Bounds(); |
|||
foreach (Component targetObject in o.targets) |
|||
{ |
|||
var rp = targetObject.transform; |
|||
var b = rp.position; |
|||
bounds.Encapsulate(b); |
|||
} |
|||
return bounds; |
|||
}; |
|||
} |
|||
|
|||
public void DoShortcutKey(Editor owner) |
|||
{ |
|||
var evt = Event.current; |
|||
if (evt.type != EventType.KeyDown || !evt.shift) |
|||
return; |
|||
|
|||
ToolBar toolbar; |
|||
if(toolbar_ShortCutKey.TryGetValue(evt.keyCode, out toolbar)) |
|||
{ |
|||
bool used = false; |
|||
foreach(ToolBar t in toolBars) |
|||
{ |
|||
if((t&toolbar)>0) |
|||
{ |
|||
used = true; |
|||
break; |
|||
} |
|||
} |
|||
if (!used) |
|||
{ |
|||
return; |
|||
} |
|||
|
|||
var targetMode = toolbar_Mode[toolbar]; |
|||
var mode = EditMode.editMode == targetMode ? EditMode.SceneViewEditMode.None : targetMode; |
|||
EditMode.ChangeEditMode(mode, GetBoundsGetter(owner)(), owner); |
|||
evt.Use(); |
|||
} |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: ce4764ad508471d498f39a66388bb18d |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using UnityEditorInternal; |
|||
using UnityEngine; |
|||
using UnityEngine.Experimental.Rendering.HDPipeline; |
|||
|
|||
namespace UnityEditor.Experimental.Rendering.HDPipeline |
|||
{ |
|||
partial class HDProbeUI |
|||
{ |
|||
|
|||
internal static void DrawHandles(HDProbeUI s, SerializedHDProbe d, Editor o) |
|||
{ |
|||
HDProbe probe = d.target as HDProbe; |
|||
var mat = Matrix4x4.TRS(probe.transform.position, probe.transform.rotation, Vector3.one); |
|||
|
|||
switch (EditMode.editMode) |
|||
{ |
|||
case EditBaseShape: |
|||
InfluenceVolumeUI.DrawHandles_EditBase(s.influenceVolume, d.influenceVolume, o, mat, probe); |
|||
break; |
|||
case EditInfluenceShape: |
|||
InfluenceVolumeUI.DrawHandles_EditInfluence(s.influenceVolume, d.influenceVolume, o, mat, probe); |
|||
break; |
|||
case EditInfluenceNormalShape: |
|||
InfluenceVolumeUI.DrawHandles_EditInfluenceNormal(s.influenceVolume, d.influenceVolume, o, mat, probe); |
|||
break; |
|||
case EditCenter: |
|||
{ |
|||
using (new Handles.DrawingScope(Matrix4x4.TRS(Vector3.zero, Quaternion.identity, Vector3.one))) |
|||
{ |
|||
Vector3 offsetWorld = probe.transform.position + probe.transform.rotation * probe.influenceVolume.offset; |
|||
EditorGUI.BeginChangeCheck(); |
|||
var newOffsetWorld = Handles.PositionHandle(offsetWorld, probe.transform.rotation); |
|||
if (EditorGUI.EndChangeCheck()) |
|||
{ |
|||
Vector3 newOffset = Quaternion.Inverse(probe.transform.rotation) * (newOffsetWorld - probe.transform.position); |
|||
Undo.RecordObjects(new Object[] { probe, probe.transform }, "Translate Influence Position"); |
|||
d.influenceVolume.offset.vector3Value = newOffset; |
|||
d.influenceVolume.Apply(); |
|||
|
|||
//call modification to legacy ReflectionProbe
|
|||
probe.influenceVolume.offset = newOffset; |
|||
} |
|||
} |
|||
break; |
|||
} |
|||
} |
|||
} |
|||
|
|||
[DrawGizmo(GizmoType.Selected)] |
|||
internal static void DrawGizmos(HDProbe d, GizmoType gizmoType) |
|||
{ |
|||
HDProbeUI s; |
|||
if (!HDProbeEditor.TryGetUIStateFor(d, out s)) |
|||
return; |
|||
|
|||
var mat = Matrix4x4.TRS(d.transform.position, d.transform.rotation, Vector3.one); |
|||
|
|||
switch (EditMode.editMode) |
|||
{ |
|||
case EditBaseShape: |
|||
InfluenceVolumeUI.DrawGizmos( |
|||
s.influenceVolume, d.influenceVolume, mat, |
|||
InfluenceVolumeUI.HandleType.Base, |
|||
InfluenceVolumeUI.HandleType.All); |
|||
break; |
|||
case EditInfluenceShape: |
|||
InfluenceVolumeUI.DrawGizmos( |
|||
s.influenceVolume, |
|||
d.influenceVolume, |
|||
mat, |
|||
InfluenceVolumeUI.HandleType.Influence, |
|||
InfluenceVolumeUI.HandleType.All); |
|||
break; |
|||
case EditInfluenceNormalShape: |
|||
InfluenceVolumeUI.DrawGizmos( |
|||
s.influenceVolume, |
|||
d.influenceVolume, |
|||
mat, |
|||
InfluenceVolumeUI.HandleType.InfluenceNormal, |
|||
InfluenceVolumeUI.HandleType.All); |
|||
break; |
|||
default: |
|||
{ |
|||
var showedHandles = s.influenceVolume.showInfluenceHandles |
|||
? InfluenceVolumeUI.HandleType.All |
|||
: InfluenceVolumeUI.HandleType.Base; |
|||
InfluenceVolumeUI.DrawGizmos( |
|||
s.influenceVolume, |
|||
d.influenceVolume, |
|||
mat, |
|||
InfluenceVolumeUI.HandleType.None, |
|||
showedHandles); |
|||
break; |
|||
} |
|||
} |
|||
|
|||
if (d.proxyVolume != null) |
|||
ReflectionProxyVolumeComponentUI.DrawGizmos_EditNone(d.proxyVolume); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 8ee668677cd59784d8fb06a531b49a77 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System; |
|||
using System.Collections.Generic; |
|||
using UnityEditor.AnimatedValues; |
|||
using UnityEngine; |
|||
using UnityEngine.Events; |
|||
using UnityEngine.Experimental.Rendering.HDPipeline; |
|||
using UnityEngine.Rendering; |
|||
|
|||
namespace UnityEditor.Experimental.Rendering.HDPipeline |
|||
{ |
|||
partial class HDProbeUI |
|||
{ |
|||
/* |
|||
static readonly Color[][] k_handlesColor = new Color[][] |
|||
{ |
|||
new Color[] |
|||
{ |
|||
Color.red, |
|||
Color.green, |
|||
Color.blue |
|||
}, |
|||
new Color[] |
|||
{ |
|||
new Color(.5f, 0f, 0f, 1f), |
|||
new Color(0f, .5f, 0f, 1f), |
|||
new Color(0f, 0f, .5f, 1f) |
|||
} |
|||
}; |
|||
*/ |
|||
|
|||
//static readonly GUIContent bakeTypeContent = CoreEditorUtils.GetContent("Type|'Baked Cubemap' uses the 'Auto Baking' mode from the Lighting window. If it is enabled then baking is automatic otherwise manual bake is needed (use the bake button below). \n'Custom' can be used if a custom cubemap is wanted. \n'Realtime' can be used to dynamically re-render the cubemap during runtime (via scripting).");
|
|||
|
|||
static readonly GUIContent proxyVolumeContent = CoreEditorUtils.GetContent("Proxy Volume"); |
|||
protected static readonly GUIContent useInfiniteProjectionContent = CoreEditorUtils.GetContent("Same As Influence Volume|If enabled, parallax correction will occure, causing reflections to appear to change based on the object's position within the probe's box, while still using a single probe as the source of the reflection. This works well for reflections on objects that are moving through enclosed spaces such as corridors and rooms. When disabled, the cubemap reflection will be treated as coming from infinitely far away. Note that this feature can be globally disabled from Graphics Settings -> Tier Settings"); |
|||
|
|||
//static readonly GUIContent normalModeContent = CoreEditorUtils.GetContent("Normal|Normal parameters mode (only change for box shape).");
|
|||
// static readonly GUIContent advancedModeContent = CoreEditorUtils.GetContent("Advanced|Advanced parameters mode (only change for box shape).");
|
|||
|
|||
protected static readonly GUIContent fieldCaptureTypeContent = CoreEditorUtils.GetContent("Type"); |
|||
protected static readonly GUIContent resolutionContent = CoreEditorUtils.GetContent("Resolution"); |
|||
protected static readonly GUIContent shadowDistanceContent = CoreEditorUtils.GetContent("Shadow Distance"); |
|||
protected static readonly GUIContent cullingMaskContent = CoreEditorUtils.GetContent("Culling Mask"); |
|||
protected static readonly GUIContent useOcclusionCullingContent = CoreEditorUtils.GetContent("Use Occlusion Culling"); |
|||
protected static readonly GUIContent nearClipCullingContent = CoreEditorUtils.GetContent("Near Clip"); |
|||
protected static readonly GUIContent farClipCullingContent = CoreEditorUtils.GetContent("Far Clip"); |
|||
|
|||
static readonly GUIContent weightContent = CoreEditorUtils.GetContent("Weight|Blend weight applied on this reflection probe. This can be used for fading in or out a reflection probe."); |
|||
static readonly GUIContent multiplierContent = CoreEditorUtils.GetContent("Intensity Multiplier|Allows you to boost or dimmer the reflected cubemap. Values above 1 will make reflections brighter and values under 1 will make reflections darker. Using values different than 1 is not physically correct."); |
|||
static readonly GUIContent lightLayersContent = CoreEditorUtils.GetContent("Light Layers|Specifies the current light layers that the light affect. Corresponding renderer with the same flags will be lit by this light."); |
|||
|
|||
//static readonly GUIContent textureSizeContent = CoreEditorUtils.GetContent("Probe Texture Size (Set By HDRP)");
|
|||
//static readonly GUIContent compressionTextureContent = CoreEditorUtils.GetContent("Probe Compression (Set By HDRP)");
|
|||
|
|||
|
|||
const string mimapHelpBoxText = "No mipmaps in the cubemap, Smoothness value in Standard shader will be ignored."; |
|||
const string noProxyHelpBoxText = "Influence shape will be used as Projection shape too."; |
|||
const string noProxyInfiniteHelpBoxText = "Projection will be at infinite."; |
|||
const string proxyInfluenceShapeMismatchHelpBoxText = "Proxy volume and influence volume have different shapes, this is not supported."; |
|||
|
|||
const string proxySettingsHeader = "Projection Settings"; |
|||
//influenceVolume have its own header
|
|||
protected const string captureSettingsHeader = "Capture Settings"; |
|||
const string additionnalSettingsHeader = "Custom Settings"; |
|||
|
|||
static Dictionary<ToolBar, GUIContent> s_Toolbar_Contents = null; |
|||
protected static Dictionary<ToolBar, GUIContent> toolbar_Contents |
|||
{ |
|||
get |
|||
{ |
|||
return s_Toolbar_Contents ?? (s_Toolbar_Contents = new Dictionary<ToolBar, GUIContent> |
|||
{ |
|||
{ ToolBar.InfluenceShape, EditorGUIUtility.IconContent("EditCollider", "|Modify the base shape. (SHIFT+1)") }, |
|||
{ ToolBar.Blend, EditorGUIUtility.IconContent("PreMatCube", "|Modify the influence volume. (SHIFT+2)") }, |
|||
{ ToolBar.NormalBlend, EditorGUIUtility.IconContent("SceneViewOrtho", "|Modify the influence normal volume. (SHIFT+3)") }, |
|||
{ ToolBar.CapturePosition, EditorGUIUtility.IconContent("MoveTool", "|Change the Offset of the shape.") } |
|||
}); |
|||
} |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 43443fcbe23ff044eb73250a6d34cedd |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System; |
|||
using UnityEditor.AnimatedValues; |
|||
using UnityEngine.Events; |
|||
using UnityEngine.Experimental.Rendering.HDPipeline; |
|||
using UnityEngine.Rendering; |
|||
|
|||
namespace UnityEditor.Experimental.Rendering.HDPipeline |
|||
{ |
|||
abstract partial class HDProbeUI : BaseUI<SerializedHDProbe> |
|||
{ |
|||
const int k_AnimBoolSingleFieldCount = 6; |
|||
static readonly int k_ReflectionProbeModeCount = Enum.GetValues(typeof(ReflectionProbeMode)).Length; |
|||
static readonly int k_ReflectionInfluenceShapeCount = Enum.GetValues(typeof(InfluenceShape)).Length; |
|||
static readonly int k_AnimBoolTotal = k_ReflectionProbeModeCount + k_AnimBoolSingleFieldCount + k_ReflectionInfluenceShapeCount; |
|||
|
|||
public InfluenceVolumeUI influenceVolume = new InfluenceVolumeUI(); |
|||
public FrameSettingsUI frameSettings = new FrameSettingsUI(); |
|||
public ReflectionProxyVolumeComponentUI reflectionProxyVolume = new ReflectionProxyVolumeComponentUI(); |
|||
|
|||
public AnimBool isSectionExpandedInfluenceSettings { get { return m_AnimBools[k_ReflectionProbeModeCount]; } } |
|||
public AnimBool isSectionExpandedCaptureSettings { get { return m_AnimBools[k_ReflectionProbeModeCount + 1]; } } |
|||
|
|||
public AnimBool isSectionExpandedCaptureMirrorSettings { get { return m_AnimBools[k_ReflectionProbeModeCount + 2]; } } |
|||
public AnimBool isSectionExpandedCaptureStaticSettings { get { return m_AnimBools[k_ReflectionProbeModeCount + 3]; } } |
|||
public AnimBool isSectionExpendedProxyVolume { get { return m_AnimBools[k_ReflectionProbeModeCount + 4]; } } |
|||
public AnimBool isSectionExpendedAdditionalSettings { get { return m_AnimBools[k_ReflectionProbeModeCount + 5]; } } |
|||
|
|||
public bool showCaptureHandles { get; set; } |
|||
|
|||
internal static HDProbeUI CreateFor(HDProbeEditor o) |
|||
{ |
|||
if (o is PlanarReflectionProbeEditor) |
|||
return new PlanarReflectionProbeUI(); |
|||
else |
|||
return new HDReflectionProbeUI(); |
|||
} |
|||
internal static HDProbeUI CreateFor(HDProbe p) |
|||
{ |
|||
if (p is PlanarReflectionProbe) |
|||
return new PlanarReflectionProbeUI(); |
|||
else |
|||
return new HDReflectionProbeUI(); |
|||
} |
|||
|
|||
public HDProbeUI() |
|||
: base(k_AnimBoolTotal) |
|||
{ |
|||
isSectionExpandedInfluenceSettings.value = true; |
|||
isSectionExpandedCaptureSettings.value = true; |
|||
isSectionExpendedProxyVolume.value = true; |
|||
isSectionExpendedAdditionalSettings.value = false; |
|||
} |
|||
|
|||
public AnimBool IsSectionExpandedReflectionProbeMode(ReflectionProbeMode mode) |
|||
{ |
|||
return m_AnimBools[(int)mode]; |
|||
} |
|||
|
|||
public void SetModeTarget(int value) |
|||
{ |
|||
for (var i = 0; i < k_ReflectionProbeModeCount; i++) |
|||
GetReflectionProbeModeBool(i).target = i == value; |
|||
} |
|||
|
|||
AnimBool GetReflectionProbeModeBool(int i) |
|||
{ |
|||
return m_AnimBools[i]; |
|||
} |
|||
|
|||
public override void Reset(SerializedHDProbe data, UnityAction repaint) |
|||
{ |
|||
frameSettings.Reset(data.frameSettings, repaint); |
|||
influenceVolume.Reset(data.influenceVolume, repaint); |
|||
base.Reset(data, repaint); |
|||
} |
|||
|
|||
public override void Update() |
|||
{ |
|||
for (var i = 0; i < k_ReflectionProbeModeCount; i++) |
|||
m_AnimBools[i].target = i == data.mode.intValue; |
|||
|
|||
SetModeTarget(data.mode.hasMultipleDifferentValues ? -1 : data.mode.intValue); |
|||
influenceVolume.SetIsSectionExpanded_Shape(data.influenceVolume.shape.hasMultipleDifferentValues ? -1 : data.influenceVolume.shape.intValue); |
|||
|
|||
frameSettings.Update(); |
|||
influenceVolume.Update(); |
|||
base.Update(); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: f23cf1efede7335468bfa23bd1838cd2 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using UnityEngine.Experimental.Rendering.HDPipeline; |
|||
|
|||
namespace UnityEditor.Experimental.Rendering.HDPipeline |
|||
{ |
|||
internal abstract class SerializedHDProbe |
|||
{ |
|||
internal SerializedObject serializedObject; |
|||
|
|||
internal SerializedProperty proxyVolumeReference; |
|||
internal SerializedProperty infiniteProjection; |
|||
|
|||
internal SerializedInfluenceVolume influenceVolume; |
|||
|
|||
internal SerializedFrameSettings frameSettings; |
|||
|
|||
internal SerializedProperty lightLayers; |
|||
internal SerializedProperty weight; |
|||
internal SerializedProperty multiplier; |
|||
|
|||
internal SerializedProperty mode; |
|||
internal SerializedProperty refreshMode; |
|||
|
|||
internal SerializedProperty resolution; |
|||
internal SerializedProperty shadowDistance; |
|||
internal SerializedProperty cullingMask; |
|||
internal SerializedProperty useOcclusionCulling; |
|||
internal SerializedProperty nearClip; |
|||
internal SerializedProperty farClip; |
|||
|
|||
internal HDProbe target { get { return serializedObject.targetObject as HDProbe; } } |
|||
|
|||
internal SerializedHDProbe(SerializedObject serializedObject) |
|||
{ |
|||
this.serializedObject = serializedObject; |
|||
|
|||
proxyVolumeReference = serializedObject.Find((HDProbe p) => p.proxyVolume); |
|||
influenceVolume = new SerializedInfluenceVolume(serializedObject.Find((HDProbe p) => p.influenceVolume)); |
|||
infiniteProjection = serializedObject.Find((HDProbe p) => p.infiniteProjection); |
|||
|
|||
frameSettings = new SerializedFrameSettings(serializedObject.Find((HDProbe p) => p.frameSettings)); |
|||
|
|||
lightLayers = serializedObject.Find((HDProbe p) => p.lightLayers); |
|||
weight = serializedObject.Find((HDProbe p) => p.weight); |
|||
multiplier = serializedObject.Find((HDProbe p) => p.multiplier); |
|||
|
|||
mode = serializedObject.Find((HDProbe p) => p.mode); |
|||
refreshMode = serializedObject.Find((HDProbe p) => p.refreshMode); |
|||
} |
|||
|
|||
internal virtual void Update() |
|||
{ |
|||
serializedObject.Update(); |
|||
//InfluenceVolume does not have Update. Add it here if it have in the future.
|
|||
} |
|||
|
|||
internal virtual void Apply() |
|||
{ |
|||
serializedObject.ApplyModifiedProperties(); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: fe06aab2f0da27148b61819e1ce565a1 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using UnityEngine; |
|||
using UnityEngine.Experimental.Rendering.HDPipeline; |
|||
|
|||
namespace UnityEditor.Experimental.Rendering.HDPipeline |
|||
{ |
|||
|
|||
partial class InfluenceVolumeUI |
|||
{ |
|||
|
|||
static readonly Color k_GizmoThemeColorBase = new Color(255f / 255f, 229f / 255f, 148f / 255f, 80f / 255f); |
|||
//static readonly Color k_GizmoThemeColorBaseFace = new Color(255f / 255f, 229f / 255f, 148f / 255f, 45f / 255f);
|
|||
static readonly Color k_GizmoThemeColorInfluence = new Color(83f / 255f, 255f / 255f, 95f / 255f, 75f / 255f); |
|||
//static readonly Color k_GizmoThemeColorInfluenceFace = new Color(83f / 255f, 255f / 255f, 95f / 255f, 17f / 255f);
|
|||
static readonly Color k_GizmoThemeColorInfluenceNormal = new Color(0f / 255f, 229f / 255f, 255f / 255f, 80f / 255f); |
|||
//static readonly Color k_GizmoThemeColorInfluenceNormalFace = new Color(0f / 255f, 229f / 255f, 255f / 255f, 36f / 255f);
|
|||
//static readonly Color k_GizmoThemeColorProjection = new Color(0x00 / 255f, 0xE5 / 255f, 0xFF / 255f, 0x20 / 255f);
|
|||
//static readonly Color k_GizmoThemeColorProjectionFace = new Color(0x00 / 255f, 0xE5 / 255f, 0xFF / 255f, 0x20 / 255f);
|
|||
//static readonly Color k_GizmoThemeColorDisabled = new Color(0x99 / 255f, 0x89 / 255f, 0x59 / 255f, 0x10 / 255f);
|
|||
//static readonly Color k_GizmoThemeColorDisabledFace = new Color(0x99 / 255f, 0x89 / 255f, 0x59 / 255f, 0x10 / 255f);
|
|||
|
|||
|
|||
static readonly GUIContent shapeContent = CoreEditorUtils.GetContent("Shape"); |
|||
static readonly GUIContent boxSizeContent = CoreEditorUtils.GetContent("Box Size|The size of the box in which the reflections will be applied to objects. The value is not affected by the Transform of the Game Object."); |
|||
static readonly GUIContent offsetContent = CoreEditorUtils.GetContent("Offset|The center of the InfluenceVolume in which the reflections will be applied to objects. The value is relative to the position of the Game Object."); |
|||
static readonly GUIContent blendDistanceContent = CoreEditorUtils.GetContent("Blend Distance|Area around the probe where it is blended with other probes. Only used in deferred probes."); |
|||
static readonly GUIContent blendNormalDistanceContent = CoreEditorUtils.GetContent("Blend Normal Distance|Area around the probe where the normals influence the probe. Only used in deferred probes."); |
|||
static readonly GUIContent faceFadeContent = CoreEditorUtils.GetContent("Face fade|Fade faces of the cubemap."); |
|||
|
|||
static readonly GUIContent radiusContent = CoreEditorUtils.GetContent("Radius"); |
|||
|
|||
static readonly GUIContent normalModeContent = CoreEditorUtils.GetContent("Normal|Normal parameters mode (only change for box shape)."); |
|||
static readonly GUIContent advancedModeContent = CoreEditorUtils.GetContent("Advanced|Advanced parameters mode (only change for box shape)."); |
|||
|
|||
static readonly string influenceVolumeHeader = "Influence Volume"; |
|||
} |
|||
} |
部分文件因为文件数量过多而无法显示
撰写
预览
正在加载...
取消
保存
Reference in new issue