Better previews
This commit is contained in:
@@ -5,5 +5,5 @@ precision mediump float;
|
||||
varying vec4 v_col;
|
||||
|
||||
void main(){
|
||||
gl_FragColor = v_col;
|
||||
gl_FragColor = v_col;
|
||||
}
|
||||
|
||||
14
core/assets/shaders/planetgrid.fragment.glsl
Normal file
14
core/assets/shaders/planetgrid.fragment.glsl
Normal file
@@ -0,0 +1,14 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
||||
varying vec4 v_col;
|
||||
varying vec4 v_position;
|
||||
|
||||
uniform vec3 u_mouse;
|
||||
|
||||
const vec4 shadow = vec4(0, 0, 0, 0);
|
||||
|
||||
void main(){
|
||||
gl_FragColor = mix(v_col, shadow, distance(u_mouse, v_position.xyz));
|
||||
}
|
||||
12
core/assets/shaders/planetgrid.vertex.glsl
Normal file
12
core/assets/shaders/planetgrid.vertex.glsl
Normal file
@@ -0,0 +1,12 @@
|
||||
attribute vec4 a_position;
|
||||
attribute vec4 a_color;
|
||||
|
||||
uniform mat4 u_projModelView;
|
||||
varying vec4 v_col;
|
||||
varying vec4 v_position;
|
||||
|
||||
void main() {
|
||||
gl_Position = u_projModelView * a_position;
|
||||
v_col = a_color;
|
||||
v_position = a_position;
|
||||
}
|
||||
Reference in New Issue
Block a user