Conversation
…as-Engine into feature/point-lights
…as-Engine into feature/point-lights
…as-Engine into feature/point-lights # Conflicts: # data/shader/rtgi/temporal.csh
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7efafe4f37
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| for (auto mat : materials) { | ||
| if (mat.first == selectedMaterial) { | ||
| pair = mat; |
There was a problem hiding this comment.
Avoid reading mutable material list from preview worker
The preview generation lambda runs on a background job but reads materials/selectedMaterial through this; the UI thread can modify materials via add/delete actions while the job is running, which is an unsynchronized std::vector access and can lead to intermittent crashes or corrupted preview output. Capture a snapshot of the material state for the job instead of accessing shared mutable members.
Useful? React with 👍 / 👎.
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| UnusedCode | 3 medium |
| ErrorProne | 5 medium |
| Security | 3 critical |
🟢 Metrics 529 complexity · 46 duplication
Metric Results Complexity 529 Duplication 46
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b48800b2f5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| else if (!editingMode && LoDDistances.size()) { | ||
| // If we are here it means we have exited editing mode | ||
| for (int32_t i = 0; i < terrain->LoDCount; i++) { | ||
| terrain->SetLoDDistance(i, LoDDistances[i]); | ||
| } |
There was a problem hiding this comment.
Clear cached LoD distances after restoring edit mode
When editing mode is turned off, this branch restores distances from LoDDistances but never clears the cache, so it keeps running every frame and can index past the vector if the user later switches to a terrain with more LoDs than were cached. That creates an out-of-bounds read/write path and applies stale LoD values to unrelated terrains.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8bbf60513b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| semaphore.acquire(); | ||
| condition = false; |
There was a problem hiding this comment.
Prevent lost wakeups in Signal::Wait
Signal::Wait clears condition only after semaphore.acquire() returns, so a concurrent Notify in that window sees condition == true and skips release(). That drops a wakeup and can leave worker threads sleeping even though new jobs were enqueued, which is especially visible in PriorityPool where workers immediately re-enter Wait() after Work().
Useful? React with 👍 / 👎.
| heightData[idx] == FLT_MAX ? FLT_MAX : heightData[idx] * heightFactor, | ||
| float(i) * stretchFactor | ||
| ); | ||
|
|
||
| aabb.min = glm::min(aabb.min, vertices[idx]); |
There was a problem hiding this comment.
Exclude hole sentinels from terrain cell bounds
In BuildBVH, hole samples are encoded as FLT_MAX but still fed into aabb.min/max updates. Any cell containing at least one hole will get an effectively unbounded Y extent, which breaks broad-phase culling/queries and can degrade ray-tracing and streaming decisions for that cell.
Useful? React with 👍 / 👎.
| bool hole = heightData[idx] == FLT_MAX || heightData[idx + 1] == FLT_MAX || | ||
| heightData[idx + heightFieldSideLength] == FLT_MAX || | ||
| heightData[idx + heightFieldSideLength + 1] == FLT_MAX; | ||
| if (hole) | ||
| continue; |
There was a problem hiding this comment.
Compact triangle indices when skipping hole quads
The index buffer is pre-sized for every quad, but hole quads continue without writing their 6 indices. Later, the code still builds/uploads triangles for the full indices.size(), so skipped quads become zero-index degenerate triangles (vertex 0) in the BLAS, causing incorrect intersections and unnecessary RT workload whenever holes are present.
Useful? React with 👍 / 👎.
Summary
Integrates terrain authoring into the Atlas editor and updates the runtime/rendering stack needed to make terrain, vegetation, local lighting, ray tracing, and post-processing work together in editable scenes.
This PR adds editor-facing terrain generation, terrain painting, vegetation generation, spline editing, stronger hierarchy/content workflows, terrain streaming/storage improvements, terrain-aware ray tracing, clustered local lighting, SSR, auto exposure, bloom, and a broader render-state preparation path.
Major Changes
Editor terrain workflow
terrains/<name>/<name>.aeterrain.Vegetation generation
Editor UX and scene tools
Terrain runtime
Terrain tools and brushes
Rendering architecture
SceneRenderStateto own per-frame render preparation data, including render lists, material buffers, bindless texture state, bindless BLAS state, light buffers, volumetric light buffers, and async preparation jobs.Lighting and shadows
Ray tracing
Reflections, GI, AO, and post-processing
Shaders
data/shader/bloom.data/shader/exposure.data/shader/reflection.Scene, ECS, and components
SplineComponentwith linear, Catmull-Rom, and Hermite interpolation plus baked spline data.Resources, loaders, and asset data
Job system and async work
JobSemaphoreandSignal.Graphics/backend infrastructure
Build, dependencies, CI, and docs
0.2.1.Tests and demo app