Author Topic: RGBA8 texture is unsuported in Compute shaders  (Read 5719 times)

0 Members and 1 Guest are viewing this topic.

msomeone

  • Zombie
  • *
  • Posts: 2
    • View Profile
RGBA8 texture is unsuported in Compute shaders
« on: October 10, 2014, 09:55:56 AM »
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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1894
    • View Profile
    • Geeks3D.com
Re: RGBA8 texture is unsuported in Compute shaders
« Reply #1 on: October 10, 2014, 06:29:16 PM »
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

« Last Edit: October 10, 2014, 06:46:29 PM by JeGX »

msomeone

  • Zombie
  • *
  • Posts: 2
    • View Profile
Re: RGBA8 texture is unsuported in Compute shaders
« Reply #2 on: October 11, 2014, 01:46:48 PM »
Thats great, thanks for fixing it so fast.

And thanks for developing such a usefull tool!