OpenGL ES SDK for Android ARM Developer Center
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
shaders.h File Reference

Go to the source code of this file.

Variables

static const char vertex_shader_source []
 
static const char fragment_shader_source []
 

Variable Documentation

const char fragment_shader_source[]
static
Initial value:
=
"#version 300 es\n"
"layout(std140) uniform;\n"
"precision highp float;\n"
"out vec4 FragColor;\n"
"in float vHeight;\n"
"in vec2 vLod;\n"
"in float vFog;\n"
"// Compress (-inf, +inf) to (0, 1).\n"
"float map_height(float h)\n"
"{\n"
" return 1.0 / (1.0 + exp(-h / 20.0));\n"
"}\n"
"// Make the heightmap look somewhat cloudy and fluffy.\n"
"void main()\n"
"{\n"
" vec3 color = vec3(1.2, 1.2, 1.0) * vec3(map_height(vHeight) + (vLod.x + vLod.y) * 0.1);\n"
" vec3 final_color = mix(color, vec3(0.5), vFog);\n"
" FragColor = vec4(final_color, 1.0);\n"
"}\n"

Definition at line 92 of file shaders.h.

const char vertex_shader_source[]
static

Definition at line 30 of file shaders.h.