Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- texture tex0;
- sampler sBase=sampler_state{Texture=(tex0);};
- float Angle = 0.0;
- #define PI 3.14159265f
- float4 ps1(float2 Base:TEXCOORD0):COLOR
- {
- float4 color = tex2D( sBase, Base.xy );
- if( color.a != 0.0)
- {
- float2 vec1 = float2( 0.5, 1.0 );
- float2 vec2 = normalize( float2( 0.5 - Base.x, 0.5 - Base.y ) );
- float VecAngle = PI + atan2( vec1.x * vec2.y - vec1.y * vec2.x, dot( vec1, vec2 ) );
- if( VecAngle > radians( Angle ) )
- color.a = 0.0;
- }
- return color;
- }
- technique remover
- {
- pass p0
- {
- PixelShader=compile ps_2_0 ps1();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement