projects
/
tar-legacy.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Gamma corrected height shader (thanks Yanzl)
[tar-legacy.git]
/
MCDV
/
shaders
/
depth.fs
1
#version 330 core
2
out vec4 FragColor;
3
4
uniform vec3 color;
5
uniform float test;
6
7
uniform float HEIGHT_MIN;
8
uniform float HEIGHT_MAX;
9
10
in vec3 FragPos;
11
in float Depth;
12
in float Alpha;
13
14
15
void main()
16
{
17
float height = pow((Depth - HEIGHT_MIN) / HEIGHT_MAX, 2.2);
18
FragColor = vec4(height, height, height, Alpha);
19
}