Cleanup
This commit is contained in:
@@ -678,6 +678,7 @@ setting.pixelate.name = Pixelate
|
||||
setting.minimap.name = Show Minimap
|
||||
setting.position.name = Show Player Position
|
||||
setting.musicvol.name = Music Volume
|
||||
setting.atmosphere.name = Show Planet Atmosphere
|
||||
setting.ambientvol.name = Ambient Volume
|
||||
setting.mutemusic.name = Mute Music
|
||||
setting.sfxvol.name = SFX Volume
|
||||
|
||||
@@ -1,34 +1,16 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision lowp int;
|
||||
#define INTEGER lowp int
|
||||
#else
|
||||
#define INTEGER int
|
||||
#endif
|
||||
|
||||
//#define GRADIENTS
|
||||
#define step 0.5
|
||||
|
||||
const int MAX_COLORS = 10;
|
||||
|
||||
uniform INTEGER u_colornum;
|
||||
uniform vec4 u_colors[MAX_COLORS];
|
||||
|
||||
varying float v_height;
|
||||
|
||||
void main() {
|
||||
#ifdef GRADIENTS
|
||||
uniform sampler2D u_colors;
|
||||
|
||||
int from = int(v_height * float(u_colornum));
|
||||
int to = int(clamp(float(int(v_height * float(u_colornum) + 1.0)), 0.0, float(u_colornum)-1.0));
|
||||
float alpha = fract(v_height * float(u_colornum));
|
||||
alpha = floor(alpha / step) * step;
|
||||
|
||||
gl_FragColor = vec4(mix(u_colors[from], u_colors[to], alpha));
|
||||
|
||||
#else
|
||||
|
||||
gl_FragColor = u_colors[int(v_height * float(u_colornum))];
|
||||
|
||||
#endif
|
||||
void main(){
|
||||
gl_FragColor = texture2D(u_colors, vec2(v_height, 0.0));
|
||||
}
|
||||
@@ -1,9 +1,6 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision lowp int;
|
||||
#define INTEGER lowp int
|
||||
#else
|
||||
#define INTEGER int
|
||||
#endif
|
||||
|
||||
attribute vec4 a_position;
|
||||
@@ -22,8 +19,6 @@ uniform float u_spread;
|
||||
uniform float u_magnitude;
|
||||
uniform float u_seed;
|
||||
|
||||
uniform INTEGER u_colornum;
|
||||
|
||||
varying float v_height;
|
||||
|
||||
float rand(vec2 co){
|
||||
|
||||
Reference in New Issue
Block a user