RGBA8 texture is unsuported in Compute shaders

Started by msomeone, October 10, 2014, 09:55:56 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

msomeone

Hello,
i've recently tried using GLSL Hacker with compute shaders and discovered that PF_U8_RGBA textures are not able to be written into.
As a reproducer i've modified gl-430-arb-compute-shader_Image_PostFX hostapi sample to create PF_U8_RGBA texture and changed r32f in compute shader to rgba8: http://pastebin.com/5Vr7TPV0

Is there something wrong in what i was doing or this could be considered as a bug?

offtopic: is there any chance, that 16bit channel textures would be supported in near future (sometimes one could need to load 16bit grayscale png for example)?

Thanks for attention

JeGX

#1
It's not a bug and what you are doing is ok. It's just a pixel format for image2D that was not handled by GLSL Hacker. I added it in GLSL Hacker 0.7.1.5 (which should be downloadable in few minutes).

Now you can use PF_U8_RGBA in Lua and layout(rgba8) in GLSL. Same thing with PF_U8_R and layout(r8). I added a new demo (demo_v02_rgba8.xml).

I will add 16-bit channel texture support in one of the next versions.

Update: GLSL Hacker 0.7.1.5
http://www.geeks3d.com/forums/index.php/topic,3723.msg4470.html#msg4470


msomeone

Thats great, thanks for fixing it so fast.

And thanks for developing such a usefull tool!