73 lines
2.7 KiB
C
73 lines
2.7 KiB
C
////////////////////////////////////////////////////////////
|
|
//~ Backdrop shader types
|
|
|
|
Struct(V_BackdropSig)
|
|
{
|
|
/* ----------------------------------------------------- */
|
|
Vec2I32 target_size; /* 02 consts */
|
|
RWTexture2DRid target_tex; /* 01 consts */
|
|
SamplerStateRid sampler; /* 01 consts */
|
|
/* ----------------------------------------------------- */
|
|
u32 _pad0; /* 01 consts (padding) */
|
|
u32 _pad1; /* 01 consts (padding) */
|
|
u32 _pad2; /* 01 consts (padding) */
|
|
u32 _pad3; /* 01 consts (padding) */
|
|
/* ----------------------------------------------------- */
|
|
};
|
|
AssertRootConst(V_BackdropSig, 8);
|
|
|
|
#define V_BackdropCSThreadSizeFromTexSize(tex_size) VEC3U32((tex_size.x + 7) / 8, (tex_size.y + 7) / 8, 1)
|
|
|
|
////////////////////////////////////////////////////////////
|
|
//~ Quad shader types
|
|
|
|
Struct(V_DQuadSig)
|
|
{
|
|
/* ----------------------------------------------------- */
|
|
Vec2I32 target_size; /* 02 consts */
|
|
StructuredBufferRid quads; /* 01 consts */
|
|
SamplerStateRid sampler; /* 01 consts */
|
|
/* ----------------------------------------------------- */
|
|
b32 debug_enabled; /* 01 consts */
|
|
u32 _pad0; /* 01 consts (padding) */
|
|
u32 _pad1; /* 01 consts (padding) */
|
|
u32 _pad2; /* 01 consts (padding) */
|
|
/* ----------------------------------------------------- */
|
|
};
|
|
AssertRootConst(V_DQuadSig, 8);
|
|
|
|
Enum(V_DQuadFlag)
|
|
{
|
|
V_DQuadFlag_None = 0,
|
|
V_DQuadFlag_DrawGrid = (1 << 0),
|
|
};
|
|
|
|
Struct(V_DQuad)
|
|
{
|
|
V_DQuadFlag flags;
|
|
};
|
|
|
|
////////////////////////////////////////////////////////////
|
|
//~ Shape shader types
|
|
|
|
Struct(V_DVertSig)
|
|
{
|
|
/* ----------------------------------------------------- */
|
|
Vec2I32 target_size; /* 02 consts */
|
|
StructuredBufferRid verts; /* 01 consts */
|
|
SamplerStateRid sampler; /* 01 consts */
|
|
/* ----------------------------------------------------- */
|
|
b32 debug_enabled; /* 01 consts */
|
|
u32 _pad0; /* 01 consts (padding) */
|
|
u32 _pad1; /* 01 consts (padding) */
|
|
u32 _pad2; /* 01 consts (padding) */
|
|
/* ----------------------------------------------------- */
|
|
};
|
|
AssertRootConst(V_DVertSig, 8);
|
|
|
|
Struct(V_DVert)
|
|
{
|
|
Vec2 pos;
|
|
Vec4 color_lin;
|
|
};
|