public SerializedRenderPipelineSettings(SerializedProperty root) { this.root = root; supportShadowMask = root.Find((RenderPipelineSettings s) => s.supportShadowMask); supportSSR = root.Find((RenderPipelineSettings s) => s.supportSSR); supportSSAO = root.Find((RenderPipelineSettings s) => s.supportSSAO); supportSubsurfaceScattering = root.Find((RenderPipelineSettings s) => s.supportSubsurfaceScattering); increaseSssSampleCount = root.Find((RenderPipelineSettings s) => s.increaseSssSampleCount); supportVolumetrics = root.Find((RenderPipelineSettings s) => s.supportVolumetrics); increaseResolutionOfVolumetrics = root.Find((RenderPipelineSettings s) => s.increaseResolutionOfVolumetrics); supportLightLayers = root.Find((RenderPipelineSettings s) => s.supportLightLayers); supportedLitShaderMode = root.Find((RenderPipelineSettings s) => s.supportedLitShaderMode); supportDecals = root.Find((RenderPipelineSettings s) => s.supportDecals); supportMSAA = root.Find((RenderPipelineSettings s) => s.supportMSAA); MSAASampleCount = root.Find((RenderPipelineSettings s) => s.msaaSampleCount); supportMotionVectors = root.Find((RenderPipelineSettings s) => s.supportMotionVectors); supportRuntimeDebugDisplay = root.Find((RenderPipelineSettings s) => s.supportRuntimeDebugDisplay); supportDitheringCrossFade = root.Find((RenderPipelineSettings s) => s.supportDitheringCrossFade); supportRayTracing = root.Find((RenderPipelineSettings s) => s.supportRayTracing); lightLoopSettings = new SerializedGlobalLightLoopSettings(root.Find((RenderPipelineSettings s) => s.lightLoopSettings)); hdShadowInitParams = new SerializedHDShadowInitParameters(root.Find((RenderPipelineSettings s) => s.hdShadowInitParams)); decalSettings = new SerializedGlobalDecalSettings(root.Find((RenderPipelineSettings s) => s.decalSettings)); }
public SerializedRenderPipelineSettings(SerializedProperty root) { this.root = root; supportShadowMask = root.Find((RenderPipelineSettings s) => s.supportShadowMask); supportSSR = root.Find((RenderPipelineSettings s) => s.supportSSR); supportSSAO = root.Find((RenderPipelineSettings s) => s.supportSSAO); supportSubsurfaceScattering = root.Find((RenderPipelineSettings s) => s.supportSubsurfaceScattering); increaseSssSampleCount = root.Find((RenderPipelineSettings s) => s.increaseSssSampleCount); supportVolumetrics = root.Find((RenderPipelineSettings s) => s.supportVolumetrics); increaseResolutionOfVolumetrics = root.Find((RenderPipelineSettings s) => s.increaseResolutionOfVolumetrics); supportLightLayers = root.Find((RenderPipelineSettings s) => s.supportLightLayers); colorBufferFormat = root.Find((RenderPipelineSettings s) => s.colorBufferFormat); supportedLitShaderMode = root.Find((RenderPipelineSettings s) => s.supportedLitShaderMode); supportDecals = root.Find((RenderPipelineSettings s) => s.supportDecals); MSAASampleCount = root.Find((RenderPipelineSettings s) => s.msaaSampleCount); supportMotionVectors = root.Find((RenderPipelineSettings s) => s.supportMotionVectors); supportRuntimeDebugDisplay = root.Find((RenderPipelineSettings s) => s.supportRuntimeDebugDisplay); supportDitheringCrossFade = root.Find((RenderPipelineSettings s) => s.supportDitheringCrossFade); supportDistortion = root.Find((RenderPipelineSettings s) => s.supportDistortion); supportTransparentBackface = root.Find((RenderPipelineSettings s) => s.supportTransparentBackface); supportTransparentDepthPrepass = root.Find((RenderPipelineSettings s) => s.supportTransparentDepthPrepass); supportTransparentDepthPostpass = root.Find((RenderPipelineSettings s) => s.supportTransparentDepthPostpass); supportRayTracing = root.Find((RenderPipelineSettings s) => s.supportRayTracing); supportedRaytracingTier = root.Find((RenderPipelineSettings s) => s.supportedRaytracingTier); lightLoopSettings = new SerializedGlobalLightLoopSettings(root.Find((RenderPipelineSettings s) => s.lightLoopSettings)); hdShadowInitParams = new SerializedHDShadowInitParameters(root.Find((RenderPipelineSettings s) => s.hdShadowInitParams)); decalSettings = new SerializedGlobalDecalSettings(root.Find((RenderPipelineSettings s) => s.decalSettings)); postProcessSettings = new SerializedGlobalPostProcessSettings(root.Find((RenderPipelineSettings s) => s.postProcessSettings)); dynamicResolutionSettings = new SerializedDynamicResolutionSettings(root.Find((RenderPipelineSettings s) => s.dynamicResolutionSettings)); lowresTransparentSettings = new SerializedLowResTransparencySettings(root.Find((RenderPipelineSettings s) => s.lowresTransparentSettings)); }
static void Drawer_SectionSky(SerializedGlobalLightLoopSettings serialized, Editor owner) { EditorGUILayout.PropertyField(serialized.skyReflectionSize, k_SkyReflectionSizeContent); EditorGUILayout.PropertyField(serialized.skyLightingOverrideLayerMask, k_SkyLightingOverrideMaskContent); if (serialized.skyLightingOverrideLayerMask.intValue == -1) { EditorGUILayout.HelpBox(k_SkyLightingHelpBoxContent, MessageType.Warning); } }
static void Drawer_LightLoop(SerializedGlobalLightLoopSettings serialized, Editor o) { EditorGUILayout.DelayedIntField(serialized.maxDirectionalLightsOnScreen, k_MaxDirectionalContent); EditorGUILayout.DelayedIntField(serialized.maxPunctualLightsOnScreen, k_MaxPonctualContent); EditorGUILayout.DelayedIntField(serialized.maxAreaLightsOnScreen, k_MaxAreaContent); EditorGUILayout.DelayedIntField(serialized.maxEnvLightsOnScreen, k_MaxEnvContent); EditorGUILayout.DelayedIntField(serialized.maxDecalsOnScreen, k_MaxDecalContent); serialized.maxDirectionalLightsOnScreen.intValue = Mathf.Clamp(serialized.maxDirectionalLightsOnScreen.intValue, 1, LightLoop.k_MaxDirectionalLightsOnScreen); serialized.maxPunctualLightsOnScreen.intValue = Mathf.Clamp(serialized.maxPunctualLightsOnScreen.intValue, 1, LightLoop.k_MaxPunctualLightsOnScreen); serialized.maxAreaLightsOnScreen.intValue = Mathf.Clamp(serialized.maxAreaLightsOnScreen.intValue, 1, LightLoop.k_MaxAreaLightsOnScreen); serialized.maxEnvLightsOnScreen.intValue = Mathf.Clamp(serialized.maxEnvLightsOnScreen.intValue, 1, LightLoop.k_MaxEnvLightsOnScreen); serialized.maxDecalsOnScreen.intValue = Mathf.Clamp(serialized.maxDecalsOnScreen.intValue, 1, LightLoop.k_MaxDecalsOnScreen); }
static void Drawer_SectionReflection(SerializedGlobalLightLoopSettings serialized, Editor owner) { EditorGUILayout.PropertyField(serialized.reflectionCacheCompressed, k_CompressProbeCacheContent); EditorGUILayout.PropertyField(serialized.reflectionCubemapSize, k_CubemapSizeContent); EditorGUI.BeginChangeCheck(); EditorGUILayout.DelayedIntField(serialized.reflectionProbeCacheSize, k_ProbeCacheSizeContent); if (EditorGUI.EndChangeCheck()) { serialized.reflectionProbeCacheSize.intValue = Mathf.Clamp(serialized.reflectionProbeCacheSize.intValue, 1, TextureCache.k_MaxSupported); } long currentCache = ReflectionProbeCache.GetApproxCacheSizeInByte(serialized.reflectionProbeCacheSize.intValue, serialized.reflectionCubemapSize.intValue, serialized.supportFabricConvolution.boolValue ? 2 : 1); if (currentCache > LightLoop.k_MaxCacheSize) { int reserved = ReflectionProbeCache.GetMaxCacheSizeForWeightInByte(LightLoop.k_MaxCacheSize, serialized.reflectionCubemapSize.intValue, serialized.supportFabricConvolution.boolValue ? 2 : 1); string message = string.Format(k_CacheErrorFormat, HumanizeWeight(currentCache), reserved); EditorGUILayout.HelpBox(message, MessageType.Error); } else { string message = string.Format(k_CacheInfoFormat, HumanizeWeight(currentCache)); EditorGUILayout.HelpBox(message, MessageType.Info); } EditorGUILayout.Space(); EditorGUILayout.PropertyField(serialized.planarReflectionCacheCompressed, k_CompressPlanarProbeCacheContent); EditorGUILayout.PropertyField(serialized.planarReflectionCubemapSize, k_PlanarTextureSizeContent); EditorGUI.BeginChangeCheck(); EditorGUILayout.DelayedIntField(serialized.planarReflectionProbeCacheSize, k_PlanarProbeCacheSizeContent); if (EditorGUI.EndChangeCheck()) { serialized.planarReflectionProbeCacheSize.intValue = Mathf.Clamp(serialized.planarReflectionProbeCacheSize.intValue, 1, TextureCache.k_MaxSupported); } currentCache = PlanarReflectionProbeCache.GetApproxCacheSizeInByte(serialized.planarReflectionProbeCacheSize.intValue, serialized.planarReflectionCubemapSize.intValue, 1); if (currentCache > LightLoop.k_MaxCacheSize) { int reserved = PlanarReflectionProbeCache.GetMaxCacheSizeForWeightInByte(LightLoop.k_MaxCacheSize, serialized.planarReflectionCubemapSize.intValue, 1); string message = string.Format(k_CacheErrorFormat, HumanizeWeight(currentCache), reserved); EditorGUILayout.HelpBox(message, MessageType.Error); } else { string message = string.Format(k_CacheInfoFormat, HumanizeWeight(currentCache)); EditorGUILayout.HelpBox(message, MessageType.Info); } EditorGUILayout.PropertyField(serialized.supportFabricConvolution, k_SupportFabricBSDFConvolutionContent); }
static void Drawer_SectionCookies(SerializedGlobalLightLoopSettings serialized, Editor owner) { EditorGUILayout.PropertyField(serialized.cookieSize, k_CoockieSizeContent); EditorGUI.BeginChangeCheck(); EditorGUILayout.DelayedIntField(serialized.cookieTexArraySize, k_CookieTextureArraySizeContent); if (EditorGUI.EndChangeCheck()) { serialized.cookieTexArraySize.intValue = Mathf.Clamp(serialized.cookieTexArraySize.intValue, 1, TextureCache.k_MaxSupported); } long currentCache = TextureCache2D.GetApproxCacheSizeInByte(serialized.cookieTexArraySize.intValue, serialized.cookieSize.intValue, 1); if (currentCache > LightLoop.k_MaxCacheSize) { int reserved = TextureCache2D.GetMaxCacheSizeForWeightInByte(LightLoop.k_MaxCacheSize, serialized.cookieSize.intValue, 1); string message = string.Format(k_CacheErrorFormat, HumanizeWeight(currentCache), reserved); EditorGUILayout.HelpBox(message, MessageType.Error); } else { string message = string.Format(k_CacheInfoFormat, HumanizeWeight(currentCache)); EditorGUILayout.HelpBox(message, MessageType.Info); } EditorGUILayout.PropertyField(serialized.pointCookieSize, k_PointCoockieSizeContent); EditorGUI.BeginChangeCheck(); EditorGUILayout.DelayedIntField(serialized.cubeCookieTexArraySize, k_PointCookieTextureArraySizeContent); if (EditorGUI.EndChangeCheck()) { serialized.cubeCookieTexArraySize.intValue = Mathf.Clamp(serialized.cubeCookieTexArraySize.intValue, 1, TextureCache.k_MaxSupported); } currentCache = TextureCacheCubemap.GetApproxCacheSizeInByte(serialized.cubeCookieTexArraySize.intValue, serialized.pointCookieSize.intValue, 1); if (currentCache > LightLoop.k_MaxCacheSize) { int reserved = TextureCacheCubemap.GetMaxCacheSizeForWeightInByte(LightLoop.k_MaxCacheSize, serialized.pointCookieSize.intValue, 1); string message = string.Format(k_CacheErrorFormat, HumanizeWeight(currentCache), reserved); EditorGUILayout.HelpBox(message, MessageType.Error); } else { string message = string.Format(k_CacheInfoFormat, HumanizeWeight(currentCache)); EditorGUILayout.HelpBox(message, MessageType.Info); } }