You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Godot v4.1.1.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 750 Ti (NVIDIA; 31.0.15.3623) - 12th Gen Intel(R) Core(TM) i5-12400F (12 Threads)
Issue description
When creating a Shader Global of type sampler2DArray:
The expected resource is Texture2DArray.
Using an imported Texture2DArray does not work as they are actually imported as a CompressedTexture2DArray, and to my knowledge a normal Texture2DArray is impossible to create
Steps to reproduce
Import a spritesheet as a Texture2DArray
Notice the file is imported as a CompressedTexture2DArray resource
Create a Shader Global of type sampler2DArray
Try to add your texture array but notice that it only accepts Texture2DArray, while our import is CompressedTexture2DArray. To my knowledge, a Texture2DArray is impossible to import, it will always be a compressed array.
Expected behavior: sampler2DArray lets you select both Texture2DArray and CompressedTexture2DArray resources
All of the following types should be able to used in this field:
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered:
We might need to allow some more subclasses to be used or adjust the type checks if they are too strict. Meanwhile, you might be able to use RenderingServer.global_shader_parameter_set() to set the CompressedTexture2DArray object directly during runtime (or in a tool script if running in editor).
I focused this post on the CompressedTexture2DArray but after looking at the suggested resources for a sampler2DArray that is not global, it applies to more than just the singular class i was talking about if that wasn't obvious already
Pic of all the classes a sampler2DArray spot should have:
FireCatMagic
changed the title
Cannot add sampler2DArray as shader global due to Texture2D Array import compression
Cannot add sampler2DArray as shader global due to strict class selection
Aug 28, 2023
Godot version
v4.1.1.stable
System information
Godot v4.1.1.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 750 Ti (NVIDIA; 31.0.15.3623) - 12th Gen Intel(R) Core(TM) i5-12400F (12 Threads)
Issue description
When creating a Shader Global of type sampler2DArray:


The expected resource is Texture2DArray.
Using an imported Texture2DArray does not work as they are actually imported as a CompressedTexture2DArray, and to my knowledge a normal Texture2DArray is impossible to create

Steps to reproduce
Expected behavior: sampler2DArray lets you select both Texture2DArray and CompressedTexture2DArray resources
All of the following types should be able to used in this field:

Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: