From 76e65286fd0369fbae7b258921e8e95be67b0fc0 Mon Sep 17 00:00:00 2001 From: hevinci Date: Thu, 3 Nov 2022 20:18:05 +0800 Subject: [PATCH] Update basic sample --- .../ShaderVariants/MyShaderVariants.json | 229 ++++++++++-------- .../MyShaderVariants.shadervariants | 31 ++- 2 files changed, 148 insertions(+), 112 deletions(-) diff --git a/Assets/YooAsset/Samples~/Basic Sample/GameArt/ShaderVariants/MyShaderVariants.json b/Assets/YooAsset/Samples~/Basic Sample/GameArt/ShaderVariants/MyShaderVariants.json index af1dd44..8060666 100644 --- a/Assets/YooAsset/Samples~/Basic Sample/GameArt/ShaderVariants/MyShaderVariants.json +++ b/Assets/YooAsset/Samples~/Basic Sample/GameArt/ShaderVariants/MyShaderVariants.json @@ -1,155 +1,194 @@ { - "ShaderCount": 0, - "VariantCount": 0, - "ShaderVariants": [ - { - "AssetPath": "Resources/unity_builtin_extra", - "ShaderName": "Hidden/Internal-ScreenSpaceShadows", - "PassType": 0, - "Keywords": [ - "SHADOWS_SINGLE_CASCADE", - "SHADOWS_SPLIT_SPHERES" - ] - }, + "ShaderTotalCount": 12, + "VariantTotalCount": 16, + "ShaderVariantInfos": [ { "AssetPath": "Resources/unity_builtin_extra", "ShaderName": "Hidden/BlitCopy", - "PassType": 0, - "Keywords": [ - "" + "ShaderVariantElements": [ + { + "PassType": 0, + "Keywords": [ + "" + ] + } ] }, { "AssetPath": "Resources/unity_builtin_extra", "ShaderName": "Skybox/Procedural", - "PassType": 0, - "Keywords": [ - "BILLBOARD_FACE_CAMERA_POS", - "UNITY_HDR_ON", - "_SUNDISK_SIMPLE" - ] - }, - { - "AssetPath": "Resources/unity_builtin_extra", - "ShaderName": "Skybox/Procedural", - "PassType": 0, - "Keywords": [ - "BILLBOARD_FACE_CAMERA_POS", - "SOFTPARTICLES_ON", - "UNITY_HDR_ON", - "_SUNDISK_SIMPLE" + "ShaderVariantElements": [ + { + "PassType": 0, + "Keywords": [ + "BILLBOARD_FACE_CAMERA_POS", + "_SUNDISK_SIMPLE" + ] + } ] }, { "AssetPath": "Resources/unity_builtin_extra", "ShaderName": "Hidden/Internal-GUITextureClip", - "PassType": 0, - "Keywords": [ - "" + "ShaderVariantElements": [ + { + "PassType": 0, + "Keywords": [ + "" + ] + } ] }, { "AssetPath": "Resources/unity_builtin_extra", "ShaderName": "Hidden/Internal-GUITextureClipText", - "PassType": 0, - "Keywords": [ - "" + "ShaderVariantElements": [ + { + "PassType": 0, + "Keywords": [ + "" + ] + } ] }, { "AssetPath": "Resources/unity_builtin_extra", "ShaderName": "Hidden/Internal-GUITexture", - "PassType": 0, - "Keywords": [ - "" + "ShaderVariantElements": [ + { + "PassType": 0, + "Keywords": [ + "" + ] + } ] }, { "AssetPath": "Resources/unity_builtin_extra", "ShaderName": "Hidden/Internal-GUITextureBlit", - "PassType": 0, - "Keywords": [ - "" + "ShaderVariantElements": [ + { + "PassType": 0, + "Keywords": [ + "" + ] + } ] }, { "AssetPath": "Resources/unity_builtin_extra", "ShaderName": "Hidden/Internal-GUIRoundedRect", - "PassType": 0, - "Keywords": [ - "" + "ShaderVariantElements": [ + { + "PassType": 0, + "Keywords": [ + "" + ] + } ] }, { "AssetPath": "Resources/unity_builtin_extra", "ShaderName": "Hidden/Internal-GUIRoundedRectWithColorPerBorder", - "PassType": 0, - "Keywords": [ - "" + "ShaderVariantElements": [ + { + "PassType": 0, + "Keywords": [ + "" + ] + } ] }, { "AssetPath": "Resources/unity_builtin_extra", "ShaderName": "Hidden/Internal-UIRAtlasBlitCopy", - "PassType": 0, - "Keywords": [ - "" + "ShaderVariantElements": [ + { + "PassType": 0, + "Keywords": [ + "" + ] + } ] }, { "AssetPath": "Resources/unity_builtin_extra", "ShaderName": "Hidden/UIElements/EditorUIE", - "PassType": 0, - "Keywords": [ - "BILLBOARD_FACE_CAMERA_POS" + "ShaderVariantElements": [ + { + "PassType": 0, + "Keywords": [ + "BILLBOARD_FACE_CAMERA_POS" + ] + } ] }, { "AssetPath": "Resources/unity_builtin_extra", - "ShaderName": "Hidden/UIElements/EditorUIE", - "PassType": 0, - "Keywords": [ - "BILLBOARD_FACE_CAMERA_POS", - "SOFTPARTICLES_ON" + "ShaderName": "Mobile/Diffuse", + "ShaderVariantElements": [ + { + "PassType": 4, + "Keywords": [ + "BILLBOARD_FACE_CAMERA_POS", + "DIRECTIONAL", + "LIGHTPROBE_SH", + "SHADOWS_SCREEN", + "SHADOWS_SOFT", + "SHADOWS_SPLIT_SPHERES" + ] + }, + { + "PassType": 8, + "Keywords": [ + "" + ] + }, + { + "PassType": 8, + "Keywords": [ + "SHADOWS_DEPTH", + "SHADOWS_SOFT", + "SHADOWS_SPLIT_SPHERES" + ] + } ] }, { - "AssetPath": "Assets/GameRes/Shaders/MyUnlitShader.shader", - "ShaderName": "Unlit/MyUnlitShader", - "PassType": 0, - "Keywords": [ - "BILLBOARD_FACE_CAMERA_POS", - "UNITY_HDR_ON" - ] - }, - { - "AssetPath": "Assets/GameArt/Shaders/StandardMobile.shader", + "AssetPath": "Assets/Samples/Basic Sample/GameArt/Shaders/StandardMobile.shader", "ShaderName": "Mobile/Standard", - "PassType": 1, - "Keywords": [ - "BILLBOARD_FACE_CAMERA_POS", - "UNITY_HDR_ON", - "_EMISSION", - "_METALLICGLOSSMAP", - "_NORMALMAP" - ] - }, - { - "AssetPath": "Assets/GameArt/Shaders/StandardMobile.shader", - "ShaderName": "Mobile/Standard", - "PassType": 8, - "Keywords": [ - "SHADOWS_DEPTH" - ] - }, - { - "AssetPath": "Assets/GameArt/Shaders/StandardMobile.shader", - "ShaderName": "Mobile/Standard", - "PassType": 8, - "Keywords": [ - "_EMISSION", - "_METALLICGLOSSMAP", - "_NORMALMAP" + "ShaderVariantElements": [ + { + "PassType": 1, + "Keywords": [ + "BILLBOARD_FACE_CAMERA_POS", + "SHADOWS_SCREEN", + "SHADOWS_SOFT", + "SHADOWS_SPLIT_SPHERES", + "_EMISSION", + "_METALLICGLOSSMAP", + "_NORMALMAP" + ] + }, + { + "PassType": 8, + "Keywords": [ + "_EMISSION", + "_METALLICGLOSSMAP", + "_NORMALMAP" + ] + }, + { + "PassType": 8, + "Keywords": [ + "SHADOWS_DEPTH", + "SHADOWS_SOFT", + "SHADOWS_SPLIT_SPHERES", + "_EMISSION", + "_METALLICGLOSSMAP", + "_NORMALMAP" + ] + } ] } ] diff --git a/Assets/YooAsset/Samples~/Basic Sample/GameArt/ShaderVariants/MyShaderVariants.shadervariants b/Assets/YooAsset/Samples~/Basic Sample/GameArt/ShaderVariants/MyShaderVariants.shadervariants index b348c4d..814708a 100644 --- a/Assets/YooAsset/Samples~/Basic Sample/GameArt/ShaderVariants/MyShaderVariants.shadervariants +++ b/Assets/YooAsset/Samples~/Basic Sample/GameArt/ShaderVariants/MyShaderVariants.shadervariants @@ -8,11 +8,6 @@ ShaderVariantCollection: m_PrefabAsset: {fileID: 0} m_Name: MyShaderVariants m_Shaders: - - first: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} - second: - variants: - - keywords: SHADOWS_SINGLE_CASCADE SHADOWS_SPLIT_SPHERES - passType: 0 - first: {fileID: 66, guid: 0000000000000000f000000000000000, type: 0} second: variants: @@ -21,9 +16,7 @@ ShaderVariantCollection: - first: {fileID: 106, guid: 0000000000000000f000000000000000, type: 0} second: variants: - - keywords: BILLBOARD_FACE_CAMERA_POS UNITY_HDR_ON _SUNDISK_SIMPLE - passType: 0 - - keywords: BILLBOARD_FACE_CAMERA_POS SOFTPARTICLES_ON UNITY_HDR_ON _SUNDISK_SIMPLE + - keywords: BILLBOARD_FACE_CAMERA_POS _SUNDISK_SIMPLE passType: 0 - first: {fileID: 9000, guid: 0000000000000000f000000000000000, type: 0} second: @@ -65,20 +58,24 @@ ShaderVariantCollection: variants: - keywords: BILLBOARD_FACE_CAMERA_POS passType: 0 - - keywords: BILLBOARD_FACE_CAMERA_POS SOFTPARTICLES_ON - passType: 0 - - first: {fileID: 4800000, guid: e1f5153da774c754aa283cf23fd64d56, type: 3} + - first: {fileID: 10703, guid: 0000000000000000f000000000000000, type: 0} second: variants: - - keywords: BILLBOARD_FACE_CAMERA_POS UNITY_HDR_ON - passType: 0 + - keywords: BILLBOARD_FACE_CAMERA_POS DIRECTIONAL LIGHTPROBE_SH SHADOWS_SCREEN + SHADOWS_SOFT SHADOWS_SPLIT_SPHERES + passType: 4 + - keywords: + passType: 8 + - keywords: SHADOWS_DEPTH SHADOWS_SOFT SHADOWS_SPLIT_SPHERES + passType: 8 - first: {fileID: 4800000, guid: ba67c8b1d5e59dc428ad9fc9270f8353, type: 3} second: variants: - - keywords: BILLBOARD_FACE_CAMERA_POS UNITY_HDR_ON _EMISSION _METALLICGLOSSMAP - _NORMALMAP + - keywords: BILLBOARD_FACE_CAMERA_POS SHADOWS_SCREEN SHADOWS_SOFT SHADOWS_SPLIT_SPHERES + _EMISSION _METALLICGLOSSMAP _NORMALMAP passType: 1 - - keywords: SHADOWS_DEPTH - passType: 8 - keywords: _EMISSION _METALLICGLOSSMAP _NORMALMAP passType: 8 + - keywords: SHADOWS_DEPTH SHADOWS_SOFT SHADOWS_SPLIT_SPHERES _EMISSION _METALLICGLOSSMAP + _NORMALMAP + passType: 8