Add shaders

This commit is contained in:
Williams
2026-05-19 15:33:18 +02:00
committed by Lucien
parent 593c2e75b2
commit cd9df45d08
1358 changed files with 2429155 additions and 0 deletions
@@ -0,0 +1,93 @@
Shader "Debug Terrain Carve"
{
Properties
{
_Color("Main Color", Color) = (1,1,1,1)
}
SubShader
{
Pass
{
Tags{ "Queue" = "Geometry-10" }
ZTest Always
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
#include "UnityLightingCommon.cginc"
struct v2f
{
fixed4 diff : COLOR0;
float4 vertex : SV_POSITION;
};
v2f vert(appdata_base v)
{
v2f o;
o.vertex = UnityObjectToClipPos(v.vertex);
half3 worldNormal = UnityObjectToWorldNormal(v.normal);
half nl = max(0, dot(worldNormal, _WorldSpaceLightPos0.xyz));
o.diff = nl * _LightColor0;
o.diff.rgb += ShadeSH9(half4(worldNormal,1));
return o;
}
fixed4 _Color;
fixed4 frag(v2f i) : SV_Target
{
fixed4 col = _Color;
col *= i.diff;
return col;
}
ENDCG
}
Pass
{
Tags{ "Queue" = "Geometry-10" }
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
#include "UnityLightingCommon.cginc"
struct v2f
{
fixed4 diff : COLOR0;
float4 vertex : SV_POSITION;
};
v2f vert(appdata_base v)
{
v2f o;
o.vertex = UnityObjectToClipPos(v.vertex);
half3 worldNormal = UnityObjectToWorldNormal(v.normal);
half nl = max(0, dot(worldNormal, _WorldSpaceLightPos0.xyz));
o.diff = nl * _LightColor0;
o.diff.rgb += ShadeSH9(half4(worldNormal,1));
return o;
}
fixed4 _Color;
fixed4 frag(v2f i) : SV_Target
{
fixed4 col = _Color;
col *= i.diff;
return col;
}
ENDCG
}
}
}