Files
cell/shaders/common/vertex.hlsl
2024-12-24 09:48:52 -06:00

25 lines
538 B
HLSL

#include "common.hlsl"
struct input
{
float2 pos : pos; // given as world
float2 uv : uv; // always a quad
float4 color : color;
};
// Output structure from the vertex shader to the pixel shader
struct output
{
float4 pos : SV_Position; // Clip-space position
float2 uv : TEXCOORD0; // Texture coordinates
float4 color : COLOR0; // Interpolated vertex color
};
output main(input i)
{
output o;
o.pos = mul(world_to_projection, float4(i.pos,0,1));
o.uv = i.uv;
o.color = i.color;
return o;
}