Added support for changing cached floor/terrain

This commit is contained in:
Anuken
2020-03-03 17:01:09 -05:00
parent f1aadd97a8
commit bac1648d4b
12 changed files with 117 additions and 29 deletions

View File

@@ -1,12 +1,16 @@
#ifdef GL_ES
precision mediump float;
precision lowp int;
#define INTEGER lowp int
#else
#define INTEGER int
#endif
#define gradients false
const int MAX_COLORS = 10;
uniform int u_colornum;
uniform INTEGER u_colornum;
uniform vec4 u_colors[MAX_COLORS];
varying float v_height;

View File

@@ -1,3 +1,11 @@
#ifdef GL_ES
precision mediump float;
precision lowp int;
#define INTEGER lowp int
#else
#define INTEGER int
#endif
attribute vec4 a_position;
attribute vec3 a_normal;
@@ -14,7 +22,7 @@ uniform float u_spread;
uniform float u_magnitude;
uniform float u_seed;
uniform int u_colornum;
uniform INTEGER u_colornum;
varying float v_height;