dungeon_crawler
diff prototype/src/renderer.cc @ 30:938a6a155c94
foo
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Mon, 27 Aug 2012 04:03:22 +0300 |
parents | 2fc004802739 |
children | 0cd55268eaf4 |
line diff
1.1 --- a/prototype/src/renderer.cc Sun Aug 26 03:39:32 2012 +0300 1.2 +++ b/prototype/src/renderer.cc Mon Aug 27 04:03:22 2012 +0300 1.3 @@ -73,7 +73,7 @@ 1.4 set_uniform_int(deferred_debug, uname, i); 1.5 } 1.6 1.7 - if(!(deferred_omni = load_sdr("deferred.v.glsl", "deferred_omni.p.glsl"))) { 1.8 + if(!(deferred_omni = load_sdr("deferred_omni.v.glsl", "deferred_omni.p.glsl"))) { 1.9 return false; 1.10 } 1.11 for(int i=0; i<MRT_COUNT; i++) { 1.12 @@ -119,6 +119,8 @@ 1.13 float tex_scale_y = (float)fb_ysz / tex_ysz; 1.14 1.15 set_uniform_float2(deferred_omni, "tex_scale", tex_scale_x, tex_scale_y); 1.16 + set_uniform_float2(deferred_omni, "fb_size", fb_xsz, fb_ysz); 1.17 + 1.18 set_uniform_float2(deferred_debug, "tex_scale", tex_scale_x, tex_scale_y); 1.19 } 1.20 1.21 @@ -137,7 +139,12 @@ 1.22 // post-process lighting 1.23 glPushAttrib(GL_ENABLE_BIT); 1.24 1.25 + glEnable(GL_BLEND); 1.26 + glBlendFunc(GL_ONE, GL_ONE); 1.27 + 1.28 glDisable(GL_LIGHTING); 1.29 + glDisable(GL_CULL_FACE); 1.30 + glDisable(GL_DEPTH_TEST); 1.31 1.32 glUseProgram(deferred_omni); 1.33 for(int i=0; i<MRT_COUNT; i++) {