polyadvent

A game engine from scratch in C
git clone git://jb55.com/polyadvent
Log | Files | Refs | README

commit c39058de9fc0ac54502c6f167b2e2cb7ca1d08b1
parent 6fe6faadff7853075e85d1b044eb4c0b2f36036e
Author: William Casarin <jb55@jb55.com>
Date:   Fri, 28 Sep 2018 22:53:57 -0700

use artistic terrain shader

Diffstat:
Metc/shaders/test.v.glsl | 16++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/etc/shaders/test.v.glsl b/etc/shaders/test.v.glsl @@ -39,14 +39,14 @@ void main() v_color = land[0].xyz; - for (int i = 0; i < nlands-1; i++) { - v_color = - mix(v_color, - land[i+1].xyz, - smoothstep(land[i].w, land[i+1].w, position.z)); - } - - // v_color = vec3(0.2 + position.z*0.05, position.z*0.0095, position.z*0.0001) * 0.5; + // for (int i = 0; i < nlands-1; i++) { + // v_color = + // mix(v_color, + // land[i+1].xyz, + // smoothstep(land[i].w, land[i+1].w, position.z)); + // } + + v_color = vec3(0.2 + position.z*0.05, position.z*0.0095, position.z*0.0001) * 0.5; // v_color = vec3(position.z, position.z, position.z) * 0.005;