Progress i guess

This commit is contained in:
Dynamitos
2023-11-08 23:27:21 +01:00
parent ecb5050dc7
commit 19c3e559b1
49 changed files with 268 additions and 361 deletions
+6 -6
View File
@@ -9,14 +9,14 @@ struct TextData
float4 textColor;
float scale;
}
ParameterBuffer<SamplerState> glyphSampler;
ParameterBlock<SamplerState> glyphSampler;
//layout(set = 1)
//ShaderBuffer<GlyphData> glyphData;
ParameterBuffer<Texture2D<uint>[]> glyphTextures;
ParameterBuffer<Texture2D<uint>[]> pGlyphTextures;
[[vk::push_constant]]
ConstantBuffer<TextData> textData;
struct VertexStageInput
struct VertexInput
{
float2 position;
float2 widthHeight;
@@ -24,7 +24,7 @@ struct VertexStageInput
uint vertexId : SV_VertexID;
};
struct VertexStageOutput
struct VertexOutput
{
float4 position : SV_Position;
float2 texCoords : TEXCOORD;
@@ -32,7 +32,7 @@ struct VertexStageOutput
};
[shader("vertex")]
VertexStageOutput vertexMain(VertexStageInput input)
VertexOutput vertexMain(VertexInput input)
{
float xpos = input.position.x;
float ypos = input.position.y;
@@ -61,5 +61,5 @@ float4 fragmentMain(
uint glyphIndex : GLYPHINDEX
) : SV_Target
{
return textData.textColor * glyphTextures[glyphIndex].Sample(glyphSampler, texCoords);
return textData.textColor * pGlyphTextures[glyphIndex].Sample(glyphSampler, texCoords);
}