mirror of
https://github.com/Zelda64Recomp/Zelda64Recomp
synced 2026-09-10 04:31:57 -04:00
Integrated RmlUi, fully moved over to cmake
This commit is contained in:
@@ -1,10 +1,23 @@
|
||||
struct Input {
|
||||
float4x4 transform;
|
||||
float2 translation;
|
||||
};
|
||||
|
||||
[[vk::push_constant]]
|
||||
ConstantBuffer<Input> gInput : register(b0, space0);
|
||||
|
||||
void VSMain(
|
||||
in uint vert_id : SV_VertexID,
|
||||
out float4 pos : SV_Position
|
||||
in float2 iPosition : POSITION,
|
||||
in float4 iColor : COLOR,
|
||||
in float2 iUV : TEXCOORD,
|
||||
out float4 oColor : COLOR,
|
||||
out float2 oUV : TEXCOORD,
|
||||
out float4 oPosition : SV_Position
|
||||
)
|
||||
{
|
||||
const float2 translation = 0.1f;
|
||||
const float2 size = 0.1f;
|
||||
float2 extent = float2(vert_id & 1 ? 1.0f : 0.0f, vert_id & 2 ? 1.0f : 0.0f);
|
||||
pos = float4(extent * size + translation, 1.0f, 1.0f);
|
||||
float2 translatedPos = iPosition + gInput.translation;
|
||||
oPosition = mul(gInput.transform, float4(translatedPos, 0, 1));
|
||||
|
||||
oColor = iColor;
|
||||
oUV = iUV;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user