LightsprintSDK 2021.08.08
rr_gl::PluginParamsShared Struct Reference

#include <Plugin.h>

Public Member Functions

 PluginParamsShared ()
 

Public Attributes

const rr::RRCameracamera
 
std::array< unsigned, 4 > viewport
 
bool srgbCorrect
 
rr::RRVec4 brightness
 
float gamma
 

Detailed Description

Parameters shared by all plugins.

This structure is passed to rr_gl::Renderer::render() together with plugin chain. It contains parameters relevant for more than one plugin. When plugin calls next plugin, it can pass this structure modified.

Constructor & Destructor Documentation

◆ PluginParamsShared()

rr_gl::PluginParamsShared::PluginParamsShared ( )
inline

Member Data Documentation

◆ camera

const rr::RRCamera* rr_gl::PluginParamsShared::camera

Camera we are rendering with.

◆ viewport

std::array<unsigned,4> rr_gl::PluginParamsShared::viewport

Viewport we are rendering to, in OpenGL format. This does not replace glViewport call, it's a copy of data passed to the most recent glViewport. Although it's never accessed in basic rendering, mirrors and other effects need it.

◆ srgbCorrect

bool rr_gl::PluginParamsShared::srgbCorrect

True = calculates illumination in slower but more accurate sRGB correct way. However, transparency is also calculated in sRGB, which makes it look different. Has no effect on very old GPUs that don't support sRGB textures.

◆ brightness

rr::RRVec4 rr_gl::PluginParamsShared::brightness

Specifies global brightness.

◆ gamma

float rr_gl::PluginParamsShared::gamma

Specifies global gamma (contrast) factor. Default is 1 for standard pipeline, 2.2 for sRGB correct pipeline.