added mesh rendering

This commit is contained in:
2025-05-28 14:36:57 +03:00
parent 60fa98e240
commit b83078553e
53 changed files with 1436 additions and 363 deletions

View File

@@ -0,0 +1,23 @@
#include "mesh_shared.slang"
uint32_t hash32(uint32_t x) {
x = ((x >> 16) ^ x) * 0x45d9f3b;
x = ((x >> 16) ^ x) * 0x45d9f3b;
x = (x >> 16) ^ x;
return x;
}
[[vk::binding(1)]]
uniform Sampler2D textures[];
float4 main(
VertexOutput input,
uint triid: SV_PrimitiveID,
uniform PushConstants constants,
) : SV_TARGET
{
return float4(textures[constants.albedoID].Sample(input.uv).xyz, 1);
}