circles, man!

This commit is contained in:
vfs committed 2026-02-20 02:49:55 +01:00
1 parent bfaf4653f0
commit b83207e652
6 files changed
+94 -105

No files matched your search

+5 -3
View File
@@ -5,6 +5,8 @@ struct VSInput {
float4 color;
float alpha;
uint32_t textureID;
uint vertex_index : SV_VertexID;
};
struct VSOutput {
@@ -26,13 +28,13 @@ static const float2 square[6] = {
};
[shader ("vertex")]
VSOutput main(VSInput input, uint vertex_index : SV_VertexID) {
VSOutput main(VSInput input, uniform float4x4 proj) {
VSOutput output;
float2 vertex_pos = square[vertex_index % 6];
float2 vertex_pos = square[input.vertex_index % 6];
float2 final_pos = (vertex_pos * input.scale) + input.pos;
output.pos = float4(final_pos, 0.0, 1.0);
output.pos = mul(proj, float4(final_pos, 0.0, 1.0));
output.uv = input.uv;
output.color = input.color;
output.alpha = input.alpha;