This commit is contained in:
CortexCore
2024-11-16 16:00:16 +08:00
parent 99cf181bbe
commit 99253854e8
284 changed files with 112566 additions and 21 deletions

View File

@@ -0,0 +1,135 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Cube
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 2000
stringTagMap:
RenderType: Opaque
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 2800000, guid: a53709626f9b437db0bb194c74e17492, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: a53709626f9b437db0bb194c74e17492, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.5
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _UVSec: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
--- !u!114 &2165328522814242493
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 7

View File

@@ -0,0 +1,25 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: FaceOrientation
m_Shader: {fileID: 4800000, guid: be87678310594ea1b49e617b7ce3b697, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs: []
m_Floats: []
m_Colors:
- _ColorBack: {r: 0.7, g: 1, b: 0.7, a: 1}
- _ColorFront: {r: 1, g: 0.7, b: 0.7, a: 1}

View File

@@ -0,0 +1,135 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-3777250870574274005
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 7
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Ground
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 2000
stringTagMap:
RenderType: Opaque
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 2800000, guid: 52fd329b36c94d13a5731e1c128fcd4a, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: 52fd329b36c94d13a5731e1c128fcd4a, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.5
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _UVSec: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.37499997, g: 0.37499997, b: 0.37499997, a: 1}
- _Color: {r: 0.37499994, g: 0.37499994, b: 0.37499994, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []

View File

@@ -0,0 +1,241 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: MatCapMask_Mirror
m_Shader: {fileID: 4800000, guid: be891319084e9d147b09d89e80ce60e0, type: 3}
m_ShaderKeywords: _ _ADD_ANTIPODEAN_RIMLIGHT_ON _CAMERAROLLING_STABILIZER_ON _CAMERAROTATION_STABILIZER_ON
_EMISSIVE_SIMPLE _INVERSE_Z_AXIS_BLD_ON _IS_ANGELRING_OFF _IS_BLENDADDTOMATCAP_ON
_IS_CLIPPING_OFF _IS_FILTER_HICUTPOINTLIGHTCOLOR_ON _IS_LIGHTCOLOR_1ST_SHADE_ON
_IS_LIGHTCOLOR_2ND_SHADE_ON _IS_LIGHTCOLOR_AP_RIMLIGHT_ON _IS_LIGHTCOLOR_AR_ON
_IS_LIGHTCOLOR_BASE_ON _IS_LIGHTCOLOR_HIGHCOLOR_ON _IS_LIGHTCOLOR_MATCAP_ON _IS_LIGHTCOLOR_RIMLIGHT_ON
_IS_OUTLINE_CLIPPING_NO _IS_SPECULARTOHIGHCOLOR_ON _KANIMATCAP_ON _LIGHTDIRECTION_MASKON_ON
_MATCAP_ON _MatCap _OUTLINE_NML _RIMLIGHT_ON
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 2000
stringTagMap:
IgnoreProjection: False
RenderType: Opaque
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _1st_ShadeMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _2nd_ShadeMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _AngelRing_Sampler:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BakedNormal:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ClippingMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Emissive_Tex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _HighColor_Tex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MatCap_Sampler:
m_Texture: {fileID: 2800000, guid: c72bd5543bce4674929b05c755faa026, type: 3}
m_Scale: {x: 1, y: 1.09}
m_Offset: {x: 0, y: -0.04}
- _NormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMapForMatCap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OutlineTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Outline_Sampler:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Set_1st_ShadePosition:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Set_2nd_ShadePosition:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Set_HighColorMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Set_MatcapMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Set_RimLightMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ShadingGradeMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _1st2nd_Shades_Feather: 0.0001
- _1st_ShadeColor_Feather: 0.0001
- _1st_ShadeColor_Step: 0.8
- _2nd_ShadeColor_Feather: 0.0001
- _2nd_ShadeColor_Step: 0.56
- _ARSampler_AlphaOn: 0
- _AR_OffsetU: 0
- _AR_OffsetV: 0.3
- _Add_Antipodean_RimLight: 1
- _AngelRing: 0
- _Ap_RimLight_FeatherOff: 0
- _Ap_RimLight_Power: 0.86
- _AutoRenderQueue: 1
- _BaseColor_Step: 0.8
- _BaseShade_Feather: 0.0001
- _Base_Speed: 0
- _BlurLevelMatcap: 0
- _BlurLevelSGM: 0
- _BumpScale: 1
- _BumpScaleMatcap: 1
- _CameraRolling_Stabilizer: 1
- _CameraRotation_Stabilizer: 1
- _ClippingMode: 0
- _Clipping_Level: 0
- _ColorBoost: 1
- _ColorShift_Speed: 0
- _CullMode: 2
- _Cutoff: 0.5
- _EMISSIVE: 0
- _Farthest_Distance: 10
- _GI_Intensity: 0
- _HighColor_Power: 0.677
- _Inverse_Clipping: 0
- _Inverse_MatcapMask: 0
- _Inverse_Z_Axis_BLD: 1
- _IsBaseMapAlphaAsClippingMask: 0
- _Is_1st_ShadeColorOnly: 0
- _Is_BLD: 0
- _Is_BakedNormal: 0
- _Is_BlendAddToHiColor: 0
- _Is_BlendAddToMatCap: 1
- _Is_BlendBaseColor: 0
- _Is_ColorShift: 0
- _Is_Filter_HiCutPointLightColor: 1
- _Is_Filter_LightColor: 0
- _Is_LightColor_1st_Shade: 1
- _Is_LightColor_2nd_Shade: 1
- _Is_LightColor_AR: 1
- _Is_LightColor_Ap_RimLight: 1
- _Is_LightColor_Base: 1
- _Is_LightColor_HighColor: 1
- _Is_LightColor_MatCap: 0
- _Is_LightColor_Outline: 1
- _Is_LightColor_RimLight: 1
- _Is_NormalMapForMatCap: 0
- _Is_NormalMapToBase: 0
- _Is_NormalMapToHighColor: 0
- _Is_NormalMapToRimLight: 0
- _Is_Ortho: 0
- _Is_OutlineTex: 0
- _Is_PingPong_Base: 0
- _Is_SpecularToHighColor: 1
- _Is_UseTweakHighColorOnShadow: 0
- _Is_UseTweakMatCapOnShadow: 0
- _Is_ViewCoord_Scroll: 0
- _Is_ViewShift: 0
- _LightDirection_MaskOn: 1
- _LodLevelMatcap: 0
- _LodLevelSGM: 0
- _MatCap: 1
- _Nearest_Distance: 0.5
- _OUTLINE: 0
- _Offset_X_Axis_BLD: 0.072
- _Offset_Y_Axis_BLD: 0.185
- _Offset_Z: 0
- _Outline_Width: 12
- _RimLight: 1
- _RimLight_FeatherOff: 0
- _RimLight_InsideMask: 0.0001
- _RimLight_Power: 0.728
- _Rotate_EmissiveUV: 0
- _Rotate_MatCapUV: 0
- _Rotate_NormalMapForMatCapUV: 0
- _SPRDefaultUnlitColorMask: 15
- _SRPDefaultUnlitColMode: 1
- _Scroll_EmissiveU: 0
- _Scroll_EmissiveV: 0
- _Set_SystemShadowsToBase: 0
- _ShadeColor_Step: 0.56
- _StencilComp: 0
- _StencilMode: 0
- _StencilNo: 1
- _StencilOpFail: 0
- _StencilOpPass: 0
- _StepOffset: 0
- _TransparentEnabled: 0
- _TweakHighColorOnShadow: 0
- _TweakMatCapOnShadow: 0.266
- _Tweak_HighColorMaskLevel: 0
- _Tweak_LightDirection_MaskLevel: 0
- _Tweak_MatCapUV: -0.019
- _Tweak_MatcapMaskLevel: 1
- _Tweak_RimLightMaskLevel: 0
- _Tweak_ShadingGradeMapLevel: 0
- _Tweak_SystemShadowsLevel: 0
- _Tweak_transparency: 0
- _Unlit_Intensity: 1
- _Use_1stAs2nd: 0
- _Use_BaseAs1st: 0
- _ZOverDrawMode: 0
- _ZWriteMode: 1
- _simpleUI: 0
- _use_ShadowMaskAsMatcapMask: 0
- _utsTechnique: 0
- _utsVersionX: 2
- _utsVersionY: 2
- _utsVersionZ: 0
m_Colors:
- _1st_ShadeColor: {r: 0.50735295, g: 0.50735295, b: 0.50735295, a: 1}
- _2nd_ShadeColor: {r: 0.3455882, g: 0.3455882, b: 0.3455882, a: 1}
- _AngelRing_Color: {r: 1, g: 1, b: 1, a: 1}
- _Ap_RimLightColor: {r: 0.10899655, g: 0.55742764, b: 0.8235294, a: 1}
- _BaseColor: {r: 0.71323526, g: 0.71323526, b: 0.71323526, a: 1}
- _Color: {r: 0.71323526, g: 0.71323526, b: 0.71323526, a: 1}
- _ColorShift: {r: 0, g: 0, b: 0, a: 1}
- _Emissive_Color: {r: 0, g: 0, b: 0, a: 1}
- _HighColor: {r: 0.12018816, g: 0.1865423, b: 0.8602941, a: 1}
- _MatCapColor: {r: 0.6838235, g: 0.571818, b: 0.20615268, a: 1}
- _Outline_Color: {r: 0.5, g: 0.5, b: 0.5, a: 1}
- _RimLightColor: {r: 0.9558824, g: 0.06325693, b: 0.70964074, a: 1}
- _ViewShift: {r: 0, g: 0, b: 0, a: 1}

View File

@@ -0,0 +1,37 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Mirror
m_Shader: {fileID: 4800000, guid: e2adf32f5e454e829a4ce64665dbc021, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 0, y: 0}
m_Offset: {x: 0, y: 0}
- _ReflectionTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats: []
m_Colors: []
m_BuildTextureStacks: []

View File

@@ -0,0 +1,135 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: MirrorFlame
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 2000
stringTagMap:
RenderType: Opaque
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.5
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _UVSec: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.40441176, g: 0.371702, b: 0.371702, a: 1}
- _Color: {r: 0.4044117, g: 0.37170196, b: 0.37170196, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
--- !u!114 &8304035635537127767
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 7

View File

@@ -0,0 +1,275 @@
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
// This MirrorReflection.cs is the version for Scriptable Render Pipeline.
namespace UnityEngine.Rendering.Toon.Universal.Samples
{
[ExecuteInEditMode] // Make mirror live-update even when not in play mode
public class MirrorReflection : MonoBehaviour
{
public enum Mode
{
water,
wall
}
public enum SetMirrorFor
{
GameView, // Set this mirror object for Game view.
SceneView // Set this mirror object for Scene view.
}
public Mode _Mode = Mode.water;
public SetMirrorFor _SetMirrorFor = SetMirrorFor.GameView;
public bool m_DisablePixelLights = true;
public int m_TextureSize = 256;
[SerializeField]
private float m_ClipPlaneOffset = 0.07f;
[SerializeField]
private float m_ClipPlaneNear = 0.3f;
[SerializeField]
private float m_ClipPlaneFar = 1000.0f;
public LayerMask m_ReflectLayers = -1;
private List<Camera> _m_RefrectionCameras = new List<Camera>();// Camera -> Camera table
private RenderTexture m_ReflectionTexture = null;
private int m_OldReflectionTextureSize = 0;
private static bool s_InsideRendering = false;
public void Update()
{
var rend = GetComponent<Renderer>();
if (!enabled || !rend || !rend.sharedMaterial || !rend.enabled)
return;
Camera cam = null;
switch (_SetMirrorFor){
case SetMirrorFor.GameView:
cam = Camera.main;
break;
case SetMirrorFor.SceneView:
cam = Camera.current;
break;
}
if (!cam)
return;
// Safeguard from recursive reflections.
if (s_InsideRendering)
return;
s_InsideRendering = true;
Camera reflectionCamera;
CreateMirrorObjects(cam, out reflectionCamera);
// find out the reflection plane: position and normal in world space
Vector3 pos = transform.position;
Vector3 normal;
if (_Mode == Mode.water)
{
normal = transform.up;
}
else
{
normal = transform.forward;
}
// Optionally disable pixel lights for reflection
int oldPixelLightCount = QualitySettings.pixelLightCount;
if (m_DisablePixelLights)
QualitySettings.pixelLightCount = 0;
UpdateCameraModes(cam, reflectionCamera);
// Render reflection
// Reflect camera around reflection plane
float d = -Vector3.Dot(normal, pos) - m_ClipPlaneOffset;
Vector4 reflectionPlane = new Vector4(normal.x, normal.y, normal.z, d);
Matrix4x4 reflection = Matrix4x4.zero;
CalculateReflectionMatrix(ref reflection, reflectionPlane);
Vector3 oldpos = cam.transform.position;
Vector3 newpos = reflection.MultiplyPoint(oldpos);
reflectionCamera.worldToCameraMatrix = cam.worldToCameraMatrix * reflection;
// Setup oblique projection matrix so that near plane is our reflection
// plane. This way we clip everything below/above it for free.
Vector4 clipPlane = CameraSpacePlane(reflectionCamera, pos, normal, 1.0f);
//Matrix4x4 projection = cam.projectionMatrix;
Matrix4x4 projection = cam.CalculateObliqueMatrix(clipPlane);
reflectionCamera.projectionMatrix = projection;
reflectionCamera.cullingMask = ~(1 << 4) & m_ReflectLayers.value; // never render water layer
reflectionCamera.targetTexture = m_ReflectionTexture;
GL.invertCulling = true;
reflectionCamera.transform.position = newpos;
Vector3 euler = cam.transform.eulerAngles;
reflectionCamera.transform.eulerAngles = new Vector3(0, euler.y, euler.z);
reflectionCamera.Render();
reflectionCamera.transform.position = oldpos;
GL.invertCulling = false;
Material[] materials = rend.sharedMaterials;
foreach (Material mat in materials)
{
if (mat.HasProperty("_ReflectionTex"))
mat.SetTexture("_ReflectionTex", m_ReflectionTexture);
}
// Restore pixel light count
if (m_DisablePixelLights)
QualitySettings.pixelLightCount = oldPixelLightCount;
s_InsideRendering = false;
}
// Cleanup all the objects we possibly have created
void OnDisable()
{
if (m_ReflectionTexture)
{
DestroyImmediate(m_ReflectionTexture);
m_ReflectionTexture = null;
}
if (_m_RefrectionCameras.Count != 0)
{
if (_m_RefrectionCameras[0] != null)
{
foreach (Camera Cam in _m_RefrectionCameras)
{
DestroyImmediate(Cam.gameObject);
}
}
}
_m_RefrectionCameras.Clear();
}
private void UpdateCameraModes(Camera src, Camera dest)
{
if (dest == null)
return;
// set camera to clear the same way as current camera
dest.clearFlags = src.clearFlags;
dest.backgroundColor = src.backgroundColor;
if (src.clearFlags == CameraClearFlags.Skybox)
{
Skybox sky = src.GetComponent(typeof(Skybox)) as Skybox;
Skybox mysky = dest.GetComponent(typeof(Skybox)) as Skybox;
if (!sky || !sky.material)
{
mysky.enabled = false;
}
else
{
mysky.enabled = true;
mysky.material = sky.material;
}
}
// update other values to match current camera.
// even if we are supplying custom camera&projection matrices,
// some of values are used elsewhere (e.g. skybox uses far plane)
dest.farClipPlane = m_ClipPlaneFar;// src.farClipPlane;
dest.nearClipPlane = m_ClipPlaneNear;// src.nearClipPlane;
dest.orthographic = src.orthographic;
dest.fieldOfView = src.fieldOfView;
dest.aspect = src.aspect;
dest.orthographicSize = src.orthographicSize;
}
// On-demand create any objects we need
private void CreateMirrorObjects(Camera currentCamera, out Camera reflectionCamera)
{
reflectionCamera = null;
// Reflection render texture
if (!m_ReflectionTexture || m_OldReflectionTextureSize != m_TextureSize)
{
if (m_ReflectionTexture)
DestroyImmediate(m_ReflectionTexture);
m_ReflectionTexture = new RenderTexture(m_TextureSize, m_TextureSize, 16);
m_ReflectionTexture.name = "__MirrorReflection" + GetInstanceID();
m_ReflectionTexture.isPowerOfTwo = true;
m_ReflectionTexture.hideFlags = HideFlags.DontSave;
m_OldReflectionTextureSize = m_TextureSize;
}
// Camera for reflection
if (_m_RefrectionCameras.Count == 0)
{
GameObject go = new GameObject("Mirror Refl Camera id" + GetInstanceID() + " for " + currentCamera.GetInstanceID(), typeof(Camera), typeof(Skybox));
reflectionCamera = go.GetComponent<Camera>();
reflectionCamera.enabled = false;
reflectionCamera.transform.position = transform.position;
reflectionCamera.transform.rotation = transform.rotation;
reflectionCamera.gameObject.AddComponent<FlareLayer>();
go.hideFlags = HideFlags.HideAndDontSave;
_m_RefrectionCameras.Add(reflectionCamera);
}
else
{
if (_m_RefrectionCameras[0] == null)
{
GameObject go = new GameObject("Mirror Refl Camera id" + GetInstanceID() + " for " + currentCamera.GetInstanceID(), typeof(Camera), typeof(Skybox));
reflectionCamera = go.GetComponent<Camera>();
reflectionCamera.enabled = false;
go.hideFlags = HideFlags.HideAndDontSave;
_m_RefrectionCameras.Add(reflectionCamera);
}
else
{
reflectionCamera = _m_RefrectionCameras[0];
}
reflectionCamera.transform.position = transform.position;
reflectionCamera.transform.rotation = transform.rotation;
}
}
// Extended sign: returns -1, 0 or 1 based on sign of a
private static float sgn(float a)
{
if (a > 0.0f) return 1.0f;
if (a < 0.0f) return -1.0f;
return 0.0f;
}
// Given position/normal of the plane, calculates plane in camera space.
private Vector4 CameraSpacePlane(Camera cam, Vector3 pos, Vector3 normal, float sideSign)
{
Vector3 offsetPos = pos + normal * m_ClipPlaneOffset;
Matrix4x4 m = cam.worldToCameraMatrix;
Vector3 cpos = m.MultiplyPoint(offsetPos);
Vector3 cnormal = m.MultiplyVector(normal).normalized * sideSign;
return new Vector4(cnormal.x, cnormal.y, cnormal.z, -Vector3.Dot(cpos, cnormal));
}
// Calculates reflection matrix around the given plane
private static void CalculateReflectionMatrix(ref Matrix4x4 reflectionMat, Vector4 plane)
{
reflectionMat.m00 = (1F - 2F * plane[0] * plane[0]);
reflectionMat.m01 = (-2F * plane[0] * plane[1]);
reflectionMat.m02 = (-2F * plane[0] * plane[2]);
reflectionMat.m03 = (-2F * plane[3] * plane[0]);
reflectionMat.m10 = (-2F * plane[1] * plane[0]);
reflectionMat.m11 = (1F - 2F * plane[1] * plane[1]);
reflectionMat.m12 = (-2F * plane[1] * plane[2]);
reflectionMat.m13 = (-2F * plane[3] * plane[1]);
reflectionMat.m20 = (-2F * plane[2] * plane[0]);
reflectionMat.m21 = (-2F * plane[2] * plane[1]);
reflectionMat.m22 = (1F - 2F * plane[2] * plane[2]);
reflectionMat.m23 = (-2F * plane[3] * plane[2]);
reflectionMat.m30 = 0F;
reflectionMat.m31 = 0F;
reflectionMat.m32 = 0F;
reflectionMat.m33 = 1F;
}
}
}

View File

@@ -0,0 +1,37 @@
Shader "Unlit/FaceOrientation"
{
Properties
{
_ColorFront ("Front Color", Color) = (1,0.7,0.7,1)
_ColorBack ("Back Color", Color) = (0.7,1,0.7,1)
}
SubShader
{
Pass
{
Cull Off // 裏向きのカリングをオフにします
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma target 3.0
float4 vert (float4 vertex : POSITION) : SV_POSITION
{
return UnityObjectToClipPos(vertex);
}
fixed4 _ColorFront;
fixed4 _ColorBack;
fixed4 frag (fixed facing : VFACE) : SV_Target
{
// VFACE 入力は正面向きでは負の値、
// 裏向きでは負の値です。その値によって
// 2 色のうちの 1 つを出力します。
return facing > 0 ? _ColorFront : _ColorBack;
}
ENDCG
}
}
}

View File

@@ -0,0 +1,45 @@
Shader "Hidden/UnityChan/MirrorReflection"
{
Properties
{
_MainTex ("Base (RGB)", 2D) = "white" {}
[HideInInspector] _ReflectionTex ("", 2D) = "white" {}
}
SubShader
{
Tags { "RenderType"="Opaque" }
LOD 100
Pass {
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
struct v2f
{
float2 uv : TEXCOORD0;
float4 refl : TEXCOORD1;
float4 pos : SV_POSITION;
};
float4 _MainTex_ST;
v2f vert(float4 pos : POSITION, float2 uv : TEXCOORD0)
{
v2f o;
o.pos = UnityObjectToClipPos (pos);
o.uv = TRANSFORM_TEX(uv, _MainTex);
o.refl = ComputeScreenPos (o.pos);
return o;
}
sampler2D _MainTex;
sampler2D _ReflectionTex;
fixed4 frag(v2f i) : SV_Target
{
fixed4 wcoord = (i.refl.xyzw/i.refl.w);
fixed4 tex = tex2D(_MainTex, i.uv);
fixed4 refl = tex2Dproj(_ReflectionTex, UNITY_PROJ_COORD(wcoord));
return tex * refl;
}
ENDCG
}
}
}

View File

@@ -0,0 +1,6 @@
Mirrorオブジェクトに関する仕様について    2020/03/11
Scriptable Render Pipeline版の仕様として、MirrorReflection.csは、ゲームビューもしくはシーンビューのどちらかでしか正しく動作しません。
1. ゲームビュー内のMirrorオブジェクトを動作させたい時には、MirrorReflectionコンポーネントのSet Mirror Forを"Game View"にして、プレイボタンを押してください。
2. シーンビュー内のMirrorオブジェクトを動作させたい時には、MirrorReflectionコンポーネントのSet Mirror Forを"Scene View"にして、プレイボタンを押してください。

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB