Repository navigation
[Reviewed][3D terrain] Make the ground faster to draw on slower graphics cards (v0.2.0) - #2345
Merged
Merged
Conversation
…ics cards (v0.2.0) - Read the noise making layer borders irregular from a small texture instead of computing 16 hashes per pixel. - Compute the average color of layer textures once on the CPU for the height blending, instead of 4 texture reads per pixel (the mipmap is still read if the image can't be read, like for images from another domain). - Compile the shader only with the layers, normal maps, height blending and texture variation used by the terrain. - Get the world normal of vertices without inverting a matrix per vertex. - Add an advanced "Anisotropic filtering" property (4x by default, as before). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GFZnZwjYz8dSQxu3B2QVUJ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some testers report stuttering in starters using the 3D terrain (GDevelopApp/GDevelop-examples#1106). Their Chrome traces show the graphics card is the bottleneck: the terrain's shader costs too much for each pixel of ground. JavaScript time per frame is unchanged.
Changes
sin()hashes per pixel. With texture variation, it is 3 reads instead of 12 hashes.#defines for layer textures, normal maps, height blending and texture variation.inverse()for each vertex.Compatibility
#defines changes. Properties change only in the editor (property actions are private), and holes already worked this way.Testing
The gameplay tests of 5 examples using the terrain, grass and scattered models were run with GDevelop 5.6.286: 3D island terrain, 3D driving, 3D tank, first-person horror and 3D flight sim. Each game was run twice with the old extension and twice with the new one.
🤖 Generated with Claude Code
https://claude.ai/code/session_01GFZnZwjYz8dSQxu3B2QVUJ