We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Is your feature request related to a problem? Please describe. I want change isTransparent in shaderlab by one macro or one variable.
isTransparent
Describe the solution you'd like by macro:
#ifdef MATERIAL_IS_TRANSPARENT BlendState { Enabled = true; SourceColorBlendFactor = BlendFactor.SourceAlpha; DestinationColorBlendFactor = BlendFactor.OneMinusSourceAlpha; SourceAlphaBlendFactor = BlendFactor.One; DestinationAlphaBlendFactor = BlendFactor.OneMinusSourceAlpha; } DepthState { WriteEnabled = false; } RenderQueueType = RenderQueueType.Transparent; #else BlendState { Enabled = false; SourceColorBlendFactor = BlendFactor.SourceAlpha; DestinationColorBlendFactor = BlendFactor.OneMinusSourceAlpha; SourceAlphaBlendFactor = BlendFactor.One; DestinationAlphaBlendFactor = BlendFactor.OneMinusSourceAlpha; } DepthState { WriteEnabled = true; } RenderQueueType = RenderQueueType.Opaque; #endif
or by variable:
BlendState { Enabled = [isTransparent? false: true]; SourceColorBlendFactor = BlendFactor.SourceAlpha; DestinationColorBlendFactor = BlendFactor.OneMinusSourceAlpha; SourceAlphaBlendFactor = BlendFactor.One; DestinationAlphaBlendFactor = BlendFactor.OneMinusSourceAlpha; } DepthState { WriteEnabled =[isTransparent? false: true]; } RenderQueueType =[isTransparent? Transparent: Opaque];
The text was updated successfully, but these errors were encountered:
review in next milestone
Sorry, something went wrong.
"Macro" way is a more general solution. User can use diffirent directives like UsePass, Tags besides RenderState declaration.
UsePass
Tags
RenderState
Solution: move preprocessor parsing to before struct parse stage.
ShaderLab
Sway007
No branches or pull requests
Is your feature request related to a problem? Please describe.
I want change
isTransparent
in shaderlab by one macro or one variable.Describe the solution you'd like
by macro:
or by variable:
The text was updated successfully, but these errors were encountered: