Files
3d-tower/Assets/Enviro 3 - Sky and Weather/Resources/Shader/Blit/EnviroBlitThroughURP17.shader
2026-05-09 09:10:52 +08:00

70 lines
1.7 KiB
Plaintext

Shader "Hidden/EnviroBlitThroughURP17"
{
SubShader
{
Tags { "RenderType"="Opaque" "RenderPipeline" = "UniversalPipeline"}
LOD 100
ZTest Always ZWrite Off Cull Off
Pass
{
Name "EnviroBlitThrough"
HLSLPROGRAM
#pragma vertex Vert
#pragma fragment frag
#pragma multi_compile __ ENVIROURP
#if defined (ENVIROURP)
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
#include "Packages/com.unity.render-pipelines.core/Runtime/Utilities/Blit.hlsl"
TEXTURE2D_X(_MainTex);
SAMPLER(sampler_MainTex);
half4 frag (Varyings input) : SV_Target
{
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input);
return SAMPLE_TEXTURE2D_X(_MainTex, sampler_MainTex, input.texcoord);
}
#else
struct appdata
{
float4 vertex : POSITION;
float2 uv : TEXCOORD0;
};
struct v2f
{
float2 uv : TEXCOORD0;
float4 vertex : SV_POSITION;
};
v2f Vert (appdata v)
{
v2f o;
o.vertex = v.vertex;
o.uv = v.uv;
return o;
}
sampler2D _MainTex;
float4 frag (v2f i) : SV_Target
{
float4 col = tex2D(_MainTex, i.uv);
// just invert the colors
col.rgb = 1 - col.rgb;
return col;
}
#endif
ENDHLSL
}
}
}