File tree Expand file tree Collapse file tree 6 files changed +108
-5
lines changed Expand file tree Collapse file tree 6 files changed +108
-5
lines changed Original file line number Diff line number Diff line change @@ -968,10 +968,10 @@ shaders/shaders_julia_set: shaders/shaders_julia_set.c
968
968
969
969
shaders/shaders_lightmap: shaders/shaders_lightmap.c
970
970
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -s FORCE_FILESYSTEM=1 \
971
- --preload-file shaders/resources/shaders/glsl330 /lightmap.vs \
972
- --preload-file shaders/resources/shaders/glsl330 /lightmap.fs \
973
- --preload-file shaders/resources/cubicmap_atlas.png \
974
- --preload-file shaders/resources/spark_flame.png
971
+ --preload-file shaders/resources/shaders/glsl100/lightmap.vs@resources/shaders/glsl100 /lightmap.vs \
972
+ --preload-file shaders/resources/shaders/glsl100/lightmap.fs@resources/shaders/glsl100 /lightmap.fs \
973
+ --preload-file shaders/resources/cubicmap_atlas.png@resources/cubicmap_atlas.png \
974
+ --preload-file shaders/resources/spark_flame.png@resources/spark_flame.png
975
975
976
976
shaders/shaders_mesh_instancing: shaders/shaders_mesh_instancing.c
977
977
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
Original file line number Diff line number Diff line change
1
+ #version 100
2
+
3
+ precision mediump float ;
4
+
5
+ // Input vertex attributes (from vertex shader)
6
+ varying vec2 fragTexCoord;
7
+ varying vec2 fragTexCoord2;
8
+ varying vec3 fragPosition;
9
+ varying vec4 fragColor;
10
+
11
+ // Input uniform values
12
+ uniform sampler2D texture0;
13
+ uniform sampler2D texture1;
14
+
15
+ void main()
16
+ {
17
+ // Texel color fetching from texture sampler
18
+ vec4 texelColor = texture2D (texture0, fragTexCoord);
19
+ vec4 texelColor2 = texture2D (texture1, fragTexCoord2);
20
+
21
+ gl_FragColor = texelColor * texelColor2;
22
+ }
Original file line number Diff line number Diff line change
1
+ #version 100
2
+
3
+ // Input vertex attributes
4
+ attribute vec3 vertexPosition;
5
+ attribute vec2 vertexTexCoord;
6
+ attribute vec2 vertexTexCoord2;
7
+ attribute vec4 vertexColor;
8
+
9
+ // Input uniform values
10
+ uniform mat4 mvp;
11
+ uniform mat4 matModel;
12
+
13
+ // Output vertex attributes (to fragment shader)
14
+ varying vec3 fragPosition;
15
+ varying vec2 fragTexCoord;
16
+ varying vec2 fragTexCoord2;
17
+ varying vec4 fragColor;
18
+
19
+ // NOTE: Add here your custom variables
20
+
21
+ void main()
22
+ {
23
+ // Send vertex attributes to fragment shader
24
+ fragPosition = vec3 (matModel* vec4 (vertexPosition, 1.0 ));
25
+ fragTexCoord = vertexTexCoord;
26
+ fragTexCoord2 = vertexTexCoord2;
27
+ fragColor = vertexColor;
28
+
29
+ // Calculate final vertex position
30
+ gl_Position = mvp* vec4 (vertexPosition, 1.0 );
31
+ }
Original file line number Diff line number Diff line change
1
+ #version 120
2
+
3
+ // Input vertex attributes (from vertex shader)
4
+ varying vec2 fragTexCoord;
5
+ varying vec2 fragTexCoord2;
6
+ varying vec3 fragPosition;
7
+ varying vec4 fragColor;
8
+
9
+ // Input uniform values
10
+ uniform sampler2D texture0;
11
+ uniform sampler2D texture1;
12
+
13
+ void main()
14
+ {
15
+ // Texel color fetching from texture sampler
16
+ vec4 texelColor = texture2D (texture0, fragTexCoord);
17
+ vec4 texelColor2 = texture2D (texture1, fragTexCoord2);
18
+
19
+ gl_FragColor = texelColor * texelColor2;
20
+ }
Original file line number Diff line number Diff line change
1
+ #version 120
2
+
3
+ // Input vertex attributes
4
+ attribute vec3 vertexPosition;
5
+ attribute vec2 vertexTexCoord;
6
+ attribute vec2 vertexTexCoord2;
7
+ attribute vec4 vertexColor;
8
+
9
+ // Input uniform values
10
+ uniform mat4 mvp;
11
+ uniform mat4 matModel;
12
+
13
+ // Output vertex attributes (to fragment shader)
14
+ varying vec3 fragPosition;
15
+ varying vec2 fragTexCoord;
16
+ varying vec2 fragTexCoord2;
17
+ varying vec4 fragColor;
18
+
19
+ // NOTE: Add here your custom variables
20
+
21
+ void main()
22
+ {
23
+ // Send vertex attributes to fragment shader
24
+ fragPosition = vec3 (matModel* vec4 (vertexPosition, 1.0 ));
25
+ fragTexCoord = vertexTexCoord;
26
+ fragTexCoord2 = vertexTexCoord2;
27
+ fragColor = vertexColor;
28
+
29
+ // Calculate final vertex position
30
+ gl_Position = mvp* vec4 (vertexPosition, 1.0 );
31
+ }
Original file line number Diff line number Diff line change @@ -170,4 +170,3 @@ int main(void)
170
170
171
171
return 0 ;
172
172
}
173
-
You can’t perform that action at this time.
0 commit comments