update sample

This commit is contained in:
DCFApixels 2025-02-28 13:09:22 +08:00
parent 195acca03e
commit 5ea6cb4ffa
5 changed files with 72 additions and 1231 deletions

View File

@ -0,0 +1,62 @@
Shader "Unlit/FakeLighth"
{
Properties
{
_Color ("Color", Color) = (1,1,1,1)
}
SubShader
{
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" "PreviewType"="Plane" }
Blend SrcAlpha One, One One
ZWrite Off Fog { Mode Off }
Lighting Off
ZTest On
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
struct appdata
{
float4 vertex : POSITION;
float2 uv : TEXCOORD0;
};
struct v2f
{
float2 uv : TEXCOORD0;
float4 vertex : SV_POSITION;
};
float4 _Color;
float2 Unity_PolarCoordinates_float(float2 UV, float2 Center, float RadialScale, float LengthScale)
{
float2 delta = UV - Center;
float radius = length(delta) * 2 * RadialScale;
float angle = atan2(delta.x, delta.y) * 1.0/6.28 * LengthScale;
return float2(radius, angle);
}
v2f vert (appdata v)
{
v2f o;
o.vertex = UnityObjectToClipPos(v.vertex);
o.uv = v.uv;
return o;
}
fixed4 frag (v2f i) : SV_Target
{
return _Color * (1.0 - Unity_PolarCoordinates_float(i.uv, 0.5, 1, 1).x);
}
ENDCG
}
}
}

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: ef72b49ee3d807c46a7349cc8fca5a77
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: f5563b73be1540b4d9eae3ee64144b25
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}

View File

@ -21,7 +21,7 @@ Material:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: FakeLightMat
m_Shader: {fileID: -6465566751694194690, guid: f5563b73be1540b4d9eae3ee64144b25, type: 3}
m_Shader: {fileID: 4800000, guid: ef72b49ee3d807c46a7349cc8fca5a77, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []