Impostors - Runtime Optimization
Next generation of Imposter System asset with DOTS in mind.
When creating big worlds it's important to show users large-scale scenes with lots of objects in the background. That's a tough task that requires optimizing shaders, materials, meshes, and so on.
With the help of Impostors, you can greatly simplify this task!
Impostor - fake object(quad), that tries to look like its original object. It's very cheap to render but with a trade-off between performance and visual quality.
We don't really need high visual quality at distance, because distant objects take tiny space on the screen. That's why there are techniques like LODs (Level Of Detail).
Impostors expand this approach, and in some cases can completely replace it.
Why impostors?
There are several problems with LODs
- it requires manually creating additional assets for each object - meshes with fewer polygons and materials,
- these additional assets increase build size,
- there might be a noticeable difference between LODs, which pop in and out when player moves.
Poping problem is really hard to solve because it's just the trade-off between performance and visual quality. But with Impostors we can solve the first two issues:
- impostors don't require manually creating additional assets,
- impostors don't increase build size,
- impostors work with stylized custom shading,
- in perfect scenarios impostors look exactly like the original objects.
How impostors work
The concept of impostors is quite simple. We just take a photo of the object from a specific angle, and then show this photo as a sprite instead of the original object. Sprites are super cheap to render: they use special shader without lightning calculation and require only 2 triangles to draw. Whenever camera changes position we need to regenerate the photo to represent object from a new angle.
Important note
Again, we stuck with the trade-off between performance and visual quality.
Impostors are not a panacea and cannot replace standard rendering.
But it provides the opportunity to fill your scene with lots of distant details if your project fits several conditions.
When to use impostors
Before we continue with this chapter I want to mention: if you have any doubts or questions about impostors working with your project, feel free to contact me with some gameplay footage or at least a high-level overview of what is going on in your game. I will try my best to answer your questions and let you know whether Impostors fits your project.
Last note, Asset Store provides refunds, and I have never rejected refund requests, so you are covered.
1. Camera rarely changes position
The best scenario for impostors!
Regenerating impostor's image is a rendering operation, which we are trying to avoid as much as possible. When camera doesn't move we don't need to update anything.
Genres: VR with teleportation movement or steady gameplay, visual novels, side-scrollers.
2. First-person character camera
Works perfectly with impostors!
Genres: open-world FPS, battle-royal, survivals.
3. Flying or top-down camera
Such camera behavior requires constantly regenerating photos of impostors, which leads to way less performance boost. However, I can't say that impostors cannot be used in such games! Example scene shows exactly that scenario.
4. Fast-paced camera movement
The weak part of impostors.
Games like racing and flying simulators might not work with impostors as good as others. It depends on what you are trying to achieve. Feel free to contact me and we will try to understand whether your project works with impostors or not.
5. Games with procedural objects
If your game has procedurally generated meshes, I doubt you have LODs for them:)
In such a situation Impostors package comes handy because it generates everything at runtime!
6. Low-poly games
It depends on the platform you targeting and the count of objects you want to present in your scene. Generally speaking, impostors are overkill for games with a low poly count.
Limitations
- Requires shaders that support forward rendering and RGBA ColorMask.
- Whenever lighting condition changes impostors' images need to be updated.
- At a close distance it's quite easy to distinguish impostor from the original object, so they must be used at most at 10% of camera screen size.
- For now, Impostors doesn't support semi-transparent objects. Only Opaque and AlphaTest/Cutout shaders.
- For now, Impostors supports only one directional light plus ambient light.
Features:
- Significant decrease in poly and drawcall counts
- Works with stylized custom shading
- No asset pre-processing, no baking
- No additional assets
- Doesn't increase build size
- Generates everything at runtime
- Fast setup
- Multiple cameras
- VR (tested with Oculus Quest)
- Utilizes max performance using Jobs and Burst
- Supports moving objects
Dependencies:
- Unity 2020.3.16 - 6000.2.x
- Burst
- Mathematics
- Collections
Supported Render Pipelines:
- Built-in
- Universal
- It may be used in custom RP (requires a bit of coding to embed impostors into RP)
- NO OFFICIAL SUPPORT FOR HDRP
Supported platforms:
Every platform that supports render textures, which is almost every platform supported by Unity.
WebGL is an exception because it doesn't work with the multithreading Jobs System.
Links:
Documentation
Forum
Release Notes
v2.1.0 - 29 Nov 2025
- Fixed URP 17 RenderGraph errors and warnings (removed scheduled update mode).
- Fixed warnings for the Unity 6+ about changed API.
v2.0.1 - 27 Jul 2023
- Added DemoDisplay with quick access settings in sample scenes.
- Fixed impostors-dither-pattern texture format which caused crashes on old mobile devices.
- Fixed integration with new InputSystem in samples.
v2.0.0 - 25 Jun 2023
Major version change. Upgrade from v1 guide.
Bumped min supported Unity version to 2020.3.16f1.
- Added support for Unity 2023.1 URP.
- Improved how URP proxy works. No more confusing and tedious setup.
- Added support for URP asset render scale.
- Added support for resolution scaling.
- Improved imposters shader to eliminate outline issues.
- Improved light calculation for both BiRP and URP.
- Added RenderType = ImpostorsCutout to shader to support shader replacement.
- Optimized impostor shader vertex stage by removing waste vector normalization.
- Refactored shader structure to simplify custom modifications/extensions.
- Changed fading effect to be affected by timeScale.
- Updated dither texture to proper blue noise pattern.
- Improved menu item commands to work properly with Undo system.
- Impostor shader no more shows in the select shader menu.
- Added sample shader that supports both BiRP and URP.
- Added new cyan debug color for 32x32 imposter.
- New sample camera controller.
- Added button to auto setup RP proxy.
- Changed some APIs to have more meaningful and consistent naming.
- Fixed long bothering issue on some hardware. Mainly on Mac and iOS devices.
- Fixed fog in URP to be consistent with rest shaders.
- Fixed bug in build with enabled Graphics Jobs.
v1.0.7 - 26 May 2023
- Improved usage of static fields to work better with Enter Play Mode settings.
- Improved in-editor impostor rendering. Now changing object's shader won't produce cyan impostors.
- Removed unused directives in scripts.
- Fixed light color issues with temperature and color space.
v1.0.6 - 04 Nov 2022
- Added script to convert terrain trees into scene object to use Impostors.
- Added example scene that showcases Impostors for terrain trees integration.
- Renamed some assets to prevent asset pollution.
- Fixed missed reference to RenderPipeline.Core assembly.
- Fixed a small issue with impostor texture resolution.
v1.0.5 - 29 Jun 2022
- Added support for URP's deferred rendering
- Added DepthNormal pass for URP
- Added warning about Graphics Jobs setting
- Improved warnings on ImpostorLODGroup
- Fixed HDR light color
- Fixed restoring camera settings after impostor rendering
- Fixed issues with CrossFade effect
- Other minor improvements and fixes
v1.0.4 - 15 Apr 2022
- Added immediate mode impostor rendering for URP (must fix issues with VR in URP projects)
- Added warning about SetPass calls count when inspecting ImpostorLODGroup
- Added new ProfilerMarkers
- Improved bounds calculation to support not symmetrical objects
- Improved rendering of lightmapped and statically batched objects
- Removed DrawMesh rendering command which caused too many troubles
- Fixed issue with lightmap index unexpected value
- Other minor improvements and fixes
v1.0.3 - 18 Mar 2022
- Fixed bug with frequent impostors enabling and disabling
v1.0.2 - 27 Jan 2022
- Fixed bug with throwing errors on scene load in some conditions
v1.0.1 - 12 Nov 2021
- Fixed depth writing in forward rendering
- Fixed light angle delta not affecting update importance
v1.0.0 - 07 Nov 2021
Requires clean installation.
- Added support for dynamic/moving objects
- Added ability to more precisely control update queue
- Added instant impostor creation for objects that become visible
- Added MarkGoingToDestroy method to remove waste allocations on object's destruction
- Improved overall system performance
- Improved sorting algorithms
- Improved editor for ease of use
- Fixed URP rendering on Oculus Quest
________________________________________________________________________________________________
v0.9.6 - 20 Jun 2021
Requires clean installation.
- Improved Jobs scheduling and overall performance
- Added ability to manually request impostor texture update
- Improved performance of setup process
- Significantly decreased allocations amount
- Changed some settings to be publicly accessible
- Fixed problems with static batching
- Fixed impostors for scenes with mixed lighting
- Fixed impostors rendering layer
- Fixed some editor errors
v0.9.5 - 02 Jun 2021
- Fixed HDR causing gray impostor's background
- Improved editor workflow
- Added ability to set rendering layer for impostors
- Added in-editor dialogs to simplify impostors setup process
v0.9.4
Introduces breaking changes. Requires manual upgrading.
- Improved overall system performance by several times
- Added debug mode with cascades
- Added RenderPipelineProxy to support different render pipelines
- Fixed Mali GPU floating-point issue
- Fixed Manual update mode
- Improved Editor UX