fzea vlnzuueck

This commit is contained in:
2017-02-22 18:31:04 -04:00
parent a2d0da2404
commit 6898dd244c
10 changed files with 59 additions and 34 deletions

View File

@@ -1,9 +1,10 @@
#version 120
uniform sampler2D sTexture;
uniform sampler1D sColorMap;
void main() {
vec4 tex = texture2D(sTexture, gl_TexCoord[0].st);
vec4 color = mix(vec4(0.0, 0.0, 0.3, 1.0), vec4(1.0, 1.0, 0.0, 1.0), tex.r);
gl_FragColor = clamp(color, 0.0, 1.0);
vec4 map = texture1D(sColorMap, tex.r);
gl_FragColor = map;
}

BIN
shaders/color_map.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 B