-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Terrain fixes #188
Merged
Merged
Terrain fixes #188
Conversation
This file contains 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
Duttenheim
force-pushed
the
terrain-fixes
branch
from
October 24, 2023 11:29
f2f9ecf
to
f967ef3
Compare
Added API for creating a resource table set from shader.
Resolve pass needs to render all geometry again to properly calculate light, but uses Z equals to early out. Terrain tiles render with instancing. Terrain PSOs gets created during setup.
Merged together terrain lighting code so it works the same for lowress fallback and virtual sample. Normals are calculated in the domain shader instead of relying on base mesh normals. Fix order of operations, page clear now happens after the prepass and the page status copy to readback. Removed the screen space resolve shader and passes. Added a bunch of extra markers to the terrain code so it's clearer what's going on when debugging. Failing to load biome textures reverts to using the system textures for albedo, normals and materials.
Move terrain sampling to function to minimize shader code and repetition.
New API requires getting the offset and buffer to pass to a future upload, since the buffer in question might be different between subsequent calls to upload.
Remove the header reimplementation of interlocked in favor of a common header and per-platform implemnentation. Add AtomicInt, AtomicInt64 and AtomicPointer as types which disallow directly modifying or reading the value.
Utilize 64 bit atomics to keep the byte offset and buffer id in the same object. This allows for the allocating thread to always know for which buffer allocation attempts where made, such that the appropriate buffer can be returned. Remove bufferlock for UploadInternal, we should now treat the Upload buffer as being inherently threadsafe. Replace use of std::pair with Util::Pair. Reduce upload heap by half, but keep it big enough to fit at least an 8K BC7 texture.
Duttenheim
force-pushed
the
terrain-fixes
branch
from
November 9, 2023 16:05
4b3b304
to
11f0d62
Compare
And fix uploads in terrain to use proper alignment.
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.
Fixes various things with the terrain.