Files
MinecraftLegends/Win32.DX11.Release/data/shaders/hlsl/texture_raw_alphatest.fragment.hlsl
2026-03-08 15:34:38 -05:00

31 lines
656 B
HLSL

#include "ShaderConstants.fxh"
#include "util.fxh"
struct PS_Input
{
float4 position : SV_Position;
float2 uv : TEXCOORD_0_FB_MSAA;
};
struct PS_Output
{
float4 color : SV_Target;
};
void main( in PS_Input PSInput, out PS_Output PSOutput )
{
#if !defined(TEXEL_AA) || !defined(TEXEL_AA_FEATURE) || (VERSION < 0xa000 /*D3D_FEATURE_LEVEL_10_0*/)
float4 diffuse = TEXTURE_0.Sample(TextureSampler0, PSInput.uv);
#else
float4 diffuse = texture2D_AA(TEXTURE_0, TextureSampler0, PSInput.uv);
#endif
#ifdef ALPHA_TEST
if( diffuse.a < 0.0625 )
{
discard;
}
#endif
PSOutput.color = diffuse;
}