-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
Support for texStorage #21874
Comments
Interesting... How do you propose the API for it to look like? |
One possibility is DataStorageTexture, DataStorageTexture3D, DataStorageTexture2DArray. Another could be to pass additional parameters to existing class. E.g. DataTexture( data, width, height, format, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, encoding, storage (true|false)). Thx |
Would it be possible to use |
@Mugen87 You mean when using |
I thought the method could always be used when mipmaps are defined. |
Right... After reading greggman's explanation, seems to me that we should use |
@DavidPeicho @mbredif do you guys agree? |
Using |
Something to be aware of is that, Chrome currently doesn't have optimised support of |
I've started to experiment with
Besides, the approach looks different depending on the use case in |
Can we please add support for texStorage2D & texStorage3D for more efficient uploading of data (not images).
WebGL 2.0 spec has a comment on this topic in section 3.7.6 Texture objects: "texStorage2D should be considered a preferred alternative to texImage2D. It may have lower memory costs than texImage2D in some implementations."
This is also mentioned in MDN.
https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/WebGL_best_practices.
https://www.khronos.org/registry/webgl/specs/latest/2.0/
Some discussion on this on stackoverflow
https://stackoverflow.com/questions/63353873/how-to-handle-3d-texture-on-webgl2
Describe the solution you'd like
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: