45 lines
981 B
Plaintext
45 lines
981 B
Plaintext
////////////////////////////////////////////////////////////
|
|
//~ Rect shader types
|
|
|
|
Struct(UI_DRectPSInput)
|
|
{
|
|
Semantic(Vec4, sv_position);
|
|
Semantic(nointerpolation u32, rect_idx);
|
|
Semantic(Vec4, base_background_premul);
|
|
Semantic(Vec4, base_border_premul);
|
|
Semantic(Vec4, tint_premul);
|
|
Semantic(Vec4, debug_premul);
|
|
Semantic(Vec2, rect_uv);
|
|
Semantic(Vec2, tex_uv);
|
|
};
|
|
|
|
Struct(UI_DRectPSOutput)
|
|
{
|
|
Semantic(Vec4, sv_target0);
|
|
};
|
|
|
|
////////////////////////////////////////////////////////////
|
|
//~ Blit shader types
|
|
|
|
Struct(UI_BlitPSInput)
|
|
{
|
|
Semantic(Vec4, sv_position);
|
|
Semantic(Vec2, src_uv);
|
|
};
|
|
|
|
Struct(UI_BlitPSOutput)
|
|
{
|
|
Semantic(Vec4, sv_target0);
|
|
};
|
|
|
|
////////////////////////////////////////////////////////////
|
|
//~ Shaders
|
|
|
|
//- Rect
|
|
VertexShader(UI_DRectVS, UI_DRectPSInput);
|
|
PixelShader(UI_DRectPS, UI_DRectPSOutput, UI_DRectPSInput input);
|
|
|
|
//- Blit
|
|
VertexShader(UI_BlitVS, UI_BlitPSInput);
|
|
PixelShader(UI_BlitPS, UI_BlitPSOutput, UI_BlitPSInput input);
|