Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
08fb51a
Refactor scene render pipeline state
CCPNobody Oct 15, 2026
5171744
Unify space scene view and reflection
CCPNobody Oct 16, 2026
1d4b63d
EveSpaceScene rendering spIit
CCPNobody Oct 20, 2026
8ba6e6f
Removing an unused parameter
CCPNobody Oct 20, 2026
4be45f5
Adding reflection settings to lights
CCPNobody Oct 20, 2026
fe775b8
Adding dynamic lights to the reflection probe
CCPNobody Oct 26, 2026
7c2bcf7
Code move
CCPNobody Oct 27, 2026
3212684
Removing newroute
CCPNobody Oct 27, 2026
ba1b16b
Removing redundant code
CCPNobody Oct 27, 2026
0f8efd4
Reflection improvements
CCPNobody Oct 27, 2026
200f7e4
Fixing small issues
CCPNobody Oct 28, 2026
da0cdde
Lensflares in reflection fix
CCPNobody Oct 28, 2026
8e2b967
EveSpaceScene
CCPNobody Oct 29, 2026
6061ca2
Timer fixup
CCPNobody Oct 29, 2026
caa0b70
Update EveSpaceSceneRenderDriver.cpp
CCPNobody Oct 29, 2026
e313879
Update EveSpaceScene.cpp
CCPNobody Oct 29, 2026
8b80f34
Update EveSpaceScene.cpp
CCPNobody Oct 29, 2026
657556f
code formatting fixes
CCPNobody Oct 29, 2026
1f32667
Addressing some code review issues
CCPNobody Oct 29, 2026
bff4624
Merge branch 'main' into dynamicexposure-and-reflection-probe-improve…
CCPNobody Oct 29, 2026
369347e
Update MetalWorkQueue.mm
CCPNobody Oct 30, 2026
5a869ba
Merge branch 'dynamicexposure-and-reflection-probe-improvements' of h…
CCPNobody Oct 30, 2026
e170e38
Formatting fixes
CCPNobody Oct 30, 2026
a813bc2
Merge branch 'dynamicexposure-and-reflection-probe-improvements' of h…
CCPNobody Nov 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions trinity/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,8 @@ set(_SOURCES
Eve/EveRootTransform.cpp
Eve/EveRootTransform.h
Eve/EveRootTransform_Blue.cpp
Eve/EveSceneView.cpp
Eve/EveSceneView.h
Eve/EveSpaceScene.cpp
Eve/EveSpaceScene.h
Eve/EveSpaceScene_Blue.cpp
Expand Down
58 changes: 58 additions & 0 deletions trinity/Eve/EveSceneView.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
// Copyright © 2026 CCP ehf.

#include "StdAfx.h"
#include "EveSceneView.h"

namespace EveSceneView
{
Camera::Camera( const Matrix& view, const Matrix& projection, const TextureSize2D& renderSize, const Matrix& jitterMatrix, float mipLodBias, float upscalingAmount )
{
this->view = view;
this->projection = projection;
this->jitterMatrix = jitterMatrix;
this->renderSize = renderSize;
this->mipLodBias = mipLodBias;
this->upscalingAmount = upscalingAmount;

const Matrix jitteredProjection = projection * jitterMatrix;
const Matrix inverseView = Inverse( view );
const Vector3 position( inverseView._41, inverseView._42, inverseView._43 );

CTriViewport viewport;
viewport.width = renderSize.width;
viewport.height = renderSize.height;

this->frustum.DeriveFrustum( &this->view, &position, &jitteredProjection, viewport );
}

ViewInfo ViewInfo::Main( bool distortion )
{
ViewInfo view;
view.reason = TR2RENDERREASON_NORMAL;
view.cullMode = Tr2RenderContextEnum::CULLMODE_CW;
view.distortion = distortion;
view.sceneObjects = true;
view.temporal = true;
view.subsurfaceScattering = true;
view.gpuParticles = true;
view.lensflares = true;
return view;
}

ViewInfo ViewInfo::ReflectionFace( bool lensflares )
{
ViewInfo view;
view.reason = TR2RENDERREASON_REFLECTION;
// Faces are rendered into a left handed cubemap, so the caller inverts the cull mode
// and the scene must not override it
view.cullMode = Tr2RenderContextEnum::CULLMODE_NONE;
view.distortion = false;
view.sceneObjects = false;
// faces must not disturb the main view's history
view.temporal = false;
view.subsurfaceScattering = false;
view.gpuParticles = false;
view.lensflares = lensflares;
return view;
}
}
56 changes: 56 additions & 0 deletions trinity/Eve/EveSceneView.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// Copyright © 2026 CCP ehf.

#pragma once

#include "TriFrustum.h"
#include "ITr2Renderable.h"
#include "Tr2GpuResourcePool.h"

namespace EveSceneView
{
// Where a view looks from. Constructor derives the frustum from the other fields, so build a
// new Camera rather than changing one.
struct Camera
{
Matrix view;
Matrix projection;
Matrix jitterMatrix;
TextureSize2D renderSize;
float mipLodBias = 0.0f;
float upscalingAmount = 1.0f;
// derived from the view, the jittered projection and renderSize, never from the bound viewport
TriFrustum frustum;

Camera( const Matrix& view, const Matrix& projection, const TextureSize2D& renderSize, const Matrix& jitterMatrix = IdentityMatrix(), float mipLodBias = 0.0f, float upscalingAmount = 1.0f );
};

// What the scene renders for a view. The scene reads these flags rather than deciding per
// call site what a kind of view gets. The flags are off by default and every factory sets
// every field, so a new field has to be decided for each kind of view.
struct ViewInfo
{
// Passed on to GetBatches, so renderables can filter themselves (e.g. ShouldReflect)
Tr2RenderReason reason = TR2RENDERREASON_NORMAL;
Tr2RenderContextEnum::CullMode cullMode = Tr2RenderContextEnum::CULLMODE_CW;
bool distortion = false;
// Gather the scene's objects, camera attachments, static particles and impostors.
// Otherwise only the reflectable renderables in the component registry are gathered.
bool sceneObjects = false;
// The view feeds the next frame: view history for reprojection, temporal volumetrics
// and lens flare occlusion queries
bool temporal = false;
bool subsurfaceScattering = false;
bool gpuParticles = false;
bool lensflares = false;

// Render the scene as a reflection probe sees it: damped reflection intensity,
// reflection background and the reflection shadow map
bool IsReflection() const
{
return reason == TR2RENDERREASON_REFLECTION;
}

static ViewInfo Main( bool distortion );
static ViewInfo ReflectionFace( bool lensflares );
};
}
Loading
Loading