Integrated RmlUi, fully moved over to cmake

This commit is contained in:
Mr-Wiseguy
2023-11-02 01:20:12 -04:00
parent dd30250623
commit 6fdf66b296
37 changed files with 1694 additions and 34717 deletions
+7 -2
View File
@@ -1,6 +1,11 @@
SamplerState gSampler : register(s1, space0);
Texture2D<float4> gTexture : register(t0, space1);
void PSMain(
out float4 resultColor : SV_TARGET
in float4 iColor : COLOR,
in float2 iUV : TEXCOORD,
out float4 oColor : SV_TARGET
)
{
resultColor = float4(1,0,0,1);
oColor = gTexture.SampleLevel(gSampler, iUV, 0) * iColor;
}
+19 -6
View File
@@ -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;
}