forked from LeenkxTeam/LNXSDK
Update leenkx/Sources/leenkx/renderpath/RenderPathForward.hx
This commit is contained in:
@ -146,12 +146,13 @@ class RenderPathForward {
|
|||||||
t.scale = Inc.getSuperSampling();
|
t.scale = Inc.getSuperSampling();
|
||||||
path.createRenderTarget(t);
|
path.createRenderTarget(t);
|
||||||
|
|
||||||
|
//holds colors before refractive meshes are drawn
|
||||||
var t = new RenderTargetRaw();
|
var t = new RenderTargetRaw();
|
||||||
t.name = "refr";
|
t.name = "refr";
|
||||||
t.width = 0;
|
t.width = 0;
|
||||||
t.height = 0;
|
t.height = 0;
|
||||||
t.displayp = Inc.getDisplayp();
|
t.displayp = Inc.getDisplayp();
|
||||||
t.format = "RGBA64";
|
t.format = Inc.getHdrFormat();
|
||||||
t.scale = Inc.getSuperSampling();
|
t.scale = Inc.getSuperSampling();
|
||||||
path.createRenderTarget(t);
|
path.createRenderTarget(t);
|
||||||
}
|
}
|
||||||
@ -200,7 +201,7 @@ class RenderPathForward {
|
|||||||
Inc.initGI("voxels");
|
Inc.initGI("voxels");
|
||||||
Inc.initGI("voxelsOut");
|
Inc.initGI("voxelsOut");
|
||||||
Inc.initGI("voxelsOutB");
|
Inc.initGI("voxelsOutB");
|
||||||
#if (lnx_voxelgi_shadows || (rp_voxels == "Voxel GI"))
|
#if (rp_voxels == "Voxel GI" || lnx_voxelgi_shadows)
|
||||||
Inc.initGI("voxelsSDF");
|
Inc.initGI("voxelsSDF");
|
||||||
Inc.initGI("voxelsSDFtmp");
|
Inc.initGI("voxelsSDFtmp");
|
||||||
#end
|
#end
|
||||||
@ -319,6 +320,7 @@ class RenderPathForward {
|
|||||||
path.createRenderTarget(t);
|
path.createRenderTarget(t);
|
||||||
}
|
}
|
||||||
#end
|
#end
|
||||||
|
|
||||||
#if rp_ssr
|
#if rp_ssr
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -397,7 +399,6 @@ class RenderPathForward {
|
|||||||
path.setViewport(res, res);
|
path.setViewport(res, res);
|
||||||
|
|
||||||
path.bindTarget("voxels", "voxels");
|
path.bindTarget("voxels", "voxels");
|
||||||
path.drawMeshes("voxel");
|
|
||||||
|
|
||||||
Inc.computeVoxelsTemporal();
|
Inc.computeVoxelsTemporal();
|
||||||
|
|
||||||
@ -422,7 +423,7 @@ class RenderPathForward {
|
|||||||
#if (rp_ssrefr || lnx_voxelgi_refract)
|
#if (rp_ssrefr || lnx_voxelgi_refract)
|
||||||
{
|
{
|
||||||
path.setTarget("gbuffer_refraction"); // Only clear gbuffer0
|
path.setTarget("gbuffer_refraction"); // Only clear gbuffer0
|
||||||
path.clearTarget(0xff000000);
|
path.clearTarget(0xffffff00);
|
||||||
}
|
}
|
||||||
#end
|
#end
|
||||||
|
|
||||||
@ -448,10 +449,12 @@ class RenderPathForward {
|
|||||||
#if (rp_voxels != "Off")
|
#if (rp_voxels != "Off")
|
||||||
if (leenkx.data.Config.raw.rp_gi != false)
|
if (leenkx.data.Config.raw.rp_gi != false)
|
||||||
{
|
{
|
||||||
|
#if (rp_voxels != "Off")
|
||||||
path.bindTarget("voxelsOut", "voxels");
|
path.bindTarget("voxelsOut", "voxels");
|
||||||
#if (lnx_voxelgi_shadows || rp_voxels == "Voxel GI")
|
#if (rp_voxels == "Voxel GI" || lnx_voxelgi_shadows)
|
||||||
path.bindTarget("voxelsSDF", "voxelsSDF");
|
path.bindTarget("voxelsSDF", "voxelsSDF");
|
||||||
#end
|
#end
|
||||||
|
#end
|
||||||
}
|
}
|
||||||
#end
|
#end
|
||||||
|
|
||||||
@ -501,12 +504,19 @@ class RenderPathForward {
|
|||||||
|
|
||||||
#if (rp_voxels != "Off")
|
#if (rp_voxels != "Off")
|
||||||
path.bindTarget("voxelsOut", "voxels");
|
path.bindTarget("voxelsOut", "voxels");
|
||||||
|
#if (rp_voxels == "Voxel GI" || lnx_voxelgi_shadows)
|
||||||
path.bindTarget("voxelsSDF", "voxelsSDF");
|
path.bindTarget("voxelsSDF", "voxelsSDF");
|
||||||
#end
|
#end
|
||||||
|
#end
|
||||||
|
|
||||||
|
#if rp_ssrs
|
||||||
|
path.bindTarget("_main", "gbufferD");
|
||||||
|
#end
|
||||||
|
|
||||||
path.drawMeshes("refraction");
|
path.drawMeshes("refraction");
|
||||||
|
|
||||||
path.setTarget("lbuffer0");
|
path.setTarget("lbuffer0");
|
||||||
|
|
||||||
path.bindTarget("lbuffer0", "tex");
|
path.bindTarget("lbuffer0", "tex");
|
||||||
path.bindTarget("refr", "tex1");
|
path.bindTarget("refr", "tex1");
|
||||||
path.bindTarget("_main", "gbufferD");
|
path.bindTarget("_main", "gbufferD");
|
||||||
|
Reference in New Issue
Block a user