Shader gen produce shader data#1600
Open
marauder2k7 wants to merge 16 commits intoTorqueGameEngines:developmentfrom
Open
Shader gen produce shader data#1600marauder2k7 wants to merge 16 commits intoTorqueGameEngines:developmentfrom
marauder2k7 wants to merge 16 commits intoTorqueGameEngines:developmentfrom
Conversation
Shader gen unification Shader node features can now be initialized with parameters set through FEATUREMGR This is to facilitate creation of node features from script. ShaderNode parameters are now no longer sent around as a void* and now use base type FeatureParamsBase
add output vars to the param types fixed gl bug need samplertype
Added CastOp logic, prints out a cast operation MatrixInitialization operation, takes input langelements and initializes a matrix Other functions added to langelement
Cross api support for vertex positions matrixmultiplyop added for multiplying matrix with other types automatically expands or shortens vec types to suit the matrix Added identity to the matrix initialization op.
Use resolve source type for other shaderops This allows us to be more dynamic in the shaderop logic moved function out to langelement, this allows it to be used inside shaderFeatures
ShaderGen now generates a ShaderData class to simplify macro switchups ShaderData caches mInstancingFormat ShaderGen now creates a cache of the files that already exist, and if it exists it will return and use that file instead of regenning a new one. Vertex files can be used for multiple pixel files and vice versa Requires partial shadernode setup due to changes on how shader feature parameters are handled
Added index to the cache name Moved the hash out to the torque namespace DX now outputs the compiled shader
some shader features require these to be checked by both vert and pixel stages (similar to alphatest)
vertex shaders need to regen on run again to get the vertex format setup
move skipregen initialization
0e763d3 to
4ceeb07
Compare
move clearing of the map out of flushproceduralshaders, this function is now empty, not sure if this is going to cause issues elsewhere but what was happening was postfx manager was setting the hdr format after the level had been loaded, the materials for a few objects were being setup but then the shadergen process would execute on them again and it would clear the cache and cause double ups
always running into issues with this as at times features are coming in with a different index and that affects how another stage is interacting with that shader. This produces alot more shaders, previous run with these was around 500 but without it is producing over 800 (this includes tso compiled output) This may be something that will only work for the shadernodes as users will be designing those.
3 clean run throughs with switches between levels and did not see the same issues as before. so we should be able to reintroduce the stage seperation checks
hopefully it stays that way
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.
Shader gen now produces a shaderData class that should make it easier to change macros on procedural shaders
ShaderGen now caches files and the shaderData so different stage files can be reused
Note: Starter for the shaderNodes is in here only because some datatypes have been updated that are used within shaderGen