-
-
Notifications
You must be signed in to change notification settings - Fork 212
Override Materials
Some passes and effects use override materials to render special data such as view space normals. This system has several shortcomings and fails when the scene contains a mix of instanced/skinned and basic meshes. Since version 6.14.0
, there's an optional workaround for this particular problem.
The workaround is disabled by default because it can have a negative impact on performance when the scene contains a lot of meshes. To enable the workaround globally for all passes and effects, do the following:
import { OverrideMaterialManager } from "postprocessing";
OverrideMaterialManager.workaroundEnabled = true;
This will fix override materials for passes and materials that use them. If you don't use effects that use override materials, the workaround will remain inactive. The following effects and passes currently rely on override materials:
- OutlineEffect
- SSAOEffect
- SelectiveBloomEffect
- DepthPass
- NormalPass
It's recommended to enable the workaround before the render loop starts.