panda3d
panda3d copied to clipboard
ShaderTerrainMesh define up axis
Description
In the shaderTerrainMesh panda.core class there is culling of the terrain quadtree happening by using the bounding box https://github.com/panda3d/panda3d/blob/3084fcd8dc8fa2c29ea5b58860ea8b060e6e46aa/panda/src/grutil/shaderTerrainMesh.cxx#L639-L640
Unfortunately this assumes that z axis is the vertical axis... It would be nice if this class would allow one to define the 'up' dimension... And change the bounding box declaration accordingly. There maybe other adjustments need to be made...
Use Case
It would allow shaderTerrainMesh to be used in coordinate systems... ('coordinate-system y-up-left')
This could be replaced with LPoint3::rfu(x, y, z).
Unfortunately I think it's far more involved than that, the code that generates the patches has to be changed and probably the shader as well.