GLSL blur shader and HSB

edited November 2014 in GLSL / Shaders

Hi,

Maybe this is already very simple. I am not much of a GLSL coder!

I have a pixel manipulation code running, and the built in P55 blur was too slow so I went into the shaders world.

I tried replacing the built-in filter(BLUR) with the one in the Examples, it is attractive and very fast. But seems to darken my image too much, it eventually dissappears - I think it could be to do with the fact that I am manipulating the pixels in HSB mode and the shader seems to be summing RGB ...

How can I get things working so that the shader behaves exactly the same as filter(BLUR) with HSB pixels?

Tagged:

Answers

  • Colors are always handled as RGB in GLSL, but you can manually convert the RGB components of a color into HSB in order to run your calculations in that colorspace. You then have to convert back the results to RGB. This might be useful.

Sign In or Register to comment.