@@ -106,9 +106,8 @@ void renderer::process_post_processing() {
106106 this ->framebuffer_post_processing .invoke (0 , GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
107107
108108 agk::app.p_sky ->on_render ();
109- this ->process_terrain ();
110- this ->process_environment ();
111- this ->process_sky ();
109+ // this->process_terrain();
110+ // this->process_environment();
112111
113112 /* Revoke all buffers from frame. */
114113 this ->framebuffer_post_processing .revoke (GL_COLOR_BUFFER_BIT);
@@ -168,21 +167,21 @@ void renderer::process_post_processing() {
168167
169168 this ->shape_post_processing .invoke ();
170169 this ->shape_post_processing .p_program ->set_uniform_bool (" uSkyPostProcessing" , false );
171- this ->shape_post_processing .p_program ->set_uniform_bool (" uHDR.uEnabled " , agk::app.setting .enable_hdr .get_value ());
170+ this ->shape_post_processing .p_program ->set_uniform_bool (" uEffects.uHDREnabled " , agk::app.setting .enable_hdr .get_value ());
172171
173172 if (agk::app.setting .enable_hdr .get_value ()) {
174- this ->shape_post_processing .p_program ->set_uniform_float (" uHDR.uExposure " , agk::app.setting .hdr_exposure .get_value ());
175- this ->shape_post_processing .p_program ->set_uniform_float (" uHDR.uAverageLuminance " , ave_lum);
173+ this ->shape_post_processing .p_program ->set_uniform_float (" uEffects.uHDRExposure " , agk::app.setting .hdr_exposure .get_value ());
174+ this ->shape_post_processing .p_program ->set_uniform_float (" uEffects.uHDRAverageLuminance " , ave_lum);
176175 this ->previous_average_luminosity = ave_lum;
177176 }
178177
179- this ->shape_post_processing .p_program ->set_uniform_bool (" uMotionBlur.uEnabled " , agk::app.setting .enable_motion_blur .get_value ());
178+ this ->shape_post_processing .p_program ->set_uniform_bool (" uEffects.uMotionBlurEnabled " , agk::app.setting .enable_motion_blur .get_value ());
180179 if (agk::app.setting .enable_motion_blur .get_value ()) {
181180 // @TODO Should make the HDR luminance calc better.
182181
183182 this ->mat4x4_inverse_perspective_view = glm::inverse (this ->mat4x4_perspective_view );
184- this ->shape_post_processing .p_program ->set_uniform_mat4 (" uMotionBlur. uInversePerspectiveView" , &this ->mat4x4_inverse_perspective_view [0 ][0 ]);
185- this ->shape_post_processing .p_program ->set_uniform_mat4 (" uMotionBlur. uPreviousPerspectiveView" , &this ->mat4x4_previous_perspective_view [0 ][0 ]);
183+ this ->shape_post_processing .p_program ->set_uniform_mat4 (" uInversePerspectiveView" , &this ->mat4x4_inverse_perspective_view [0 ][0 ]);
184+ this ->shape_post_processing .p_program ->set_uniform_mat4 (" uPreviousPerspectiveView" , &this ->mat4x4_previous_perspective_view [0 ][0 ]);
186185 this ->mat4x4_previous_perspective_view = this ->mat4x4_perspective_view ;
187186
188187 auto p_camera {agk::app.p_curr_camera };
@@ -193,11 +192,11 @@ void renderer::process_post_processing() {
193192 this ->camera_motion_delta .x = yaw - this ->camera_motion_delta .x ;
194193 this ->camera_motion_delta .y = pitch - this ->camera_motion_delta .y ;
195194 float acc {(this ->camera_motion_delta .x * this ->camera_motion_delta .x + this ->camera_motion_delta .y * this ->camera_motion_delta .y )};
196- this ->shape_post_processing .p_program ->set_uniform_bool (" uMotionBlur.uCameraRotated " , acc != 0 .0f );
195+ this ->shape_post_processing .p_program ->set_uniform_bool (" uEffects.uMotionBlurCameraRotated " , acc != 0 .0f );
197196 this ->camera_motion_delta .x = yaw;
198197 this ->camera_motion_delta .y = pitch;
199198
200- this ->shape_post_processing .p_program ->set_uniform_float (" uMotionBlur.uIntensity " , agk::app.setting .motion_blur_intensity .get_value ());
199+ this ->shape_post_processing .p_program ->set_uniform_float (" uEffects.uMotionBlurIntensity " , agk::app.setting .motion_blur_intensity .get_value ());
201200 }
202201
203202 this ->shape_post_processing .draw ({0 , 0 , agk::app.screen_width , agk::app.screen_height }, {.0f , 0 .0f , 1 .0f , 1 .0f });
@@ -345,10 +344,9 @@ void renderer::on_render() {
345344
346345 case false : {
347346 agk::app.p_sky ->on_render ();
348- this ->process_terrain ();
349- this ->process_environment ();
347+ // this->process_terrain();
348+ // this->process_environment();
350349 this ->process_editor ();
351- this ->process_sky ();
352350 break ;
353351 }
354352 }
0 commit comments