117 ImVec2 size =
Size();
118 return size.x > 0.0f && size.y > 0.0f;
133 ImVec2 size =
Size();
136 int x =
static_cast<int>(u *
static_cast<float>(
renderExtent.x));
137 int y =
static_cast<int>(v *
static_cast<float>(
renderExtent.y));
148 if (fStop <= 0.0f || sensorHeight <= 0.0f)
151 float focalLength = (0.5f * sensorHeight) / std::tan(fovY * 0.5f);
152 return focalLength / (2.0f * fStop);
196 .fovY = radians(60.f),
218 CHECK(scratchAlloc !=
nullptr);
221 sceneFile.emplace(path, MemoryMappedAccess::ReadOnly);
#define GLOBAL_ALLOC
Definition Allocator.hpp:240
#define CHECK(expr)
Definition Logging.hpp:92
void ClearMaterialTexturePreviewCache()
Definition EditorUI.cpp:621
constexpr bool IsProgressive(ERendererMode mode)
Definition EditorState.hpp:42
float ApertureRadiusFromFStop(float fStop, float sensorHeight, float fovY)
Definition EditorState.hpp:146
constexpr bool IsPathTracer(ERendererMode mode)
Definition EditorState.hpp:38
int SceneMaterialIndexFromId(FUUID id)
Definition EditorState.cpp:42
bool IsSelectedInstanceValid()
Definition EditorState.cpp:44
bool ApplyMatcapSelection()
Definition EditorScene.cpp:171
void CheckDeferredSceneLoad()
Definition EditorScene.cpp:621
void DoRenderReadback(RendererOutputs const &outputs)
Definition EditorScene.cpp:306
constexpr bool IsRaster(ERendererMode mode)
Definition EditorState.hpp:46
void UpdateSceneLights()
Definition EditorScene.cpp:350
void FLightingPanel()
Definition EditorUI.cpp:2154
void EditorDockSpaceAndMenuBar()
Definition EditorUI.cpp:1614
void LoadScene(StringView path)
Definition EditorScene.cpp:637
ERendererMode
Definition EditorState.hpp:29
void CommitSceneToGPU(bool resetAccumulation=true)
Definition EditorScene.cpp:56
void HandleFile(const char *filePath)
Definition EditorScene.cpp:693
FSerializedBounds const * InstanceResourceBounds(FInstance const &instance)
Definition EditorState.cpp:54
int SceneLightIndexFromId(FUUID id)
Definition EditorState.cpp:40
const char * RendererModeDisplayName(ERendererMode mode)
Definition EditorState.hpp:50
int SceneInstanceIndexFromId(FUUID id)
Definition EditorState.cpp:38
bool ApplyViewLUTSelection()
Definition EditorScene.cpp:157
void LoadEnvMap(StringView path)
Definition EditorScene.cpp:673
ERenderFormat
Definition EditorState.hpp:61
void DeleteSelectedInstance()
Definition EditorScene.cpp:357
bool PollSceneLoad()
Definition EditorScene.cpp:597
void FHierarchyPanel()
Definition EditorUI.cpp:1890
void RequestLoadScene(StringView path, StringView envMapPath={})
Definition EditorScene.cpp:615
EditorState GEditor
Definition EditorState.cpp:11
void SelectInstance(FUUID instanceId, FUUID materialId)
Definition EditorState.cpp:75
void FRendering(RendererOutputs const &outputs)
Definition EditorUI.cpp:3281
void RecreateEditorSwapchain()
Definition EditorState.cpp:29
RHISwapchainResult EditorBeginFrame(Renderer *renderer, Presenter *presenter)
Definition EditorState.cpp:18
void FRunningImGui()
Definition EditorUI.cpp:2551
void ClearSelection()
Definition EditorState.cpp:89
void SelectLight(FUUID lightId)
Definition EditorState.cpp:82
RHISwapchainResult EditorEndFrame(Renderer *renderer, Presenter *presenter)
Definition EditorState.cpp:23
FEditorState
Definition Editor.hpp:6
@ FEInitEnter
Definition Editor.hpp:7
void LoadFSCN(FImportedScene &scene)
Definition Scene.cpp:2064
Allocator interface (noexcept)
Definition Allocator.hpp:29
Definition Presenter.hpp:12
Renderer implementing a Frame Graph system with automatic resource tracking and synchronization.
Definition Renderer.hpp:377
std::basic_string< char, std::char_traits< char >, StlDefaultAllocator< char > > String
Alias for std::basic_string<char>, without an explicit allocator constructor.
Definition Container.hpp:120
std::basic_string_view< char > StringView
Alias for std::basic_string_view<char>
Definition Container.hpp:56
vec3 float3
Definition Math.hpp:26
ivec2 int2
Definition Math.hpp:29
bool RHISwapchainResultMayPresent(RHISwapchainResult result)
Definition Swapchain.hpp:20
glm::vec< 2, uint32_t > RHIExtent2D
Definition Common.hpp:10
RHISwapchainResult
Definition Swapchain.hpp:9
Core functionalities for rendering, including the Frame Graph implementation.
Definition Bindless.cpp:2
Handle ResourceHandle
Definition Renderer.hpp:22
int GetDefaultViewLUTIndex(ViewLUTDomain domain)
Definition Postprocess.cpp:66
Definition EditorState.hpp:94
float sensorHeightMm
Definition EditorState.hpp:97
bool dofEnabled
Definition EditorState.hpp:95
float fStop
Definition EditorState.hpp:96
Definition EditorState.hpp:156
TextureHandle viewLUTHdrHandle
Definition EditorState.hpp:184
TextureHandle viewLUTSdrHandle
Definition EditorState.hpp:183
FUUID selectedLight
Definition EditorState.hpp:168
String matcapExternalPath
Definition EditorState.hpp:186
RenderOutputState renderTask
Definition EditorState.hpp:173
FEditorState state
Definition EditorState.hpp:199
GTAOConfig rasterGTAOConfig
Definition EditorState.hpp:203
int viewLUTSdrIndex
Definition EditorState.hpp:179
Optional< FAnimationRuntime > animation
Definition EditorState.hpp:161
FImportedScene & Scene()
Definition EditorState.hpp:206
float renderResolutionScale
Definition EditorState.hpp:201
bool HasScene() const
Definition EditorState.hpp:205
Optional< FImportedScene > scene
Definition EditorState.hpp:163
FUUID selectedMaterial
Definition EditorState.hpp:167
bool cameraUpdated
Definition EditorState.hpp:200
FArcballCamera camera
Definition EditorState.hpp:192
FUUID selectedInstance
Definition EditorState.hpp:166
FImportedScene const & Scene() const
Definition EditorState.hpp:211
bool rasterGTAO
Definition EditorState.hpp:202
String currentSavePath
Definition EditorState.hpp:164
RendererConfig rendererConfig
Definition EditorState.hpp:177
void OpenSceneFile(StringView path, Allocator *scratchAlloc=GLOBAL_ALLOC)
Definition EditorState.hpp:216
CameraApertureState aperture
Definition EditorState.hpp:175
ResourceHandle postprocessOutput
Definition EditorState.hpp:190
bool applySelectionDoubleClickAction
Definition EditorState.hpp:172
String viewLUTHdrExternalPath
Definition EditorState.hpp:182
FSceneGPUResources resources
Definition EditorState.hpp:160
GizmoState gizmo
Definition EditorState.hpp:174
float selectedLightHighlightStart
Definition EditorState.hpp:170
ERendererMode rendererMode
Definition EditorState.hpp:178
int matcapIndex
Definition EditorState.hpp:185
String viewLUTSdrExternalPath
Definition EditorState.hpp:181
EditorViewportState viewport
Definition EditorState.hpp:176
bool openSelectionContextMenu
Definition EditorState.hpp:171
RendererUBO shaderGlobals
Definition EditorState.hpp:189
TextureHandle matcapHandle
Definition EditorState.hpp:187
Optional< MemoryMappedFile > sceneFile
Definition EditorState.hpp:162
bool scrollSelectedLightToTop
Definition EditorState.hpp:169
PostprocessUBO postprocessGlobals
Definition EditorState.hpp:191
bool showImGui
Definition EditorState.hpp:198
int viewLUTHdrIndex
Definition EditorState.hpp:180
Definition EditorState.hpp:101
bool WindowPointToRenderPixel(ImVec2 pos, int2 &outPixel) const
Definition EditorState.hpp:128
ImVec2 Size() const
Definition EditorState.hpp:107
RHIExtent2D renderExtent
Definition EditorState.hpp:104
ImVec2 contentMax
Definition EditorState.hpp:103
bool Contains(ImVec2 pos) const
Definition EditorState.hpp:121
ImVec2 contentMin
Definition EditorState.hpp:102
bool HasRect() const
Definition EditorState.hpp:115
bool visible
Definition EditorState.hpp:105
float3 center
Definition Camera.hpp:13
Definition GPUScene.hpp:8
Definition Metadata.hpp:14
128-bit identifier. Two flavors, both well-formed per RFC 9562:
Definition UUID.hpp:35
std::optional with convenience Get()/GetIf() methods.
Definition Container.hpp:256
Definition EditorState.hpp:82
bool showImGuizmo
Definition EditorState.hpp:90
int op
Definition EditorState.hpp:83
bool showLightBVHBounds
Definition EditorState.hpp:89
float rotateSnap
Definition EditorState.hpp:85
bool showBoundingBox
Definition EditorState.hpp:87
bool showLightGizmos
Definition EditorState.hpp:88
float translateSnap
Definition EditorState.hpp:84
float scaleSnap
Definition EditorState.hpp:86
Definition Renderer.hpp:90
Definition EditorState.hpp:64
float previousResolutionScale
Definition EditorState.hpp:77
ERenderFormat format
Definition EditorState.hpp:65
bool openRenderPopup
Definition EditorState.hpp:71
bool renderAutoPaused
Definition EditorState.hpp:73
int targetSamples
Definition EditorState.hpp:66
int previousSpp
Definition EditorState.hpp:76
int timePopupInput
Definition EditorState.hpp:69
double startTime
Definition EditorState.hpp:70
int targetTimeSeconds
Definition EditorState.hpp:68
int autoPauseSampleLimit
Definition EditorState.hpp:74
int samplePopupInput
Definition EditorState.hpp:67
bool renderPaused
Definition EditorState.hpp:72
String outputPath
Definition EditorState.hpp:75
Definition Renderer.hpp:122
Definition Renderer.hpp:310
Definition Renderer.hpp:11
Definition GPUScene.hpp:54