long_gone Posted February 10, 2022 Share Posted February 10, 2022 Hello there everyone, when I render with shader my 2D HUD texture' origanally trasparent parts of it get filled with white color. struct VS_INFO { float4 position : POSITION; float2 coord : TEXCOORD; }; VS_INFO main_vs(VS_INFO input) { VS_INFO output; output.position = input.position; output.coord = input.coord; return output; } uniform texture2D g_texture; sampler2D g_texture_sampler = sampler_state { Texture = <g_texture>; }; float4 main_ps(float2 uv : TEXCOORD0) : COLOR { float4 sourceColor = tex2D(g_texture_sampler, uv); return sourceColor; } technique T0 { pass P0 { VertexShader = compile vs_2_0 main_vs(); PixelShader = compile ps_2_0 main_ps(); } } I want 'em(parts) to be transparent after they have been rendered with shader Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now