cginternals / webgl-operate

A TypeScript based WebGL rendering framework.
https://webgl-operate.org
MIT License
167 stars 25 forks source link

Refine logic to determine internal texture format for shadow pass #264

Open scheibel opened 4 years ago

scheibel commented 4 years ago

It seems as if 32-bit float textures are not considered filterable in WebGL 2 [1]. The necessary extension for those textures does not change that, either [2]. With this in mind, we should redesign the algorithm to determine bitness, number of channels and specific internal format, and filtering method for the shadow map of a shadow pass.

Possible combinations seems to be:

Sources: [1] https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/texImage2D) [2] https://developer.mozilla.org/en-US/docs/Web/API/OES_texture_float

cgcostume commented 4 years ago

perhaps we should enable OES_texture_float_linear in such cases, e.g., when rendering shadow maps

cgcostume commented 2 years ago

this is well suited for the wizard.ts ...