Repository navigation
Add some shader source files to trinity - #121
Merged
Merged
Conversation
…er declaration and getting sorted incorrectly
…er declaration and getting sorted incorrectly
… into shader-source
…r state when patching dx9-style texture functions
filipppavlov
marked this pull request as ready for review
October 15, 2026 09:28
CCPNobody
reviewed
Oct 16, 2026
CCPNobody
approved these changes
Oct 16, 2026
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.
Summary
Refactor and add some of the game project's source shader files to Trinity. This is a very small subset of shaders and include files that are supposed to be project-independent and are strongly related to Trinity's code itself. For example, include
files contain per-object and per-scene constant buffer layouts (as they must match the layout of these buffers in Trinity's C++ code), but they don't contain lighting model code as it is different between game clients.
Shader files are partitioned into public shader include files in
shaders/includedirectory and (private) shader source in othershaders/directories. Game projects can use Trinity's public includes in their shaders, and they are supposed to compile and use Trinity's source shaders, although they can override them if needed.Aside from shaders, this PR contains a few fixes and extensions to the Shader Compiler:
/I directorywill add the directory to the search paths used when looking for include files/Iare searched first.static constvariable declarations out of the global constant buffer for dx11 and dx12, and maintain the source order for these const declarations: this fixes a bug when the compiler may rearrange const declarations inside the global constant buffer even if there is a dependency between const because of initializers.Linked issue (optional)
https://fenriscreations.atlassian.net/browse/PLAT-11863