Closed MasonAlice closed 1 year ago
If you can avoid using view and model matrices in shaders you can avoid precision problems that occur when the view matrix values become large. The VulkanSceneGraph is designed to handle really large to tiny worlds where ability handle precision issues are critical so use modelview matrix are the default.
Sadly lots of example shaders out there use separate model and view matrices are introduce this precision problem, then when developers trying to scale there worlds from toy examples into large real world scales they are hit by an intractable precision problems.
While it's technically possible to pass separate model and view matrices directly yourself, I would strongly recommend thinking about how to refactor shaders so they can work with modelview matrices that the VSG provides out of the box. We can help make suggestions, but wihtout knowing what might be in your shaders and what type of scene you are trying to render it's too open ended attempt.
I'm moving this "Issue" to the Discussion pages where it belongs as it's not a bug or build problem with the VSG itself.
I figured out that vsg use push constant to update projection matrix and modelview matrix. how can I just use model or view matrix in the shader.