Kaynağa Gözat

unnecessary spacing

pull/5615/head
ggrizzly 1 hafta önce
ebeveyn
işleme
8f1dee6545
9 değiştirilmiş dosya ile 35 ekleme ve 36 silme
  1. +7
    -7
      examples/shaders/resources/shaders/glsl100/cel.fs
  2. +3
    -4
      examples/shaders/resources/shaders/glsl100/cel.vs
  3. +2
    -2
      examples/shaders/resources/shaders/glsl100/outline_hull.vs
  4. +7
    -7
      examples/shaders/resources/shaders/glsl120/cel.fs
  5. +5
    -5
      examples/shaders/resources/shaders/glsl120/cel.vs
  6. +2
    -2
      examples/shaders/resources/shaders/glsl120/outline_hull.vs
  7. +4
    -4
      examples/shaders/resources/shaders/glsl330/cel.fs
  8. +3
    -3
      examples/shaders/resources/shaders/glsl330/cel.vs
  9. +2
    -2
      examples/shaders/resources/shaders/glsl330/outline_hull.vs

+ 7
- 7
examples/shaders/resources/shaders/glsl100/cel.fs Dosyayı Görüntüle

@ -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

+ 3
- 4
examples/shaders/resources/shaders/glsl100/cel.vs Dosyayı Görüntüle

@ -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);
}

+ 2
- 2
examples/shaders/resources/shaders/glsl100/outline_hull.vs Dosyayı Görüntüle

@ -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);
}

+ 7
- 7
examples/shaders/resources/shaders/glsl120/cel.fs Dosyayı Görüntüle

@ -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

+ 5
- 5
examples/shaders/resources/shaders/glsl120/cel.vs Dosyayı Görüntüle

@ -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);
}

+ 2
- 2
examples/shaders/resources/shaders/glsl120/outline_hull.vs Dosyayı Görüntüle

@ -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);
}

+ 4
- 4
examples/shaders/resources/shaders/glsl330/cel.fs Dosyayı Görüntüle

@ -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

+ 3
- 3
examples/shaders/resources/shaders/glsl330/cel.vs Dosyayı Görüntüle

@ -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);
}

+ 2
- 2
examples/shaders/resources/shaders/glsl330/outline_hull.vs Dosyayı Görüntüle

@ -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);
}

Yükleniyor…
İptal
Kaydet