ClassiCube/misc/xbox/vs_offset.cg

31 lines
555 B
Plaintext

struct vIn {
float4 tex : TEXCOORD;
float4 col : DIFFUSE;
float4 pos : POSITION;
};
struct vOut {
float4 pos : POSITION;
float4 col : COLOR;
float4 tex : TEXCOORD0;
};
vOut main(
vIn input,
uniform float4x4 mvp,
uniform float4 tex_offset
)
{
vOut result;
float4 position;
position = float4(input.pos.xyz, 1.0f);
position = mul(position, mvp);
position.xyz = position.xyz / position.w;
result.pos = position;
result.col = input.col;
result.tex = input.tex + tex_offset;
return result;
}