Godot 4.2.2 stable
Vulkan API 1.3.277 - Forward+ - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce GTX 1660 Ti
Question
I’m trying to stack multiple textures in a compute shader. The first one goes to the first RenderDeviceTexture and each next “layer” or texture is send to the second RD2Dtexture. Then in the shader both textures are combined and using imageStore() I’m storing it back to the first texture. At the end I’m retreving back texture from compute shader, convert it to image texture and apply it into material. But I realized that I can’t send any external texture from file. So it’s useless because of this
I’m new to compute shaders so probably I’m doing something silly.
I’m trying to send small amount of info about my project. But if there is not enough information to help then please say so. In that case I’ll send additional information or tell more about the project to clarify more what I’m trying to achieve.
That doesn’t sound right. From what I see in the API it wants packedbytearray and that can be gotten from get_data function of an image classyou have already shown.
Don’t use load(path).
Use myimage = Image.load_from_file(path)
I will also ask what are the dimensions of your image and it’s format? And what is it after pulled into Godot? I would assume the rdtextureformat will have to match the data of the image.
welp I showed screen of the texture previously. It’s jpg image 512x512 resolution. And because it’s jpg it’s not using Alpha channel. I tried to match image’s imported properties, like mipmap count and etc. But it didn’t work. And apparently sampling texture that is composed only from RGB values without A isn’t supported?? I read some article that in glsl this is very unusual to NOT use multiples of two so not every graphics card support RGB sampling but every support RGBA. BUT I also tried using godot’s icon.svg which does have alpha channel. But it also didn’t work.