Contents
What can you do with a GLSL shader?
This post will be part of an ongoing series porting Image Editing tools to GLSL. Color correction is a common part of the gaming industry now, from making blue nights and golden sunrises, to increasing contrast, applying hueshifting to images that are otherwise dull and unsaturated.
Can a GLSL program be used in OpenGL?
Pixel based lighting is a common issue in many OpenGL applications, as the standard OpenGL lighting has very poor quality. I want to use a GLSL program to have per-pixel based lighting in my OpenGL program instead of per-vertex. Just Diffuse lighting, but with fog, texture and texture-alpha at least.
Which is the best image editing tool for GLSL?
Photoshop / Gimp are great for working with static images, but now you can bring those tools to your games with GLSL. This post will be part of an ongoing series porting Image Editing tools to GLSL.
Can you use GL _ light0 in fragment shader?
If I only use GL_LIGHT0 in the fragment shader, then it seems to work, but only reasonable for camera facing polygons and my floor polygon is just extremely dark. Also quads with RGBA textures show no sign of transparency. I use standard glRotate/Translate for the Modelview matrix, and glVertex/Normal for my polygons.
How to change the hue of an image?
I’m trying to change the hue of an image using a GLSL fragment shader. I want to achieve something similar to Photoshop’s Hue/Saturation Adjustment layer.
Is there a way to change hue in OpenGL?
EDIT: Using the functions Sam Hocevar provided in his answer, the problem with pink bands is solved, but I can only reach half of the color spectrum. I can change the hue from red to green, but I can’t change it to blue or pink. These functions will perform very badly. I suggest using functions that are written with the GPU in mind.
Which is the best shader for color correction?
Curves are the best way for you to perform common tasks such as lowering and raising the brightness of an image, adding contrast, HDR, etc. It’ll be possible in the future to combine this shader with a gradient shader I’m working on that’ll composite an image from a set colors making this truly dynamic.