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
#version 330 core

in vec3 v_world_pos;

uniform vec3 light_pos;
uniform float far_plane;

out float frag_depth;

void main() {
    frag_depth = length(v_world_pos - light_pos) / far_plane;
}