17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-09 05:54:43 +01:00

Add DLSS Frame Generation (gfx.framegeneration x2/x3/x4) and Reflex (gfx.reflex) to the Vulkan renderer

This commit is contained in:
2026-10-25 20:52:12 +01:00
parent 1841e6d7b0
commit a6bdeeaa2b
23 changed files with 1474 additions and 85 deletions

View File

@@ -75,12 +75,14 @@ glm::mat4 gfx::temporal_aa::begin_frame(glm::mat4 const &Projection, glm::dmat3
m_worldfuture = glm::mat4{projectionfix * world};
m_cabfuture = glm::mat4{projectionfix * cab};
m_reprojection = glm::mat4{previous * world * inverseprojection};
m_reprojectionnooffset = glm::mat4{m_previous.projection * world * glm::inverse(current.projection)};
}
else
{
m_worldfuture = glm::mat4{1.f};
m_cabfuture = glm::mat4{1.f};
m_reprojection = glm::mat4{1.f};
m_reprojectionnooffset = glm::mat4{1.f};
}
m_target = 1 - m_target;
m_previous = current;

View File

@@ -65,6 +65,11 @@ class temporal_aa
{
return m_reprojection;
}
// the same without the offsets of the frames (the frame generation of dlss)
glm::mat4 const &reprojection_without_offset() const
{
return m_reprojectionnooffset;
}
// the image of the history written this frame (0 or 1); the other one holds the last frame
int target() const
{
@@ -95,6 +100,7 @@ class temporal_aa
glm::mat4 m_worldfuture{1.f};
glm::mat4 m_cabfuture{1.f};
glm::mat4 m_reprojection{1.f};
glm::mat4 m_reprojectionnooffset{1.f};
int m_target{0};
bool m_historyvalid{false};
};