8 uniform vec4 uHeightmapParams;
9 uniform
float uAngleScale;
14 vec2 tex_coord = vec2(aVertex.x +
float(uOffset.x) + 0.5, -aVertex.y +
float(uOffset.y) + 0.5) / vec2(textureSize(sHeight, 0));
16 vec3 world_pos = vec3(aVertex.x, 0.0, aVertex.y);
17 world_pos.xz += uHeightmapParams.xy;
19 float angle = world_pos.x * uAngleScale;
20 world_pos.xz *= uHeightmapParams.zw;
22 float lod = log2(world_pos.z + 1.0) - 6.0;
23 vec4 heights = textureLod(sHeight, tex_coord,
lod);
28 int c = int(-
sign(world_pos.x) + 1.0);
29 float height = mix(heights[
c], heights[1], abs(
angle) / 3.141592653);
32 vec3
up = vec3(-sangle, cangle, 0.0);
34 float base_y = 80.0 - 80.0 * cangle;
35 float base_x = 80.0 * sangle;
36 world_pos.xy = vec2(base_x, base_y);
39 vWorldPos = world_pos;
40 vHeight = vec3(
height, heights.yw * 80.0 - 40.0);
#define GLSL_300(src)
Definition: shaders_common.h:11
sampler2DBase< glm::vec4 > sampler2D
Definition: sampler.hpp:94
GLfloat angle
Definition: glext.h:11760
static const char * fft_vertex_program_heightmap
Definition: fft_heightmap.glsl.vert.h:3
struct passwd out
Definition: missing_libc_functions.c:51
const GLubyte * c
Definition: glext.h:9812
GLint lod
Definition: glext.h:8462
GLint location
Definition: glext.h:6690
GLuint in
Definition: glext.h:10523
#define sin(x)
Definition: math.h:23
int main(int argc, char *argv[])
Definition: send-presence.c:197
#define cos(x)
Definition: math.h:21
def sign()
Definition: build.py:201
#define gl_Position
Definition: internal_interface.hpp:385
bool up
Definition: connect_wiiupro.c:50
GLint GLint GLsizei GLsizei height
Definition: glext.h:6293