Effects and Properties Breakdown
Last updated
Last updated
The AllIn1Vfx shader has a custom Material Inspector that allows you to activate and deactivate effects. When an effect is activated it displays it’s properties so that they can be modified:
In this image we can see how the Glow Color Effect is enabled and all its properties. Remember that effects will only be computed and therefore cost performance when enabled, otherwise the shader won’t compile the effect code and therefore it will cost 0 performance since the code won’t even be present on the shader. Also note the “R” button next to each property that stands for “Reset” . Pressing this button will restore the property to its default value.
Keep in mind that there’s an example of every effect on one of the Demo scene sample effects. Looking into the Demo is probably the best way to discover ways of using the asset and to see what each property does Down below all the shader properties are explained. In between [] (ex:[GLOW_ON]) you can find the shader keyword name of each effect (see How to Enable/Disable Effects at Runtime section to see how to use it). In between () (ex: _MainTex) you can find the shader property names in case you want to modify them in a script (see Scripting section).
Before reading this please make sure to be familiar with the shader by reading the Shader Structure and Usage section or by taking a look at the asset Youtube playlist before moving on.
Reminder of how the asset works: First the shapes get combined, this shape result will have the rest of effects applied to it. We’ll call Global something that affects the final result at the end of this process.
Global Properties
Global Color (_Color): The Global Tint color
Global Alpha (_Alpha): Global Transparency
Shape Properties and Effects (N means the shape number but Shape 1 omits the number in properties. So _ShapeNColor would be _ShapeColor for Shape 1, _Shape2Color for Shape 2 and _Shape3Color for Shape 3. With effects such as SHAPE_N_CONTRAST_ON the N doesn’t omit any number, so shape 1 will be SHAPE1CONTRAST_ON. Sorry if this is confusing but changing this meant losing all the demo material values. In any case these names are only used for scripting and the asset will very rarely be modified via script)
Shape1 Texture (_MainTex): Shape 1 Texture and also the image that will be automatically assigned in Sprite Renderers and UI Image components. Renderer components that have an Image property will override this texture. This will be the base shape texture that will be used to get combined with the other 2 shapes
Shape 2 and 3 Texture (_Shape2Tex and _Shape3Tex): These 2 shape textures will get combined with shape 1 and with each other if they are both enabled. These 2 textures will always be set through the material inspector
ShapeN Color (_ShapeNColor): Tint Color of the Shape Texture. This will be applied before combining the shapes and the color is HDR so can be used to affect color intensity and therefore glow
ShapeN X/Y Speed (_ShapeNXSpeed and _ShapeNXSpeed): These 2 properties are in charge of scrolling the shape texture over time. The higher the number, the faster the scroll will be
ShapeN Contrast [SHAPE_N_CONTRAST_ON]: Used to apply more or less contrast and more or less brightness to the shape texture before mixing the other shapes and applying effects
ShapeN Contrast (_ShapeNContrast): High values mean high contrast, low values mean low contrast (the shape texture turns gray when untinted)
ShapeN Brightness (_ShapeNBrightness): Brightness amount we add to the shape texture
ShapeN Distortion [SHAPE_N_DISTORT_ON]: Used to distort the shape texture before mixing the other shapes and applying effects
Distortion Texture (_ShapeNDistortTex): Noise texture that determines how the distortion is done
Distortion Amount (_ShapeNDistortAmount): How much the image is distorted following the distortion texture pattern
Scroll Speed X and Y (_ShapeNDistortXSpeed and _ShapeNDistortYSpeed): Scroll speed of the distortion texture in the X axis and Y axis
ShapeN Rotation [SHAPE_N_ROTATE_ON]: Used to rotate the shape texture, this will work regardless of the tiling and offset of the textures
Rotation Offset (_ShapeNRotationOffset): The initial rotation of the shape texture (measured in radians). This will be applied before the rotation over time of the next property
Rotation Speed (_ShapeNRotationSpeed): How fast the shape texture will turn (measured in radians)
ShapeN RGB is Shape Color, Red Channel Is Alpha [SHAPE_N_SHAPECOLOR_ON]: When enabled the greyscale value from 0 to 1 of the red channel of the shape texture gets used as the alpha (transparency) of the shape texture and the RGB of the shape will be the Shape N Color property
ShapeN Screen Position UVs [SHAPE_N_SCREENUV_ON]: When enabled the shape texture will be samples using screen space coordinates instead of the model or quad UVs
Scale With Dist Amount (_ScreenUvShNDistScale): If set to 1 the screen space UVs will scale the further/closer we get, so the shape texture will have a constant size. If 0 it will look as if the shape texture shrinks and expands as we get further/closer
ShapeN Debug [SHAPEDEBUG_ON]: When enabled only the current shape we have toggled will be rendered. This is extremely useful to see how each shape looks before combining with the other shapes and before applying effects
ShapeN RGB Weight (_ShapeNColorWeight): Affects how the shape RGB will be combined with other shapes RGB. See Shader Structure and Usage section for more detailed info
ShapeN A Weight (_ShapeNAlphaWeight): Affects how the shape alpha (A) will be combined with other shapes alpha. See Shader Structure and Usage section for more detailed info
● Color Effects: These effects apply color changes to the shape combination result
Glow [GLOW_ON]: Needs Post Processing Bloom for better visuals
Glow Color (_GlowColor): Color of the Glow, has HDR and can also affect how bright the material shines by increasing the HDR intensity
Glow Intensity (_Glow): Indicates how bright the Glow Color will shine
Glow Global Intensity (_GlowGlobal): Indicates how bright the global result will shine
Glow Texture (_GlowTex): Acts as a mask. The glow will only be applied where the alpha of this texture is greater than 0
Color Ramp [COLORRAMP_ON]: Takes a gradient as an input and maps the color of the shapes result to this gradient. When the Material is Saved To Folder we can use a live editable gradient instead of a static gradient texture
Color Ramp Texture (_ColorRampTex): Static gradient texture that the user needs to provide. The resulting colors will get mapped to this gradient. Dark colors will get mapped to the left of the gradient and bright colors to the right of the gradient
Color Ramp Luminosity (_ColorRampLuminosity): This will get added to the greyscale value the shader uses to map the colors. The higher this value the more we’ll skew results to the right of the gradient
Color Ramp Gradient (_ColorRampTexGradient): If the Material is Saved To Folder and the Use Editable Gradient box is toggled this property can be used to dynamically edit and create a gradient color
Color Ramp Blend (_ColorRampBlend): Used to blend the gradient in and out. A Blend amount of 0 will make this effect invisible
Color Grading [COLORGRADING_ON]: Similar to Color Ramp but more lightweight and slightly more limited. It works just like Color Ramp but it interpolates the result color across 3 input colors instead of a full gradient
Light Color Tint (_ColorGradingLight): Equivalent to the very right of the color ramp. Light color values will be mapped to this color
Mid Tone Color Tint (_ColorGradingMiddle): Equivalent to the center of the color ramp. Middle range color values will be mapped to this color
Dark/Shadow Color Tint (_ColorGradingDark): Equivalent to the very left of the color ramp. Dark color values will be mapped to this color
Mid Point (_ColorGradingMidPoint): Used to skew the result towards the Light Color or the Dark Color input
Hue Shift and Saturation [HSV_ON]:
Hue Shift (_HsvShift): How much the colors will be shifted
Hue Shift Saturation (_HsvSaturation): Saturation of the hue shift result
Hue Shift Bright (_HsvBright): Brightness of the hue shift result
Fresnel / Rim Color: Creates a rim light / fresnel effect around the target Mesh. This effect can add color or make the Mesh transparent around the rims
Rim Color (_RimColor): Color of the effect, has HDR and can also affect how bright the material shines by increasing the HDR intensity
Rim Bias (_RimBias): Adds this amount to the “amount of rim” the shader detects and therefore makes all parts of the mesh be considered part of the rim (in most cases you’ll want to use the Rim Scale instead)
Rim Scale (_RimScale): Multiplies this amount to the “amount of rim” the shader detects and therefore makes the rim wider
Rim Power (_RimPower): Exponent of the “amount of rim” the shader detects and therefore can be used to further fine tune the rim width
Rim Intensity (_RimIntensity): Indicates how bright the Rim Color will shine
Add Amount (_RimAmount): 0 means that the rim color we calculate will be multiplied against the shape result, this is useful when we want the effect to not affect darker parts, it looks like it follows the texture. 1 means the rim color will be added and always visible regardless of the shape color. Any value in between will be an interpolation between both results
Rim Erodes Alpha (_RimErodesAlpha): Increase this value and set Rim Intensity to 0 to fade the model rim
Intersection Glow[DEPTHGLOW_ON]: Applies glow to intersecting geometry that writes to the depth buffer. Needs Post Processing Bloom for better visuals. For this effect to work as intended ZWrite should be disabled
Depth Distance (_DepthGlowDist): How sensible the depth difference is. The higher the value the sharper the glow will be
Depth Power (_DepthGlowPow): Exponent of the depth difference that creates the glow mask
Glow Color (_DepthGlowColor): Color of the Glow, has HDR and can also affect how bright the material shines by increasing the HDR intensity
Glow Color Intensity (_DepthGlow): Indicates how bright the Glow Color will shine
Global Glow Intensity (_DepthGlowGlobal): Indicates how bright the global result will shine (needs Bloom in the scene)
Posterize [POSTERIZE_ON]: Limits the amount of colors creating a banding effect
Posterize Number of Colors (_PosterizeNumColors): The higher the number the more different colors the material will display
Backface Tint [BACKFACETINT_ON]: Tints the front and back face of the target mesh. We consider the backface the face that has the normal vector pointing in the opposite direction of what we would regularly expect on a surface
Backface Tint (_BackFaceTint): Tint Color back face of the mesh. The color is HDR so can be used to affect color intensity and therefore glow
FrontfaceTint (_FrontFaceTint): Tint Color front face of the mesh. The color is HDR so can be used to affect color intensity and therefore glow. Usually we’ll keep this white to not affect regular facing mesh faces
Fake Light And Shadow [LIGHTANDSHADOW_ON]: As the name says, this isn’t real lighting that will work with Unity lighting components, instead this is a simplified performant lighting approximation that can be used to give some more depth to your effects. For this to work you’ll need to have an active AllIn1VfxFakeLightDirSetter component in the scene, this component will tell the shader what the direction of the light is. Configure said component to choose when the light direction is updated and to choose the target transform that will determine the light direction with its forward vector. Video using and explaining the effect: https://youtu.be/F24wH7q34Xs
Light Amount (_LightAmount): This is how much extra luminosity we want. 0 means no extra luminosity and 1 means that we want to light the object based on the direction of the target light set in AllIn1VfxFakeLightDirSetter
Light Color (_LightColor): The color of the fake light, use this to choose the tint of the light set by the previous property. Note that this is an HDR color and that can be used to make the object glow by increasing the intensity
Shadow Amount (_ShadowAmount): This tells the shader what is the darkest shadow value. So 0 will mean that the shadows can be completely black and 1 will mean that the shadows won’t be visible at all
Shadow Min and Max (_ShadowStepMin and _ShadowStepMax): This is used to choose the banding on the shadow, the closer these values are together the more cartoon the shadow will look
Shape 1 Mask [SHAPE1MASK_ON]: Prevents Shape1 from being affected by other shapes and distortions. This is used to keep certain parts of the shape intact, for example in a trail to make sure the beginning of the trail has no gaps
Shape 1 Mask Texture (_Shape1MaskTex): Mask that tells the shader what parts of Shape 1 to keep. White means keep Shape 1 intact and black means keep shape result, in between values get blended
Shape 1 Mask Power (_Shape1MaskPow): Exponent of the Mask Texture, used to fine tune the results
● Alpha Effects: These effects apply color changes to the shape combination alpha result
Alpha Mask [MASK_ON]: Will make certain parts of the global result transparent
Mask Texture (_MaskTex): White on the texture means unaltered original opacity. Black means fully invisible
Mask Power (_MaskPow): Exponent of the Mask Texture, used to fine tune the effect without doing any change to the Mask Texture
Fade From Noise Texture (Dissolve) [FADE_ON]: Uses a Fade Texture to fade/dissolve the global result. Particle system alpha or Custom Data Streams can be used to control this dissolve. A burn texture can be added to have a different color around dissolve edges
Fade Amount Affects Global Transparency (Toggle Box) [ALPHAFADETRANSPARENCYTOO_ON]: When checked the global transparency will decrease with the Fade Amount
Fade Amount Driven By Vertex Stream? (Toggle Box that only appear when a Particle System is present) [ALPHAFADEINPUTSTREAM_ON]: When enabled the Fade Amount can be driven with Custom Data streams. Check the Custom Vertex Streams and Custom Data Auto Setup for more details
Fade Texture (_FadeTex): Maps how the fade will be made. The fade will be made from black to white
Fade Amount (_FadeAmount): How much fade to apply. -0.1 is no fading and 1 is completely faded
Fade Transition (_FadeTransition): How smooth the dissolve edges are. The higher the number the smoother it will be
Fade Power (_FadePower): The exponent of the fade amount, used to tweak how soon/late the fade happens
Speed X/Y Axis (_FadeScrollXSpeed and _FadeScrollYSpeed): Scroll speed of the fade texture in the X axis and Y axis
Fade Burn Texture (_FadeBurnTex): Texture of the burned edge
Fade Burn Color (_FadeBurnColor): Color of the burned edges, has HDR and can also affect how bright the material shines by increasing the HDR intensity
Fade Burn Width (_FadeBurnWidth): How smooth the burn edges are. The higher the number the smoother it will be
Fade Burn Glow (_FadeBurnGlow): Indicates how bright the texture will shine (needs Bloom in the scene)
Fade From Final Shape (Procedural Dissolve) [ALPHAFADE_ON]: Almost identical to the previous effect but takes the final shape as fade mask instead of taking a fade texture
Fade Amount Affects Global Transparency (Toggle Box) [ALPHAFADETRANSPARENCYTOO_ON]: When checked the global transparency will decrease with the Fade Amount
Fade Amount Driven By Vertex Stream? (Toggle Box that only appear when a Particle System is present) [ALPHAFADEINPUTSTREAM_ON]: When enabled the Fade Amount can be driven with Custom Data streams. Check the Custom Vertex Streams and Custom Data Auto Setup for more details
Use grayscale as alpha [ALPHAFADEUSEREDCHANNEL_ON]: Enable this on additive configurations or when the shape result has no alpha. This will premultiply the red channel of the shape result into the alpha channels giving better results on the described cases
Use Shape1 as fade mask [ALPHAFADEUSESHAPE1_ON]: When checked the shader will take Shape1 as fade mask input instead of using the combined shape result (only useful when using more than 1 shape)
Fade Amount (_AlphaFadeAmount): How much fade to apply. -0.1 is no fading and 1 is completely faded
Fade Transition (_AlphaFadeSmooth): How smooth the dissolve edges are. The higher the number the smoother it will be
Fade Power (_AlphaFadePow): The exponent of the fade amount, used to tweak how soon/late the fade happens
Soft Particles / Intersection Fade [SOFTPART_ON]: Fades the global result when close to other meshes that write to the depth buffer. Used to fade things that get close to the floor for example
Soft Particles Factor (_SoftFactor): The higher this value is the thinner the fade transition will be
Camera Distance Fade [CAMDISTFADE_ON]: Fades the global result when the camera is either too close or too far away
Far Fade Start Point (_CamDistFadeStepMin): At this distance from the cam the material will start to fade
Far Fade End Point (_CamDistFadeStepMax): At this distance from the cam the material will be completely faded
Close Fade Start Point (_CamDistProximityFade): When the camera is closer than this distance the material will start fading
Alpha Remap [ALPHASMOOTHSTEP_ON]: Remaps the global result alpha to a custom range of your liking
Smoothstep Min (_AlphaStepMin): Low bound of the new alpha range, where the previous alpha was 0 now it will be Smoothstep Min
Smoothstep Max (_AlphaStepMax): High bound of the new alpha range, where the previous alpha was 1 now it will be Smoothstep Max. Everything in between gets interpolated
Alpha Cutoff [ALPHACUTOFF_ON]: Used to discard pixels and reduce overdraw
Alpha cutoff value (_AlphaCutoffValue): Pixels that are more transparent than this value are not drawn. This is useful to make more cartoon looking effects and to discard unwanted transparencies from certain effects
● UV and Vertex Effects: These effects will affect the texture coordinates of the textures used by the shader or the vertex position of the mesh the material is using
Global Distortion [DISTORT_ON]: It will distort all textures used by the shader
Distortion Texture (_DistortTex): Noise texture that determines how the distortion is done
Distortion Amount (_DistortAmount): How much the image is distorted following the texture pattern
Distortion scroll speed (_DistortTexXSpeed and _DistortTexYSpeed): Scroll speed of the distortion texture in the X axis and Y axis
Global Polar Coordinates [POLARUV_ON]: Transforms the uv coordinates into polar coordinates (this effect looks goods with tiling on the textures + texture scrolling)
Polar Coords affects Distortion textures [POLARUVDISTORT_ON]: We may or may not want the distortion textures to be transformed to polar coordinates. This toggle allows you to choose
Shape Weights Custom Stream [SHAPEWEIGHTS_ON]: This effect will only be visible when viewing the Material from an object that has a Particle System on it or if the effect was already active. The effect can be used to change the weights of each Shape through a Particle System Custom Data, the ones that you can find in the Shape Result tab of the Material when more that 1 Shape is active
Shape N Blend Offset (_ShNBlendOffset): This value will be multiplied by the offset value that comes through the vertex stream. It allows us to choose the direction and magnitude of the offset
Texture Offset Custom Stream [OFFSETSTREAM_ON]: This effect will only be visible when viewing the Material from an object that has a Particle System on it or if the effect was already active. The effect can be used to scroll or offset each Shape texture through a Particle System Custom Data
Shape N Offset Mult (_OffsetShN): This is the multiplier of the offset value that comes through the vertex stream. It allows us to choose how much effect the weight change should have over each shape and what direction they scroll on. So with only 1 vertex stream value we can affect each shape differently
Shape Texture Offset [SHAPETEXOFFSET_ON]: This effect will help us avoid repetition on objects that use this same Material. It will use the Random Time Seed (_TimingSeed) to offset Shape textures
Shape N Mult (_RandomShNMult): Controls how much the Timing Seed will offset each Shape, 0 means no variation, 1 means that it will fully use the Timing Seed but it will probably give you the same results than 0 since the texture coordinates may loop around perfectly. Try using values between 0 and 1 for better results
Global Texture Scroll [TEXTURESCROLL_ON]: It will scroll all textures the shader uses
Texture Scroll Speed X (_TextureScrollXSpeed): Scrolling speed on the X axis
Texture Scroll Speed Y (_TextureScrollYSpeed): Scrolling speed on the Y axis
Twist [TWISTUV_ON]
Twist Amount (_TwistUvAmount): How much all textures are twisted
Twist Pos X Axis (_TwistUvPosX): Position of the center of the twist on the X axis (0 is left and 1 is right)
Twist Pos Y Axis (_TwistUvPosY): Position of the center of the twist on the Y axis (0 is bottom and 1 is top)
Twist Radius (_TwistUvRadius): The radius of the twist effect
Wave [WAVEUV_ON]: Distort waves from left to right
Wave Amount (_WaveAmount): How many waves we make
Wave speed (_WaveSpeed): How fast the wave scrolls
Wave Strength (_WaveStrength): How much the wave affects the textures
Wave X Axis (_WaveX): Position of the wave origin on the X axis (0 is left 1 is right)
Wave Y Axis (_WaveY): Position of the wave origin on the Y axis (0 is bottom 1 is top)
Round Wave [ROUNDWAVEUV_ON]: Radial distort waves
Round Wave Strength (_RoundWaveStrength): How much the wave affects the textures
Round Wave Speed (_RoundWaveSpeed): How fast the wave scrolls
Hand Drawn [DOODLE_ON]
Hand Drawn Amount (_HandDrawnAmount): How much of a distortion we apply to make it look hand drawn frame a frame
Hand Drawn Speed (_HandDrawnSpeed): How often we distort the textures
Pixelate [PIXELATE_ON]
Pixelate size (_PixelateSize): The lower the number the more pixelated the textures get. This effect looks bad when combined with distortions
Trail Width [TRAILWIDTH_ON]: Offers you fine control over the scale of the vertical texture coordinate. This allows you to scale a trail without the common Trail Renderer component artifacts. When using this please keep a constant width across the whole trail in the Trail Renderer component. This component needs the material to be Saved To Folder in order to work
Trail Width Power (_TrailWidthPower): The exponent of the trail width set by the following property. Allows to fine tune the results without editing the gradient
Trail Width Gradient (_TrailWidthGradient): A custom gradient property that allows you to edit a texture with the Unity gradient window (read the Custom Gradient Property Drawer for more info). Black means scale 0 and therefore 0 width trail. White means scale 1 and therefore maximum scale width trail
Shake [SHAKEUV_ON]: Shakes all texture coordinates
Shake Speed (_ShakeUvSpeed): How fast it shakes
Shake X Multiplier (_ShakeUvX): The higher the value the more it will move on the X axis while shaking
Shake Y Multiplier (_ShakeUvY): The higher the value the more it will move on the Y axis while shaking
Vertex Offset [VERTOFFSET_ON]: Displaces the vertices of the mesh
Offset Noise Texture (_VertOffsetTex): Tells the shader how to offset the vertices. 1 means maximum offset, 0 means no offset
Offset Amount (_VertOffsetAmount): The offset amount, this will set the max offset distance
Offset Power (_VertOffsetPower): Exponent of the offset amount used to fine tune the effect
Scroll Speed X/Y (_VertOffsetTexXSpeed and _VertOffsetTexYSpeed): How fast the Offset Noise Texture will scroll on the X and Y axis