You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
83 lines
4.7 KiB
83 lines
4.7 KiB
using System;
|
|
using UnityEditor.Rendering;
|
|
using UnityEngine.Rendering.HighDefinition;
|
|
|
|
namespace UnityEditor.Rendering.HighDefinition
|
|
{
|
|
class SerializedHDShadowAtlasInitParams
|
|
{
|
|
public SerializedProperty shadowMapResolution;
|
|
public SerializedProperty cachedResolution;
|
|
public SerializedProperty shadowMapDepthBits;
|
|
public SerializedProperty useDynamicViewportRescale;
|
|
}
|
|
|
|
class SerializedHDShadowInitParameters
|
|
{
|
|
public SerializedProperty root;
|
|
|
|
public SerializedProperty directionalShadowMapDepthBits;
|
|
|
|
public SerializedHDShadowAtlasInitParams serializedPunctualAtlasInit;
|
|
public SerializedHDShadowAtlasInitParams serializedAreaAtlasInit;
|
|
|
|
public SerializedScalableSetting shadowResolutionDirectional;
|
|
public SerializedScalableSetting shadowResolutionPunctual;
|
|
public SerializedScalableSetting shadowResolutionArea;
|
|
|
|
public SerializedProperty allowDirectionalMixedCachedShadows;
|
|
public SerializedProperty maxDirectionalShadowMapResolution;
|
|
public SerializedProperty maxPunctualShadowMapResolution;
|
|
public SerializedProperty maxAreaShadowMapResolution;
|
|
|
|
public SerializedProperty maxShadowRequests;
|
|
|
|
public SerializedProperty punctualShadowFilteringQuality;
|
|
public SerializedProperty directionalShadowFilteringQuality;
|
|
public SerializedProperty areaShadowFilteringQuality;
|
|
|
|
public SerializedProperty supportScreenSpaceShadows;
|
|
public SerializedProperty maxScreenSpaceShadowSlots;
|
|
public SerializedProperty screenSpaceShadowBufferFormat;
|
|
|
|
public SerializedHDShadowInitParameters(SerializedProperty root)
|
|
{
|
|
this.root = root;
|
|
|
|
directionalShadowMapDepthBits = root.Find((HDShadowInitParameters s) => s.directionalShadowsDepthBits);
|
|
|
|
serializedPunctualAtlasInit = new SerializedHDShadowAtlasInitParams
|
|
{
|
|
shadowMapResolution = root.Find((HDShadowInitParameters s) => s.punctualLightShadowAtlas.shadowAtlasResolution),
|
|
cachedResolution = root.Find((HDShadowInitParameters s) => s.cachedPunctualLightShadowAtlas),
|
|
shadowMapDepthBits = root.Find((HDShadowInitParameters s) => s.punctualLightShadowAtlas.shadowAtlasDepthBits),
|
|
useDynamicViewportRescale = root.Find((HDShadowInitParameters s) => s.punctualLightShadowAtlas.useDynamicViewportRescale)
|
|
};
|
|
|
|
serializedAreaAtlasInit = new SerializedHDShadowAtlasInitParams
|
|
{
|
|
shadowMapResolution = root.Find((HDShadowInitParameters s) => s.areaLightShadowAtlas.shadowAtlasResolution),
|
|
cachedResolution = root.Find((HDShadowInitParameters s) => s.cachedAreaLightShadowAtlas),
|
|
shadowMapDepthBits = root.Find((HDShadowInitParameters s) => s.areaLightShadowAtlas.shadowAtlasDepthBits),
|
|
useDynamicViewportRescale = root.Find((HDShadowInitParameters s) => s.areaLightShadowAtlas.useDynamicViewportRescale)
|
|
};
|
|
|
|
maxShadowRequests = root.Find((HDShadowInitParameters s) => s.maxShadowRequests);
|
|
|
|
shadowResolutionDirectional = new SerializedScalableSetting(root.Find((HDShadowInitParameters s) => s.shadowResolutionDirectional));
|
|
shadowResolutionPunctual = new SerializedScalableSetting(root.Find((HDShadowInitParameters s) => s.shadowResolutionPunctual));
|
|
shadowResolutionArea = new SerializedScalableSetting(root.Find((HDShadowInitParameters s) => s.shadowResolutionArea));
|
|
maxDirectionalShadowMapResolution = root.Find((HDShadowInitParameters s) => s.maxDirectionalShadowMapResolution);
|
|
maxPunctualShadowMapResolution = root.Find((HDShadowInitParameters s) => s.maxPunctualShadowMapResolution);
|
|
maxAreaShadowMapResolution = root.Find((HDShadowInitParameters s) => s.maxAreaShadowMapResolution);
|
|
allowDirectionalMixedCachedShadows = root.Find((HDShadowInitParameters s) => s.allowDirectionalMixedCachedShadows);
|
|
|
|
punctualShadowFilteringQuality = root.Find((HDShadowInitParameters s) => s.punctualShadowFilteringQuality);
|
|
directionalShadowFilteringQuality = root.Find((HDShadowInitParameters s) => s.directionalShadowFilteringQuality);
|
|
areaShadowFilteringQuality = root.Find((HDShadowInitParameters s) => s.areaShadowFilteringQuality);
|
|
supportScreenSpaceShadows = root.Find((HDShadowInitParameters s) => s.supportScreenSpaceShadows);
|
|
maxScreenSpaceShadowSlots = root.Find((HDShadowInitParameters s) => s.maxScreenSpaceShadowSlots);
|
|
screenSpaceShadowBufferFormat = root.Find((HDShadowInitParameters s) => s.screenSpaceShadowBufferFormat);
|
|
}
|
|
}
|
|
}
|