Reverse depth is now working in the shadow pass
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "Graphics/Graphics.h"
|
||||
#include "Graphics/Initializer.h"
|
||||
#include "Graphics/RenderTarget.h"
|
||||
#include "Math/Matrix.h"
|
||||
#include "stb_image.h"
|
||||
|
||||
using namespace Seele;
|
||||
@@ -20,7 +21,6 @@ EnvironmentLoader::EnvironmentLoader(Gfx::PGraphics graphics) : graphics(graphic
|
||||
.size = {SOURCE_RESOLUTION, SOURCE_RESOLUTION},
|
||||
.offset = {0, 0},
|
||||
},
|
||||
.fieldOfView = glm::radians(90.0f),
|
||||
});
|
||||
convolutionViewport = graphics->createViewport(nullptr, ViewportCreateInfo{
|
||||
.dimensions =
|
||||
@@ -28,7 +28,6 @@ EnvironmentLoader::EnvironmentLoader(Gfx::PGraphics graphics) : graphics(graphic
|
||||
.size = {CONVOLUTED_RESOLUTION, CONVOLUTED_RESOLUTION},
|
||||
.offset = {0, 0},
|
||||
},
|
||||
.fieldOfView = glm::radians(90.0f),
|
||||
});
|
||||
for (uint32 i = 0; i < prefilterViewports.size(); ++i) {
|
||||
prefilterViewports[i] = graphics->createViewport(nullptr, ViewportCreateInfo{
|
||||
@@ -37,7 +36,6 @@ EnvironmentLoader::EnvironmentLoader(Gfx::PGraphics graphics) : graphics(graphic
|
||||
.size = {128 * std::pow(0.5, i), 128 * std::pow(0.5, i)},
|
||||
.offset = {0, 0},
|
||||
},
|
||||
.fieldOfView = glm::radians(90.0f),
|
||||
});
|
||||
}
|
||||
cubeSampler = graphics->createSampler({
|
||||
@@ -127,7 +125,6 @@ EnvironmentLoader::EnvironmentLoader(Gfx::PGraphics graphics) : graphics(graphic
|
||||
.size = {512, 512},
|
||||
.offset = {0, 0},
|
||||
},
|
||||
.fieldOfView = glm::radians(90.0f),
|
||||
});
|
||||
Gfx::ORenderPass lutPass = graphics->createRenderPass(
|
||||
Gfx::RenderTargetLayout{
|
||||
@@ -195,7 +192,7 @@ void EnvironmentLoader::import(EnvironmentImportArgs args, PEnvironmentMapAsset
|
||||
.height = (uint32)height,
|
||||
.name = "HDRRaw",
|
||||
});
|
||||
Matrix4 captureProjection = cubeRenderViewport->getProjectionMatrix(0.1f, 10.0f);
|
||||
Matrix4 captureProjection = perspectiveProjection(glm::radians(90.0f), 1.0f, 0.1f, 10.0f);
|
||||
Matrix4 captureViews[] = {
|
||||
glm::lookAt(Vector(0.0f, 0.0f, 0.0f), Vector(1.0f, 0.0f, 0.0f), Vector(0.0f, 1.0f, 0.0f)),
|
||||
glm::lookAt(Vector(0.0f, 0.0f, 0.0f), Vector(-1.0f, 0.0f, 0.0f), Vector(0.0f, 1.0f, 0.0f)),
|
||||
|
||||
Reference in New Issue
Block a user