Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
scheibel opened this issue Aug 18, 2020 · 2 comments
Open

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

scheibel opened this issue Aug 18, 2020 · 2 comments
Labels
haeley-webgl Move/to be resolved in to haeley-webgl

Comments

@scheibel
Copy link
Member

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:

  • RED with R8 and linear filtering
  • RED with R8 and nearest filtering
  • RG with RG8 and linear filtering
  • RG with RG8 and nearest filtering
  • RGBA with RGBA8 and nearest filtering

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
Copy link
Member

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

@cgcostume cgcostume added the haeley-webgl Move/to be resolved in to haeley-webgl label Jan 26, 2022
@cgcostume
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
haeley-webgl Move/to be resolved in to haeley-webgl
Projects
None yet
Development

No branches or pull requests

2 participants