RetroArch
fft_heightmap.glsl.frag.h
Go to the documentation of this file.
1 #include "shaders_common.h"
2 
4  precision mediump float;
5  out vec4 FragColor;
6  in vec3 vWorldPos;
7  in vec3 vHeight;
8 
9  vec3 colormap(vec3 height) {
10  return 1.0 / (1.0 + exp(-0.08 * height));
11  }
12 
13  void main() {
14  vec3 color = mix(vec3(1.0, 0.7, 0.7) * colormap(vHeight), vec3(0.1, 0.15, 0.1), clamp(vWorldPos.z / 400.0, 0.0, 1.0));
15  color = mix(color, vec3(0.1, 0.15, 0.1), clamp(1.0 - vWorldPos.z / 2.0, 0.0, 1.0));
16  FragColor = vec4(color, 1.0);
17  }
18 );
#define GLSL_300(src)
Definition: shaders_common.h:11
struct passwd out
Definition: missing_libc_functions.c:51
#define exp(a)
Definition: math.h:32
GLenum GLint GLint * precision
Definition: glext.h:8206
GLuint in
Definition: glext.h:10523
GLenum clamp
Definition: glext.h:6856
int main(int argc, char *argv[])
Definition: send-presence.c:197
GLuint color
Definition: glext.h:6883
GLint GLint GLsizei GLsizei height
Definition: glext.h:6293
static const char * fft_fragment_program_heightmap
Definition: fft_heightmap.glsl.frag.h:3