Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // Position + Color vertex shader
- //
- struct a2v { //in from attributes to vertex
- float4 Position : POSITION;
- float4 Color : COLOR0;
- };
- struct v2p { //out from vertex to pixel
- float4 Position : POSITION;
- float3 Color : COLOR0;
- };
- void main(in a2v IN, out v2p OUT)
- {
- OUT.Position = mul(gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION], IN.Position);
- OUT.Color.rgb = IN.Color.rgb;
- }
- //
- // Color fragment shader
- //
- struct v2p { //in from vertex to pixel
- float3 Color : COLOR0;
- };
- struct p2s { //out from pixel to screen
- float4 Color : COLOR;
- };
- void main(in v2p IN, out p2s OUT)
- {
- OUT.Color.rgb = IN.Color.rgb;
- OUT.Color.a = 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement