Sign in to follow this  

Last Object Only Renders

Recommended Posts

I have a problem in my engine, if I try to render multiple objects at once, only the last object to render shows up. What is the possible causes of this? As a side note I have not received any errors from the validation layer. I am stumped...

Edited by Karutoh

Share this post


Link to post
Share on other sites

Primary I'm with ncsu on this.

Some rough first thoughts:

- are you updating the world matrix of the objects correctly? (or accidentally using the same for all objects, thus only the last object is visible)

- a wrong index called in some buffer [static number]  instead of [loop var]?

- ...

Share this post


Link to post
Share on other sites

Currently I use a Dynamic Uniform Buffer, and use Dynamic Offsets. So each object for sure has it's own MVP data, etc... I'm a 100% certain it's not my entity array.

 

Edit:

Actually, could it possibly be that I need to add a VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER in VkWriteDescriptorSet for each object?

Edited by Karutoh

Share this post


Link to post
Share on other sites
I would recommend that you debug your program with renderdoc. You will be able to inspect all draw commands, look at the mesh input and output, check if the buffer values are correct and look at what is rendered to the framebuffer.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this