forked from FWGS/xash3d-fwgs
-
Notifications
You must be signed in to change notification settings - Fork 16
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
rt: improve materials and blending #520
Merged
Merged
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
They have mismatching frequencies. ModelMetadata should be per-Model, there should be only a few dozen of these. There maybe hundreds (or even thousands) of materials, but one material can be still referenced by many kusochki. This only moves fields into new structs, which still belong to Kusok. The real extraction will happen later, see #52.
Known issues: - Breaks sprite glow for some reason.
This required uploaded kusochki only later during frame time, just before rendering the model. Otherwise they would get incorrect rendermode. Also add blend mode debug colors.
Known issues: - apparently BLEND_MIX surfaces should also participate in lighting. Figure out how. - sensitive to ray tracing order. Need proper OIT (or hacks)
Known issues: - test_brush blend modes are broken - emissive does not participate in weighted oit properly
Fixes blending differences in test_brush/test_sprite maps. They now look fairly similar (modulo color correction). OIT is still a bit off, but good enough for now
Still doesn't work for us, as we also have purely emissive/additive polygons. wOIT doesn't seem to support that fundamentally, each surface should still attenuate the background. Didn't even get to the _weighted_ part of it because of that.
Limit to 8 layer for now. Seems to be working just fine. VGPR usage and performance impact will be checked later.
Fixes rare random crashes when loading maps with many models in it.
This is to more clearly distinguish between simple blended things that don't participate in lighting, and future more involved blending with refraction and being affected by light
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.
See #519 for details and references.