Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cbuffer ShaderParams : register(b0)
- {
- float2 half_size;
- }
- struct vsinput
- {
- float2 xy : POSITION;
- float4 rgba : COLOR;
- float2 uv : TEXCOORDS;
- };
- struct vsoutput
- {
- float4 pos : SV_POSITION;
- float4 col : COLOR;
- float2 uv : TEXCOORDS;
- };
- vsoutput main(vsinput in_)
- {
- vsoutput out_;
- out_.pos = float4(-1.f + in_.xy.x / half_size.x, 1.f + in_.xy.y / half_size.y, 0.f, 1.f);
- out_.col = in_.rgba;
- out_.uv = in_.uv;
- return out_;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement