LightsprintSDK 2021.08.08
|
#include <PluginScene.h>
Public Member Functions | |
PluginParamsScene (const PluginParams *_next, RRSolverGL *_solver) | |
virtual PluginRuntime * | createRuntime (const PluginCreateRuntimeParams ¶ms) const |
virtual class PluginRuntime * | createRuntime (const PluginCreateRuntimeParams ¶ms) const =0 |
Public Attributes | |
rr::RRSolver * | solver |
const rr::RRObjects * | objects |
const RealtimeLights * | lights |
UberProgramSetup | uberProgramSetup |
rr::RRSolver::Multipliers | multipliers |
const RealtimeLight * | renderingFromThisLight |
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 PluginParams * | next |
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.
|
inline |
Convenience ctor, for setting some plugin parameters. You still might want to change default values of some other parameters after ctor.
|
virtual |
Access to actual plugin code, called by Renderer.
Implements rr_gl::PluginParams.
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.
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.
const RealtimeLights* rr_gl::PluginParamsScene::lights |
Set of lights, source of direct illumination in rendered scene.
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.
rr::RRSolver::Multipliers rr_gl::PluginParamsScene::multipliers |
Multipliers applied to rendered lights and materials.
const RealtimeLight* rr_gl::PluginParamsScene::renderingFromThisLight |
When rendering shadows into shadowmap, set it to respective light, otherwise nullptr.
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.
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.
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.
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.
unsigned rr_gl::PluginParamsScene::layerLDM |
Specifies source of light detail maps. Renderer only reads them.
bool rr_gl::PluginParamsScene::lightmapsContainAlsoDirectIllumination |
True = when rendering with lightmap from layerLightmap, direct lights are disabled.
unsigned rr_gl::PluginParamsScene::forceObjectType |
For diagnostic use only. 0=automatic, 1=force rendering singleobjects, 2=force rendering multiobject.
float rr_gl::PluginParamsScene::animationTime |
Specifies time from start of animation. At the moment, only water shader uses it for animated waves.
ClipPlanes rr_gl::PluginParamsScene::clipPlanes |
Specifies clipping of rendered geometry.
bool rr_gl::PluginParamsScene::wireframe |
True = renders polygons as wireframe.
bool rr_gl::PluginParamsScene::mirrorOcclusionQuery |
When rendering mirrors, this enables occlusion query optimization. It increases fps in some situations, reduces in others.