iTwin / itwinjs-core

Monorepo for iTwin.js Library
https://www.itwinjs.org
MIT License
600 stars 210 forks source link

Implement maxBlendableType on WebGL capabilities #3708

Closed markschlosseratbentley closed 1 year ago

markschlosseratbentley commented 2 years ago

This PR works around an issue with Safari 14 caused by blending full 32-bit float textures without the presence of EXT_float_blend: https://bentleycs.visualstudio.com/iModelTechnologies/_git/imodeljs/pullrequest/115930

We actually want to work around this in a way where we can still utilize full-float rendering when we are not going to be blending. The goal of this backlog item is to implement and properly utilize a maxBlendableType value on the WebGL capabilities.

We will probably rename maxRenderType to maxRenderableType, and introduce a new maxBlendableType. maxBlendableType depends on EXT_float_blend.

When rendering translucency, we would consult maxBlendableType to decide whether to render to full 32-bit floats or not.

Shadows likely can consult maxRenderableType - investigate this.

markschlosseratbentley commented 1 year ago

Planning to leave this as-is since only Safari iOS lacks the extension it seems -- @eringram plans to fill some gaps in the tests for this situation.

eringram commented 1 year ago

^Data from here. Full float rendering is already disabled in Safari iOS, so this would only matter in the future anyway when it becomes enabled.