116 ImVec2 size =
Size();
117 return size.x > 0.0f && size.y > 0.0f;
132 ImVec2 size =
Size();
135 int x =
static_cast<int>(u *
static_cast<float>(
renderExtent.x));
136 int y =
static_cast<int>(v *
static_cast<float>(
renderExtent.y));
147 if (fStop <= 0.0f || sensorHeight <= 0.0f)
150 float focalLength = (0.5f * sensorHeight) / std::tan(fovY * 0.5f);
151 return focalLength / (2.0f * fStop);
191 .fovY = radians(60.f),
214 CHECK(scratchAlloc !=
nullptr);
217 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:41
float ApertureRadiusFromFStop(float fStop, float sensorHeight, float fovY)
Definition EditorState.hpp:145
constexpr bool IsPathTracer(ERendererMode mode)
Definition EditorState.hpp:37
int SceneMaterialIndexFromId(FUUID id)
Definition EditorState.cpp:42
bool IsSelectedInstanceValid()
Definition EditorState.cpp:44
bool ApplyMatcapSelection()
Definition EditorScene.cpp:174
void CheckDeferredSceneLoad()
Definition EditorScene.cpp:614
void DoRenderReadback(RendererOutputs const &outputs)
Definition EditorScene.cpp:309
constexpr bool IsRaster(ERendererMode mode)
Definition EditorState.hpp:45
void UpdateSceneLights()
Definition EditorScene.cpp:353
void FLightingPanel()
Definition EditorUI.cpp:2413
void EditorDockSpaceAndMenuBar()
Definition EditorUI.cpp:1874
void LoadScene(StringView path)
Definition EditorScene.cpp:630
ERendererMode
Definition EditorState.hpp:28
void CommitSceneToGPU(bool resetAccumulation=true)
Definition EditorScene.cpp:56
void HandleFile(const char *filePath)
Definition EditorScene.cpp:686
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:49
int SceneInstanceIndexFromId(FUUID id)
Definition EditorState.cpp:38
bool ApplyViewLUTSelection()
Definition EditorScene.cpp:160
void LoadEnvMap(StringView path)
Definition EditorScene.cpp:666
ERenderFormat
Definition EditorState.hpp:60
void DeleteSelectedInstance()
Definition EditorScene.cpp:360
bool PollSceneLoad()
Definition EditorScene.cpp:590
void FHierarchyPanel()
Definition EditorUI.cpp:2149
void RequestLoadScene(StringView path, StringView envMapPath={})
Definition EditorScene.cpp:608
EditorState GEditor
Definition EditorState.cpp:11
void SelectInstance(FUUID instanceId, FUUID materialId)
Definition EditorState.cpp:75
void FRendering(RendererOutputs const &outputs)
Definition EditorUI.cpp:3545
void RecreateEditorSwapchain()
Definition EditorState.cpp:29
RHISwapchainResult EditorBeginFrame(Renderer *renderer, Presenter *presenter)
Definition EditorState.cpp:18
void FRunningImGui()
Definition EditorUI.cpp:2778
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:1778
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:404
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:93
float sensorHeightMm
Definition EditorState.hpp:96
bool dofEnabled
Definition EditorState.hpp:94
float fStop
Definition EditorState.hpp:95
Definition EditorState.hpp:155
TextureHandle viewLUTHdrHandle
Definition EditorState.hpp:179
TextureHandle viewLUTSdrHandle
Definition EditorState.hpp:178
FUUID selectedLight
Definition EditorState.hpp:163
String matcapExternalPath
Definition EditorState.hpp:181
RenderOutputState renderTask
Definition EditorState.hpp:168
FEditorState state
Definition EditorState.hpp:194
GTAOConfig rasterGTAOConfig
Definition EditorState.hpp:199
int viewLUTSdrIndex
Definition EditorState.hpp:174
FImportedScene & Scene()
Definition EditorState.hpp:202
float renderResolutionScale
Definition EditorState.hpp:197
bool HasScene() const
Definition EditorState.hpp:201
Optional< FImportedScene > scene
Definition EditorState.hpp:158
FUUID selectedMaterial
Definition EditorState.hpp:162
bool cameraUpdated
Definition EditorState.hpp:195
FArcballCamera camera
Definition EditorState.hpp:187
FUUID selectedInstance
Definition EditorState.hpp:161
FImportedScene const & Scene() const
Definition EditorState.hpp:207
bool rasterGTAO
Definition EditorState.hpp:198
String currentSavePath
Definition EditorState.hpp:159
RendererConfig rendererConfig
Definition EditorState.hpp:172
void OpenSceneFile(StringView path, Allocator *scratchAlloc=GLOBAL_ALLOC)
Definition EditorState.hpp:212
CameraApertureState aperture
Definition EditorState.hpp:170
ResourceHandle postprocessOutput
Definition EditorState.hpp:185
bool applySelectionDoubleClickAction
Definition EditorState.hpp:167
String viewLUTHdrExternalPath
Definition EditorState.hpp:177
FSceneGPUResources resources
Definition EditorState.hpp:156
GizmoState gizmo
Definition EditorState.hpp:169
float selectedLightHighlightStart
Definition EditorState.hpp:165
ERendererMode rendererMode
Definition EditorState.hpp:173
int matcapIndex
Definition EditorState.hpp:180
String viewLUTSdrExternalPath
Definition EditorState.hpp:176
EditorViewportState viewport
Definition EditorState.hpp:171
bool openSelectionContextMenu
Definition EditorState.hpp:166
RendererUBO shaderGlobals
Definition EditorState.hpp:184
TextureHandle matcapHandle
Definition EditorState.hpp:182
Optional< MemoryMappedFile > sceneFile
Definition EditorState.hpp:157
bool scrollSelectedLightToTop
Definition EditorState.hpp:164
PostprocessUBO postprocessGlobals
Definition EditorState.hpp:186
bool showImGui
Definition EditorState.hpp:193
bool asyncComputeEnabled
Definition EditorState.hpp:196
int viewLUTHdrIndex
Definition EditorState.hpp:175
Definition EditorState.hpp:100
bool WindowPointToRenderPixel(ImVec2 pos, int2 &outPixel) const
Definition EditorState.hpp:127
ImVec2 Size() const
Definition EditorState.hpp:106
RHIExtent2D renderExtent
Definition EditorState.hpp:103
ImVec2 contentMax
Definition EditorState.hpp:102
bool Contains(ImVec2 pos) const
Definition EditorState.hpp:120
ImVec2 contentMin
Definition EditorState.hpp:101
bool HasRect() const
Definition EditorState.hpp:114
bool visible
Definition EditorState.hpp:104
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:81
bool showImGuizmo
Definition EditorState.hpp:89
int op
Definition EditorState.hpp:82
bool showLightBVHBounds
Definition EditorState.hpp:88
float rotateSnap
Definition EditorState.hpp:84
bool showBoundingBox
Definition EditorState.hpp:86
bool showLightGizmos
Definition EditorState.hpp:87
float translateSnap
Definition EditorState.hpp:83
float scaleSnap
Definition EditorState.hpp:85
Definition Renderer.hpp:91
Definition EditorState.hpp:63
float previousResolutionScale
Definition EditorState.hpp:76
ERenderFormat format
Definition EditorState.hpp:64
bool openRenderPopup
Definition EditorState.hpp:70
bool renderAutoPaused
Definition EditorState.hpp:72
int targetSamples
Definition EditorState.hpp:65
int previousSpp
Definition EditorState.hpp:75
int timePopupInput
Definition EditorState.hpp:68
double startTime
Definition EditorState.hpp:69
int targetTimeSeconds
Definition EditorState.hpp:67
int autoPauseSampleLimit
Definition EditorState.hpp:73
int samplePopupInput
Definition EditorState.hpp:66
bool renderPaused
Definition EditorState.hpp:71
String outputPath
Definition EditorState.hpp:74
Definition Renderer.hpp:124
Definition Renderer.hpp:313
Definition Renderer.hpp:11
Definition GPUScene.hpp:54