|
group2 0.1.0
CSE 125 Group 2
|
SDL3 GPU renderer implementation – pipelines, passes, and post-processing. More...
#include "Renderer.hpp"#include "Camera.hpp"#include "ModelLoader.hpp"#include "SMAAAreaTex.h"#include "SMAASearchTex.h"#include "particles/ParticleSystem.hpp"#include <algorithm>#include <backends/imgui_impl_sdlgpu3.h>#include <cmath>#include <filesystem>#include <glm/ext/matrix_clip_space.hpp>#include <glm/ext/matrix_transform.hpp>#include <glm/gtc/matrix_inverse.hpp>#include <imgui.h>#include <stb_image.h>#include <vector>#include <stb_image_write.h>Functions | |
| static std::array< CascadeInfo, 4 > | computeCascades (const Camera &cam, const glm::vec3 &lightDir, int numCascades, int shadowMapSize, float shadowMaxDist, float lambda) |
| Compute per-cascade light view-projection matrices. | |
SDL3 GPU renderer implementation – pipelines, passes, and post-processing.
|
static |
Compute per-cascade light view-projection matrices.
Tightly fits the camera's sub-frustum from the light's perspective. Uses the practical split scheme (blend of logarithmic and linear) and texel-snaps the ortho projection to prevent shadow swimming.
| cam | Current camera. |
| lightDir | Unit direction vector toward the sun. |
| numCascades | Number of cascades (up to 4). |
| shadowMapSize | Per-cascade shadow map resolution. |
| shadowMaxDist | Maximum shadow distance in world units. |
| lambda | Logarithmic vs linear blend factor (0=linear, 1=log). |