Fix viewport resize flicker
This commit is contained in:
@@ -271,6 +271,7 @@ function base_resize() {
|
||||
cam.data.ortho[3] = 2 * (sys_h() / sys_w());
|
||||
}
|
||||
camera_object_build_proj(cam);
|
||||
render_path_base_taa_frame = 0;
|
||||
|
||||
if (context_raw.camera_type == camera_type_t.ORTHOGRAPHIC) {
|
||||
viewport_update_camera_type(context_raw.camera_type);
|
||||
|
||||
@@ -261,7 +261,7 @@ function render_path_base_init_ssao() {
|
||||
|
||||
function render_path_base_draw_ssao() {
|
||||
let ssao: bool = config_raw.rp_ssao != false && context_raw.camera_type == camera_type_t.PERSPECTIVE;
|
||||
if (ssao && context_raw.ddirty > 0 && render_path_base_taa_frame > 0) {
|
||||
if (ssao && context_raw.ddirty > 0 && _render_path_frame > 0) {
|
||||
if (map_get(render_path_render_targets, "singlea") == null) {
|
||||
render_path_base_init_ssao();
|
||||
}
|
||||
@@ -289,7 +289,7 @@ function render_path_base_draw_deferred_light() {
|
||||
render_path_bind_target("gbuffer0", "gbuffer0");
|
||||
render_path_bind_target("gbuffer1", "gbuffer1");
|
||||
let ssao: bool = config_raw.rp_ssao != false && context_raw.camera_type == camera_type_t.PERSPECTIVE;
|
||||
if (ssao && render_path_base_taa_frame > 0) {
|
||||
if (ssao && _render_path_frame > 0) {
|
||||
render_path_bind_target("singlea", "ssaotex");
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user