Viewport fixes

This commit is contained in:
luboslenco
2018-10-14 20:22:40 +02:00
parent 9f7b48cc30
commit 75b469b572
2 changed files with 56 additions and 32 deletions
+19 -23
View File
@@ -74,8 +74,7 @@ class RenderPathDeferred {
t.height = 0;
t.displayp = Inc.getDisplayp();
t.format = Inc.getHdrFormat();
var ss = Inc.getSuperSampling();
if (ss != 1) t.scale = ss;
t.scale = Inc.getSuperSampling();
t.depth_buffer = "main";
#if rp_autoexposure
t.mipmaps = true;
@@ -94,8 +93,7 @@ class RenderPathDeferred {
t.height = 0;
t.displayp = Inc.getDisplayp();
t.format = Inc.getHdrFormat();
var ss = Inc.getSuperSampling();
if (ss != 1) t.scale = ss;
t.scale = Inc.getSuperSampling();
path.createRenderTarget(t);
}
@@ -108,8 +106,7 @@ class RenderPathDeferred {
t.height = 0;
t.displayp = Inc.getDisplayp();
t.format = "RGBA64";
var ss = Inc.getSuperSampling();
if (ss != 1) t.scale = ss;
t.scale = Inc.getSuperSampling();
t.depth_buffer = "main";
path.createRenderTarget(t);
}
@@ -121,8 +118,7 @@ class RenderPathDeferred {
t.height = 0;
t.displayp = Inc.getDisplayp();
t.format = "RGBA64";
var ss = Inc.getSuperSampling();
if (ss != 1) t.scale = ss;
t.scale = Inc.getSuperSampling();
path.createRenderTarget(t);
}
@@ -134,8 +130,7 @@ class RenderPathDeferred {
t.height = 0;
t.displayp = Inc.getDisplayp();
t.format = "RGBA64";
var ss = Inc.getSuperSampling();
if (ss != 1) t.scale = ss;
t.scale = Inc.getSuperSampling();
path.createRenderTarget(t);
}
@@ -146,8 +141,7 @@ class RenderPathDeferred {
t.height = 0;
t.displayp = Inc.getDisplayp();
t.format = "RGBA32";
var ss = Inc.getSuperSampling();
if (ss != 1) t.scale = ss;
t.scale = Inc.getSuperSampling();
path.createRenderTarget(t);
}
#end
@@ -184,8 +178,7 @@ class RenderPathDeferred {
t.height = 0;
t.displayp = Inc.getDisplayp();
t.format = "RGBA32";
var ss = Inc.getSuperSampling();
if (ss != 1) t.scale = ss;
t.scale = Inc.getSuperSampling();
path.createRenderTarget(t);
}
{
@@ -195,8 +188,7 @@ class RenderPathDeferred {
t.height = 0;
t.displayp = Inc.getDisplayp();
t.format = "RGBA32";
var ss = Inc.getSuperSampling();
if (ss != 1) t.scale = ss;
t.scale = Inc.getSuperSampling();
path.createRenderTarget(t);
}
#end
@@ -257,8 +249,7 @@ class RenderPathDeferred {
t.height = 0;
t.displayp = Inc.getDisplayp();
t.format = "R8";
var ss = Inc.getSuperSampling();
if (ss != 1) t.scale = ss;
t.scale = Inc.getSuperSampling();
// t.scale = 0.5;
path.createRenderTarget(t);
}
@@ -269,8 +260,7 @@ class RenderPathDeferred {
t.height = 0;
t.displayp = Inc.getDisplayp();
t.format = "R8";
var ss = Inc.getSuperSampling();
if (ss != 1) t.scale = ss;
t.scale = Inc.getSuperSampling();
// t.scale = 0.5;
path.createRenderTarget(t);
}
@@ -1158,9 +1148,15 @@ class RenderPathDeferred {
path.bindTarget("gbuffer2", "sveloc");
path.drawShader("shader_datas/taa_pass/taa_pass");
path.setTarget("taa");
path.bindTarget("bufa", "tex");
path.drawShader("shader_datas/copy_pass/copy_pass");
// Paint
if (arm.UITrait.inst.dirty > 1) {
//
path.setTarget("taa");
path.bindTarget("bufa", "tex");
path.drawShader("shader_datas/copy_pass/copy_pass");
// Paint
}
//
}
}
#end