Is there a way to set up an object so that it renders last, after the scene is done rendering and it ignores the Z-buffer of the scene? I need to draw some 3D objects in a “HUD” that should draw even if they are behind walls or other objects. It is ok if these objects are not lit correctly and do not recieve shadows.
Hi new_user_987 look in IEntityRenderState.h (enum EERType) Hope that help you
Thanks! Looking in there I found ERF_HUD and ERF_RENDER_ALWAYS so I set those two flags to true. Enabling wireframe does show that the object is now drawn even when it is behind other objects, however it is still occluded by the objects that it is behind. I need it to render on top of everything; to draw after everything else with ZPASS_ALWAYS.
Also added SetHUDRequireDepthTest(false). Still getting occluded by objects in the scene.
Also, I have some code fixes in the Lumberyard code. Is there a way for me to submit them to you guys for consideration? In particular there was some “half finished” stuff in the ray intersection code for StatObj’s that I have cleaned up and tested. When you request a ray-intersection, you can ask for uv-coords and tangent space vectors but if you do ask for those results, the code goes down a path that doesn’t actually even do the intersection. I’ve fixed that and added the code to compute the uvcoords, etc (only if requested by the user of course).
I’m checking with the team to see if we can get you an answer on this.
Hey @new_user_987, this is something we are working on. Let me follow up and get back to you on this.
I had used the “SetHudRequireDepthTest” feature of IComponentRender to implement this (though it was pretty hacky). In Lumberyard1.9 the “SetHudRequireDepthTest” function has been removed. Is there now a way to render objects that render “last” and ignore the depth buffer? I don’t need any lighting or anything fancy on these objects but they need to “show through” everything in the scene.
Hey @new_user_987 I’m in the same boat!!! trying to create a 3D HUD. Did you guys find a fix for this?