polyadvent

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

commit 2a211af4eeac25b51d1dbc0eef0a2abc83fcfa71
parent 5a78fd91b3a6a263d5988d045456d99fce74aa27
Author: William Casarin <jb55@jb55.com>
Date:   Wed,  2 May 2018 21:56:59 -0700

okay

Diffstat:
Metc/shaders/test.v.glsl | 2+-
Msrc/game.c | 2++
Msrc/render.c | 3++-
3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/etc/shaders/test.v.glsl b/etc/shaders/test.v.glsl @@ -33,7 +33,7 @@ void main() else if (position.z <= 100.0) v_color = vec4(0.5, 0.5, 0.5, 1.0); else - v_color = vec4(1.0, 1.0, 1.0, 1.0); + v_color = vec4(1.0, 1.0, 1.0, 1.0) * 0.9; v_ray = camera_position - (world * v4pos).xyz; } diff --git a/src/game.c b/src/game.c @@ -52,6 +52,8 @@ void game_init(struct game *game) { light_dir[1] = 0.8; light_dir[2] = 0.8; + game->test_resources.fog_on = 1; + node_init(root); node_init(player); node_init(camera); diff --git a/src/render.c b/src/render.c @@ -190,7 +190,8 @@ static void render_geom (struct resources *res, void render (struct game *game, struct geometry *geom) { - glClearColor( 0.5294f, 0.8078f, 0.9216f, 1.0f ); //clear background screen to black + static const float adjust = 1.0f; + glClearColor( 0.5294f * adjust, 0.8078f * adjust, 0.9216f * adjust, 1.0f ); //clear background screen to black glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); check_gl();