36
36
* > 0 => activate the version of the scene (v1, v2...)
37
37
*/
38
38
#define MODE_HAL 0
39
- #define MODE_TRAVEL 4
39
+ #define MODE_IMAC 1
40
+ #define MODE_TRAVEL 0
40
41
41
42
#ifndef DEBUG_PRINT
42
43
#define DEBUG_PRINT 1
@@ -122,7 +123,10 @@ int main( int argc, char **argv )
122
123
#if MODE_HAL == 1
123
124
lightManager.createHalLights ();
124
125
#endif
125
-
126
+ #if MODE_IMAC == 1
127
+ lightManager.createIMACLights ();
128
+ #endif
129
+
126
130
#if MODE_TRAVEL == 1
127
131
lightManager.createTravel1Lights ();
128
132
#endif
@@ -150,10 +154,13 @@ int main( int argc, char **argv )
150
154
/* ------------------------------------------ Shaders ------------------------------------------ */
151
155
/* --------------------------------------------------------------------------------------------- */
152
156
shaderManager.addShader (" shaders/gbuffer.glsl" , Shader::VERTEX_SHADER | Shader::FRAGMENT_SHADER, ShaderManager::GBUFFER);
157
+ shaderManager.addShader (" shaders/imac.glsl" , Shader::VERTEX_SHADER | Shader::FRAGMENT_SHADER, ShaderManager::GBUFFER_IMAC);
153
158
shaderManager.addShader (" shaders/gbufferTravelPlanete.glsl" , Shader::VERTEX_SHADER | Shader::FRAGMENT_SHADER, ShaderManager::GBUFFER_TRAVEL_PLANETE);
154
159
shaderManager.addShader (" shaders/gbufferTravelSpiral.glsl" , Shader::VERTEX_SHADER | Shader::FRAGMENT_SHADER, ShaderManager::GBUFFER_TRAVEL_SPIRAL);
155
160
shaderManager.addShader (" shaders/gbufferTravelMonolithe.glsl" , Shader::VERTEX_SHADER | Shader::FRAGMENT_SHADER, ShaderManager::GBUFFER_TRAVEL_MONOLITHE);
156
161
shaderManager.addShader (" shaders/blit.glsl" , Shader::VERTEX_SHADER | Shader::FRAGMENT_SHADER, ShaderManager::BLIT);
162
+
163
+
157
164
// Light
158
165
shaderManager.addShader (" shaders/dirLight.glsl" , Shader::VERTEX_SHADER | Shader::FRAGMENT_SHADER, ShaderManager::DIR_LIGHT);
159
166
shaderManager.addShader (" shaders/pointLight.glsl" , Shader::VERTEX_SHADER | Shader::FRAGMENT_SHADER, ShaderManager::POINT_LIGHT);
@@ -473,6 +480,10 @@ int main( int argc, char **argv )
473
480
textureManager.fillFrameBufferHal (gbufferFbo, gbufferDrawBuffers, width, height, shaderManager, textures, vao, camera.m_eye , t);
474
481
#endif
475
482
483
+ #if MODE_IMAC == 1
484
+ textureManager.fillFrameBufferImac (gbufferFbo, gbufferDrawBuffers, width, height, shaderManager, textures, vao, camera.m_eye , t);
485
+ #endif
486
+
476
487
#if MODE_TRAVEL == 1
477
488
textureManager.fillFrameBufferTravel1 (gbufferFbo, gbufferDrawBuffers, width, height, shaderManager, textures, vao, camera.m_eye , t);
478
489
#endif
@@ -497,6 +508,25 @@ int main( int argc, char **argv )
497
508
lightManager.updateHalLights (t);
498
509
#endif
499
510
511
+ // #if MODE_IMAC == 1
512
+ // // LIGHTS
513
+ // shaderManager.renderLighting(shaderManager, lightManager, width, height, gbufferTextures, fxBufferTextures[0], vao, camera.m_eye, t);
514
+ // shaderManager.renderLighting(shaderManager, lightManager, width, height, gbufferTextures, fxBufferTextures[4], vao, camera.m_eye, t);
515
+ // // COC
516
+ // shaderManager.computeCoc(width, height, gbufferTextures[2], fxBufferTextures[2], vao, camera.m_eye, t);
517
+ // // SOBEL
518
+ // shaderManager.renderTextureWithShader(ShaderManager::SOBEL, width, height, fxBufferTextures, vao, 1, 0, camera.m_eye, t);
519
+ // shaderManager.renderTextureWithShader(ShaderManager::SOBEL, width, height, fxBufferTextures, vao, 4, 0, camera.m_eye, t);
520
+ // // BLUR
521
+ // shaderManager.renderTextureWithShader(ShaderManager::BLUR, width, height, fxBufferTextures, vao, 3, 1, camera.m_eye, t);
522
+ // // DOF
523
+ // shaderManager.renderTextureWithShader(ShaderManager::DOF, width, height, fxBufferTextures, vao, 0, 1, camera.m_eye, t);
524
+ // // GLOW
525
+ // shaderManager.renderTextureWithShader(ShaderManager::GLOW, width, height, fxBufferTextures, vao, 1, 0, camera.m_eye, t);
526
+ // // GAMMA
527
+ // shaderManager.renderTextureWithShader(ShaderManager::GAMMA, width, height, fxBufferTextures, vao, 0, 1, camera.m_eye, t);
528
+ // #endif
529
+
500
530
#if MODE_TRAVEL == 1
501
531
lightManager.updateTravel1Lights (t);
502
532
#endif
@@ -506,7 +536,7 @@ int main( int argc, char **argv )
506
536
shaderManager.updateTravel2Elements (t);
507
537
#endif
508
538
509
- #if MODE_HAL == 1 || MODE_TRAVEL == 1 || MODE_TRAVEL == 2
539
+ #if MODE_HAL == 1 || MODE_TRAVEL == 1 || MODE_TRAVEL == 2 || MODE_IMAC == 1
510
540
// LIGHTS
511
541
shaderManager.renderLighting (shaderManager, lightManager, width, height, gbufferTextures, fxBufferTextures[0 ], vao, camera.m_eye , t);
512
542
shaderManager.renderLighting (shaderManager, lightManager, width, height, gbufferTextures, fxBufferTextures[4 ], vao, camera.m_eye , t);
@@ -536,7 +566,7 @@ int main( int argc, char **argv )
536
566
shaderManager.renderTextureWithShader (ShaderManager::STAR, width, height, fxBufferTextures, vao, 1 , 0 , camera.m_eye , t);
537
567
#endif
538
568
539
- //
569
+ // ²²
540
570
// Unbind framebuffer : now that we render all the textures, we can debind the fxBuffer
541
571
//
542
572
glBindFramebuffer (GL_FRAMEBUFFER, 0 );
@@ -548,6 +578,9 @@ int main( int argc, char **argv )
548
578
#if MODE_TRAVEL == 3 || MODE_TRAVEL == 4
549
579
textureManager.renderMainScreen (shaderManager, width, height, fxBufferTextures[1 ], vao, camera.m_eye , t);
550
580
#endif
581
+ #if MODE_IMAC == 1
582
+ textureManager.renderMainScreen (shaderManager, width, height, fxBufferTextures[0 ], vao, camera.m_eye , t);
583
+ #endif
551
584
// Display debug (pas à la noix non non non !)
552
585
// textureManager.renderDebugScreens(3, width, height, gbufferTextures, vao);
553
586
#if 1
0 commit comments