e4s-game/gamedata/shaders/d3d11/debug_draw.vs.hlsl
2026-06-18 01:18:29 +03:00

26 lines
461 B
HLSL

#include "common.hlsli"
// input
struct v_vert
{
float4 pos : POSITION; // (float,float,float,1)
float4 color : COLOR0; // (r,g,b,dir-occlusion)
};
// output
struct v2p_L
{
float4 pos : SV_POSITION;
float4 viewpos : TEXCOORD0;
float4 color : COLOR0;
};
// Vertex
v2p_L main(v_vert I)
{
v2p_L O;
O.pos = mul(m_WVP, I.pos);
O.viewpos = float4(mul(m_WV, I.pos), 1.0f);
O.color = I.color.bgra; // swizzle vertex colour
return O;
}