Number range for color in GLSL
Posted
by
kotoko
on Stack Overflow
See other posts from Stack Overflow
or by kotoko
Published on 2012-06-11T10:30:23Z
Indexed on
2012/06/11
10:40 UTC
Read the original article
Hit count: 200
I'm figuring out how to set a colour in a Fragment Shader.
This statement gl_FragColor = (0.1,0.6,1,1);
gives me white regardless of what I enter in the first 3 values.
I was expecting to either give it values between 0 and 255 or 0 and 1 but neither seems to work.
I can change how bright it is with values from 0 to 1 in the fourth value, but nothing for colour.
Can anybody tell me if:
- gl_FragColor is the right variable to set.
- What is the range of values for the first three values.
- What am I currently making the Shader do.
© Stack Overflow or respective owner