Skip to content

[Foliage swaying 3D] Precompile foliage shaders to avoid stutters … - #2286

Merged
Bouh merged 1 commit into
mainfrom
update-perf
Oct 1, 2026
Merged

Bouh merged 1 commit into
mainfrom
update-perf

Conversation

@Bouh

@Bouh Bouh commented Oct 1, 2026

Copy link
Copy Markdown
Member

…when foliage first becomes visible

Each foliage material's shaders are now compiled ahead of time, for both plain and instanced meshes. This removes the frame hitches that happened when foliage appeared for the first time, often during a camera turn. And the Sway properties (type, material name, response, uniform sway) are grouped under a "Sway" group.

This change improve this game from 7sc of loading to 2sc, and the micro freeze are gone when tunring the camera, the FPS also improved and more stable.

…when foliage first becomes visible

Each foliage material's shaders are now compiled ahead of time, for both plain and instanced meshes. Compilation runs at the start of the next render. It runs again only when a material is added or changes version, for example when wind gusts are enabled. This removes the frame hitches that happened when foliage appeared for the first time, often during a camera turn.
The Sway properties (type, material name, response, uniform sway) are grouped under a "Sway" group.
@Bouh
Bouh requested a review from a team as a code owner October 1, 2026 15:02
@Bouh
Bouh merged commit 1206fbb into main Oct 1, 2026
5 checks passed
@Bouh
Bouh deleted the update-perf branch October 1, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant