Skip to content

Commit ab0d19f

Browse files
authored
Merge pull request raysan5#137 from raysan5/develop
Integrate Develop branch
2 parents 13e18c2 + c482f37 commit ab0d19f

33 files changed

+148
-192
lines changed

release/html5/libraylib.bc

1.83 KB
Binary file not shown.

release/win32/mingw32/libraylib.a

24.8 KB
Binary file not shown.

shaders/glsl100/bloom.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ varying vec4 fragColor;
88

99
// Input uniform values
1010
uniform sampler2D texture0;
11-
uniform vec4 fragTintColor;
11+
uniform vec4 colDiffuse;
1212

1313
// NOTE: Add here your custom variables
1414

shaders/glsl100/blur.fs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ varying vec4 fragColor;
88

99
// Input uniform values
1010
uniform sampler2D texture0;
11-
uniform vec4 fragTintColor;
11+
uniform vec4 colDiffuse;
1212

1313
// NOTE: Add here your custom variables
1414

15-
const float renderWidth = 1280;
16-
const float renderHeight = 720;
15+
// NOTE: Render size values must be passed from code
16+
const float renderWidth = 800;
17+
const float renderHeight = 450;
1718

1819
float offset[3] = float[]( 0.0, 1.3846153846, 3.2307692308 );
1920
float weight[3] = float[]( 0.2270270270, 0.3162162162, 0.0702702703 );

shaders/glsl100/cross_hatching.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ varying vec4 fragColor;
88

99
// Input uniform values
1010
uniform sampler2D texture0;
11-
uniform vec4 fragTintColor;
11+
uniform vec4 colDiffuse;
1212

1313
// NOTE: Add here your custom variables
1414

shaders/glsl100/cross_stitching.fs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ varying vec4 fragColor;
88

99
// Input uniform values
1010
uniform sampler2D texture0;
11-
uniform vec4 fragTintColor;
11+
uniform vec4 colDiffuse;
1212

1313
// NOTE: Add here your custom variables
1414

15-
const float renderWidth = 1280;
16-
const float renderHeight = 720;
15+
// NOTE: Render size values must be passed from code
16+
const float renderWidth = 800;
17+
const float renderHeight = 450;
1718

1819
float stitchingSize = 6.0f;
1920

shaders/glsl100/dream_vision.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ varying vec4 fragColor;
88

99
// Input uniform values
1010
uniform sampler2D texture0;
11-
uniform vec4 fragTintColor;
11+
uniform vec4 colDiffuse;
1212

1313
// NOTE: Add here your custom variables
1414

shaders/glsl100/fisheye.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ varying vec4 fragColor;
88

99
// Input uniform values
1010
uniform sampler2D texture0;
11-
uniform vec4 fragTintColor;
11+
uniform vec4 colDiffuse;
1212

1313
// NOTE: Add here your custom variables
1414

shaders/glsl100/pixel.fs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ varying vec4 fragColor;
88

99
// Input uniform values
1010
uniform sampler2D texture0;
11-
uniform vec4 fragTintColor;
11+
uniform vec4 colDiffuse;
1212

1313
// NOTE: Add here your custom variables
1414

15-
const float renderWidth = 1280;
16-
const float renderHeight = 720;
15+
// NOTE: Render size values must be passed from code
16+
const float renderWidth = 800;
17+
const float renderHeight = 450;
1718

1819
uniform float pixelWidth = 5.0f;
1920
uniform float pixelHeight = 5.0f;

shaders/glsl100/posterization.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ varying vec4 fragColor;
88

99
// Input uniform values
1010
uniform sampler2D texture0;
11-
uniform vec4 fragTintColor;
11+
uniform vec4 colDiffuse;
1212

1313
// NOTE: Add here your custom variables
1414

shaders/glsl100/predator.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ varying vec4 fragColor;
88

99
// Input uniform values
1010
uniform sampler2D texture0;
11-
uniform vec4 fragTintColor;
11+
uniform vec4 colDiffuse;
1212

1313
// NOTE: Add here your custom variables
1414

shaders/glsl100/scanlines.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ varying vec4 fragColor;
88

99
// Input uniform values
1010
uniform sampler2D texture0;
11-
uniform vec4 fragTintColor;
11+
uniform vec4 colDiffuse;
1212

1313
// NOTE: Add here your custom variables
1414

shaders/glsl100/standard.fs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ struct Light {
3434
};
3535

3636
const int maxLights = 8;
37-
uniform int lightsCount;
3837
uniform Light lights[maxLights];
3938

4039
vec3 CalcPointLight(Light l, vec3 n, vec3 v, float s)
@@ -134,19 +133,15 @@ void main()
134133
float spec = 1.0;
135134
if (useSpecular == 1) spec *= normalize(texture2D(texture2, fragTexCoord).r);
136135

137-
for (int i = 0; i < lightsCount; i++)
136+
for (int i = 0; i < maxLights; i++)
138137
{
139138
// Check if light is enabled
140139
if (lights[i].enabled == 1)
141140
{
142141
// Calculate lighting based on light type
143-
switch (lights[i].type)
144-
{
145-
case 0: lighting += CalcPointLight(lights[i], n, v, spec); break;
146-
case 1: lighting += CalcDirectionalLight(lights[i], n, v, spec); break;
147-
case 2: lighting += CalcSpotLight(lights[i], n, v, spec); break;
148-
default: break;
149-
}
142+
if(lights[i].type == 0) lighting += CalcPointLight(lights[i], n, v, spec);
143+
else if(lights[i].type == 1) lighting += CalcDirectionalLight(lights[i], n, v, spec);
144+
else if(lights[i].type == 2) lighting += CalcSpotLight(lights[i], n, v, spec);
150145
}
151146
}
152147

shaders/glsl100/swirl.fs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ varying vec4 fragColor;
88

99
// Input uniform values
1010
uniform sampler2D texture0;
11-
uniform vec4 fragTintColor;
11+
uniform vec4 colDiffuse;
1212

1313
// NOTE: Add here your custom variables
1414

15-
const float renderWidth = 800.0; // HARDCODED for example!
16-
const float renderHeight = 480.0; // Use uniforms instead...
15+
// NOTE: Render size values must be passed from code
16+
const float renderWidth = 800;
17+
const float renderHeight = 450;
1718

1819
float radius = 250.0;
1920
float angle = 0.8;

shaders/glsl330/bloom.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ in vec4 fragColor;
66

77
// Input uniform values
88
uniform sampler2D texture0;
9-
uniform vec4 fragTintColor;
9+
uniform vec4 colDiffuse;
1010

1111
// Output fragment color
1212
out vec4 finalColor;

shaders/glsl330/blur.fs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@ in vec4 fragColor;
66

77
// Input uniform values
88
uniform sampler2D texture0;
9-
uniform vec4 fragTintColor;
9+
uniform vec4 colDiffuse;
1010

1111
// Output fragment color
1212
out vec4 finalColor;
1313

1414
// NOTE: Add here your custom variables
1515

16-
const float renderWidth = 1280.0;
17-
const float renderHeight = 720.0;
16+
// NOTE: Render size values must be passed from code
17+
const float renderWidth = 800;
18+
const float renderHeight = 450;
1819

1920
float offset[3] = float[](0.0, 1.3846153846, 3.2307692308);
2021
float weight[3] = float[](0.2270270270, 0.3162162162, 0.0702702703);

shaders/glsl330/cross_hatching.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ in vec4 fragColor;
66

77
// Input uniform values
88
uniform sampler2D texture0;
9-
uniform vec4 fragTintColor;
9+
uniform vec4 colDiffuse;
1010

1111
// Output fragment color
1212
out vec4 finalColor;

shaders/glsl330/cross_stitching.fs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@ in vec4 fragColor;
66

77
// Input uniform values
88
uniform sampler2D texture0;
9-
uniform vec4 fragTintColor;
9+
uniform vec4 colDiffuse;
1010

1111
// Output fragment color
1212
out vec4 finalColor;
1313

1414
// NOTE: Add here your custom variables
1515

16-
const float renderWidth = 1280.0;
17-
const float renderHeight = 720.0;
16+
// NOTE: Render size values must be passed from code
17+
const float renderWidth = 800.0;
18+
const float renderHeight = 450.0;
1819

1920
float stitchingSize = 6.0;
2021

shaders/glsl330/depth.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ in vec4 fragColor;
66

77
// Input uniform values
88
uniform sampler2D texture0; // Depth texture
9-
uniform vec4 fragTintColor;
9+
uniform vec4 colDiffuse;
1010

1111
// Output fragment color
1212
out vec4 finalColor;

shaders/glsl330/dream_vision.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ in vec2 fragTexCoord;
55
out vec4 fragColor;
66

77
uniform sampler2D texture0;
8-
uniform vec4 fragTintColor;
8+
uniform vec4 colDiffuse;
99

1010
// NOTE: Add here your custom variables
1111

shaders/glsl330/fisheye.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ in vec2 fragTexCoord;
55
out vec4 fragColor;
66

77
uniform sampler2D texture0;
8-
uniform vec4 fragTintColor;
8+
uniform vec4 colDiffuse;
99

1010
// NOTE: Add here your custom variables
1111

shaders/glsl330/phong.fs

Lines changed: 0 additions & 85 deletions
This file was deleted.

shaders/glsl330/phong.vs

Lines changed: 0 additions & 29 deletions
This file was deleted.

shaders/glsl330/pixel.fs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@ in vec4 fragColor;
66

77
// Input uniform values
88
uniform sampler2D texture0;
9-
uniform vec4 fragTintColor;
9+
uniform vec4 colDiffuse;
1010

1111
// Output fragment color
1212
out vec4 finalColor;
1313

1414
// NOTE: Add here your custom variables
1515

16-
const float renderWidth = 1280.0;
17-
const float renderHeight = 720.0;
16+
// NOTE: Render size values must be passed from code
17+
const float renderWidth = 800;
18+
const float renderHeight = 450;
1819

1920
uniform float pixelWidth = 5.0;
2021
uniform float pixelHeight = 5.0;

shaders/glsl330/posterization.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ in vec4 fragColor;
66

77
// Input uniform values
88
uniform sampler2D texture0;
9-
uniform vec4 fragTintColor;
9+
uniform vec4 colDiffuse;
1010

1111
// Output fragment color
1212
out vec4 finalColor;

0 commit comments

Comments
 (0)