Changelog

Implemented support for highlighting geometry rendered with GPU instancing

Static and Dynamic batching will no longer produce z-fighting artifacts under any circumstances. Dynamic Offset and Factor options have been removed from the HighlightingRenderer component

Highlighting depth occlusion now works even if MSAA is enabled. This is no longer necessary to manually add HighlighterOccluder components to GameObjects (use HighlighterOccluder component only to achieve see-thorugh occluders). Non-seethrough occluders is now never rendered, so that saves performance

Added API for runtime control of highlighting presets. Now they are stored in HighlightingRenderer components (previously they were stored using Unity EditorPrefs)

Added forceRender option to the Highlighter (to make it ignore frustum culling and occlusion culling)

Improved cross-platform compatibility

Fixed highlighting depth occlusion not working if Camera Clear Flags set to Depth only or Don’t clear in Forward or VertexLit rendering paths

Fixed no longer used highlighting materials kept in memory (turns out Unity is never releasing unreferenced materials without the Resources.UnloadUnusedAssets() call, so explicit Destroy() call is required) (https://trello.com/c/st8b6YZ9)

Added support for ParticleRenderer (Legacy) and ParticleSystemRenderer highlighting

Other improvements and performance optimizations

v3.0

In this version, highlighting occluders doesn’t work with Sprites! This might be fixed in the future releases of the Highlighting System, but you shouldn’t upgrade in case you heavily rely on this feature in your project

Mobile optimizations (9 FPS vs 25 FPS on iPhone 4)

Highlighting occlusion feature (highlighters is now occluded with scene objects without the need to add highlighting occluders to all of them). Not compatible with hardware anti-aliasing!

Per-Highlighter see-through mode (controls when the highlighting should be always visible)

Hardware anti-aliasing (MSAA) support (highlighting buffer is now also anti-aliased. RenderTexture anti-aliasing support was introduced in Unity 4.2)

Support for nested highlighted objects (previously it was causing an error)

Invisible highlighted objects culling (they will not be affected by the material replacement routine. Scenes with huge amount of highlighted objects now should work faster)

Depth Offset Factor and Offset Units settings added to avoid visual artifacts when Dynamic Batching is enabled in Player Settings

Real stencil buffer is now used during highlighting buffer rendering (speeds up rendering. Stencil buffer access was introduced in Unity 4.2)

Fixed lightmapped objects highlighting

_CameraDepthTexture / _CameraDepthNormalsTexture is no longer cleared when the camera.depthTextureMode property is set to DepthTextureMode.Depth / DepthTextureMode.DepthNormals

RenderTexture restore operations avoided in most of the cases and “Tiled GPU perf. warning” is suppressed in all other cases. Uncomment DEBUG_ENABLED define in HighlightingBase.cs script to see when this happens

Null reference exceptions now prevented in case highlighted GameObject or Renderer was removed, but ReinitMaterials() wasn’t called

Fixed one empty pixel border around highlighted objects on a devices without support for NPOT (non power of two) textures

Fixed one texel vertical offset in Direct3D 9

Coroutines, used in HighlightableObject (Highlighter) were replaced with simple frame number comparision

Combined highlighting shaders. Fixed function states (ZWrite, ZTest, etc.) is now driven by the material parameters (feature was introduced in Unity 4.3)

Events/delegates used to control HighlightableObject’s (Highlighter’s) state from HighlightingEffect’s (HighlightingRenderer / HighlightingMobile) were replaced with Highlighter components management

All shaders are now compatible with the Highlighting System out of the box (no need to adapt each custom shader anymore)

Batching and shared materials support

Correct highlighting of transparent materials

Highlighting occluders

Handy highlighting effect quality and intensity controls with presets

Effect inspector helpers (will help you correctly setup Highlighting System in your project)

Bug fixes, shaders optimizations and other performance improvements

v1.2

Unity iOS Pro support

v1.1

Improved folder structure (highlighting scripts moved to Plugins folder). Now it’s possible to use Highlighting System from JavaScript and Boo (see JSHighlightingController.js and BooHighlightingController.boo)

Fix: Highlighting System now highlights only MeshRenderer, SkinnedMeshRenderer and ClothRenderer components, because you probably don’t want to see highlighted meshes created by ParticleRenderer, ParticleSystemRenderer, LineRenderer and TrailRenderer components

Fix: Now you can use highlighting with Hardware Anti-Aliasing without having highlights flipped, but Hardware AA smooths only framebuffer – outline glow will remain aliased as it uses additional render buffers, so i recommend you to continue using AntialiasingAsPostEffect.js for this