-
-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
24704b9
commit 0509d2d
Showing
6 changed files
with
101 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 6 additions & 4 deletions
10
...itor/api/opengl/shaders/render_chunk.vert → .../api/opengl/shaders/render_chunk_120.vert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
amulet_map_editor/api/opengl/shaders/render_chunk_330.frag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# version 120 | ||
in vec2 fTexCoord; | ||
in vec4 fTexOffset; | ||
in vec3 fTint; | ||
|
||
uniform sampler2D image; | ||
|
||
void main(){ | ||
vec4 texColor = texture2D( | ||
image, | ||
vec2( | ||
mix(fTexOffset.x, fTexOffset.z, mod(fTexCoord.x, 1.0)), | ||
mix(fTexOffset.y, fTexOffset.w, mod(fTexCoord.y, 1.0)) | ||
) | ||
); | ||
if(texColor.a < 0.02) | ||
discard; | ||
texColor.xyz = texColor.xyz * fTint * 0.85; | ||
gl_FragColor = texColor; | ||
} |
20 changes: 20 additions & 0 deletions
20
amulet_map_editor/api/opengl/shaders/render_chunk_330.vert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# version 120 | ||
#extension GL_ARB_explicit_attrib_location : enable | ||
|
||
layout(location = 0) in vec3 positions; | ||
layout(location = 1) in vec2 vTexCoord; | ||
layout(location = 2) in vec4 vTexOffset; | ||
layout(location = 3) in vec3 vTint; | ||
|
||
varying vec2 fTexCoord; | ||
varying vec4 fTexOffset; | ||
varying vec3 fTint; | ||
|
||
uniform mat4 transformation_matrix; | ||
|
||
void main(){ | ||
gl_Position = transformation_matrix * vec4(positions, 1.0); | ||
fTexCoord = vTexCoord; | ||
fTexOffset = vTexOffset; | ||
fTint = vTint; | ||
} |