diff --git a/examples/shaders/resources/shaders/glsl100/cel.fs b/examples/shaders/resources/shaders/glsl100/cel.fs index 3e3e105a2..dfc22d0c0 100644 --- a/examples/shaders/resources/shaders/glsl100/cel.fs +++ b/examples/shaders/resources/shaders/glsl100/cel.fs @@ -8,13 +8,13 @@ varying vec4 fragColor; varying vec3 fragNormal; uniform sampler2D texture0; -uniform vec4 colDiffuse; -uniform vec3 viewPos; -uniform float numBands; +uniform vec4 colDiffuse; +uniform vec3 viewPos; +uniform float numBands; struct Light { - int enabled; - int type; + int enabled; + int type; vec3 position; vec3 target; vec4 color; @@ -23,9 +23,9 @@ uniform Light lights[4]; void main() { - vec4 texColor = texture2D(texture0, fragTexCoord); + vec4 texColor = texture2D(texture0, fragTexCoord); vec3 baseColor = texColor.rgb * fragColor.rgb * colDiffuse.rgb; - vec3 norm = normalize(fragNormal); + vec3 norm = normalize(fragNormal); float lightAccum = 0.08; // ambient floor diff --git a/examples/shaders/resources/shaders/glsl100/cel.vs b/examples/shaders/resources/shaders/glsl100/cel.vs index 7e9f7d6d0..153842a9b 100644 --- a/examples/shaders/resources/shaders/glsl100/cel.vs +++ b/examples/shaders/resources/shaders/glsl100/cel.vs @@ -13,7 +13,6 @@ varying vec2 fragTexCoord; varying vec4 fragColor; varying vec3 fragNormal; -// inverse() and transpose() are not built-in until GLSL 1.40 / ES 3.0 mat3 inverse(mat3 m) { float a00 = m[0][0], a01 = m[0][1], a02 = m[0][2]; @@ -39,10 +38,10 @@ void main() { fragPosition = vec3(matModel * vec4(vertexPosition, 1.0)); fragTexCoord = vertexTexCoord; - fragColor = vertexColor; + fragColor = vertexColor; mat3 normalMatrix = transpose(inverse(mat3(matModel))); - fragNormal = normalize(normalMatrix * vertexNormal); + fragNormal = normalize(normalMatrix * vertexNormal); - gl_Position = mvp * vec4(vertexPosition, 1.0); + gl_Position = mvp * vec4(vertexPosition, 1.0); } \ No newline at end of file diff --git a/examples/shaders/resources/shaders/glsl100/outline_hull.vs b/examples/shaders/resources/shaders/glsl100/outline_hull.vs index f6b9aa129..af7be8831 100644 --- a/examples/shaders/resources/shaders/glsl100/outline_hull.vs +++ b/examples/shaders/resources/shaders/glsl100/outline_hull.vs @@ -5,11 +5,11 @@ attribute vec3 vertexNormal; attribute vec2 vertexTexCoord; attribute vec4 vertexColor; -uniform mat4 mvp; +uniform mat4 mvp; uniform float outlineThickness; void main() { vec3 extruded = vertexPosition + vertexNormal * outlineThickness; - gl_Position = mvp * vec4(extruded, 1.0); + gl_Position = mvp * vec4(extruded, 1.0); } \ No newline at end of file diff --git a/examples/shaders/resources/shaders/glsl120/cel.fs b/examples/shaders/resources/shaders/glsl120/cel.fs index 01b75516d..88321e60f 100644 --- a/examples/shaders/resources/shaders/glsl120/cel.fs +++ b/examples/shaders/resources/shaders/glsl120/cel.fs @@ -6,13 +6,13 @@ varying vec4 fragColor; varying vec3 fragNormal; uniform sampler2D texture0; -uniform vec4 colDiffuse; -uniform vec3 viewPos; -uniform float numBands; +uniform vec4 colDiffuse; +uniform vec3 viewPos; +uniform float numBands; struct Light { - int enabled; - int type; + int enabled; + int type; vec3 position; vec3 target; vec4 color; @@ -21,9 +21,9 @@ uniform Light lights[4]; void main() { - vec4 texColor = texture2D(texture0, fragTexCoord); + vec4 texColor = texture2D(texture0, fragTexCoord); vec3 baseColor = texColor.rgb * fragColor.rgb * colDiffuse.rgb; - vec3 norm = normalize(fragNormal); + vec3 norm = normalize(fragNormal); float lightAccum = 0.08; // ambient floor diff --git a/examples/shaders/resources/shaders/glsl120/cel.vs b/examples/shaders/resources/shaders/glsl120/cel.vs index ef2a1907b..3c736aec7 100644 --- a/examples/shaders/resources/shaders/glsl120/cel.vs +++ b/examples/shaders/resources/shaders/glsl120/cel.vs @@ -19,9 +19,9 @@ mat3 inverse(mat3 m) float a00 = m[0][0], a01 = m[0][1], a02 = m[0][2]; float a10 = m[1][0], a11 = m[1][1], a12 = m[1][2]; float a20 = m[2][0], a21 = m[2][1], a22 = m[2][2]; - float b01 = a22*a11 - a12*a21; + float b01 = a22*a11 - a12*a21; float b11 = -a22*a10 + a12*a20; - float b21 = a21*a10 - a11*a20; + float b21 = a21*a10 - a11*a20; float det = a00*b01 + a01*b11 + a02*b21; return mat3(b01, (-a22*a01 + a02*a21), ( a12*a01 - a02*a11), b11, ( a22*a00 - a02*a20), (-a12*a00 + a02*a10), @@ -39,10 +39,10 @@ void main() { fragPosition = vec3(matModel * vec4(vertexPosition, 1.0)); fragTexCoord = vertexTexCoord; - fragColor = vertexColor; + fragColor = vertexColor; mat3 normalMatrix = transpose(inverse(mat3(matModel))); - fragNormal = normalize(normalMatrix * vertexNormal); + fragNormal = normalize(normalMatrix * vertexNormal); - gl_Position = mvp * vec4(vertexPosition, 1.0); + gl_Position = mvp * vec4(vertexPosition, 1.0); } \ No newline at end of file diff --git a/examples/shaders/resources/shaders/glsl120/outline_hull.vs b/examples/shaders/resources/shaders/glsl120/outline_hull.vs index 8209d6279..7ad125be1 100644 --- a/examples/shaders/resources/shaders/glsl120/outline_hull.vs +++ b/examples/shaders/resources/shaders/glsl120/outline_hull.vs @@ -5,11 +5,11 @@ attribute vec3 vertexNormal; attribute vec2 vertexTexCoord; attribute vec4 vertexColor; -uniform mat4 mvp; +uniform mat4 mvp; uniform float outlineThickness; void main() { vec3 extruded = vertexPosition + vertexNormal * outlineThickness; - gl_Position = mvp * vec4(extruded, 1.0); + gl_Position = mvp * vec4(extruded, 1.0); } \ No newline at end of file diff --git a/examples/shaders/resources/shaders/glsl330/cel.fs b/examples/shaders/resources/shaders/glsl330/cel.fs index 435f6fb7d..78a2097c2 100644 --- a/examples/shaders/resources/shaders/glsl330/cel.fs +++ b/examples/shaders/resources/shaders/glsl330/cel.fs @@ -7,7 +7,7 @@ in vec3 fragNormal; // Raylib standard uniforms uniform sampler2D texture0; -uniform vec4 colDiffuse; +uniform vec4 colDiffuse; // View position for future specular / fresnel use. uniform vec3 viewPos; @@ -18,7 +18,7 @@ uniform float numBands; // rlights.h compatible light block. struct Light { int enabled; - int type; // 0 = directional, 1 = point + int type; // 0 = directional, 1 = point vec3 position; vec3 target; vec4 color; @@ -29,9 +29,9 @@ uniform Light lights[4]; out vec4 finalColor; void main() { - vec4 texColor = texture(texture0, fragTexCoord); + vec4 texColor = texture(texture0, fragTexCoord); vec3 baseColor = texColor.rgb * fragColor.rgb * colDiffuse.rgb; - vec3 norm = normalize(fragNormal); + vec3 norm = normalize(fragNormal); float lightAccum = 0.08; // ambient floor diff --git a/examples/shaders/resources/shaders/glsl330/cel.vs b/examples/shaders/resources/shaders/glsl330/cel.vs index 813ab8836..37a8d200d 100644 --- a/examples/shaders/resources/shaders/glsl330/cel.vs +++ b/examples/shaders/resources/shaders/glsl330/cel.vs @@ -19,7 +19,7 @@ out vec3 fragNormal; void main() { fragPosition = vec3(matModel * vec4(vertexPosition, 1.0)); fragTexCoord = vertexTexCoord; - fragColor = vertexColor; - fragNormal = normalize(vec3(matNormal * vec4(vertexNormal, 0.0))); - gl_Position = mvp * vec4(vertexPosition, 1.0); + fragColor = vertexColor; + fragNormal = normalize(vec3(matNormal * vec4(vertexNormal, 0.0))); + gl_Position = mvp * vec4(vertexPosition, 1.0); } diff --git a/examples/shaders/resources/shaders/glsl330/outline_hull.vs b/examples/shaders/resources/shaders/glsl330/outline_hull.vs index 4a3dafdce..2e350201e 100644 --- a/examples/shaders/resources/shaders/glsl330/outline_hull.vs +++ b/examples/shaders/resources/shaders/glsl330/outline_hull.vs @@ -5,11 +5,11 @@ in vec3 vertexNormal; in vec2 vertexTexCoord; in vec4 vertexColor; -uniform mat4 mvp; +uniform mat4 mvp; uniform float outlineThickness; void main() { // Extrude vertex along its normal to create the hull. vec3 extruded = vertexPosition + vertexNormal * outlineThickness; - gl_Position = mvp * vec4(extruded, 1.0); + gl_Position = mvp * vec4(extruded, 1.0); }