Skip to content

Mesh loaders kevin #199

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Mesh loaders kevin #199

wants to merge 6 commits into from

Conversation

kevyuu
Copy link

@kevyuu kevyuu commented Jun 25, 2025

Fix example 9, 67, 71

@devshgraphicsprogramming devshgraphicsprogramming changed the base branch from master to mesh_loaders June 25, 2025 14:09
Comment on lines 53 to 96
// switch (objType)
// {
// case OT_CUBE:
// {
// // TODO(kevin): Don't hardcode the normal stride in hlsl
// uint32_t v0 = vk::RawBufferLoad < uint32_t > (normalVertexBufferAddress + i0 * 4);
// uint32_t v1 = vk::RawBufferLoad < uint32_t > (normalVertexBufferAddress + i1 * 4);
// uint32_t v2 = vk::RawBufferLoad < uint32_t > (normalVertexBufferAddress + i2 * 4);
//
// n0 = normalize(nbl::hlsl::spirv::unpackSnorm4x8(v0).xyz);
// n1 = normalize(nbl::hlsl::spirv::unpackSnorm4x8(v1).xyz);
// n2 = normalize(nbl::hlsl::spirv::unpackSnorm4x8(v2).xyz);
// }
// break;
// case OT_SPHERE:
// case OT_CYLINDER:
// case OT_ARROW:
// case OT_CONE:
// {
// // TODO(kevin): Fix this logic. Don't use vertex stride since nomral is separated from position
// uint32_t v0 = vk::RawBufferLoad < uint32_t > (normalVertexBufferAddress + i0 * vertexStride);
// uint32_t v1 = vk::RawBufferLoad < uint32_t > (normalVertexBufferAddress + i1 * vertexStride);
// uint32_t v2 = vk::RawBufferLoad < uint32_t > (normalVertexBufferAddress + i2 * vertexStride);
//
// n0 = normalize(unpackNormals3x10(v0));
// n1 = normalize(unpackNormals3x10(v1));
// n2 = normalize(unpackNormals3x10(v2));
// }
// break;
// case OT_RECTANGLE:
// case OT_DISK:
// case OT_ICOSPHERE:
// default:
// {
// // TODO(kevin): Don't hardcode the normal stride in hlsl
// n0 = vk::RawBufferLoad < float3 > (normalVertexBufferAddress + i0 * 4);
// n1 = vk::RawBufferLoad < float3 > (normalVertexBufferAddress + i1 * 4);
// n2 = vk::RawBufferLoad < float3 > (normalVertexBufferAddress + i2 * 4);
// }
// }

// n0 = float3(0, 1, 0);
// n1 = float3(0, 1, 0);
// n2 = float3(0, 1, 0);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can delete old code

Base automatically changed from mesh_loaders to master July 1, 2025 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants