I want to use it in my shader but I want to ensure it is correctly produced by visualizing it
Certainly what you want to do is possible. I donāt have time to find the JME example that renders depth textures in the HUD for you but they exist.
In the mean time, it seems like it would be a million times easier just to debug the values in your shader. Render the depth instead of rendering your normal color ājust to seeā, etcā¦ Itās also more reliable because itās āground truthā where as a secondary render is very likely to be one frame behind depending on how you hook it up.
Ok
Thank you
Iāll try to use it in a Shader to see if it works
In meantime, if you could find a clue remember me
Can you please tell us what was the issue? it may help other folks too.
It was in this code
reflectionCam.setFrustumPerspective(getCamera().getFov(), 1, 1.0f, 1000);
I was setting it as
reflectionCam.setFrustumPerspective(getCamera().getFov(), 1, 0.001f, 1000);
Near and Far Frustum is important in depth calculation