Fixed the grass rendering - #8
Merged
Merged
Conversation
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.
Fixed the grass rendering (div by zero in shader).
dxbc-spirvconverter.Converter::handleIntDivideemitted SPIR-VOpUDiv/OpUModwith the original, possibly-zero divisor and only corrected the result with a laterOpSelect. SPIR-V leaves the zero-divisor operation itself undefined, and the undefined result leaked into the foliage skip logic (GetSkipinFoliage.hlsl).Patches/dxvk/0003-dxbc-spirv-select-nonzero-divisor.patch: selects a nonzero divisor (-1when the divisor is zero) before emittingOpUDiv/OpUMod, keeping the existing result selection so DXBC semantics are unchanged while the SPIR-V is always defined.Patches/vkd3d-proton/vkd3d-proton-dxbc-spirv-select-nonzero-divisor.patch), so SM ≤ 5 DXBC shaders reaching the SE2 D3D12 layer are covered too.doitsujin/dxbc-spirvcontains the fix and the pins catch up.