Cartoon FX Remaster FREE
R 1.4, May 2024 (changelog)
© 2012-2024 - Jean Moreno
jean.moreno.nonsensepublic+unity@gmail.com

### Table of Content

- About
- Usage
- Troubleshooting
- Changelog

## About

"Cartoon FX Remaster FREE" is a collection of stylized visual effects mainly made with Particle Systems (using Unity's CPU-based particle system 'Shuriken').

Featuring:

- Custom shaders with special effects such as dissolve animation, UV distortion, lit particles, edge fading, HDR colors, single channel textures for reduced memory usage, shadow casting and dithering
- Specialized shader to draw pixel-perfect circles and rings while reducing overdraw (using a low-poly ring mesh instead of a quad)
- Optimized meshes where relevant to reduce overdraw/fill-rate issues
- Custom script that can animate attached lights and perform screen-shake for relevant effects
- High-resolution hand-drawn textures
- Custom shader format that will only compile the code for the currently active render pipeline (Built-In Render Pipeline or Universal Render Pipeline (URP))

This is the free version containing a sample of effects taken from the four commercial packs.
The license is the same as the commercial packs, including commercial use of the effects in games and apps, according to the license terms.
The full license can be found here: https://unity.com/legal/as-terms (Appendix 1, End User License Agreement)

### Render Pipelines

"Cartoon FX Remaster FREE" supports the Built-In and Universal Render Pipelines.

It uses a special custom shader format that will only compile the relevant shader code for the currently active render pipeline in the project.

If you change the render pipeline after having imported the assets, then you will have to reimport the shaders so that they compile for the newly selected render pipeline (right-click on the Shaders folder, and hit Reimport).

### Legacy Effects

"Cartoon FX Remaster FREE" is called so because it is a made from scratch remake of the old "Cartoon FX Pack FREE" set of effects, released circa 2012.
Those old effects are still included if you are curious or want to use them: they are in the Cartoon FX FREE (old legacy effects) package and need to be extracted through Unity.

## Usage

### Spawn Effects

"Cartoon FX Remaster FREE" effects are provided as individual prefabs. Simply spawn the prefabs (e.g. using Instantiate) and activate the instantiated GameObject to play the effect.

GameObjects will auto-destroy themselves when the effect has finished playing. You can change that behavior in the CFXR_Effect script attached (to either Destroy, Disable or do nothing after the effect has finished playing).

### CFXR Script file

You can change some global script settings in the CFXR_Effect.cs file, by uncommenting the global defines at the top:

- Disable Camera Shake: will disable all of the Camera shake code, if you don't need it or have your own solution
- Disable Lights: will keep the Lights attached to the effect deactivated
- Disable Clear Behavior: will disable the code handing the clear behavior after an effect has fully finished playing

### CFXR Settings file

You can change some global shader settings in the CFXR_Settings.cginc file:

- Disable Soft Particles: in case you don't need that feature, you can globally disable it for all CFXR effects (Soft Particles in Unity's built-in shaders will still work)
- Orthographic Soft Particles: if you are using an Orthographic camera, then enable this to make soft particles work properly
- Global HDR Multiplier: some effects use HDR colors (colors that go above the [0-1] range), so that they work nicely with post effects like bloom and simulate illuminated particles.
  Depending on your bloom settings, you may want to adjust that multiplier value to tune up or down the final colors.
- Enable Point Lights: enables additional lights affecting lit particles (else they will only be affected by the main directional light). This is enabled by default.

## Troubleshooting

- License: The full legal license can be found here: https://unity.com/legal/as-terms (see Appendix 1: Asset Store End User License Agreement)
  You can only use the effects in a commercial game or application when used as described in the above license.
- URP: If almost all effects don't show when using URP, it likely is because the 'Depth Texture' is disabled, and it is needed for soft particles to work.
  You can either:
  - Enable the 'Depth Texture' option in the URP asset
  - Disable soft particles entirely by editing the CFXR Settings.cginc file and uncommenting the relevant line
- Magenta/Pink Effects: If the shaders don't work and effects are magenta, then you may need to recompile the shaders for the currently active render pipeline: right-click on the Shaders folder, and hit Reimport
- Addressables/Asset Bundles: if the effect don't work when using addressables, you can try to force the selected render pipeline for the shaders (select the shader files, and change the relevant option in their inspector).
  Some users also reported that using the 'Build > Clean Build > Build Pipeline Cache' option in the Addressables window did solve the issue afterwards.
- CFXR_Effect script: Almost all prefabs have the CFXR_Effect script attached: it handles auto-destruction or deactivation of the GameObject once an effect has finished playing, as well as camera shake and light animation where relevant
- Sorting: If you have problems with z-sorting (transparent objects appearing in front of other when their position is actually behind), try changing the values in the Particle System > Renderer > Sorting Fudge; as long as the relative order is respected between the different particle systems of a same prefab, it should work ok.
- Color Space: Effects were authored using Linear Color Space; use that for the best results (in the Player project settings)
- HDR: If some effects show washed out colors, it likely is because HDR isn't enabled for the camera (or in the URP asset), and thus colors will be clamped.

Please send me an email if you are having other issues or have any question: jean.moreno.nonsensepublic+unity@gmail.com

## Changelog

R 1.4.0 - Shaders: Greatly reduced the number of possible shader variants (e.g. for Ubershader from roughly 130M to 12k possible variants) - Shaders: Added option to force compilation for a specific render pipeline (select the shader file and look in its Inspector window) - Shaders: fixed incorrect color for text effecs (green channel was always forced to 0.5) - Moved the legacy effects into a Unitypackage file so that they are not imported by default anymore - Updated and changed the readme format from txt to html for better readability and navigation R 1.3.1 - Removed 'NEW' suffix in shader names, as it was meant for internal testing R 1.3.0 - Replaced the old .shader files with a new .cfxrshader file format, that will only compile them for the currently active render pipeline (this should fix all issues related to the effects not working in builds using Addressables or Asset Bundles) - Harmonized version numbering across all Cartoon FX packs R 1.0.7 - Distortion effects now work with URP 2D Renderer R 1.0.6 - Fixed possible shader compilation error when Single-pass instanced rendering is enabled R 1.0.5 - Removed mentions of the "Cartoon FX Easy Editor" in the readme files as it is not included with the free version of Cartoon FX Remaster R 1.0.4 - Reorganized the shader code in a separate file to avoid a 'multi_compile' hack, which will hopefully fix issues with Asset Bundles/Addressables R 1.0.3 - Improved CFXR_ParticleText usability when toggling the "is Dynamic" flag on an existing text effect - Disabled mesh GPU instancing in the shaders because it was causing too many issues (even when using Unity's default particle shader) R 1.0.2 - Removed GPU instancing support on the "CFXR Procedural Ring" shader, because it visually breaks it - Fixed compilation error related to 'projPos' in the "CFXR Particle Glow" shader R 1.0.1 - Added support for GPU instancing in the shaders - Fixed possible build error when adding a text effect in a prefab due to HideFlags R 1.0.0 - First release of "Cartoon FX Remaster FREE" with new free effects taken from all four Remaster packs