URP Sprite Shadow尝试
This commit is contained in:
parent
603124916c
commit
b856b4332e
@ -425,6 +425,7 @@ Transform:
|
||||
- {fileID: 7298952062196169060}
|
||||
- {fileID: 2456820585013258503}
|
||||
- {fileID: 6363363527926158152}
|
||||
- {fileID: 3741871756500085826}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@ -1900,6 +1901,88 @@ SpriteRenderer:
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!1 &7311173354800567004
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3741871756500085826}
|
||||
- component: {fileID: 8171764776535392305}
|
||||
m_Layer: 0
|
||||
m_Name: GameObject
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &3741871756500085826
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7311173354800567004}
|
||||
m_LocalRotation: {x: 0, y: 0.079764, z: 0, w: 0.9968138}
|
||||
m_LocalPosition: {x: -0.885, y: 0.38, z: 0.983}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1377482919428722225}
|
||||
m_RootOrder: 26
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 9.15, z: 0}
|
||||
--- !u!212 &8171764776535392305
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7311173354800567004}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 0
|
||||
m_RayTraceProcedural: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 6bf0b53850e427f449311f87791af682, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 0
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_Sprite: {fileID: 21300000, guid: d393abeeaea1ca3408b8290d75313d3e, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 1
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 3.12, y: 1.12}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!1 &7523476513804204743
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -104,7 +104,7 @@ SpriteRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7911578311893482342}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_MotionVectors: 1
|
||||
|
@ -38,7 +38,7 @@ RenderSettings:
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 2138677392}
|
||||
m_IndirectSpecularColor: {r: 0.2850269, g: 0.3713935, b: 0.49601045, a: 1}
|
||||
m_IndirectSpecularColor: {r: 0.28502655, g: 0.37139302, b: 0.49600938, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
@ -176,6 +176,14 @@ PrefabInstance:
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1033268005635665460, guid: c2b00befcb5658541b1e5a6850840fd3, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1033268005635665463, guid: c2b00befcb5658541b1e5a6850840fd3, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 1.48
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7219867924276195500, guid: c2b00befcb5658541b1e5a6850840fd3, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Axibug
|
||||
@ -224,6 +232,14 @@ PrefabInstance:
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7911578312283702633, guid: c2b00befcb5658541b1e5a6850840fd3, type: 3}
|
||||
propertyPath: m_FlipX
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7911578312283702633, guid: c2b00befcb5658541b1e5a6850840fd3, type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 6bf0b53850e427f449311f87791af682, type: 2}
|
||||
- target: {fileID: 7918943641728165702, guid: c2b00befcb5658541b1e5a6850840fd3, type: 3}
|
||||
propertyPath: m_LocalScale.x
|
||||
value: 10
|
||||
@ -498,7 +514,7 @@ Light:
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_BoundingSphereOverride: {x: 9.1835e-41, y: 1.1681478e-37, z: 9.78048e-39, w: NaN}
|
||||
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0.0000000058637433}
|
||||
m_UseBoundingSphereOverride: 0
|
||||
m_UseViewFrustumForShadowCasterCull: 1
|
||||
m_ShadowRadius: 0
|
||||
|
40
Assets/Shader/Shader Graphs_SpriteHD.mat
Normal file
40
Assets/Shader/Shader Graphs_SpriteHD.mat
Normal file
@ -0,0 +1,40 @@
|
||||
%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: Shader Graphs_SpriteHD
|
||||
m_Shader: {fileID: -6465566751694194690, guid: 8dbe0aa8cdff835439b6554f4deec4c5, type: 3}
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 9018b269c00ab544d814cc041d70fc91, type: 3}
|
||||
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_Floats: []
|
||||
m_Colors: []
|
||||
m_BuildTextureStacks: []
|
8
Assets/Shader/Shader Graphs_SpriteHD.mat.meta
Normal file
8
Assets/Shader/Shader Graphs_SpriteHD.mat.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6bf0b53850e427f449311f87791af682
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
1211
Assets/Shader/SpriteHD.shadergraph
Normal file
1211
Assets/Shader/SpriteHD.shadergraph
Normal file
File diff suppressed because it is too large
Load Diff
10
Assets/Shader/SpriteHD.shadergraph.meta
Normal file
10
Assets/Shader/SpriteHD.shadergraph.meta
Normal file
@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8dbe0aa8cdff835439b6554f4deec4c5
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
|
@ -1,67 +0,0 @@
|
||||
// Sprite Shadow Shader - AllenDevs
|
||||
|
||||
Shader "Sprites/Custom/SpriteShadow"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[PerRendererData] _MainTex("Sprite Texture", 2D) = "white" {}
|
||||
_Color("Tint", Color) = (1,1,1,1)
|
||||
[MaterialToggle] PixelSnap("Pixel snap", Float) = 0
|
||||
[HideInInspector] _RendererColor("RendererColor", Color) = (1,1,1,1)
|
||||
[HideInInspector] _Flip("Flip", Vector) = (1,1,1,1)
|
||||
[PerRendererData] _AlphaTex("External Alpha", 2D) = "white" {}
|
||||
[PerRendererData] _EnableExternalAlpha("Enable External Alpha", Float) = 0
|
||||
_Cutoff("Alpha Cutoff", Range(0,1)) = 0.5
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags
|
||||
{
|
||||
"Queue" = "Transparent"
|
||||
"IgnoreProjector" = "True"
|
||||
"RenderType" = "Transparent"
|
||||
"PreviewType" = "Plane"
|
||||
"CanUseSpriteAtlas" = "True"
|
||||
}
|
||||
|
||||
Cull Off
|
||||
Lighting Off
|
||||
ZWrite Off
|
||||
Blend One OneMinusSrcAlpha
|
||||
|
||||
CGPROGRAM
|
||||
#pragma surface surf Lambert vertex:vert alphatest:_Cutoff addshadow nofog nolightmap nodynlightmap keepalpha noinstancing
|
||||
#pragma multi_compile_local _ PIXELSNAP_ON
|
||||
#pragma multi_compile _ ETC1_EXTERNAL_ALPHA
|
||||
#include "UnitySprites.cginc"
|
||||
|
||||
struct Input
|
||||
{
|
||||
float2 uv_MainTex;
|
||||
fixed4 color;
|
||||
};
|
||||
|
||||
void vert(inout appdata_full v, out Input o)
|
||||
{
|
||||
v.vertex = UnityFlipSprite(v.vertex, _Flip);
|
||||
|
||||
#if defined(PIXELSNAP_ON)
|
||||
v.vertex = UnityPixelSnap(v.vertex);
|
||||
#endif
|
||||
|
||||
UNITY_INITIALIZE_OUTPUT(Input, o);
|
||||
o.color = v.color * _Color * _RendererColor;
|
||||
}
|
||||
|
||||
void surf(Input IN, inout SurfaceOutput o)
|
||||
{
|
||||
fixed4 c = SampleSpriteTexture(IN.uv_MainTex) * IN.color;
|
||||
o.Albedo = c.rgb * c.a;
|
||||
o.Alpha = c.a;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Fallback "Transparent/VertexLit"
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 07e4675a4cebc5f41b1d43116ec28802
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
preprocessorOverride: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -12,20 +12,20 @@ EditorUserSettings:
|
||||
value: 22424703114646680e0b0227036c6c111b07142f1f2b233e2867083debf42d
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-2:
|
||||
value: 224247031146466c0c1c1e2b1f311f1604121d6a3f2d327f092c103cacf53a31f6fe
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-3:
|
||||
value: 22424703114646780c07022d036c6f190e12146a0d3a32701d251c27e4ef2635e7f576a4a70c36303503e839440e1330e2194638f50e040e5e3dde4e35fa1d1c51f61bc014cd5f518b2f15c2c11cd6e695e6c6e5c8f8a9cdd0d6b4eb
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-4:
|
||||
value: 224247031146467704090436222246034433570e2925297f092c103cd1e33136e7a923e7ee2e26
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-5:
|
||||
value: 2242470311464669081d033702205a03593b112d243c1431343a4f17adc43135eda812ecea350c3f3c0cea721130082beb
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-6:
|
||||
value: 22424703114646680e0b0227036c72111f192b292926237e38271427fb
|
||||
flags: 0
|
||||
UnityEditor.ShaderGraph.Blackboard:
|
||||
value: 18135939215a0a5004000b0e15254b524c030a3f2964643d120d1230e9e93a3fd6e826abbd3c3e302a07a37e0901373ae01e0008f707250d171df81a53a5475d44895ac825e0100ec20313c0d91cddccd3d0c7efcca9bd80908fecb0f9cfddf1eff4e7a1b1eae482f0fdaee1e1928b86d888ed909c968797a7cf
|
||||
flags: 0
|
||||
UnityEditor.ShaderGraph.FloatingWindowsLayout2:
|
||||
value: 181344140043005e1a220d3b1f364b524c0c5a27130c293326201334cee5322ca0bd30e8eb293a707b0fd0180b3d0a36fc0d3d04e649500d1002ee0b5dbd1d2c27c00ad113cb1e10e41f1addc80993b98d9884a69ae6d8f0d1cda9e8fbfefaf9f9dea3fdb9ade882f0f7b0e1e380cafbf2c3adc18e9cd285a2908b82ec869c8395949c9483d68a8e97ddbd90bf
|
||||
flags: 0
|
||||
UnityEditor.ShaderGraph.InspectorWindow:
|
||||
value: 18135939215a0a5004000b0e15254b524c1119263f2d6a722016393ce1eb3d36e5d339f9a5602b2e2c07a37e0901373ae01e0008f707250d171df81a53a5485d41895ac825e0100ec20313c0d91cddccd3d0c7efcca9bd80908fecb0f9cfddf1eff4e7a1b1eae482f0fcaee1e1928b86d888ed969b938797a7cf
|
||||
flags: 0
|
||||
UnityEditor.ShaderGraph.ToggleSettings:
|
||||
value: 18135d1527590858060c032302276919051e1a26296a7c243f3c187fa0e92708f0e220e0e22d09352a0bed30017c5b2be01f0c47b40219221f1ded0b12eb1f0127cc0bcc18c41a5e910d0edbc85193e0dadadbf8e8f9e8ced7dba5e0b6aaaca4dbfeabfef4eae1
|
||||
flags: 0
|
||||
vcSharedLogLevel:
|
||||
value: 0d5e400f0650
|
||||
flags: 0
|
||||
|
Loading…
Reference in New Issue
Block a user