summaryrefslogtreecommitdiff
path: root/src/main/resources/assets/notenoughupdates/shaders/program/grayscale.fsh
blob: 70875510cd2474779c2735a1449383de459f4663 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#version 120

uniform sampler2D DiffuseSampler;

varying vec2 texCoord;

void main(){
    vec3 Gray = vec3(0.3, 0.59, 0.11);
    vec4 diffuseColor = texture2D(DiffuseSampler, texCoord);

    float Luma = dot(diffuseColor.rgb, Gray);
    diffuseColor.rgb = vec3(Luma, Luma, Luma);

    gl_FragColor = diffuseColor;
}