LightsprintSDK 2021.08.08
rr_gl::PluginParamsScene Class Reference

#include <PluginScene.h>

Inheritance diagram for rr_gl::PluginParamsScene:
rr_gl::PluginParams

Public Member Functions

 PluginParamsScene (const PluginParams *_next, RRSolverGL *_solver)
 
virtual PluginRuntimecreateRuntime (const PluginCreateRuntimeParams &params) const
 
virtual class PluginRuntimecreateRuntime (const PluginCreateRuntimeParams &params) const =0
 

Public Attributes

rr::RRSolversolver
 
const rr::RRObjectsobjects
 
const RealtimeLightslights
 
UberProgramSetup uberProgramSetup
 
rr::RRSolver::Multipliers multipliers
 
const RealtimeLightrenderingFromThisLight
 
bool updateLayerLightmap
 
bool updateLayerEnvironment
 
unsigned layerLightmap
 
unsigned layerEnvironment
 
unsigned layerLDM
 
bool lightmapsContainAlsoDirectIllumination
 
unsigned forceObjectType
 
float animationTime
 
ClipPlanes clipPlanes
 
bool wireframe
 
bool mirrorOcclusionQuery
 
- Public Attributes inherited from rr_gl::PluginParams
const PluginParamsnext
 

Detailed Description

Renders scene, set of objects and lights.

With all parameters at defaults, PluginScene renders contents of solver, all static and dynamic objects and lights. If you modify objects and lights variables, you can render arbitrary objects and lights instead.

Constructor & Destructor Documentation

◆ PluginParamsScene()

rr_gl::PluginParamsScene::PluginParamsScene ( const PluginParams _next,
RRSolverGL _solver 
)
inline

Convenience ctor, for setting some plugin parameters. You still might want to change default values of some other parameters after ctor.

Member Function Documentation

◆ createRuntime()

virtual PluginRuntime * rr_gl::PluginParamsScene::createRuntime ( const PluginCreateRuntimeParams params) const
virtual

Access to actual plugin code, called by Renderer.

Implements rr_gl::PluginParams.

Member Data Documentation

◆ solver

rr::RRSolver* rr_gl::PluginParamsScene::solver

Source of static and dynamic objects and illumination. Direct lights from solver are ignored if you set lights differently. You can request renderer to update illumination buffers with data from solver.

◆ objects

const rr::RRObjects* rr_gl::PluginParamsScene::objects

Objects to be rendered along with all objects from solver. Illumination buffers can't be updated at render time.

◆ lights

const RealtimeLights* rr_gl::PluginParamsScene::lights

Set of lights, source of direct illumination in rendered scene.

◆ uberProgramSetup

UberProgramSetup rr_gl::PluginParamsScene::uberProgramSetup

Specifies shader properties to be allowed during render.

For rendering with all light and material features, use UberProgramSetup::enableAllLights() and UberProgramSetup::enableAllMaterials().

For brightness/gamma correction, it is sufficient to set PluginParamsShared::brightness/gamma. If you don't set POSTPROCESS_BRIGHTNESS/POSTPROCESS_GAMMA, plugin sets them automatically according to SharedPluginParams::brightness/gamma. This gives you top fps, but system might need to compile multiple shaders (depending on brightness/gamma values), so startup might be slower. If you set POSTPROCESS_BRIGHTNESS/POSTPROCESS_GAMMA, they stay set even if not necessary, so startup is faster, but shader executes few extra instructions even if they are not needed, so fps might be super tiny bit lower.

◆ multipliers

rr::RRSolver::Multipliers rr_gl::PluginParamsScene::multipliers

Multipliers applied to rendered lights and materials.

◆ renderingFromThisLight

const RealtimeLight* rr_gl::PluginParamsScene::renderingFromThisLight

When rendering shadows into shadowmap, set it to respective light, otherwise nullptr.

◆ updateLayerLightmap

bool rr_gl::PluginParamsScene::updateLayerLightmap

True = updates illumination stored in buffers in layerLightmap layer before rendering it.

Updates only outdated buffers, only buffers being rendered. Note that renderer does not allocate or delete buffers. You can allocate buffers in advance manually or by calling RRSolver::allocateBuffersForRealtimeGI() once.

◆ updateLayerEnvironment

bool rr_gl::PluginParamsScene::updateLayerEnvironment

True = updates illumination stored in buffers in layerEnvironment layer before rendering it.

Updates only outdated buffers, only buffers being rendered. Note that renderer does not allocate or delete buffers. You can allocate buffers in advance manually or by calling RRSolver::allocateBuffersForRealtimeGI() once.

◆ layerLightmap

unsigned rr_gl::PluginParamsScene::layerLightmap

Indirect illumination is taken from and possibly updated in given layer. Renderer touches only existing buffers, does not allocate new ones.

◆ layerEnvironment

unsigned rr_gl::PluginParamsScene::layerEnvironment

Environment is taken from and possibly updated in given layer. Renderer touches only existing buffers, does not allocate new ones.

◆ layerLDM

unsigned rr_gl::PluginParamsScene::layerLDM

Specifies source of light detail maps. Renderer only reads them.

◆ lightmapsContainAlsoDirectIllumination

bool rr_gl::PluginParamsScene::lightmapsContainAlsoDirectIllumination

True = when rendering with lightmap from layerLightmap, direct lights are disabled.

◆ forceObjectType

unsigned rr_gl::PluginParamsScene::forceObjectType

For diagnostic use only. 0=automatic, 1=force rendering singleobjects, 2=force rendering multiobject.

◆ animationTime

float rr_gl::PluginParamsScene::animationTime

Specifies time from start of animation. At the moment, only water shader uses it for animated waves.

◆ clipPlanes

ClipPlanes rr_gl::PluginParamsScene::clipPlanes

Specifies clipping of rendered geometry.

◆ wireframe

bool rr_gl::PluginParamsScene::wireframe

True = renders polygons as wireframe.

◆ mirrorOcclusionQuery

bool rr_gl::PluginParamsScene::mirrorOcclusionQuery

When rendering mirrors, this enables occlusion query optimization. It increases fps in some situations, reduces in others.