Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //PASSTHROUGH HLSL 11 VERTEX SHADER FOR GAMEMAKER
- struct ATTRIBUTE
- {
- float3 pos : POSITION;
- //float3 nor : NORMAL;
- float2 tex : TEXCOORD0;
- float4 col : COLOR;
- };
- struct VARYING
- {
- float4 pos : SV_POSITION;
- float2 tex : TEXCOORD0;
- float4 col : COLOR;
- };
- VARYING main(ATTRIBUTE INPUT)
- {
- VARYING OUTPUT;
- OUTPUT.pos = mul(gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION], float4(INPUT.pos,1));
- OUTPUT.tex = INPUT.tex;
- OUTPUT.col = INPUT.col;
- return OUTPUT;
- }
- //PASSTHROUGH HLSL 11 PIXEL SHADER FOR GAMEMAKER
- struct VARYING
- {
- float4 pos : POSITION;
- float2 tex : TEXCOORD0;
- float4 col : COLOR;
- };
- struct TARGET
- {
- float4 col : COLOR;
- };
- TARGET main(VARYING INPUT) : SV_TARGET
- {
- TARGET OUTPUT;
- //Sample texture using the texcoords from the vertex shader and vertex color.
- OUTPUT.col = INPUT.col * gm_BaseTextureObject.Sample(gm_BaseTexture,INPUT.tex);
- return OUTPUT;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement