You've already forked minecraft-assets
Create/Update assets for version 1.17.1
This commit is contained in:
25
assets/minecraft/shaders/program/notch.fsh
Normal file
25
assets/minecraft/shaders/program/notch.fsh
Normal file
@@ -0,0 +1,25 @@
|
||||
#version 150
|
||||
|
||||
uniform sampler2D DiffuseSampler;
|
||||
uniform sampler2D DitherSampler;
|
||||
|
||||
in vec2 texCoord;
|
||||
|
||||
uniform vec2 InSize;
|
||||
|
||||
out vec4 fragColor;
|
||||
|
||||
void main() {
|
||||
vec2 halfSize = InSize * 0.5;
|
||||
|
||||
vec2 steppedCoord = texCoord;
|
||||
steppedCoord.x = float(int(steppedCoord.x*halfSize.x)) / halfSize.x;
|
||||
steppedCoord.y = float(int(steppedCoord.y*halfSize.y)) / halfSize.y;
|
||||
|
||||
vec4 noise = texture(DitherSampler, steppedCoord * halfSize / 4.0);
|
||||
vec4 col = texture(DiffuseSampler, steppedCoord) + noise * vec4(1.0/12.0, 1.0/12.0, 1.0/6.0, 1.0);
|
||||
float r = float(int(col.r*8.0))/8.0;
|
||||
float g = float(int(col.g*8.0))/8.0;
|
||||
float b = float(int(col.b*4.0))/4.0;
|
||||
fragColor = vec4(r, g, b, 1.0);
|
||||
}
|
||||
Reference in New Issue
Block a user