Atlas - testgpurender_effects_grayscale.frag.hlsl
Home / ext / SDL / test Lines: 1 | Size: 502 bytes [Download] [Show on GitHub] [Search similar files] [Raw] [Raw (proxy)][FILE BEGIN]1Texture2D u_texture : register(t0, space2); 2SamplerState u_sampler : register(s0, space2); 3 4struct PSInput { 5 float4 v_color : COLOR0; 6 float2 v_uv : TEXCOORD0; 7}; 8 9struct PSOutput { 10 float4 o_color : SV_Target; 11}; 12 13PSOutput main(PSInput input) { 14 PSOutput output; 15 float4 color = u_texture.Sample(u_sampler, input.v_uv) * input.v_color; 16 float gray = color.r * 0.2126 + color.g * 0.7152 + color.r * 0.722; 17 output.o_color = float4(gray, gray, gray, color.a); 18 return output; 19} 20[FILE END](C) 2025 0x4248 (C) 2025 4248 Media and 4248 Systems, All part of 0x4248 See LICENCE files for more information. Not all files are by 0x4248 always check Licencing.