playing with another shader for a sun type thing and WAY better camera movement

This commit is contained in:
Jackson H committed 2024-06-04 15:25:14 -05:00
1 parent 9eb8d55630
commit b299a8d8a2
5 files changed
+175 -41

No files matched your search

+4 -2
View File
@@ -2,6 +2,7 @@
out vec4 FragColor;
uniform float light_power;
uniform vec3 lightColor;
uniform vec3 objectColor;
uniform vec3 viewPos;
@@ -10,8 +11,9 @@ in vec3 FragPos;
in vec3 Normal;
in vec3 LightPos;
// const float light_power = 12.0;
const float ambientStrength = 0.2;
const float shininess = 32.0;
const float shininess = 64.0;
const float screenGamma = 2.2; // Assume the monitor is calibrated to the sRGB color space
void main()
@@ -39,7 +41,7 @@ void main()
specular = pow(specAngle, shininess);
}
vec3 colorLinear = (ambient + diffuse + specular) * objectColor;
vec3 colorLinear = (ambient + (diffuse * light_power) + (specular * light_power)) * objectColor;
// vec3 colorGammaCorrected = pow(colorLinear, vec3(1.0 / screenGamma));