2026-04-13 13:38:41 +08:00
|
|
|
struct PixelInput
|
2026-04-13 02:23:39 +08:00
|
|
|
{
|
2026-04-13 13:38:41 +08:00
|
|
|
float4 position : SV_Position;
|
|
|
|
|
float4 color : COLOR0;
|
|
|
|
|
float2 localPosition : TEXCOORD0;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
float4 MainPS(PixelInput input) : SV_Target0
|
|
|
|
|
{
|
|
|
|
|
float alpha = exp(-dot(input.localPosition, input.localPosition));
|
|
|
|
|
alpha = saturate(alpha * input.color.a);
|
|
|
|
|
|
|
|
|
|
if (alpha < (1.0 / 255.0))
|
|
|
|
|
{
|
|
|
|
|
discard;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return float4(input.color.rgb * alpha, alpha);
|
2026-04-13 02:23:39 +08:00
|
|
|
}
|