-
-
Notifications
You must be signed in to change notification settings - Fork 18.8k
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
texture_get_data doesn't return mipmaps for layered textures #49442
Comments
Related to/duplicate of #34312? |
Seems related... Also wanted to add: |
This was a lot of fun to explore. The problem in your MRP lies in godot/drivers/gles3/rasterizer_storage_gles3.cpp Line 1005 in f3d9314
You are right to point out that mipmaps are created on texture creation. In your MRP mipmaps are created. However if The combination of these two issues made it look like your TextureArray was never creating mipmaps. Below is an MRP that shows mipmaps working correctly with TextureArray:
Shader code for the ColorRect:
|
Thanks for looking into this! |
Can confirm this works. I want to add that:
is not 100% correct as you dont need to load it as a texture. This is useful when you dont import your image as a texture |
Godot version
3.3.2
System information
Windows 10 (ver. 2004), GLES3, NVIDIA GeForce RTX 2080
Issue description
When creating a Texture array with Flag 1 (FlagsEnum.Mipmaps), no mipmaps are created for the layers, nor will existing mipmaps be transfered over.
Since it is possible to set this flag the expected behaviour would be that mipmaps will be created for all layers.
Steps to reproduce
Using C#:
If in a prior step mipmaps were created they wont get transfered over. ( myImage.GenerateMipmaps() )
Note:
You can also check for mipmaps looking at the size of the Data array of the Image using myImage.GetData().Count() or by checking with .GetMipmapOffset
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: