REVIEWED: Shaders formating to follow raylib code conventions

This commit is contained in:
Ray
2025-08-11 20:22:31 +02:00
parent 8dae39fbda
commit 9b598f6bcf
62 changed files with 797 additions and 797 deletions

View File

@ -13,9 +13,9 @@ uniform sampler2D gAlbedoSpec;
struct Light {
int enabled;
int type; // Unused in this demo.
int type; // Unused in this demo
vec3 position;
vec3 target; // Unused in this demo.
vec3 target; // Unused in this demo
vec4 color;
};
@ -38,7 +38,7 @@ void main()
for (int i = 0; i < NR_LIGHTS; ++i)
{
if(lights[i].enabled == 0) continue;
if (lights[i].enabled == 0) continue;
vec3 lightDirection = lights[i].position - fragPosition;
vec3 diffuse = max(dot(normal, lightDirection), 0.0)*albedo*lights[i].color.xyz;
@ -48,7 +48,7 @@ void main()
// Attenuation
float distance = length(lights[i].position - fragPosition);
float attenuation = 1.0/(1.0 + LINEAR * distance + QUADRATIC*distance*distance);
float attenuation = 1.0/(1.0 + LINEAR*distance + QUADRATIC*distance*distance);
diffuse *= attenuation;
specular *= attenuation;
ambient += diffuse + specular;