enigma-3d 0.2.15

A 3D Rendering Engine with a focus on simplicity and ease of use. Far from feature complete and not recommended for production use.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#version 330 core

in vec2 TEXCOORD;

out vec4 color;

uniform sampler2D scene;
uniform float threshold;

void main() {
    vec4 tex = texture(scene, TEXCOORD);
    float brightness = dot(tex.rgb, vec3(0.2126, 0.7152, 0.0722));
    if(brightness > threshold) { // Threshold for brightness
        color = tex;
    } else {
        color = vec4(0.0);
    }
}