From fad06ef0f10bfc423dc4f610c86760c2eb95ae21 Mon Sep 17 00:00:00 2001 From: Geoff Birch Date: Mon, 30 Oct 2023 11:15:42 +0000 Subject: [PATCH] Grpahics changes and converter variant changes --- .../AssetBundleConverterMaterialGenerator.cs | 7 +++++++ .../Renderer/UniversalRenderPipelineAsset.asset | 16 ++++++++-------- .../UniversalRenderPipelineGlobalSettings.asset | 11 ++--------- .../ProjectSettings/GraphicsSettings.asset | 13 ++++++------- 4 files changed, 23 insertions(+), 24 deletions(-) diff --git a/asset-bundle-converter/Assets/AssetBundleConverter/Wrappers/Implementations/Default/AssetBundleConverterMaterialGenerator.cs b/asset-bundle-converter/Assets/AssetBundleConverter/Wrappers/Implementations/Default/AssetBundleConverterMaterialGenerator.cs index d21955a3..2511e99a 100644 --- a/asset-bundle-converter/Assets/AssetBundleConverter/Wrappers/Implementations/Default/AssetBundleConverterMaterialGenerator.cs +++ b/asset-bundle-converter/Assets/AssetBundleConverter/Wrappers/Implementations/Default/AssetBundleConverterMaterialGenerator.cs @@ -24,8 +24,15 @@ public override Material GenerateMaterial(int materialIndex, GLTFast.Schema.Mate if (useSceneShader) { + foreach (var keywordName in mat.shaderKeywords) + { + mat.DisableKeyword(keywordName); + } + // Enable Forward+ and soft shadows mat.EnableKeyword("_FORWARD_PLUS"); + mat.EnableKeyword("_NORMALMAP"); + mat.EnableKeyword("_EMISSION"); mat.EnableKeyword("_ADDITIONAL_LIGHT_SHADOWS"); mat.EnableKeyword("_MAIN_LIGHT_SHADOWS_CASCADE"); mat.EnableKeyword("_SHADOWS_SOFT"); diff --git a/asset-bundle-converter/Assets/Renderer/UniversalRenderPipelineAsset.asset b/asset-bundle-converter/Assets/Renderer/UniversalRenderPipelineAsset.asset index 25d49f27..c5de70e9 100644 --- a/asset-bundle-converter/Assets/Renderer/UniversalRenderPipelineAsset.asset +++ b/asset-bundle-converter/Assets/Renderer/UniversalRenderPipelineAsset.asset @@ -32,25 +32,25 @@ MonoBehaviour: m_FsrSharpness: 0.92 m_EnableLODCrossFade: 1 m_LODCrossFadeDitheringType: 1 - m_ShEvalMode: 0 + m_ShEvalMode: 3 m_MainLightRenderingMode: 1 m_MainLightShadowsSupported: 1 m_MainLightShadowmapResolution: 2048 m_AdditionalLightsRenderingMode: 1 m_AdditionalLightsPerObjectLimit: 4 - m_AdditionalLightShadowsSupported: 0 - m_AdditionalLightsShadowmapResolution: 512 + m_AdditionalLightShadowsSupported: 1 + m_AdditionalLightsShadowmapResolution: 4096 m_AdditionalLightsShadowResolutionTierLow: 128 m_AdditionalLightsShadowResolutionTierMedium: 256 m_AdditionalLightsShadowResolutionTierHigh: 512 m_ReflectionProbeBlending: 0 m_ReflectionProbeBoxProjection: 0 - m_ShadowDistance: 50 - m_ShadowCascadeCount: 1 + m_ShadowDistance: 200 + m_ShadowCascadeCount: 4 m_Cascade2Split: 0.25 m_Cascade3Split: {x: 0.1, y: 0.3} - m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467} - m_CascadeBorder: 0.1 + m_Cascade4Split: {x: 0.049999997, y: 0.14999999, z: 0.29999998} + m_CascadeBorder: 0.42857143 m_ShadowDepthBias: 1 m_ShadowNormalBias: 1 m_AnyShadowsSupported: 1 @@ -62,7 +62,7 @@ MonoBehaviour: m_AdditionalLightsCookieFormat: 3 m_UseSRPBatcher: 1 m_SupportsDynamicBatching: 0 - m_MixedLightingSupported: 1 + m_MixedLightingSupported: 0 m_SupportsLightCookies: 1 m_SupportsLightLayers: 0 m_DebugLevel: 0 diff --git a/asset-bundle-converter/Assets/UniversalRenderPipelineGlobalSettings.asset b/asset-bundle-converter/Assets/UniversalRenderPipelineGlobalSettings.asset index 98f0dfda..cc13891e 100644 --- a/asset-bundle-converter/Assets/UniversalRenderPipelineGlobalSettings.asset +++ b/asset-bundle-converter/Assets/UniversalRenderPipelineGlobalSettings.asset @@ -14,14 +14,7 @@ MonoBehaviour: m_EditorClassIdentifier: k_AssetVersion: 3 m_RenderingLayerNames: - - Light Layer default - - Light Layer 1 - - Light Layer 2 - - Light Layer 3 - - Light Layer 4 - - Light Layer 5 - - Light Layer 6 - - Light Layer 7 + - Default m_ValidRenderingLayers: 255 lightLayerName0: Light Layer default lightLayerName1: Light Layer 1 @@ -32,7 +25,7 @@ MonoBehaviour: lightLayerName6: Light Layer 6 lightLayerName7: Light Layer 7 m_StripDebugVariants: 1 - m_StripUnusedPostProcessingVariants: 0 + m_StripUnusedPostProcessingVariants: 1 m_StripUnusedVariants: 1 m_StripUnusedLODCrossFadeVariants: 1 m_StripScreenCoordOverrideVariants: 1 diff --git a/asset-bundle-converter/ProjectSettings/GraphicsSettings.asset b/asset-bundle-converter/ProjectSettings/GraphicsSettings.asset index 9707b566..e1d68385 100644 --- a/asset-bundle-converter/ProjectSettings/GraphicsSettings.asset +++ b/asset-bundle-converter/ProjectSettings/GraphicsSettings.asset @@ -3,7 +3,7 @@ --- !u!30 &1 GraphicsSettings: m_ObjectHideFlags: 0 - serializedVersion: 14 + serializedVersion: 15 m_Deferred: m_Mode: 1 m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} @@ -13,9 +13,6 @@ GraphicsSettings: m_ScreenSpaceShadows: m_Mode: 1 m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} - m_LegacyDeferred: - m_Mode: 1 - m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} m_DepthNormals: m_Mode: 1 m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} @@ -49,10 +46,11 @@ GraphicsSettings: m_LightmapStripping: 1 m_FogStripping: 1 m_InstancingStripping: 0 + m_BrgStripping: 0 m_LightmapKeepPlain: 0 m_LightmapKeepDirCombined: 0 m_LightmapKeepDynamicPlain: 0 - m_LightmapKeepDynamicDirCombined: 1 + m_LightmapKeepDynamicDirCombined: 0 m_LightmapKeepShadowMask: 0 m_LightmapKeepSubtractive: 0 m_FogKeepLinear: 1 @@ -65,5 +63,6 @@ GraphicsSettings: m_LogWhenShaderIsCompiled: 0 m_SRPDefaultSettings: UnityEngine.Rendering.Universal.UniversalRenderPipeline: {fileID: 11400000, guid: 235a1eb1677011447b7e019d325a8a0e, type: 2} - m_CameraRelativeLightCulling: 0 - m_CameraRelativeShadowCulling: 0 + m_LightProbeOutsideHullStrategy: 0 + m_CameraRelativeLightCulling: 1 + m_CameraRelativeShadowCulling: 1