mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-10 13:51:53 +09:00
dithering on grad overlay
This commit is contained in:
17
assets/diff.frag
Normal file
17
assets/diff.frag
Normal file
@@ -0,0 +1,17 @@
|
||||
#version 120
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
#extension GL_EXT_gpu_shader4 : enable
|
||||
|
||||
|
||||
varying vec4 v_color;
|
||||
varying vec2 v_texCoords;
|
||||
uniform sampler2D u_texture;
|
||||
|
||||
void main(void) {
|
||||
vec4 inColor = texture2D(u_texture, v_texCoords);
|
||||
ivec4 bytes = ivec4(255.0 * inColor);
|
||||
ivec4 mask = ivec4(0x55);
|
||||
gl_FragColor = (bytes ^ mask) / 255.0;
|
||||
}
|
||||
BIN
assets/graphics/halfgrad.png
LFS
BIN
assets/graphics/halfgrad.png
LFS
Binary file not shown.
BIN
assets/graphics/halfgrad.tga
LFS
Normal file
BIN
assets/graphics/halfgrad.tga
LFS
Normal file
Binary file not shown.
BIN
assets/graphics/save_grad.png
LFS
BIN
assets/graphics/save_grad.png
LFS
Binary file not shown.
Reference in New Issue
Block a user