opensourceBIM / BIMsurfer

The latest version of the BIM Surfer WebGL viewer for IFC
MIT License
384 stars 132 forks source link

Camera controls #19

Closed aothms closed 6 years ago

aothms commented 6 years ago

[x] infinite zoom [x] zoom to point [x] orbit around point [x] auto updating tight near and far plane [ ] slower zoom closer to object

aothms commented 6 years ago

Looking at https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/renderbufferStorage I think gl.DEPTH_COMPONENT16 should be gl.R32F as well, NOT TESTED!

Don't understand. As a work-around for my issues or for better perfomance / less z fighting?

The near and far plane are now always aligned to the model boundaries so 16bit should be sufficient. It's probably faster / better supported to have a 16bit int depth buffer.

Still not sure why clearing the 2nd attachment does not work, but it's fine. Clearing is only necessary to detect when we are clicking outside of the model geometry and we use the first attachment for that anyway.

There are no guarantees on availability of floating point render targets. So if people report issues on this we might want to fallback to something else. But let's not spend time on that now.