4.2.2 stable
Vulkan API 1.3.277 - Forward+ - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce GTX 1660 Ti
Question
How can I send texture that doesn’t have alpha channel into compute shader?
I tried sending texture’s image data to the rd.texture_create() and in the texture format I’ve set R8G8B8_UNORM but then Godot throws an error that this format doesn’t support sampling. So I used R8G8B8A8_UNORM and it worked. But obviously it works only on images that have alpha channel. so .jpg files won’t work. Is there any function to convert RGB image or texture to RGBA, or something like that?
OMG thank you. That’s what I was looking for all this time. I was confident that there has to be something that allows converting RGB into RGBA or just addding the alpha channel. But I couldn’t found that. It’s so stupid that I didn’t thought about “convert” as name of a function.