01-24-2025, 07:35 PM
I'm glad you like it and that I had a little fun with it!
Am I understanding the question correctly? Shouldn't the lighting be too dark? You can set it here:
'lcolor' is the lighting color. (RGBA ,0-1 scale) Currently it's a very light pink.1,.8,.8.
This will actually act as a multiplier when coloring the pixels, which will work according to the following 3 settings.
ambient, diffuse,specular
It's well described here:
https://learnopengl.com/Lighting/Basic-Lighting
I intentionally brought it out in the code with the 'power' variable so that the color stays the same for everyone and can be easily calibrated. Ambient is the ambient light. If you set this higher, it won't be as dark as the one that doesn't get any light.
Am I understanding the question correctly? Shouldn't the lighting be too dark? You can set it here:
Code: (Select All)
Dim lcolor(2) As _Float
lcolor(0) = 1
lcolor(1) = .8
lcolor(2) = .8
power = .2: _glLightfv _GL_LIGHT0, _GL_AMBIENT, glVec4(lcolor(0) * power, lcolor(1) * power, lcolor(2) * power, 1)
power = .8: _glLightfv _GL_LIGHT0, _GL_DIFFUSE, glVec4(lcolor(0) * power, lcolor(1) * power, lcolor(2) * power, 1)
power = 5: _glLightfv _GL_LIGHT0, _GL_SPECULAR, glVec4(lcolor(0) * power, lcolor(1) * power, lcolor(2) * power, 1)
'lcolor' is the lighting color. (RGBA ,0-1 scale) Currently it's a very light pink.1,.8,.8.
This will actually act as a multiplier when coloring the pixels, which will work according to the following 3 settings.
ambient, diffuse,specular
It's well described here:
https://learnopengl.com/Lighting/Basic-Lighting
I intentionally brought it out in the code with the 'power' variable so that the color stays the same for everyone and can be easily calibrated. Ambient is the ambient light. If you set this higher, it won't be as dark as the one that doesn't get any light.