mirror of
https://github.com/Zelda64Recomp/Zelda64Recomp
synced 2026-05-23 06:54:33 -04:00
Integrated RmlUi, fully moved over to cmake
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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