Skip to content

Commit d37c6ab

Browse files
committed
Initial Commit
0 parents  commit d37c6ab

File tree

77 files changed

+113
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+113
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#version 150
2+
3+
#moj_import <fog.glsl>
4+
5+
in vec3 Position;
6+
in vec4 Color;
7+
in vec2 UV0;
8+
in ivec2 UV2;
9+
10+
uniform sampler2D Sampler2;
11+
12+
uniform mat4 ModelViewMat;
13+
uniform mat4 ProjMat;
14+
uniform mat3 IViewRotMat;
15+
uniform int FogShape;
16+
17+
out float vertexDistance;
18+
out vec4 vertexColor;
19+
out vec2 texCoord0;
20+
21+
void main() {
22+
gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0);
23+
24+
vertexDistance = fog_distance(ModelViewMat, IViewRotMat * Position, FogShape);
25+
26+
vec4 ColorM = Color; // mutable version of Color uniform
27+
if (vertexDistance > 800.0 && ivec3(ColorM.rgb * 255. + 0.5) == ivec3(64, 64, 64)) {
28+
ColorM = vec4(1.0, 1.0, 1.0, 1.0);
29+
}
30+
31+
vertexColor = ColorM * texelFetch(Sampler2, UV2 / 16, 0);
32+
texCoord0 = UV0;
33+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#version 150
2+
3+
#moj_import <fog.glsl>
4+
5+
in vec3 Position;
6+
in vec4 Color;
7+
in vec2 UV0;
8+
in ivec2 UV2;
9+
10+
uniform sampler2D Sampler2;
11+
12+
uniform mat4 ModelViewMat;
13+
uniform mat4 ProjMat;
14+
uniform mat3 IViewRotMat;
15+
uniform int FogShape;
16+
17+
out float vertexDistance;
18+
out vec4 vertexColor;
19+
out vec2 texCoord0;
20+
21+
void main() {
22+
gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0);
23+
24+
vertexDistance = fog_distance(ModelViewMat, IViewRotMat * Position, FogShape);
25+
26+
vec4 ColorM = Color; // mutable version of Color uniform
27+
if (vertexDistance > 800.0 && ivec3(ColorM.rgb * 255. + 0.5) == ivec3(64, 64, 64)) {
28+
ColorM = vec4(1.0, 1.0, 1.0, 1.0);
29+
}
30+
31+
vertexColor = ColorM * texelFetch(Sampler2, UV2 / 16, 0);
32+
texCoord0 = UV0;
33+
}
232 Bytes
542 Bytes
580 Bytes
673 Bytes
301 Bytes
3.49 KB
4.18 KB

0 commit comments

Comments
 (0)