deck.gl
deck.gl copied to clipboard
WIP: Use UBOs in project module
Background
Status:
- Requires luma 9.0.12
- Most shaders & layers working
project64module also ported- All tests passing
- Some render tests still broken
Change List
- Update
projectmodule to useprojectUniformsUBO - Update references in all shaders, e.g.
project_uDevicePixelRatio->project.devicePixelRatio - Remove
projectfromDEFAULT_MODULESas it needs to be passed in the bindings project64now passes fp64 matrix as amat4uniforms, rather thanvec2[16]- Test updates
@Pessimistress @ibgreen landing this will be a breaking change for any custom shaders that reference project_uXXXX uniforms. Are we OK with this or do we want to consider automatically rewriting shaders by detecting "project_u" strings and replacing? We could warn that their shaders are using the old syntax and then force the upgrade in 9.1
Are we OK with this or do we want to consider automatically rewriting shaders by detecting "project_u" strings and replacing? We could warn that their shaders are using the old syntax and then force the upgrade in 9.1
I hadn't even thought about the possibility of making the uniform buffer change backwards compatible, but it would of course be nice. I recommend looking into the existing functionality in ShaderModules, perhaps it works as is, or can be made to work with small changes:
coverage: 89.82% (+0.01%) from 89.807% when pulling dac757dd844f9bcf9590ee65c684ddbcd5b01970 on felix/project-ubo into 1a9dd6f1975f8c0a19f5d0e6a354626a97bd957e on master.
Epic!
Hi, just checking whether @felixpalmer's question in https://github.com/visgl/deck.gl/pull/8782#issuecomment-2051394539 was resolved — are we comfortable with this PR going into a deckgl v9.0.x patch release, or should we hold it for v9.1? I'm working on publishing v9.0.15 now. Thanks!
EDIT: Discussed offline. Will leave this PR out of v9.0.x and hold it for v9.1.