medfall

A super great game engine
Log | Files | Refs

commit 30c810ce445ddc5d0737475a3942d4c6b40b26cb
parent 6933aedd927d215fbf30a74a316950c86c30fc97
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Sat, 13 Oct 2018 23:25:12 +0900

Fix shadow map

Diffstat:
shadow_map.cc | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/shadow_map.cc b/shadow_map.cc @@ -145,7 +145,7 @@ GAME_FRAME( game_frame ) { { RenderState state; state.shader = get_shader( SHADER_DEBUG_RENDER_SHADOW_MAP ); - state.textures[ 0 ] = shadow_fb.texture; + state.textures[ 0 ] = shadow_fb.textures[ OUTPUT_DEPTH ]; renderer_draw_mesh( square, state ); } @@ -155,7 +155,7 @@ GAME_FRAME( game_frame ) { render_state.shader = get_shader( SHADER_SHADOWED_VERTEX_COLOURS ); render_state.uniforms[ UNIFORMS_VIEW ] = renderer_uniforms( V, P, game->pos ); render_state.uniforms[ UNIFORMS_LIGHT_VIEW ] = light_view_uniforms; - render_state.textures[ 0 ] = shadow_fb.texture; + render_state.textures[ 0 ] = shadow_fb.textures[ OUTPUT_DEPTH ]; render_state.textures[ 1 ] = renderer_blue_noise(); draw_scene( render_state, true );