Files
KopMap/Assets/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_TangentVertexDataNode.shader
2025-04-03 02:30:16 +08:00

23 lines
419 B
Plaintext

Shader "Hidden/TangentVertexDataNode"
{
SubShader
{
Pass
{
CGPROGRAM
#pragma vertex vert_img
#pragma fragment frag
#include "UnityCG.cginc"
#include "Preview.cginc"
float4 frag( v2f_img i ) : SV_Target
{
float3 normal = PreviewFragmentNormalOS( i.uv );
float3 tangent = normalize(float3( -normal.z, normal.y*0.01, normal.x ));
return float4((tangent), 1);
}
ENDCG
}
}
}