Adding custom tags
This was mentioned on Polycount -- the ability to add tags / properties would be pretty awesome. You asked for the required tags for Glow 11 (great screen-space effect), so here it is from their docs:
If you want to modify existing shaders to support glow just follow the following steps.
- Add the following properties to the shader. This is optional, it is also possible to omit all or one of these properties.
_GlowTex ("Glow", 2D) = "" {} _GlowColor ("Glow Color", Color) = (1,1,1,1) _GlowStrength ("Glow Strength", Float) = 1.0
-
Depending on the shader you need to add one of the following tags to the shader.
OpaqueTags { "RenderType"="Glow11" "RenderEffect"="Glow11" }
Alpha blendedTags { "RenderType"="Glow11Transparent" "RenderEffect"="Glow11Transparent" }
Alpha testedTags { "RenderType"="Glow11TransparentCutout" "RenderEffect"="Glow11TransparentCutout" }
- Lastly you need to add the following line to the shader (simply add it before the last "}").
CustomEditor "GlowMatInspector"
Svar
It's a very specific and, I imagine, rarely used feature. I might implement this post-release at some point, but it isn't prioritized at the moment
I thinks glow is a common neighbor in today games. I use Glow11 it widely in most of my shaders.
Thinking about manually fixing the above Tags after every compilation will make our workflow sour.
I believe this should not be much of a problem to hook custom tags into the source code post compilation. some regexes will do the job. You can also think about letting us to link a script that will run post compilation where we can parse the shader source and change things.
Thanks Chen!
A shader post-processor is actually a pretty good idea, I imagine it would help me avoid having to implement some really obscure edge cases that some few people would want. Could you open up a new topic on that Chen? :)
I just began researching to to combine other post processing plugins with Shader Forge and discovered I need this, as well. Any updates?
Kundesupport af UserEcho
It's a very specific and, I imagine, rarely used feature. I might implement this post-release at some point, but it isn't prioritized at the moment