Planar Reflections can be used with both Unlit and PBS, but they're setup differently.
More...
|
| PlanarReflections (SceneManager *sceneManager, CompositorManager2 *compositorManager, Real maxDistance, Camera *lockCamera) |
|
| ~PlanarReflections () |
|
bool | _isUpdatingRenderablesHlms (void) const |
|
void | _notifyRenderableFlushedHlmsDatablock (Renderable *renderable) |
|
PlanarReflectionActor * | addActor (const PlanarReflectionActor &actor) |
| Adds an actor plane that other objects can use as source for reflections if they're close enough to it (and aligned enough to the normal).
|
|
void | addRenderable (const TrackedRenderable &trackedRenderable) |
| Once you add a Renderable, we will automatically update its PBS material to use reflection if it's close to any active actor.
|
|
void | beginFrame (void) |
|
bool | cameraMatches (const Camera *camera) |
| Returns true if the Camera settings (position, orientation, aspect ratio, etc) match with the reflection we have in cache.
|
|
void | destroyActor (PlanarReflectionActor *actor) |
|
void | destroyAllActors (void) |
|
void | fillConstBufferData (RenderTarget *renderTarget, Camera *camera, const Matrix4 &projectionMatrix, float *RESTRICT_ALIAS passBufferPtr) const |
| Fills 'passBufferPtr' with the necessary data for PlanarReflections.
|
|
size_t | getConstBufferSize (void) const |
| Returns the amount of bytes that fillConstBufferData is going to fill.
|
|
uint8 | getMaxActiveActors (void) const |
|
TexturePtr | getTexture (uint8 actorIdx) const |
|
bool | hasActiveActor (const Renderable *renderable) const |
|
bool | hasFlushPending (const Renderable *renderable) const |
|
bool | hasPlanarReflections (const Renderable *renderable) const |
|
void | releaseReservation (PlanarReflectionActor *actor) |
| Releases a reservation made with reserve().
|
|
void | removeRenderable (Renderable *renderable) |
|
void | reserve (uint8 activeActorSlot, PlanarReflectionActor *actor) |
| Reserves a particular slot (i.e.
|
|
void | setMaxActiveActors (uint8 maxActiveActors, IdString workspaceName, bool useAccurateLighting, uint32 width, uint32 height, bool withMipmaps, PixelFormat pixelFormat, bool mipmapMethodCompute) |
| Setups how many actors can be active at the same time.
|
|
void | setMaxDistance (Real maxDistance) |
|
void | update (Camera *camera, Real aspectRatio) |
|
Planar Reflections can be used with both Unlit and PBS, but they're setup differently.
Unlit is very fast, but also very basic. It's mostly useful for perfect mirrors.
An unlit datablock is tied to a particular Actor (reflection plane). PBS on the other hand, can dynamically assign Renderables to the closest actor that aligns with the Renderable's (predominant) normal, regardless of the pbs datablock it uses. If the actor is close enough but not an exact match, PBS will attempt to project the reflection in an attempt to correct this, however it's an approximation.
If you want perfect reflections, the reflection plane of the actor must match and align exactly the surface being drawn; or rely on a fallback (Local Cubemaps, SSR, etc).
Furthermore, PBS will automatically disable reflections while rendering reflections (but Unlit won't do this, so it's your job to leave it out of rendering i.e. via visibility masks).
Actors are culled against the camera, thus if they're no longer visible Ogre will stop updating those actors, improving performance.