UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
FAQ
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
CIGI Client Plugin

Unigine::Render Class

Header: #include <UnigineRender.h>

Provides access to Unigine rendering functions. For example, it is used by AppWall application to render onto multiple monitors.

See Also#

  • A set of UnigineScript API samples located in the <UnigineSDK>/data/samples/rendering/ folder

Render Class

Members


Render * get ( ) #

Returns a pointer to the existing render.

Return value

Pointer to the existing render.

void setAlphaFade ( int fade ) #

Enables or disables alpha-blend fading (dithering) for objects. Enabling the feature allows for objects LODs to be smoothly blended into each other over a fade distance.

Arguments

  • int fade - 1 to enable alpha fading (dithering) for objects, 0 to disable it. The default value is 1.

int isAlphaFade ( ) #

Returns a value indicating if alpha-blend fading (dithering) is enabled for objects. When the feature is enabled, objects LODs are smoothly blended into each other over a fade distance.

Return value

1 if alpha fading is enabled; otherwise, 0.

void setAnimationLeaf ( float leaf ) #

Sets the global scale for rotation angle of vegetation leaves.

Arguments

  • float leaf - Global leaf rotation angle. If a negative value is provided, 0 will be used instead.

float getAnimationLeaf ( ) #

Returns the current scale for rotation angle of vegetation leaves.

Return value

Global leaf rotation angle.

float getAnimationOldTime ( ) #

Returns the previous render animation time for vegetation.

Return value

Animation time in milliseconds.

void setAnimationScale ( float scale ) #

Sets the global scale for rotation speed of vegetation leaves.

Arguments

  • float scale - Global leaf rotation speed.

float getAnimationScale ( ) #

Returns the current global scale for rotation speed of vegetation leaves.

Return value

Global leaf rotation speed.

void setAnimationStem ( float stem ) #

Sets the global scale for movement amplitude of vegetation stems.

Arguments

  • float stem - Global stem amplitude scale. If a negative value is provided, 0 will be used instead.

float getAnimationStem ( ) #

Returns the current global scale for movement amplitude of vegetation stems.

Return value

Global stem amplitude scale.

void setAnimationTime ( float time ) #

Sets the render animation time for vegetation.

Arguments

  • float time - Animation time in milliseconds.

float getAnimationTime ( ) #

Returns the render animation time for vegetation.

Return value

Animation time in milliseconds.

void setAnimationWind ( const Math::vec3 & wind ) #

Sets the direction of wind for all vegetation (grass and trees). It is a multiplier for the stem offset (in grass, stem and leaves materials).

Arguments

  • const Math::vec3 & wind - Offset for vegetation under wind by X, Y and Z axes.

Math::vec3 getAnimationWind ( ) #

Returns the current direction of wind for all vegetation (grass and trees). It is a multiplier for the stem offset (in grass, stem and leaves materials).

Return value

Offset for vegetation under wind by X, Y and Z axes.

void setBorder ( const Math::vec2 & border ) #

Sets width and height of the image border (in pixels), to be rendered outside the horizontal bounds of the screen to reduce artefacts of post effects.

Arguments

  • const Math::vec2 & border - Vector with components representing border sizes: X - width, Y - height.

Math::vec2 getBorder ( ) #

Returns current width and height of the image border (in pixels), to be rendered outside the horizontal bounds of the screen to reduce artefacts of post effects.

Return value

Vector with components representing border sizes: X - width, Y - height.

int getAPI ( ) #

Returns the current Graphics API, or API_UNKNOWN if API cannot be identified.

Return value

The Graphics API flag (see API_* variables).

void setAuxiliary ( int auxiliary ) #

Enables or disables the auxiliary render buffer usage. The buffer should be enabled for render and post post-processes to work.

Arguments

  • int auxiliary - 1 to use the auxiliary buffer, 0 not to use. The default value is 1.

int isAuxiliary ( ) #

Returns a value indicating if auxiliary render buffer is used. The buffer should be enabled for render and post post-processes to work.

Return value

1 if the auxiliary buffer is used; otherwise, 0.

void setBackgroundColor ( const Math::vec4 & color ) #

Sets the background color by using given vector.

Arguments

  • const Math::vec4 & color - A background color vector.

Math::vec4 getBackgroundColor ( ) #

Returns the background color vector.

Return value

A background color vector.

void setBentNormalRayTracing ( int tracing ) #

Enables or disables ray-traced bent normals calculation. The use of SSRTGI for bent normals allows for smooth ambient lighting.
Notice
Ray-traced bent normals calculation available only when the SSRTGI technique is enabled.

Arguments

  • int tracing - 1 to enable ray-traced bent normals calculation, 0 to disable. The default value is 1.

int isBentNormalRayTracing ( ) #

Returns a value indicating if ray-traced bent normals calculation is enabled. The use of SSRTGI for bent normals allows for smooth ambient lighting.
Notice
Ray-traced bent normals calculation available only when the SSRTGI technique is enabled.

Return value

1 if ray-traced bent normals calculation is enabled; otherwise, 0.

void setBentNormalFixOverlitAreas ( int areas ) #

Enables or disables correction of overlit areas for bent normals calculation.
Notice
  • This option may significantly affect performance, so disable it when it's not necessary.
  • Ray-traced bent normals calculation available only when the SSRTGI technique is enabled.

Arguments

  • int areas - 1 to enable correction of overlit areas for bent normals calculation, 0 to disable it. The default value is 0.

int isBentNormalFixOverlitAreas ( ) #

Returns a value indicating if correction of overlit areas for bent normals calculation is enabled.
Notice
  • This option may significantly affect performance, so disable it when it's not necessary.
  • Ray-traced bent normals calculation available only when the SSRTGI technique is enabled.

Return value

1 if correction of overlit areas for bent normals calculation is enabled; otherwise, 0.

void setBentNormalRayTracingDenoise ( int denoise ) #

Enables or disables noise reduction for ray-traced bent normals calculation. This option reduces noise by using the blur effect.
Notice
Ray-traced bent normals calculation available only when the SSRTGI technique is enabled.

Arguments

  • int denoise - 1 to enable noise reduction for ray-traced bent normals calculation, 0 to disable. The default value is 1.

int isBentNormalRayTracingDenoise ( ) #

Returns a value indicating if noise reduction for ray-traced bent normals calculation is enabled. This option reduces noise by using blur effect.
Notice
Ray-traced bent normals calculation available only when the SSRTGI technique is enabled.

Return value

1 if noise reduction for ray-traced bent normals calculation is enabled; otherwise, 0.

void setBentNormalRayTracingThreshold ( float threshold ) #

Sets the threshold value for the ray-traced bent normals calculation.
Notice
Ray-traced bent normals calculation available only when the SSRTGI technique is enabled.

Arguments

  • float threshold - Bent normals ray tracing threshold value. The default value is 1.0f.

float getBentNormalRayTracingThreshold ( ) #

Returns the current threshold value for the ray-traced bent normals calculation.
Notice
Ray-traced bent normals calculation available only when the SSRTGI technique is enabled.

Return value

Bent normal ray tracing threshold value. The default value is 1.0f.

Ptr<Texture> getBlack2DArrayTexture ( ) #

Returns black 2D array texture.

Return value

Black 2D array texture.

Ptr<Texture> getBlack2DTexture ( ) #

Returns black 2D texture.

Return value

Black 2D texture.

Ptr<Texture> getBlack3DTexture ( ) #

Returns black 3D texture.

Return value

Black 3D texture.

Ptr<Texture> getBlackCubeTexture ( ) #

Returns black Cube texture.

Return value

Black Cube texture.

void setBloom ( int bloom ) #

Enables or disables the bloom effect.

Arguments

  • int bloom - 1 value to enable the bloom effect, 0 to disable.

int isBloom ( ) #

Returns a value indicating if the bloom effect is enabled.

Return value

1 if the bloom effect is enabled; otherwise, 0.

void setBloomPasses ( int passes ) #

Sets the number of passes for the bloom effect. During the pass a bloom texture is generating. Up to 8 bloom textures can be generated: each texture has lower resolution (original size, original size /2, original size /4, so forth) with bloom effect. After that, all these bloom textures with the different resolution are composed for the final bloom texture.

Arguments

  • int passes - Number of bloom passes. The default value is 8. The higher the value the smoother is the effect. However, this option significantly affects performance.

int getBloomPasses ( ) #

Returns the current number of passes for the bloom effect. During the pass a bloom texture is generating. Up to 8 bloom textures can be generated: each texture has lower resolution (original size, original size /2, original size /4, so forth) with bloom effect. After that, all these bloom textures with the different resolution are composed for the final bloom texture.

Return value

Number of bloom passes.

void setBloomPower ( float power ) #

Sets the power of the bloom effect.
  • At the minimum value of 0.0f, the bloom effect is blurred.
  • At the maximum value of 1.0f, the bloom effect is more contrast.

Arguments

  • float power - Bloom power value within the [0.0f; 1.0f] range. The default value is 0.7f.

float getBloomPower ( ) #

Returns the power of the bloom effect.
  • At the minimum value of 0.0f, the bloom effect is blurred.
  • At the maximum value of 1.0f, the bloom effect is more contrast.

Return value

Bloom power value within the [0.0f; 1.0f] range.

void setBloomResolution ( int resolution ) #

Sets the resolution of the bloom effect.

Arguments

  • int resolution - Resolution of the bloom effect:
    • 0 - quarter resolution.
    • 1 - half resolution (by default).
    • 2 - full resolution.

int getBloomResolution ( ) #

Returns the current resolution of the bloom effect.

Return value

Resolution of the bloom effect:
  • 0 - quarter resolution.
  • 1 - half resolution (by default).
  • 2 - full resolution.

void setBloomScale ( float scale ) #

Sets the scale of the bloom effect.

Arguments

  • float scale - Bloom scale value within the [0.0f; 1.0f] range. The default value is 0.3f.

float getBloomScale ( ) #

Returns the scale of the bloom effect.

Return value

Bloom scale value within the [0.0f; 1.0f] range.

void setBudget ( float budget ) #

Sets the render budget value, which limits the number of loaded/created graphics resources during a frame according to loading/creation time.

Arguments

  • float budget - Budget value in seconds. The default value is 1/60.

float getBudget ( ) #

Returns current render budget value, which limits the number of loaded/created graphics resources during a frame according to loading/creation time.

Return value

Budget value in seconds. The default value is 1/60.

void setCameraEffectsThreshold ( float threshold ) #

Sets the threshold, which is used to detect if an object should be blurred in the HDR mode.

Arguments

  • float threshold - HDR threshold. If a negative value is provided, 0 will be used instead.

float getCameraEffectsThreshold ( ) #

Returns the brightness threshold, which is used to detect if an object should be blurred in the HDR mode.

Return value

HDR threshold.

void setClearBufferMask ( int mask ) #

Sets the buffer cleanup mask. This mask determines which buffers are to be cleared next time the Engine::render() is called. Thus, you can determine the contents of which buffers is to be kept, avoiding situations, when necessary data is cleared.
Source code (C++)
auto render = Render::get();

render->setClearBufferMask(RenderState::BUFFER_ALL); 
// color, depth & stencil buffers will be cleared
render->setClearBufferMask(RenderState::BUFFER_NONE); 
// no buffers will be cleared (useful if you want to embed the engine somewhere)
render->setClearBufferMask(RenderState::BUFFER_DEPTH); 
// only the depth buffer will be cleared

// masks can be combined:
render->setClearBufferMask(BUFFER_COLOR | BUFFER_STENCIL); 
// color and stencil buffer will be cleared

// there is a separate BUFFER_DEPTH_STENCIL mask for convenience
render->clearBuffer(BUFFER_DEPTH_STENCIL);

Arguments

int getClearBufferMask ( ) #

Returns current buffer cleanup mask. This mask determines which buffers are to be cleared next time the Engine::render() is called. This method can be used to save current buffer cleanup mask to restore it later.

Return value

Buffer mask: one of the RenderState::BUFFER_* variables.

void setCloudsDownsamplingRendering ( int rendering ) #

Sets downsampling rendering for clouds. This parameter determines clouds resolution based on current screen resolution. It has a significant impact on performance.

Arguments

  • int rendering - One of the following values:
    • 0 - full.
    • 1 - half (by default).
    • 2 - quarter.

int getCloudsDownsamplingRendering ( ) #

Returns current downsampling rendering setting for clouds. This parameter determines clouds resolution based on current screen resolution. It has a significant impact on performance.

Return value

One of the following values:
  • 0 - full.
  • 1 - half (by default).
  • 2 - quarter.

void setCloudsDynamicCoverageArea ( float area ) #

Sets dynamic coverage area for clouds. This parameter determines visibility distance for coverage of FieldWeather objects.
Notice
Increasing dynamic coverage area leads to reduction of quality of FieldWeather coverage texture and loss of details. This effect can be mitigated by increasing dynamic coverage resolution using setCloudsDynamicCoverageResolution() method.

Arguments

  • float area - Dynamic coverage area, in units. The default value is 10 000.

float getCloudsDynamicCoverageArea ( ) #

Returns current dynamic coverage area for clouds. This parameter determines visibility distance for coverage of FieldWeather objects.

Return value

Dynamic coverage area, in units.

void setCloudsDynamicCoverageResolution ( int resolution ) #

Sets dynamic coverage resolution for clouds. This parameter determines the quality of dynamic coverage texture for FieldWeather objects. Higher values make it possible to preserve texture details at high distances.
Notice
Increased resolution significantly affects performance.

Arguments

  • int resolution - One of the following values:
    • 0 - 128 x 128.
    • 1 - 256 x 256 (by default).
    • 2 - 512 x 512.
    • 3 - 1024 x 1024.
    • 4 - 2048 x 2048.

int getCloudsDynamicCoverageResolution ( ) #

Returns current dynamic coverage resolution setting for clouds. This parameter determines the quality of dynamic coverage texture for FieldWeather objects. Higher values make it possible to preserve texture details at high distances.

Return value

One of the following values:
  • 0 - 128 x 128.
  • 1 - 256 x 256 (by default).
  • 2 - 512 x 512.
  • 3 - 1024 x 1024.
  • 4 - 2048 x 2048.

void setCloudsGroundShadows ( int shadows ) #

Enables or disables rendering of shadows from the clouds on the ground.

Arguments

  • int shadows - 1 to enable rendering of shadows from the clouds on the ground, 0 to disable it. The default value is 1.

int isCloudsGroundShadows ( ) #

Returns a value indicating if rendering of shadows from the clouds on the ground is enabled.

Return value

1 if rendering of shadows from the clouds on the ground is enabled; otherwise, 0.

void setCloudsInterleavedRendering ( int rendering ) #

Enables or disables interleaved rendering mode for clouds.
Notice
In cases when clouds are viewed from the ground, or from above (at significant distance) and viewer's velocities are less than 200 units per second, this parameter can be used to provide a significant gain in performance.

Arguments

  • int rendering - Interleaved rendering mode for clouds:
    • 0 - disabled (by default).
    • 1 - 2 x 2.
    • 2 - 4 x 4.
    • 3 - 8 x 8.

int getCloudsInterleavedRendering ( ) #

Returns the value indicating current interleaved rendering mode for clouds. This feature can be used to gain performance when enabled. See getCloudsInterleavedRendering().

Return value

One of the following values:
  • 0 - disabled (by default).
  • 1 - 2 x 2.
  • 2 - 4 x 4.
  • 3 - 8 x 8.

void setCloudsLightingConeRadius ( float radius ) #

Sets lighting cone sampling radius for clouds lighting.
Notice
Low values may result in unnatural behavior as the position of the sun changes.

Arguments

  • float radius - Lighting cone radius in range [0.0f; 1.0f]. The default value is 0.3.

float getCloudsLightingConeRadius ( ) #

Returns the current lighting cone sampling radius for clouds lighting.

Return value

Lighting cone radius in range [0.0f; 1.0f].

void setCloudsLightingQuality ( int quality ) #

Sets lighting quality for clouds. This parameter determines the number of samples used to calculate lighting for clouds.
Notice
This parameter has a significant impact on performance. Therefore, it is recommended to use low settings, when possible.

Arguments

  • int quality - One of the following values:
    • 0 - 1 sample, low quality.
    • 1 - 3 samples, medium quality (by default).
    • 2 - 5 samples, high quality.
    • 3 - 6 samples, ultra quality.

int getCloudsLightingQuality ( ) #

Returns the current lighting quality setting for clouds. This parameter determines the number of samples used to calculate lighting for clouds.

Return value

One of the following values:
  • 0 - 1 sample, low quality.
  • 1 - 3 samples, medium quality (by default).
  • 2 - 5 samples, high quality.
  • 3 - 6 samples, ultra quality.

void setCloudsLightingTraceLength ( float length ) #

Sets the lighting trace length for clouds. This parameter determines the maximum length of a sun ray inside a cloud.

Arguments

  • float length - Lighting trace length in range [1.0f; 2048.0f], in units. The default value is 230.0f.

float getCloudsLightingTraceLength ( ) #

Returns the current lighting trace length for clouds. This parameter determines the maximum length of a sun ray inside a cloud.

Return value

Lighting trace length, in units.

void setCloudsNoiseIterations ( float iterations ) #

Sets the value of the noise iterations parameter for clouds. This parameter determines the amount of jitter, that is used to reduce banding effect due to insufficient number of steps.

Arguments

  • float iterations - New value of the noise iterations parameter for clouds. The default value is 0.1f.

float getCloudsNoiseIterations ( ) #

Returns the current value of the noise iterations parameter for the clouds. This parameter determines the amount of jitter, that is used to reduce banding effect due to insufficient number of steps.

Return value

Current value of the noise iterations parameter for clouds. The default value is 0.1f.

void setCloudsNoiseLighting ( float lighting ) #

Sets the value of the noise lighting parameter for clouds. This parameter determines the amount of jitter for tracing steps of lighting calculation, that is used to reduce banding effect due to insufficient number of steps.

Arguments

  • float lighting - New value of the noise lighting parameter for clouds. The default value is 0.3f.

float getCloudsNoiseLighting ( ) #

Returns the current value of the noise lighting parameter for the clouds. This parameter determines the amount of jitter for tracing steps of lighting calculation, that is used to reduce banding effect due to insufficient number of steps.

Return value

Current value of the noise lighting parameter for clouds. The default value is 0.3f.

void setCloudsNoiseStep ( float step ) #

Sets the value of the noise step parameter for clouds. This parameter determines the amount of jitter in the areas within clouds, that is used to reduce banding effect due to insufficient number of steps.

Arguments

  • float step - New value of the noise step parameter for clouds. The default value is 0.3f.

float getCloudsNoiseStep ( ) #

Returns the current value of the noise step parameter for clouds. This parameter determines the amount of jitter in the areas within clouds, that is used to reduce banding effect due to insufficient number of steps.

Return value

Current value of the noise step parameter for clouds. The default value is 0.3f.

void setCloudsNoiseStepSkip ( float skip ) #

Sets the value of the noise step skip parameter for clouds. This parameter determines the amount of jitter in the areas between clouds, that is used to reduce banding effect due to insufficient number of steps.

Arguments

  • float skip - New value of the noise step skip parameter for clouds. The default value is 0.3f.

float getCloudsNoiseStepSkip ( ) #

Returns the current value of the noise step skip parameter for clouds. This parameter determines the amount of jitter in the areas between clouds, that is used to reduce banding effect due to insufficient number of steps.

Return value

Current value of the noise step skip parameter for clouds. The default value is 0.3f.

void setCloudsSamplesCount ( int count ) #

Sets the number of samples used for clouds rendering. The higher the value, the less noise in clouds rendering.

Arguments

  • int count - Number of samples:
    • 0 - low.
    • 1 - medium.
    • 2 - high (by default).
    • 3 - ultra.

int getCloudsSamplesCount ( ) #

Returns the current number of samples used for clouds rendering. The higher the value, the less noise in clouds rendering.

Return value

One of the following values:
  • 0 - low.
  • 1 - medium.
  • 2 - high (by default).
  • 3 - ultra.

void setCloudsSamplingQuality ( int quality ) #

Sets sampling quality for clouds. This parameter sets the number of noise samples that affects the cloud shape processing quality. The higher the value, the less visual artifacts.
Notice
Visual difference between low and ultra quality is not significant. Therefore, it is recommended to use low settings, when possible, to gain performance.

Arguments

  • int quality - Sampling quality:
    • 0 - low quality (higher cloud density).
    • 1 - medium quality (by default).
    • 2 - high quality.
    • 3 - ultra quality (lower density, the clouds are softer).

int getCloudsSamplingQuality ( ) #

Returns the current sampling quality set for clouds. This parameter sets the number of noise samples that affects the cloud shape processing quality. The higher the value, the less visual artifacts.

Return value

Sampling quality:
  • 0 - low quality (higher cloud density).
  • 1 - medium quality (by default).
  • 2 - high quality.
  • 3 - ultra quality (lower density, the clouds are softer).

void setCloudsShadowShafts ( int shafts ) #

Enables or disables shadow shafts for clouds.

Arguments

  • int shafts - 1 to enable shadow shafts for clouds, 0 to disable. The default value is 1.

int isCloudsShadowShafts ( ) #

Returns the value indicating if shadow shafts for clouds are enabled.

Return value

1 if shadow shafts for clouds are enabled; otherwise, 0.

void setCloudsSimplifiedDepthTest ( int test ) #

Enables or disables simplified depth test for clouds.

Arguments

  • int test - 1 to enable simplified depth test for clouds, 0 to disable. The default value is 1.

int isCloudsSimplifiedDepthTest ( ) #

Returns the value indicating if simplified depth test for clouds is enabled.

Return value

1 if simplified depth test for clouds is enabled; otherwise, 0.

void setCloudsSoftIntersection ( float intersection ) #

Sets the soft intersection distance for clouds.

Arguments

  • float intersection - Soft intersection distance (in meters) within the [0.0f; 100000.0f] range. The default value is 100.0f.

float getCloudsSoftIntersection ( ) #

Returns the current soft intersection distance for clouds.

Return value

Soft intersection distance for clouds, in meters.

void setCloudsTransparentOrder ( int order ) #

Enables or disables rendering of clouds after all transparent objects (except water).

Arguments

  • int order - 1 to enable rendering of clouds after transparent, 0 to disable. The default value is 0.

int isCloudsTransparentOrder ( ) #

Returns the value indicating if clouds are rendered after all transparent objects (except water).

Return value

1 if clouds are rendered after transparent; otherwise, 0.

void setClutterDistance ( float distance ) #

Sets the distance, at which (and farther) objects with "clutter" flag on will not be rendered.

Arguments

  • float distance - Distance, in units.

float getClutterDistance ( ) #

Returns a distance, at which (and farther) objects with "clutter" flag on will not be rendered.

Return value

Distance, in units.

void setColorBrightness ( float brightness ) #

Sets the current brightness of the scene.

Arguments

  • float brightness - Brightness. The provided value is saturated in the range [-1.0f; 1.0f].

float getColorBrightness ( ) #

Returns the current overall brightness of the scene.

Return value

Current brightness.

void setColorContrast ( float contrast ) #

Sets the current contrast of the scene.

Arguments

  • float contrast - Contrast. The provided value is saturated in the range [-1.0f; 1.0f].

float getColorContrast ( ) #

Returns the current overall contrast of the scene.

Return value

Current contrast.

void setColorGamma ( float gamma ) #

Sets the current gamma of the scene.

Arguments

  • float gamma - Gamma. The provided value is saturated in the range [0.5f; 1.5f].

float getColorGamma ( ) #

Returns the current overall gamma of the scene.

Return value

Current gamma.

void setColorSaturation ( float saturation ) #

Sets the current saturation of the scene.

Arguments

  • float saturation - Saturation. The provided value is saturated in the range [0.0f; 2.0f].

float getColorSaturation ( ) #

Returns the current overall saturation of the scene.

Return value

Current saturation.

int setColorTextureImage ( const Ptr<Image> & image ) #

Sets a new color transformation image (LUT). This function resets a LUT texture name to null if it has been previously set via setColorTextureName().
Source code (C++)
ImagePtr lut;
ImagePtr lut_0;
ImagePtr lut_1;

if (!lut) {
	lut = Image::create();
	lut_0 = Image::create("unigine_project/textures/lookup_first.dds");
	lut_1 = Image::create("unigine_project/textures/lookup_second.dds");
}

float k = sin(Game::get()->getTime() * 2.0f) * 0.5f + 0.5f;

lut->copy(lut_0,0);
lut->blend(lut_1, 0, 0, 0, 0, lut->getWidth(), lut->getHeight(), k);

Render::get()->setColorTextureImage(lut);

Arguments

  • const Ptr<Image> & image - Color transformation image.

Return value

1 if the image is set successfully; otherwise, 0.

int getColorTextureImage ( const Ptr<Image> & image ) #

Return the current color transformation image (LUT).

Arguments

  • const Ptr<Image> & image - Image to store the color transformation texture in.

Return value

1 if an image is successfully received; otherwise, 0.

void setColorTextureName ( const char * name ) #

Sets the name of a new color transformation texture (LUT).

Arguments

  • const char * name - Name of the file with the texture. If NULL (0) is passed, the texture is cleared.

const char * getColorTextureName ( ) #

Returns the name of the current color transformation texture (LUT).

Return value

Name of the current color transformation texture.

void setColorWhite ( const Math::vec4 & white ) #

Sets the current white balance of the scene.

Arguments

  • const Math::vec4 & white - White balance. The provided value is saturated in the range [vec4_epsilon;vec4_one].

Math::vec4 getColorWhite ( ) #

Returns the current white balance of the scene.

Return value

Current white balance.

void setCompositeMaterial ( const char * material ) #

Sets a custom composite material that specifies a custom shader used for the final composition of the full-screen image instead of the default one.

Arguments

  • const char * material - Composite material name.

const char * getCompositeMaterial ( ) #

Returns a name of the current composite material that specifies a custom shader used for the final composition of the full-screen image instead of the default one.

Return value

Name of the current composite material.

void setCross ( int cross ) #

Enables or disables cross flares.

Arguments

  • int cross - 1 to enable cross flares, 0 to disable.

int isCross ( ) #

Returns a value indicating if cross flares are enabled.

Return value

1 if cross flares are enabled; otherwise, 0.

void setCrossAngle ( float angle ) #

Sets the cross flares orientation angle.

Arguments

  • float angle - Angle in degrees.

float getCrossAngle ( ) #

Returns the cross flares orientation angle.

Return value

Angle between flare shafts in degrees.

void setCrossColor ( const Math::vec4 & color ) #

Sets the color of the cross flares.

Arguments

  • const Math::vec4 & color - Color of cross flares.

Math::vec4 getCrossColor ( ) #

Returns the color of the cross flares.

Return value

Color of the cross flares.

void setCrossLength ( float length ) #

Sets the length of a cross flare. Increasing this value also leads to fading of the shafts across their length.

Arguments

  • float length - Length of a cross flare relative to the screen width.

float getCrossLength ( ) #

Returns the length of a cross flare.

Return value

Length of a cross flare relative to the screen width.

void setCrossScale ( float scale ) #

Sets a multiplier for color of cross flares.

Arguments

  • float scale - Cross color scale. If a negative value is provided, 0 will be used instead.

float getCrossScale ( ) #

Returns the current multiplier for color of cross flares.

Return value

Cross color scale.

void setCrossShafts ( int shafts ) #

Sets the number of shafts in a cross flare.
  • The minimum number of shafts is 2.
  • The maximum number of shafts is 32 (high number of flares can cause FPS drop on low-performance hardware).

Arguments

  • int shafts - The number of a cross flares. The provided value is saturated in the range [2; 32].

int getCrossShafts ( ) #

Returns the number of shafts in a cross flare.
  • The minimum number of shafts is 2.
  • The maximum number of shafts is 32 (high number of flares can cause FPS drop on low-performance hardware).

Return value

Number of cross flares.

void setCrossThreshold ( float threshold ) #

Sets the brightness threshold for areas to produce flare: the higher the threshold value, the brighter the area should be to produce a flare.

Arguments

  • float threshold - Cross flares threshold.

float getCrossThreshold ( ) #

Returns the current brightness threshold for areas to produce flare.

Return value

Cross flares threshold.

void setData ( const char * data ) #

Sets user data associated with the render. This string is written directly into a *.world file. Namely, into the data child tag of the render tag, for example:
Source code (XML)
<world version="1.21">
	<render>
		<data>User data</data>
	</render>
</world>

Arguments

  • const char * data - New user data. The data can contain an XML formatted string.

const char * getData ( ) #

Returns user data associated with the render. This string is written directly into a *.world file. Namely, into the data child tag of the render tag, for example:
Source code (XML)
<world version="1.21">
	<render>
		<data>User data</data>
	</render>
</world>

Return value

User data. The data can contain an XML formatted string.

void setDebug ( int debug ) #

Enables or disables rendering of debug materials (the debug_materials material). Debug materials can be used for debugging of image generation stages. For example, you can render only SSR, or only cubemaps and so on.

Arguments

  • int debug - 1 to enable rendering of debug materials, 0 to disable it. The default value is 0.

int isDebug ( ) #

Returns the value indicating whether debug materials (the debug_materials material) are rendered or not. Debug materials can be used for debugging of image generation stages.

Return value

1 if debug materials are rendered; otherwise, 0.

void setDebugMaterials ( const char * materials ) #

Updates the list of debug materials to be rendered.
Notice
Rendering of debug materials must be enabled (see the setDebug() method).

Arguments

  • const char * materials - List of debug materials (a comma separated string, e.g., "mat_1, mat_2, ... mat_n").

const char * getDebugMaterials ( ) #

Returns the list of debug materials to be rendered as a string constant.
Notice
Rendering of debug materials must be enabled (see the setDebug() method).

Return value

List of debug materials (a comma separated string, e.g., "mat_1, mat_2, ... mat_n").

void setDecalDistance ( float distance ) #

Sets the distance, at which (and farther) decals will not be rendered.

Arguments

  • float distance - Distance in units.

float getDecalDistance ( ) #

Returns the distance, at which (and farther) decals will not be rendered.

Return value

Distance in units.

void setDecals ( int decals ) #

Enables or disables rendering of decals.

Arguments

  • int decals - 1 to enable rendering of decals, 0 to disable it. The default value is 1.

int isDecals ( ) #

Returns the value indicating if rendering of decals is enabled.

Return value

1 if rendering of decals is enabled; otherwise, 0.

void setDeferredMaterial ( const char * material ) #

Updates the list of materials that will be used on the Deferred Composite stage of rendering sequence. A debug material can be put here in order to be added to the final image.

Arguments

  • const char * material - List of composite deferred materials (a comma separated string, e.g., "mat_1, mat_2, ... mat_n").

const char * getDeferredMaterial ( ) #

Returns the list of materials that are used on the Deferred Composite stage of rendering sequence.

Return value

List of deferred materials (a comma separated string, e.g., "mat_1, mat_2, ... mat_n").

void setDirtScale ( float scale ) #

Sets the scale of lens dirt effect modulating the pattern of lens flares. For example, it can be used to create an effect of unclean optics when the camera looks at the sun.

Arguments

  • float scale - Dirt scale value within the [0.0f; 1.0f] range. The default value is 0.5f.

float getDirtScale ( ) #

Returns the scale of lens dirt effect modulating the pattern of lens flares.

Return value

Dirt scale value within the [0.0f; 1.0f] range.

void setDirtTextureName ( const char * name ) #

Sets the texture that modulates the pattern of lens flares. For example, it can be used to create an effect of unclean optics when the camera looks at the sun.

Arguments

  • const char * name - Name of the lens flares modulation texture.

const char * getDirtTextureName ( ) #

Returns the name of the current texture that modulates the pattern of lens flares. For example, it can be used to create an effect of light reflections or unclean optics when the camera looks at the sun.

Return value

Name of the lens flares modulation texture.

void setDistanceScale ( float scale ) #

Sets the global distance scale for all distance parameters: shadow distance, light distance, LOD distances, etc.

Arguments

  • float scale - Global distance scale.

float getDistanceScale ( ) #

Returns the current global distance scale for all distance parameters: shadow distance, world lights shadows, LOD distances, etc.

Return value

Global distance scale.

void setDOF ( int dof ) #

Enables or disables the DOF (Depth Of Field) effect.

Arguments

  • int dof - 1 to enable the DOF effect, 0 to disable it. The default value is 0.

int isDOF ( ) #

Returns the value indicating if the DOF (Depth Of Field) effect is enabled.

Return value

1 if the DOF effect is enabled; otherwise, 0.

void setDOFBlur ( float blur ) #

Sets the intensity of blur for the DOF (Depth Of Field) effect.

Arguments

  • float blur - DOF blur intensity value. The default value is 1.0f.

float getDOFBlur ( ) #

Returns the intensity of blur for the DOF (Depth Of Field) effect.

Return value

DoF blur intensity value.

void setDOFBokehMode ( int mode ) #

Sets the shape of the Bokeh for the DOF effect. This parameter determines the way the lens renders out-of-focus points of light.
Notice
For the DOF effect, the Bokeh effect is enabled by default.

Arguments

  • int mode - The Bokeh shape:
    • 0 - ring (by default).
    • 1 - circle.

int getDOFBokehMode ( ) #

Returns the current shape of the Bokeh for the DOF effect. This parameter determines the way the lens renders out-of-focus points of light.
Notice
For the DOF effect, the Bokeh effect is enabled by default.

Return value

The Bokeh shape:
  • 0 - ring (by default).
  • 1 - circle.

void setDOFChromaticAberration ( float aberration ) #

Sets the intensity of chromatic aberration for the DOF (Depth Of Field) effect.

Arguments

  • float aberration - DOF chromatic aberration intensity value. The default value is 0.0f.

float getDOFChromaticAberration ( ) #

Returns the intensity of chromatic aberration for the DOF (Depth Of Field) effect.

Return value

DOF chromatic aberration intensity value.

void setDOFFarDistance ( float distance ) #

Sets the far DOF limit of the camera: the distance between the camera and the furthest element that is considered to be acceptably sharp. Black zone on the DOF mask means in-focus zone.

Arguments

  • float distance - Far DOF limit value in units.

float getDOFFarDistance ( ) #

Returns the far DOF limit of the camera: the distance between the camera and the furthest element that is considered to be acceptably sharp. Black zone on the DOF mask means in-focus zone.

Return value

Far DOF limit value in units.

void setDOFFarFocalOffset ( float offset ) #

Sets the offset from the focal to the farthest blurred zone for the DOF effect. In other words, the distance when background (far) is in focus.

Arguments

  • float offset - Far DOF focal offset value in units.

float getDOFFarFocalOffset ( ) #

Returns the offset from the focal to the farthest blurred zone. In other words, the distance when background (far) is in focus.

Return value

Far DOF focal offset value in units.

void setDOFFocalDistance ( float distance ) #

Sets the focal distance of the camera, i.e. a point where objects are in-focus and visible clearly.

Arguments

  • float distance - Focal distance in units. If a negative value is provided, 0 will be used instead.

float getDOFFocalDistance ( ) #

Returns the focal distance of the camera, i.e. a point where objects are in-focus and visible clearly.

Return value

Focal distance in units.

void setDOFFocusImprovement ( int improvement ) #

Enables or disables focus improvement for the DOF (Depth Of Field) effect. When enabled, transitions between the focused and unfocused parts of the scene become more accurate.

Arguments

  • int improvement - 1 to enable focus improvement for the DOF effect, 0 to disable it. The default value is 0.

int isDOFFocusImprovement ( ) #

Returns a value indicating if the focus improvement option is enabled for the DOF (Depth Of Field) effect. When enabled, transitions between the focused and unfocused parts of the scene become more accurate.

Return value

1 if focus improvement is enabled for the DOF effect; otherwise, 0.

void setDOFIncreasedAccuracy ( int accuracy ) #

Enables or disables increased accuracy for the DOF (Depth Of Field) effect. Enabling the parameter allows for increasing accuracy of focusing calculation.

Arguments

  • int accuracy - 1 to enable increased accuracy for the DOF effect, 0 to disable it. The default value is 0.

int isDOFIncreasedAccuracy ( ) #

Returns a value indicating if the increased accuracy option is enabled for the DOF (Depth Of Field) effect. When enabled, focusing calculation is performed with increased accuracy.

Return value

1 if increased accuracy is enabled for the DOF effect; otherwise, 0.

void setDOFNearDistance ( float distance ) #

Sets the near DOF limit of the camera: the distance between the camera and the first element that is considered to be acceptably sharp. Black zone on the DOF mask means in-focus zone.

Arguments

  • float distance - Near DOF limit value in units.

float getDOFNearDistance ( ) #

Returns the near DOF limit of the camera: the distance between the camera and the first element that is considered to be acceptably sharp. Black zone on the DOF mask means in-focus zone.

Return value

Near DOF limit value in units.

void setDOFNearFocalOffset ( float offset ) #

Sets the offset from the focal to the nearest blurred zone. In other words, the distance when foreground (far) is in focus.

Arguments

  • float offset - Near DOF focal offset value in units.

float getDOFNearFocalOffset ( ) #

Returns the offset from the focal to the nearest blurred zone. In other words, the distance when foreground (far) is in focus.

Return value

Near DOF focal offset value in units.

void setDOFQuality ( int quality ) #

Sets the quality of the DOF (Depth Of Field) effect.

Arguments

  • int quality - The value indicating quality of the DOF effect:
    • 0 - low quality.
    • 1 - medium quality (by default).
    • 2 - high quality.
    • 3 - ultra quality.

int getDOFQuality ( ) #

Returns the value indicating the quality of the DOF (Depth Of Field) effect.

Return value

The value indicating quality of the DOF effect:
  • 0 - low quality.
  • 1 - medium quality (by default).
  • 2 - high quality.
  • 3 - ultra quality.

void setDOFResolution ( int resolution ) #

Sets the resolution of the DOF (Depth Of Field) effect.

Arguments

  • int resolution - Resolution of the DOF effect:
    • 0 - quarter resolution.
    • 1 - half resolution.
    • 2 - full resolution (by default).

int getDOFResolution ( ) #

Returns the resolution of the DOF (Depth Of Field) effect.

Return value

Resolution of the DOF effect:
  • 0 - quarter resolution.
  • 1 - half resolution.
  • 2 - full resolution (by default).

void setEnabled ( int arg1 ) #

Enables or disables the render.

Arguments

  • int arg1 - 1 to enable the render, 0 to disable it.

int isEnabled ( ) #

Returns a value indicating if the render is enabled.

Return value

1 if the render is enabled; otherwise, 0.

void setEnvironment ( int environment ) #

Enables or disables rendering of environment of the scene.
Notice
To enable/disable environment rendering, use also render_environmentconsole command.

Arguments

  • int environment - 1 to enable rendering of environment, 0 to disable it. The default value is 1.

int isEnvironment ( ) #

Returns the value indicating if rendering of environment of the scene is enabled.
Notice
To check if environment rendering is enabled, use also render_environmentconsole variable.

Return value

1 rendering of environment is enabled; otherwise, 0.

void setEnvironmentCubemapBlendMode ( int mode ) #

Sets the environment cubemap blending mode.

Arguments

  • int mode - Cubemap blending mode:
    • 0 - alpha blend (by default).
    • 1 - additive blend.
    • 2 - multiply.
    • 3 - overlay.

int getEnvironmentCubemapBlendMode ( ) #

Returns the current environment cubemap blending mode.

Return value

Cubemap blending mode:
  • 0 - alpha blend (by default).
  • 1 - additive blend.
  • 2 - multiply.
  • 3 - overlay.

void setEnvironmentHazeMode ( int mode ) #

Sets the mode for the haze effect.
Notice
To set the haze mode via console, use the render_environment_hazeconsole command.

Arguments

  • int mode - Haze mode: one of the HAZE_* variables.

int getEnvironmentHazeMode ( ) #

Returns the current mode set for the haze effect.
Notice
To check the haze mode via console, use the render_environment_hazeconsole variable.

Return value

Haze mode: one of the HAZE_* variables.

void setExposure ( float exposure ) #

Sets the camera exposure (a multiplier of the scene luminance and brightness). It determines the resulting amount of luminance:
  • By the minimum value of 0.0f, the image is rendered black.
  • The higher the value, the more luminance and the brighter the scene lit.

Arguments

  • float exposure - Multiplier of the scene luminance and brightness.

float getExposure ( ) #

Returns the current camera exposure (a multiplier of the scene luminance and brightness.). It determines the resulting amount of luminance:
  • By the minimum value of 0.0f, the image is rendered black.
  • The higher the value, the more luminance and the brighter the scene lit.

Return value

Current multiplier of the scene luminance and brightness.

void setExposureAdaptation ( float adaptation ) #

Sets the time for the camera to adjust exposure. If 0.0f is set, instant adaptation will be used.

Arguments

  • float adaptation - Period of exposure adaptation in seconds. If a too small or even negative value is provided, 1E-6 will be used instead.

float getExposureAdaptation ( ) #

Returns the current the time set for the camera to adjust exposure. If the 0.0f is returned, it means that instant adaptation is used.

Return value

Period of exposure adaptation in seconds.

float getExposureInterpolation ( ) #

Returns the current exposure interpolation (the engine ifps multiplied by the exposure adaptation speed). The method can be used for automatic exposure adaptation.

Return value

Exposure interpolation.

void setExposureMaxLuminance ( float luminance ) #

Sets the maximum luminance offset relative to the default luminance of the scene used for rendering of adaptive exposure effect: the lower the value, the brighter the adapted image will be. The parameter can take on negative values.
Notice
If the specified value is less than the current minimum luminance, the minimum luminance value will be changed to the specified maximum luminance so that they are equal.

Arguments

  • float luminance - Maximum luminance. The provided value is saturated in the range [-10.0f; 10.0f].

float getExposureMaxLuminance ( ) #

Returns the maximum luminance offset relative to the default luminance of the scene used for rendering of adaptive exposure effect: the lower the value, the brighter the adapted image is.

Return value

Maximum luminance.

void setExposureMinLuminance ( float luminance ) #

Sets the minimum luminance offset relative to the default luminance of the scene used for rendering of adaptive exposure effect: the higher the value, the darker the adapted image will be. The parameter can take on negative values.
Notice
If the specified value is greater than the current maximum luminance, the maximum luminance value will be changed to the specified minimum luminance so that they are equal.

Arguments

  • float luminance - Minimum luminance. The provided value is clamped to the range [-10.0f; 10.0f].

float getExposureMinLuminance ( ) #

Returns the minimum luminance offset relative to the default luminance of the scene used for rendering of adaptive exposure effect: the higher the value, the darker the adapted image is.

Return value

Minimum luminance.

void setExposureMode ( int mode ) #

Sets the mode of the adaptive exposure effect.

Arguments

  • int mode - The value indicating the exposure mode:
    • 0 - a static exposure. The amount of luminance is determined by the setExposure().
    • 1 - adaptive logarithmic mapping technique.
    • 2 - adaptive quadratic mapping technique.

int getExposureMode ( ) #

Returns current adaptive exposure mode:
  • 0 - a static exposure. The amount of luminance is determined by the setExposure().
  • 1 - adaptive logarithmic mapping technique.
  • 2 - adaptive quadratic mapping technique.

Return value

The type of the exposure mode.

void setFadeColor ( const Math::vec4 & color ) #

Sets the current fade color for the scene on the screen. By gradually changing this value it is possible to create "fade in" and "fade out" effects depending on the w component of the given vector. For example, when the following vectors are passed the result will be:
  • vec4(1,1,1,1) - a fully white screen. Positive w results in additive blending.
  • vec4(0.5,0.5,0.5,1) - light colors on the screen.
  • vec4(1,0,0,1) - R channel for all screen colors is to its maximum; G and B without changes.
  • vec4(0,0,0,0) - there is no fading (no color alterations are done to the screen).
  • vec4(1,1,1,-1) - a fully black screen. Negative w results in scene colors * (1 - RGB), where RGB is the first three components of the passed vector.
  • vec4(0.5,0.5,0.5,-1) - dark colors on the screen.

Arguments

  • const Math::vec4 & color - Fade color for the scene on the screen. The provided vector represents RGB channel values (first three components) and a fading coefficient (w component). All components are saturated in the range [-1; 1].

Math::vec4 getFadeColor ( ) #

Returns the current fade color of the scene.

Return value

The current fade color.

void setFieldDistance ( float distance ) #

Sets the distance, at which (and farther) Field nodes will not be rendered.

Arguments

  • float distance - Distance in units.

float getFieldDistance ( ) #

Returns the distance, at which (and farther) Field nodes will not be rendered.

Return value

Distance in units.

void setFieldHeightResolution ( int resolution ) #

Sets the resolution of the FieldHeight.

Arguments

  • int resolution - One of the following values:
    • 0 - 128 x 128.
    • 1 - 256 x 256.
    • 2 - 512 x 512 (by default).
    • 3 - 1024 x 1024.
    • 4 - 2048 x 2048.
    • 5 - 4096 x 4096.
    • 6 - 8192 x 8192.

int getFieldHeightResolution ( ) #

Returns the value indicating the resolution of the FieldHeight.

Return value

One of the following values:
  • 0 - 128 x 128.
  • 1 - 256 x 256.
  • 2 - 512 x 512 (by default).
  • 3 - 1024 x 1024.
  • 4 - 2048 x 2048.
  • 5 - 4096 x 4096.
  • 6 - 8192 x 8192.

void setFieldPrecision ( int precision ) #

Sets the precision of textures used for field objects.

Arguments

  • int precision - Textures' precision:
    • 0 - 16-bit precision R16 texture (by default).
    • 1 - 32-bit precision R32F texture.

int isFieldPrecision ( ) #

Returns the value indicating the current precision of textures used for field objects.

Return value

Textures' precision:
  • 0 - 16-bit precision R16 texture (by default).
  • 1 - 32-bit precision R32F texture.

void setFieldShorelineResolution ( int resolution ) #

Set resolution of the texture into which all textures set for all FieldShoreline objects are rendered.

Arguments

  • int resolution - General FieldShoreline texture resolution:
    • 0 - 128 x 128 (by default).
    • 1 - 256 x 256.
    • 2 - 512 x 512.
    • 3 - 1024 x 1024.
    • 4 - 2048 x 2048.
    • 5 - 4096 x 4096.
    • 6 - 8192 x 8192.

int getFieldShorelineResolution ( ) #

Returns resolution of the texture into which all textures set for all FieldShoreline objects are rendered.

Return value

General FieldShoreline texture resolution:
  • 0 - 128 x 128 (by default).
  • 1 - 256 x 256.
  • 2 - 512 x 512.
  • 3 - 1024 x 1024.
  • 4 - 2048 x 2048.
  • 5 - 4096 x 4096.
  • 6 - 8192 x 8192.

void setFilmic ( int filmic ) #

Enables or disables the filmic tonemapping effect.

Arguments

  • int filmic - 1 to enable the filmic tonemapping effect, 0 to disable it. The default value is 1.

int isFilmic ( ) #

Returns a value indicating if the filmic tonemapping effect is enabled.

Return value

1 if the filmic tonemapping effect is enabled; otherwise, 0.

void setFilmicLinearAngle ( float angle ) #

Sets the Linear Angle filmic tonemapping parameter value. This parameter controls the slope of the linear part of the tone mapping curve.

Arguments

  • float angle - Linear Angle value.

float getFilmicLinearAngle ( ) #

Returns the current Linear Angle filmic tone mapping parameter value. This parameter controls the slope of the linear part of the tone mapping curve.

Return value

Linear Angle value.

void setFilmicLinearScale ( float scale ) #

Sets the Linear Strength filmic tonemapping parameter value that is used to change gray values. The Linear Scale controls the length of the tone mapping curve linear part.

Arguments

  • float scale - Linear Strength value.

float getFilmicLinearScale ( ) #

Returns the current Linear Strength filmic tone mapping parameter value that is used to change gray values. The Linear Scale controls the length of the tone mapping curve linear part.

Return value

Linear Strength value.

void setFilmicShoulderScale ( float scale ) #

Sets the Shoulder Strength filmic tonemapping parameter value that is used to change bright values.

Arguments

  • float scale - Shoulder Strength value.

float getFilmicShoulderScale ( ) #

Returns the current Shoulder Strength filmic tonemapping parameter value that is used to change bright values.

Return value

Shoulder Strength value.

void setFilmicToeDenominator ( float denominator ) #

Sets the Toe Denominator filmic tonemapping parameter value.

Arguments

  • float denominator - Toe Denominator value.

float getFilmicToeDenominator ( ) #

Returns the current Toe Denominator filmic tonemapping parameter value.

Return value

Toe Denominator value.

void setFilmicToeNumerator ( float numerator ) #

Sets the Toe Numerator filmic tonemapping parameter value.

Arguments

  • float numerator - Toe Numerator value.

float getFilmicToeNumerator ( ) #

Sets the Toe Numerator filmic tonemapping parameter value.

Return value

Toe Numerator value.

void setFilmicToeScale ( float scale ) #

Sets the Toe Scale filmic tonemapping parameter value that is used to change dark values. The Toe Scale controls the slope of the tone mapping curve toe (the area of underexposure).

Arguments

  • float scale - Toe scale value.

float getFilmicToeScale ( ) #

Returns the current Toe Scale filmic tonemapping parameter value that is used to change dark values. The Toe Scale controls the slope of the tone mapping curve toe (the area of underexposure).

Return value

Toe scale value.

void setFilmicWhiteLevel ( float level ) #

Sets the Linear White Point filmic tonemapping parameter value, which is mapped as pure white in the resulted image.

Arguments

  • float level - Linear White Point value.

float getFilmicWhiteLevel ( ) #

Returns the current Linear White Point filmic tonemapping parameter value.

Return value

Linear White Point value.

void setFilmicSaturationRecovery ( float recovery ) #

Sets the color saturation recovery value for the filmic tonemapper.

Arguments

  • float recovery - Color saturation recovery value to be set, in the [0.0f, 1.0f] range. The default value is 0.75f.
    • 0.0f - standard filmic tonemapping, no saturation recovery is performed.
    • 1.0f - color saturation is recovered to the full extent.
    Notice
    When the 1.0f value is set specular highlights appear too saturated, so the recommended value is 0.75f

float getFilmicSaturationRecovery ( ) #

Returns the current color saturation recovery value value for the filmic tonemapper.

Return value

Current color saturation recovery value in the [0.0f, 1.0f] range. The default value is 0.75f.
  • 0.0f - standard filmic tonemapping, no saturation recovery is performed.
  • 1.0f - color saturation is recovered to the full extent.
Notice
When the 1.0f value is set specular highlights appear too saturated, so the recommended value is 0.75f

void setFirstFrame ( int frame ) #

Sets a value indicating if the first frame should be enabled over the current frame.

Arguments

  • int frame - 1 to enable the first frame flag, 0 - to disable.

int isFirstFrame ( ) #

Returns a value indicating if the first frame is enabled over the current frame.

Return value

1 if the first frame flag is enabled; otherwise, 0.

int isFlipped ( ) #

Checks render orientation.
Source code (C++)
TexturePtr texture;
TexturePtr texture_2;
float uv_x, uv_y;
//...					
float flip_sign = (Render::get()->isFlipped() ? -1.0f : 1.0f);
float translate_x = 2.0f * uv_x - 1.0f;
float translate_y = flip_sign * (2.0f * uv_y - 1.0f);
float scale_x = texture->getWidth() / texture_2->getWidth();
float scale_y = texture->getHeight() / texture_2->getHeight();

Math::mat4 transform = Math::translate(translate_x, translate_y, 0.0f) * Math::scale(scale_x, scale_y, 1.0f);

Return value

1 if the render is flipped; otherwise, 0.

void setFXAAIntensity ( float intensity ) #

Sets the intensity of the FXAA. Intensity specifies the sample offset of FXAA fragment. The higher the value, the more blurred image will be.

Arguments

  • float intensity - Intensity value of the FXAA to be set.

float getFXAAIntensity ( ) #

Returns the intensity value of the FXAA. Intensity specifies the sample offset of FXAA fragment.

Return value

Intensity value of the FXAA

void setGbufferLightmap ( int lightmap ) #

Enables or disables storing lightmap data in the GBuffer.
Notice
The feature can be enabled/disabled by using the render_gbuffer_lightmapconsole command.

Arguments

  • int lightmap - 1 to enable storing lightmap data in the GBuffer, 0 to disable it. The default value is 1.

int isGbufferLightmap ( ) #

Returns a value indicating if lightmap data is stored in the GBuffer.
Notice
To check if the feature is enabled, use the render_gbuffer_lightmapconsole variable.

Return value

1 if lightmap data is stored in the GBuffer; otherwise, 0.

int getGPUMemory ( ) #

Returns an amount of memory provided by the current GPU.

Return value

Amount of memory in Mbytes.

int getGPUName ( ) #

Returns the name of the current GPU.

Return value

GPU name flag.

Ptr<Texture> getGray2DArrayTexture ( ) #

Returns gray 2D array texture.

Return value

Gray 2D array texture.

Ptr<Texture> getGray2DTexture ( ) #

Returns gray 2D texture.

Return value

Gray 2D texture.

Ptr<Texture> getGray3DTexture ( ) #

Returns gray 3D texture.

Return value

Gray 3D texture.

Ptr<Texture> getGrayCubeTexture ( ) #

Returns gray Cube texture.

Return value

Gray Cube texture.

void setLens ( int lens ) #

Enables or disables lens flares.

Arguments

  • int lens - Positive integer to enable lens flares, 0 to disable.

int isLens ( ) #

Returns a value indicating if lens flares are enabled.

Return value

Positive integer if lens flares are enabled; otherwise, 0.

void setLensColor ( const Math::vec4 & color ) #

Sets the color of a lens flares.

Arguments

  • const Math::vec4 & color - Color of lens flares.

Math::vec4 getLensColor ( ) #

Returns the color of a lens flare.

Return value

Color of a lens flare.

void setLensDispersion ( const Math::vec3 & dispersion ) #

Sets the color displacement for red, green, and blue channels of the lens flares. Can be used to create light dispersion (chromatic aberrations).

Arguments

  • const Math::vec3 & dispersion - Lens dispersion displacement per channel. If a negative value is set for a channel, 0 will be used instead.

Math::vec3 getLensDispersion ( ) #

Returns the current color displacement for red, green and blue channels of the lens flares. Can be used to create light dispersion (chromatic aberrations).

Return value

Lens dispersion displacement per channel.

void setLensLength ( float length ) #

Sets a length indicating if the whole radial lens flare is rendered on the screen or only a part of it. This option controls how lens flares pattern is distributed.

Arguments

  • float length - Length of the radial lens flare. The provided value is saturated in the range [0.0f; 1.0f].

float getLensLength ( ) #

Returns the current length indicating if the whole radial lens flare is rendered on the screen or only a part of it. This option controls how lens flares pattern is distributed.

Return value

Length of the lens flare.

void setLensRadius ( float radius ) #

Sets a radius of the spherical lens flares on the screen.

Arguments

  • float radius - Radius of the spherical lens flares. The provided value is saturated in the range [0.0f; 1.0f], where 1.0f is a screen-wide radius (a lens flare is not visible).

float getLensRadius ( ) #

Returns the current radius of the spherical lens flares on the screen.

Return value

Radius of the spherical lens flares.

void setLensScale ( float scale ) #

Sets the multiplier for color of HDR lens flares.

Arguments

  • float scale - Lens color scale. If a negative value is provided, 0.0f will be used instead.

float getLensScale ( ) #

Returns the current multiplier for color of HDR lens flares.

Return value

Lens color scale.

void setLensThreshold ( float threshold ) #

Sets the brightness threshold for lens flares.

Arguments

  • float threshold - Lens flares threshold.

float getLensThreshold ( ) #

Returns the current brightness threshold for lens flares.

Return value

Lens flares threshold.

void setLightDistance ( float distance ) #

Sets the distance, at which (and farther) dynamic lights will not be rendered.

Arguments

  • float distance - Distance in units.

float getLightDistance ( ) #

Returns the distance, at which (and farther) dynamic lights will not be rendered.

Return value

Distance in units.

void setLightsForwardPerObjectEnv ( int env ) #

Sets the maximum number of environment probes per object (available only for materials rendered in the forward rendering pass). You should set the nonzero value to increase performance: it is recommended to use not more than 4 environment probes per object.
Notice
To set the value via the Console, use the render_lights_forward_per_object_envconsole command.

Arguments

  • int env - Maximum number of environment probes per object within the [0; 128] range. The default value is 4.

int getLightsForwardPerObjectEnv ( ) #

Returns the current maximum number of environment probes per object (available only for materials rendered in the forward rendering pass).
Notice
To get the value via the Console, use the render_lights_forward_per_object_envconsole variable.

Return value

Maximum number of environment probes per object within the [0; 128] range.

void setLightsForwardPerObjectOmni ( int omni ) #

Sets the maximum number of omni lights per object (available only for materials rendered in the forward rendering pass). You should set the nonzero value to increase performance: it is recommended to use not more than 4 omni lights per object.
Notice
To set the value via the console, use the render_lights_forward_per_object_omniconsole command.

Arguments

  • int omni - Maximum number of omni lights per object within the [0; 128] range. The default value is 4.

int getLightsForwardPerObjectOmni ( ) #

Returns the current maximum number of omni lights per object (available only for materials rendered in the forward rendering pass).
Notice
To get the value via the console, use the render_lights_forward_per_object_omniconsole variable.

Return value

Maximum number of omni lights per object within the [0; 128] range.

void setLightsForwardPerObjectProj ( int proj ) #

Sets the maximum number of projected lights per object (available only for materials rendered in the forward rendering pass). You should set the nonzero value to increase performance: it is recommended to use not more than 4 projected lights per object.
Notice
To set the value via the console, use the render_lights_forward_per_object_projconsole command.

Arguments

  • int proj - Maximum number of projected lights per object within the [0; 128] range. The default value is 4.

int getLightsForwardPerObjectProj ( ) #

Returns the current maximum number of projected lights per object (available only for materials rendered in the forward rendering pass).
Notice
To get the value via the console, use the render_lights_forward_per_object_projconsole variable.

Return value

Maximum number of projected lights per object within the [0; 128] range.

void setLightsForwardPerObjectVoxel ( int voxel ) #

Sets the maximum number of voxel probes per object (available only for materials rendered in the forward rendering pass). You should set the nonzero value to increase performance: it is recommended to use not more than 4 projected lights per object.
Notice
To set the value via the console, use the render_lights_forward_per_object_voxelconsole command.

Arguments

  • int voxel - Maximum number of voxel probes per object within the [0; 128] range.

int getLightsForwardPerObjectVoxel ( ) #

Returns the current maximum number of voxel probes per object (available only for materials rendered in the forward rendering pass).
Notice
To get the value via the console, use the render_lights_forward_per_object_voxelconsole variable.

Return value

Maximum number of voxel probes per object within the [0; 128] range.

void setLightsForwardPerObjectWorld ( int world ) #

Sets the maximum number of world lights per object (available only for materials rendered in the forward rendering pass). You should set the nonzero value to increase performance: it is recommended to use not more than 4 world lights per object.
Notice
To set the value via the console, use the render_lights_forward_per_object_worldconsole command.

Arguments

  • int world - Maximum number of world lights per object within the [0; 128] range. The default value is 4.

int getLightsForwardPerObjectWorld ( ) #

Returns the current maximum number of world lights per object (available only for materials rendered in the forward rendering pass).
Notice
To get the value via the console, use the render_lights_forward_per_object_worldconsole variable.

Return value

Maximum number of world lights per object within the [0; 128] range.

void setLightsInterleaved ( int interleaved ) #

Sets a value indicating if interleaved mode for rendering lights during the deferred pass is enabled. When enabled, lights are rendered in half resolution with subsequent reconstruction of neighboring pixels using the data from previous frames. This mode requires a high framerate (60+ FPS), otherwise anti-aliasing quality reduces and ghosting effect becomes more pronounced. Recommended for relatively static scenes which contain a lot of light sources and do not have a lot of reflective surfaces (in case of small number of light sources may reduce performance).
Notice
To enable/disable this feature via the Console, use the render_lights_interleavedconsole command.

Arguments

  • int interleaved - 1 to enable interleaved lights rendering mode, 0 to disable it.

int isLightsInterleaved ( ) #

Returns a value indicating if interleaved mode for rendering lights during the deferred pass is enabled.

Return value

1 if interleaved lights rendering mode is enabled; otherwise, 0.

void setLightsInterleavedCatmullResampling ( int resampling ) #

Sets a value indicating if the Catmull-Rom resampling for interleaved lights rendering mode is enabled. This mode allows you to reduce image blurring when the camera moves forward/backward.

Arguments

  • int resampling - 1 to enable the Catmull-Rom resampling for interleaved lights rendering mode, 0 to disable it.

int isLightsInterleavedCatmullResampling ( ) #

Returns a value indicating if the Catmull-Rom resampling for interleaved lights rendering mode is enabled.

Return value

1 if the Catmull-Rom resampling for interleaved lights rendering mode is enabled; otherwise, 0.

void setLightsInterleavedColorClamping ( int clamping ) #

Sets the color clamping mode to be used for interleaved lights rendering mode. This mode is used to reduce ghosting effect: higher values increase clamping intensity but may cause flickering on rippled reflective surfaces (as this mode is not so good at object's edges). When disabled, shadows and reflections have a lag as they are several frames behind.

Arguments

  • int clamping - Color clamping mode to be used, one of the following values:
    • 0 - color clamping is disabled
    • 1 - low clamping
    • 2 - medium clamping
    • 3 - high clamping

int getLightsInterleavedColorClamping ( ) #

Returns the current color clamping mode used for interleaved lights rendering mode.

Return value

Current color clamping mode, one of the following values:
  • 0 - color clamping is disabled
  • 1 - low clamping
  • 2 - medium clamping
  • 3 - high clamping

void setLightsLensFlares ( int flares ) #

Enables or disables rendering of per-light lens flares.
Notice
To set the value via the console, use the render_lights_lens_flaresconsole command.

Arguments

  • int flares - 1 to enable rendering of per-light lens flares, 0 to disable it. The default value is 1.

int isLightsLensFlares ( ) #

Returns the value indicating if rendering of per-light lens flares is enabled.
Notice
To get the value via the console, use the render_lights_lens_flaresconsole variable.

Return value

1 if rendering of per-light lens flares is enabled; otherwise, 0.

void setLightsMaxPerBatch ( int batch ) #

Sets the maximum number of lights rendered by a tile per batch call. With lights batching optimization, omni lights divided into tiles are rendered in batches: each tile renders the specified number of lights per batch. It allows decreasing the number of DIP calls and increasing performance. The optimization works only for omni lights with point shape and without shadows.
Notice
To set the value via the console, use the render_lights_max_per_batchconsole command.

Arguments

  • int batch - Maximum number of lights per batch within the [0; 1024] range. The default value is 1024.
    Notice
    0 disables batching optimization.

int getLightsMaxPerBatch ( ) #

Returns the current maximum number of lights rendered by a tile per batch call. With lights batching optimization, omni lights divided into tiles are rendered in batches: each tile renders the specified number of lights per batch. It allows decreasing the number of DIP calls and increasing performance. The optimization works only for omni lights with point shape and without shadows.
Notice
To get the value via the console, use the render_lights_max_per_batchconsole variable.

Return value

Maximum number of lights per batch within the [0; 1024] range.
Notice
0 means batching optimization is disabled.

void setLightsTileGridSize ( int size ) #

Sets the number of grid tiles per axis for tiled rendering optimization. During this optimization, the screen space is divided into tiles that render lights in batches. The optimization works only for omni lights with point shape and without shadows.
Notice
To set the value via the console, use the render_lights_tile_grid_sizeconsole command.

Arguments

  • int size - Number of grid tiles per axis within the [1; 32] range. The default value is 8.

int getLightsTileGridSize ( ) #

Returns the current number of grid tiles per axis for tiled rendering optimization. During this optimization, the screen space is divided into tiles that render lights in batches. The optimization works only for omni lights with point shape and without shadows.
Notice
To get the value via the console, use the render_lights_tile_grid_sizeconsole variable.

Return value

Number of grid tiles per axis within the [1; 32] range.

int getMaxFieldAnimations ( ) #

Returns the maximum limit of FieldAnimation nodes allowed to be used in shaders.

Return value

Maximum number of FieldAnimation nodes allowed.
Notice
Higher values will affect shader compilation time and performance

int getMaxFieldHeights ( ) #

Returns the maximum limit of FieldHeight nodes allowed to be used in shaders.

Return value

Maximum number of FieldHeight nodes allowed.
Notice
Higher values will affect shader compilation time and performance

int getMaxFieldShorelines ( ) #

Returns the maximum limit of FieldShoreline nodes allowed to be used in shaders.

Return value

Maximum number of FieldShoreline nodes allowed.
Notice
Higher values will affect shader compilation time and performance

int getMaxFieldSpacers ( ) #

Returns the maximum limit of FieldSpacer nodes allowed to be used in shaders.

Return value

Maximum number of FieldSpacer nodes allowed.
Notice
Higher values will affect shader compilation time and performance

void setMotionBlur ( int blur ) #

Enables or disables the motion blur effect.

Arguments

  • int blur - 1 to enable the motion blur effect, 0 to disable it. The default value is 1.

int isMotionBlur ( ) #

Returns a value indicating if the motion blur effect is enabled.

Return value

1 if the motion blur effect is enabled; otherwise, 0.

void setMotionBlurCameraVelocity ( int velocity ) #

Sets a value indicating if camera velocity contributes to the motion blur effect.

Arguments

  • int velocity - 1 to take camera velocity into account in the motion blur effect; 0 to take into account velocities of objects only.

int isMotionBlurCameraVelocity ( ) #

Returns a value indicating if camera velocity contributes to the motion blur effect.

Return value

1 camera velocity contributes to the motion blur effect; 0 only velocities of objects are taken into account in the motion blur effect.

void setMotionBlurMaxVelocity ( float velocity ) #

Sets the maximum possible amount of motion blur for moving physical objects. When their body velocity exceeds the set value, they will be blurred as if they have the maximum velocity set by the parameter. This parameter should be used:
  • To avoid excessive blurring of fast moving objects.
  • To save performance, as increasing the object's velocity leads increasing the radius of the motion blur effect that drops performance at too high values.

Arguments

  • float velocity - Maximum scaled velocity of moving physical bodies used for the motion blur effect.

float getMotionBlurMaxVelocity ( ) #

Returns the current maximum possible amount of motion blur for moving physical objects.

Return value

Maximum scaled velocity of moving physical bodies used for the motion blur effect.

void setMotionBlurNeatSilhouettes ( int silhouettes ) #

Enables or disables the neat silhouettes option for motion blur. This option keeps contours of objects in front of the camera unblurred.

Arguments

  • int silhouettes - 1 to enable the neat silhouettes option for motion blur, 0 to disable it. The default value is 1.

int isMotionBlurNeatSilhouettes ( ) #

Returns a value indicating if neat silhouettes option for motion blur is enabled. This option keeps contours of objects in front of the camera unblurred.

Return value

1 if the neat silhouettes option is enabled; otherwise, 0.

void setMotionBlurNoiseIntensity ( float intensity ) #

Sets the intensity of the noise used in the motion blur.

Arguments

  • float intensity - Noise intensity value within the [0.0f; 1.0f] range. The default value is 0.25f.

float getMotionBlurNoiseIntensity ( ) #

Returns the current intensity of the noise used in the motion blur.

Return value

Noise intensity.

void setMotionBlurNumSteps ( int steps ) #

Sets the number of steps used in the motion blur. The higher the value, the more correct the motion blur effect is. At low values, moving objects may look doubled, however, performance will increase.

Arguments

  • int steps - Number of steps in range [2;64]. The default value is 4.

int getMotionBlurNumSteps ( ) #

Returns the current number of steps used in the motion blur. The higher the value, the more correct the motion blur effect is. At low values, moving objects may look doubled, however, performance will increase.

Return value

Number of steps.

void setMotionBlurVelocityScale ( float scale ) #

Sets amount of motion blur for moving physical bodies. The higher the value, the more blurred the objects will appear when moving.

Arguments

  • float scale - Scale of bodies' linear and angular velocities used for the motion blur. If a negative value is provided, 0 will be used instead.

float getMotionBlurVelocityScale ( ) #

Returns the current amount of motion blur for moving physical bodies. The higher the value, the more blurred the objects will appear when moving.

Return value

Scale of bodies' linear and angular velocities used for the motion blur.

int getNumDecals ( ) #

Returns the number of rendered per frame decals that can be currently seen in the viewport (during all of the rendering passes).

Return value

The number of decals.

int getNumDips ( ) #

Returns the number of draw calls used in the current scene. See Rendering Profiler article for details.

Return value

The number of draw calls.

int getNumInstances ( ) #

Returns the maximum number of instances that can be rendered for each of the following node types:
Notice
Returned value depends on the graphics API used.

Return value

Maximum number of instances that can be rendered.

int getNumLights ( ) #

Returns the number of light passes rendered per frame. It means that the value contains the number of all light sources that are currently seen illuminating something in the viewport and also includes additional passes for rendering lights in the reflecting surfaces (if dynamical reflections are used). See Rendering Profiler article for details.

Return value

The number of light passes.

int getNumMaterials ( ) #

Returns the number of materials set per frame (during all of the rendering passes) in the current scene.

Return value

The number of materials.

int getNumPrimitives ( ) #

Returns the number of geometric rendered per frame primitives that can be currently seen in the viewport. See Rendering Profiler article for details.

Return value

The number of primitives.

int getNumProcedurals ( ) #

Returns the number of procedurals that can be currently seen in the viewport.

Return value

The number of procedurals.

int getNumReflections ( ) #

Returns the number of reflections drawn per frame that can be currently seen in the viewport. In case of cubemap reflections, if all six faces are updated, six reflections are rendered per each frame.

Return value

The number of reflections.

long long getNumShaders ( ) #

Returns the number of shaders set per frame. See Rendering Profiler article for details.

Return value

The number of shaders.

int getNumShadows ( ) #

Returns the number of shadow passes rendered per frame. See Rendering Profiler article for details.

Return value

The number of shadow passes.

int getNumSurfaces ( ) #

Returns the number of rendered per frame surfaces that can be currently seen in the viewport (in all rendering passes). See Rendering Profiler article for details.

Return value

Number of surfaces.

int getNumTriangles ( ) #

Returns the number of rendered per frame triangles that can be currently seen in the viewport. See Rendering Profiler article for details.

Return value

Number of triangles.

void setObjectDistance ( float distance ) #

Sets the distance, at which (and farther) objects will not be rendered.

Arguments

  • float distance - Distance in units.

float getObjectDistance ( ) #

Returns a distance, at which (and farther) objects will not be rendered.

Return value

Distance in units.

void setOccluders ( int occluders ) #

Enables or disables rendering of occluders.
Notice
To set the value via the console, use the render_occluders console command.

Arguments

  • int occluders - 1 to enable rendering of occluders, 0 to disable it. The default value is 1.

int isOccluders ( ) #

Returns a value indicating if rendering of occluders is enabled.
Notice
To get the value via the console, use the render_occluders console variable.

Return value

1 if rendering of occluders is enabled; otherwise, 0. The default value is 1.

void setOccludersResolution ( const Math::vec2 & resolution ) #

Sets the resolution of the texture, to which occluders are rendered.
Notice
To set the value via the console, use the render_occluders_resolution console command.

Arguments

  • const Math::vec2 & resolution - Texture resolution (X, Y), in pixels. Available values are from (1, 1) to (1024, 1024). The default value is (128, 64).

Math::vec2 getOccludersResolution ( ) #

Returns the current resolution of the texture, to which occluders are rendered.
Notice
To get the value via the console, use the render_occluders_resolution console variable.

Return value

Texture resolution (X, Y), in pixels. Available values are from (1, 1) to (1024, 1024). The default value is (128, 64).

void setOccludersShadows ( int shadows ) #

Sets the value indicating whether rendering of occluders for shadows is enabled.
Notice
To set the value via the console, use the render_occluders_shadows console command.

Arguments

  • int shadows - 1 to enable rendering of occluders for shadows, 0 to disable it. The default value is 0.

int isOccludersShadows ( ) #

Returns the value indicating whether rendering of occluders for shadows is enabled.
Notice
To get the value via the console, use the render_occluders_shadows console variable.

Return value

1 if rendering of occluders for shadows is enabled; otherwise, 0. The default value is 0.

void setOccludersShadowsResolution ( const Math::vec2 & resolution ) #

Sets the resolution of the texture, to which occluders for shadows are rendered.
Notice
To set the value via the console, use the render_occluders_shadows_resolution console command.

Arguments

  • const Math::vec2 & resolution - Texture resolution (X, Y), in pixels. Available values are from (1, 1) to (1024, 1024). The default value is (512, 512).

Math::vec2 getOccludersShadowsResolution ( ) #

Returns the current resolution of the texture, to which occluders for shadows are rendered.
Notice
To get the value via the console, use the render_occluders_shadows_resolution console variable.

Return value

Texture resolution (X, Y), in pixels. Available values are from (1, 1) to (1024, 1024). The default value is (512, 512).

void setOcclusionQueries ( int queries ) #

Enables or disables additional hardware occlusion query test before sending data to GPU.

Arguments

  • int queries - 1 to enable additional hardware occlusion query test, 0 to disable it. The default value is 1.

int isOcclusionQueries ( ) #

Returns a value indicating if additional hardware occlusion query test before sending data to GPU is enabled.

Return value

1 if if additional hardware occlusion query test is enabled; otherwise, 0.

void setOcclusionQueriesNumFrames ( int frames ) #

Sets the number of frames for additional hardware occlusion query test performed before sending data to GPU.

Arguments

  • int frames - Number of frames. The value within the [0; 1024] range. The default value is 5.

int getOcclusionQueriesNumFrames ( ) #

Returns the current number of frames for additional hardware occlusion query test performed before sending data to GPU.

Return value

Number of frames. The value within the [0; 1024] range.

void setPanorama ( int panorama ) #

Sets the mode of panoramic rendering.
Notice
If panoramic rendering is enabled, underwater shafts and water line effects will be disabled.

Arguments

  • int panorama - One of the following values:
    • 0 - disabled (by default).
    • 1 - 180-degree panorama with curved edges.
    • 2 - 180-degree linear panorama without distortion at the edges.
    • 3 - 180-degree spherical panorama (fisheye).
    • 4 - a 360-degree panorama with curved edges.
    • 5 - a 360-degree linear panorama without distortion at the edges.
    • 6 - 360-degree spherical panorama (fisheye).

int getPanorama ( ) #

Returns the value indicating current mode of panoramic rendering.
Notice
If panoramic rendering is enabled, underwater shafts and water line effects will be disabled.

Return value

One of the following values:
  • 0 - disabled (by default).
  • 1 - 180-degree panorama with curved edges.
  • 2 - 180-degree linear panorama without distortion at the edges.
  • 3 - 180-degree spherical panorama (fisheye).
  • 4 - a 360-degree panorama with curved edges.
  • 5 - a 360-degree linear panorama without distortion at the edges.
  • 6 - 360-degree spherical panorama (fisheye).

void setPostMaterials ( const char * materials ) #

Sets post postprocess materials that are applied after all other postprocess (such as HDR, DoF, etc.) are rendered. Materials are applied in the order of listing.

They are used together with Player::setPostMaterials(), if any.

Arguments

  • const char * materials - Comma-separated list of post postprocess material names.

const char * getPostMaterials ( ) #

Returns names of the current post postprocess materials that are applied after all other postprocess (such as HDR, DoF, etc.) are rendered. Materials are applied in the order of listing.

They are used together with Player::getPostMaterials(), if any.

Return value

Comma-separated list of current post postprocess material names.

void setReflectionDistance ( float distance ) #

Sets the distance, at which (and farther) reflections will not be rendered.

Arguments

  • float distance - Distance in units.

float getReflectionDistance ( ) #

Returns the distance, at which (and farther) reflections will not be rendered.

Return value

Distance in units.

void setReflectionDynamic ( int dynamic ) #

Enables or disables dynamic reflections for materials.

Arguments

  • int dynamic - 1 to enable dynamic reflections for materials, 0 to disable it. The default value is 1.

int isReflectionDynamic ( ) #

Returns a value indicating if dynamic reflections for materials are enabled.

Return value

1 if dynamic reflections for materials are enabled; otherwise, 0.

void setReflectionLods ( int lods ) #

Enables or disables reduction of resolution of dynamic reflections when the camera moves away.

Arguments

  • int lods - 1 to enable reduction of resolution of dynamic reflections when the camera moves away, 0 to disable it. The default value is 1.

int isReflectionLods ( ) #

Returns a value indicating if reduction of resolution of dynamic reflections when the camera moves away is enabled.

Return value

1 if reduction of resolution of dynamic reflections when the camera moves away is enabled; otherwise, 0.

void setRefraction ( int refraction ) #

Enables or disables refraction.

Arguments

  • int refraction - 1 to enable refraction, 0 to disable it. The default value is 1.

int isRefraction ( ) #

Returns a value indicating if refraction is enabled.

Return value

1 if refraction is enabled; otherwise, 0.

void setRefractionDispersion ( const Math::vec3 & dispersion ) #

Sets the refraction displacement for red, green and blue channels (according to refraction texture of refractive materials). Can be used to create light dispersion (chromatic aberrations).

Arguments

  • const Math::vec3 & dispersion - Dispersion displacement per channel. If a negative value is set for a channel, 0 will be used instead.

Math::vec3 getRefractionDispersion ( ) #

Returns the refraction displacement for red, green and blue channels (according to the refraction texture of refractive materials). It can be used to create light dispersion (chromatic aberrations).

Return value

Dispersion displacement.

void setPrePostMaterials ( const char * materials ) #

Sets pre-post materials that are applied before all other postprocess (such as HDR, DoF, etc.) are rendered. Materials are applied in the order of listing.

Arguments

  • const char * materials - List of comma-separated pre-post material names.

const char * getPrePostMaterials ( ) #

Returns names of the current pre-post materials that are applied before all other postprocess (such as HDR, DoF, etc.) are rendered. Materials are applied in the order of listing.

Return value

Names of the current pre-post materials.

void setScreenPrecision ( int precision ) #

Sets screen precision. This parameter determines the texture format used for screen HDR buffers.

Arguments

  • int precision - One of the following values:
    • 0 - RG11B10F.
    • 1 - RGBA16F (by default).

int isScreenPrecision ( ) #

Returns a value indicating the current screen precision. This parameter determines the texture format used for screen HDR buffers.

Return value

One of the following values:
  • 0 - RG11B10F.
  • 1 - RGBA16F (by default).

void setShaderDefines ( const char * defines ) #

Set additional shader defines.

Arguments

  • const char * defines - Additional shader defines.

const char * getShaderDefines ( ) #

Returns additional shader defines.

Return value

Additional shader defines.

void setShadowDistance ( float distance ) #

Sets the distance, at which (and farther) shadows will not be rendered.

Arguments

  • float distance - Distance in units.

float getShadowDistance ( ) #

Returns the distance, at which (and farther) shadows will not be rendered.

Return value

Distance in units.

void setShadows ( int shadows ) #

Enables or disables shadows rendering.

Arguments

  • int shadows - 1 to enable shadows rendering, 0 to skip it. The default value is 1.

int isShadows ( ) #

Returns a value indicating whether shadows are rendered or not.

Return value

1 if shadows are rendered; otherwise, 0.

void setShadowsAlphaTest ( int test ) #

Enables or disables alpha test for shadows.

Arguments

  • int test - 1 to enable alpha test for shadows, 0 to disable it. The default value is 1.

int isShadowsAlphaTest ( ) #

Returns a value indicating if alpha test is enabled for shadows.

Return value

1 if alpha test is enabled for shadows; otherwise, 0.

void setShadowShafts ( int shafts ) #

Enables or disables volumetric shadows.

Arguments

  • int shafts - 1 to enable volumetric shadows, 0 to disable. The default value is 0.

int isShadowShafts ( ) #

Returns a value indicating if volumetric shadows are enabled.

Return value

1 if volumetric shadows are enabled; otherwise, 0.

void setShadowShaftsExposure ( float exposure ) #

Sets the contrast used for volumetric shadows.

Arguments

  • float exposure - Shadow contrast. The provided value will be saturated in the range [0.0f; 1.0f]. 0.0f means that the shadows are not seen at all.

float getShadowShaftsExposure ( ) #

Returns the contrast used for volumetric shadows.

Return value

Shadow contrast.

void setShadowShaftsLength ( float length ) #

Sets the length of volumetric shadows.

Arguments

  • float length - Shadow length. The provided value will be saturated in the range [0.0f; 1.0f]. 0.0f means that there are no shadows. 1 means that the shadows are long enough to occupy the whole screen.

float getShadowShaftsLength ( ) #

Returns the length of volumetric shadows.

Return value

Shadow length.

void setShadowsScreenSpace ( int space ) #

Enables or disables screen space shadows. They provide high-quality penumbra, per-light work, per-pixel detail at any zoom level and infinite visibility distance (when enabled, distant objects can cast shadows next to the horizon). Supports depth cutout parallax. Screen space shadows can be mixed with regular ones.
Notice
To set the value via the console, use the render_shadows_screenspace console command.

Arguments

  • int space - 1 to enable screen space shadows, 0 to disable. The default value is 1.

int isShadowsScreenSpace ( ) #

Returns the value indicating if screen space shadows are enabled. They provide high-quality penumbra, per-light work, per-pixel detail at any zoom level and infinite visibility distance (when enabled, distant objects can cast shadows next to the horizon). Supports depth cutout parallax. Screen space shadows can be mixed with regular ones.
Notice
To get the value via the console, use the render_shadows_screenspace console variable.

Return value

1 if screen space shadows are enabled; otherwise, 0.

void setShadowsPenumbraMode ( int mode ) #

Sets the global quality mode to be used for rendering penumbra from all light sources by default. This mode enables simulation of real-world shadows by keeping sharp contact shadows closer to the base and softening the farther the shadow stretches away. Higher values produce softer shadows.
Notice
  • You can set penumbra quality mode or disable penumbra rendering for each light source individually.
  • To set the value via the console, use the render_shadows_penumbra_mode console variable.

Arguments

  • int mode - Global quality mode to be used for rendering penumbra from all light sources:
    • 0 - penumbra rendering is disabled, shadow edges are crisp and sharp (no shadow softness at all).
    • 1 — low quality
    • 2 — medium quality
    • 3 — high quality
    • 4 — ultra quality

int getShadowsPenumbraMode ( ) #

Returns the global quality mode currently used for rendering penumbra from all light sources by default. This mode enables simulation of real-world shadows by keeping sharp contact shadows closer to the base and softening the farther the shadow stretches away. Higher values produce softer shadows.
Notice
  • You can set penumbra quality mode or disable penumbra rendering for each light source individually.
  • To get the value via the console, use the render_shadows_penumbra_mode console variable.

Return value

Global quality mode currently used for rendering penumbra from all light sources:
  • 0 - penumbra rendering is disabled, shadow edges are crisp and sharp (no shadow softness at all).
  • 1 — low quality
  • 2 — medium quality
  • 3 — high quality
  • 4 — ultra quality

void setShadowsPenumbraNoise ( int noise ) #

Enables or disables noise for penumbra rendering. This noise is used for smoothing.
Notice
To set the value via the console, use the render_shadows_penumbra_noise console command.

Arguments

  • int noise - 1 to enable noise for penumbra rendering, 0 to disable. The default value is 1.

int isShadowsPenumbraNoise ( ) #

Returns a value indicating if noise for penumbra rendering is enabled. This noise is used for smoothing.
Notice
To get the value via the console, use the render_shadows_penumbra_noise console variable.

Return value

1 if noise for penumbra rendering is enabled; otherwise, 0.

void setShadowsFilterMode ( int mode ) #

Sets the global filtering mode to be used for shadows from all light sources by default. This mode determines quality of soft shadows. Higher quality produces smoother shadow edges.
Notice
  • You can set filtering mode or disable filtering for each light source individually.
  • To set the value via the console, use the render_shadows_filter_mode console variable.

Arguments

  • int mode - Global filtering mode to be used for shadows from all light sources:
    • 0 - filtering for shadows is disabled, the stair-step effect is clearly seen at the edges of shadows.
    • 1 — low quality
    • 2 — medium quality
    • 3 — high quality
    • 4 — ultra quality

int getShadowsFilterMode ( ) #

Returns the global filtering mode currently used for shadows from all light sources by default. This mode determines quality of soft shadows, it is used to reduce the stair-step effect making the edges smoother. Higher quality produces smoother shadow edges.
Notice
  • You can set filtering mode or disable filtering for each light source individually.
  • To get the value via the console, use the render_shadows_filter_mode console variable.

Return value

Global filtering mode currently used for shadows from all light sources:
  • 0 - filtering for shadows is disabled, the stair-step effect is clearly seen at the edges of shadows.
  • 1 — low quality
  • 2 — medium quality
  • 3 — high quality
  • 4 — ultra quality

void setShadowsFilterNoise ( int noise ) #

Enables or disables noise for shadow filtering. This noise is used for smoothing.
Notice
To set the value via the console, use the render_shadows_filter_noise console command.

Arguments

  • int noise - 1 to enable noise for shadow filtering, 0 to disable. The default value is 1.

int isShadowsFilterNoise ( ) #

Returns a value indicating if noise for shadow filtering is enabled. This noise is used for smoothing.
Notice
To get the value via the console, use the render_shadows_filter_noise console variable.

Return value

1 if noise for shadow filtering is enabled; otherwise, 0.

void setShadowsTranslucentDepth ( float depth ) #

Sets the global translucence depth value defining how deep the light goes through translucent objects shifting the shadow.

Arguments

  • float depth - Global translucence depth to be used. The higher the value, the deeper the light penetrates translucent objects shifting the shadow.

float getShadowsTranslucentDepth ( ) #

Returns the global translucence depth value defining how deep the light goes through translucent objects shifting the shadow.

Return value

Current global translucence depth value. The higher the value, the deeper the light penetrates translucent objects shifting the shadow.

void setShadowsWorldLerpCascades ( int cascades ) #

Enables or disables shadows cascades lerp.

Arguments

  • int cascades - 1 to enable shadows cascades lerp, 0 to disable it. The default value is 1.

int isShadowsWorldLerpCascades ( ) #

Returns the value indicating if shadows cascades lerp is enabled.

Return value

1 if shadows cascades lerp is enabled; otherwise, 0.

void setSharpen ( int sharpen ) #

Enables or disables the sharpening post-processing effect.

Arguments

  • int sharpen - 1 to enable the sharpening post-processing effect, 0 to disable it. The default value is 0.

int isSharpen ( ) #

Returns a value indicating if the sharpening post-processing effect is enabled.

Return value

1 if the sharpening post-processing effect is enabled; otherwise, 0.

void setSharpenIntensity ( float intensity ) #

Sets intensity of the sharpening effect.

Arguments

  • float intensity - Intensity of the sharpening effect.

float getSharpenIntensity ( ) #

Returns intensity of the sharpening effect.

Return value

Intensity of the sharpening effect.

void setShowAlphaTest ( int test ) #

Displays or hides the visualizer for transparent objects using alpha test.

Arguments

  • int test - 1 to display the visualizer for transparent objects using alpha test, 0 to hide it. The default value is 0.

int isShowAlphaTest ( ) #

Returns a value indicating whether the visualizer is displayed for transparent objects using alpha test or not.

Return value

1 if visualizer for transparent objects using alpha test is displayed; otherwise, 0.

void setShowAmbient ( int ambient ) #

Enables or disables displaying the ambient pass buffer.

Arguments

  • int ambient - 1 to display the ambient pass buffer, 0 to hide it. The default value is 0.

int isShowAmbient ( ) #

Returns a value indicating whether the ambient pass buffer is displayed or not.

Return value

1 if the ambient pass buffer is displayed; otherwise, 0.

void setShowCascades ( int cascades ) #

Displays or hides world shadow cascades.

Arguments

  • int cascades - 1 to display world shadow cascades, 0 to hide them. The default value is 0.

int isShowCascades ( ) #

Returns a value indicating whether world shadow cascades are displayed or not.

Return value

1 if world shadow cascades are displayed; otherwise, 0.

void setShowDecals ( int decals ) #

Displays or hides the visualizer for decals.

Arguments

  • int decals - 1 to display the visualizer for decals, 0 to hide it. The default value is 0.

int isShowDecals ( ) #

Returns a value indicating whether the visualizer is displayed for decals or not.

Return value

1 if visualizer for decals is displayed; otherwise, 0.

void setShowDynamic ( int dynamic ) #

Displays or hides the visualizer for dynamic objects.

Arguments

  • int dynamic - 1 to display the visualizer for dynamic objects, 0 to hide it. The default value is 0.

int isShowDynamic ( ) #

Returns a value indicating whether the visualizer is displayed for dynamic objects or not.

Return value

1 if visualizer for dynamic objects is displayed; otherwise, 0.

void setShowGeodeticPivot ( int pivot ) #

Displays or hides geodetic pivots.

Arguments

  • int pivot - 1 to display geodetic pivots, 0 to hide them. The default value is 0.

int isShowGeodeticPivot ( ) #

Returns a value indicating whether geodetic pivots are displayed or not.

Return value

1 if geodetic pivots are displayed; otherwise, 0.

void setShowMipmaps ( int mipmaps ) #

Displays or hides texture mipmap levels.

Arguments

  • int mipmaps - 1 to display texture mipmap levels, 0 to hide them. The default value is 0.

int isShowMipmaps ( ) #

Returns a value indicating whether texture mipmap levels are displayed or not.

Return value

1 if texture mipmap levels are displayed; otherwise, 0.

void setShowOccluder ( int occluder ) #

Displays or hides the buffer used for occluders.

Arguments

  • int occluder - 1 to display the buffer used for occluders, 0 to hide it. The default value is 0.

int isShowOccluder ( ) #

Returns a value indicating whether the buffer used for occluders is displayed in the viewport or not.

Return value

1 if the buffer used for occluders is displayed; otherwise, 0.

void setShowQueries ( int queries ) #

Displays or hides occlusion query boxes.

Arguments

  • int queries - 1 to display occlusion query boxes, 0 to hide them. The default value is 0.

int isShowQueries ( ) #

Returns a value indicating whether occlusion query boxes are displayed in the viewport or not.

Return value

1 if occlusion query boxes are displayed; otherwise, 0.

void setShowScissors ( int scissors ) #

Displays or hides scissor rectangles.

Arguments

  • int scissors - 1 to display scissor rectangles, 0 to hide them. The default value is 0.

int isShowScissors ( ) #

Returns a value indicating if scissor rectangles are displayed.

Return value

1 if scissor rectangles are displayed; otherwise, 0.

void setShowTextures ( int textures ) #

Sets the display mode for buffers used by the renderer.

Arguments

  • int textures - One of the following values:
    • 0 - hide all buffers (by default).
    • 1 - display render textures in a compact view.
    • 2 - display render textures in a full view.

int getShowTextures ( ) #

Returns the current display mode for buffers used by the renderer.

Return value

One of the following values:
  • 0 - all buffers are hidden (by default).
  • 1 - render textures are displayed in a compact view.
  • 2 - render textures are displayed in a full view.

void setShowTexturesNumber ( int number ) #

Sets the number of buffers in a row displayed in the full view mode (see setShowTextures(2)).

Arguments

  • int number - Number of buffers in a row. Value within the [1; 16] range. The default value is 7.

int getShowTexturesNumber ( ) #

Returns the current number of buffers in a row displayed in the full view mode (see setShowTextures(2)).

Return value

Number of buffers in a row.

void setShowTexturesOffset ( int offset ) #

Sets the number of the buffer to start displaying from in the full view mode (see setShowTextures(2)).

Arguments

  • int offset - Number of the buffer to start displaying from. Value within the [0; 52] range. The default value is 0.

int getShowTexturesOffset ( ) #

Returns the current number of the buffer to start displaying from in the full view mode (see setShowTextures(2)).

Return value

Number of the buffer to start displaying from. Value within the [0; 52] range.

void setShowTransparent ( int transparent ) #

Displays or hides the visualizer for transparent objects.

Arguments

  • int transparent - 1 to display the visualizer for transparent objects, 0 to hide it. The default value is 0.

int isShowTransparent ( ) #

Returns a value indicating whether the visualizer is displayed for transparent objects or not.

Return value

1 if visualizer for transparent objects is enabled; otherwise, 0.

void setShowTriangles ( int triangles ) #

Sets the wireframe mode for scene triangles.

Arguments

  • int triangles - One of the following values:
    • 0 - triangles are hidden (by default).
    • 1 - front faces with the depth test are shown.
    • 2 - front faces without the depth test are shown.
    • 3 - front and back faces without the depth test are shown.

int getShowTriangles ( ) #

Returns the current wireframe mode for scene triangles.

Return value

One of the following values:
  • 0 - triangles are hidden (by default).
  • 1 - front faces with the depth test are shown.
  • 2 - front faces without the depth test are shown.
  • 3 - front and back faces without the depth test are shown.

void setCloudsEnabled ( int enabled ) #

Enables or disables clouds rendering.
Notice
To set the value via the console, use the render_clouds_enabledconsole command.

Arguments

  • int enabled - 0 to skip rendering of clouds, 1 to render clouds. The default value is 1.

int isCloudsEnabled ( ) #

Returns a value indicating if rendering of clouds is enabled.
Notice
To get the value via the console, use the render_clouds_enabledconsole variable.

Return value

1 if rendering of clouds is enabled; otherwise, 0.

void setLightsEnabled ( int enabled ) #

Enables or disables lights rendering.
Notice
To set the value via the console, use the render_lights_enabledconsole command.

Arguments

  • int enabled - 0 to skip rendering of lights, 1 to render lights. The default value is 1.

int isLightsEnabled ( ) #

Returns a value indicating if rendering of lights is enabled.
Notice
To get the value via the console, use the render_lights_enabledconsole variable.

Return value

1 if rendering of lights is enabled; otherwise, 0.

void setWaterEnabled ( int enabled ) #

Enables or disables water rendering.
Notice
To set the value via the console, use the render_water_enabledconsole command.

Arguments

  • int enabled - 0 to skip rendering of water, 1 to render water. The default value is 1.

int isWaterEnabled ( ) #

Returns a value indicating if rendering of water is enabled.
Notice
To get the value via the console, use the render_water_enabledconsole variable.

Return value

1 if rendering of water is enabled; otherwise, 0.

void setScreenSpaceEffects ( int effects ) #

Enables or disables rendering of screen-space effects.
Notice
To set the value via the console, use the render_screen_space_effectsconsole command.

Arguments

  • int effects - 1 to enable rendering of screen-space effects, 1 to skip them. The default value is 1.

int isScreenSpaceEffects ( ) #

Returns a value indicating if rendering of screen-space effects is enabled.
Notice
To get the value via the console, use the render_screen_space_effectsconsole variable.

Return value

1 if rendering of screen-space effects is enabled; otherwise, 0.

void setPrePostMaterialsEnabled ( int enabled ) #

Enables or disables rendering of pre-post materials (post-process materials applied before all other Unigine post-processes).
Notice
To set the value via the console, use the render_pre_post_materials_enabledconsole command.

Arguments

  • int enabled - 1 to render pre-post materials, 0 to skip them. The default value is 1.

int isPrePostMaterialsEnabled ( ) #

Returns a value indicating if rendering of pre-post materials (post-process materials applied before all other Unigine post-processes) is enabled.
Notice
To get the value via the console, use the render_pre_post_materials_enabledconsole variable.

Return value

1 if rendering of pre-post materials is enabled; otherwise, 0.

void setTransparentEnabled ( int enabled ) #

Enables or disables rendering of the transparent pass.
Notice
To set the value via the console, use the render_transparent_enabledconsole command.

Arguments

  • int enabled - 1 to render the transparent pass, 0 to skip it. The default value is 1.

int isTransparentEnabled ( ) #

Returns a value indicating if the transparent pass is rendered.
Notice
To get the value via the console, use the render_transparent_enabledconsole variable.

Return value

1 if the transparent pass is rendered; otherwise, 0.

void setTransparentAmbient ( int ambient ) #

Enables or disables rendering of the transparent ambient pass.
Notice
To set the value via the console, use the render_transparent_ambientconsole command.

Arguments

  • int ambient - 1 to render the transparent ambient pass, 0 to skip it. The default value is 1.

int isTransparentAmbient ( ) #

Returns a value indicating if the transparent ambient pass is rendered.
Notice
To get the value via the console, use the render_transparent_ambientconsole variable.

Return value

1 if the transparent ambient pass is rendered; otherwise, 0.

void setTransparentDeferred ( int deferred ) #

Enables or disables rendering of the transparent deferred pass.
Notice
To set the value via the console, use the render_transparent_deferredconsole command.

Arguments

  • int deferred - 1 to render the transparent deferred pass, 0 to skip it. The default value is 1.

int isTransparentDeferred ( ) #

Returns a value indicating if the transparent deferred pass is rendered.
Notice
To get the value via the console, use the render_transparent_deferredconsole variable.

Return value

1 if the transparent deferred pass is rendered; otherwise, 0.

void setTransparentLight ( int light ) #

Enables or disables rendering of the transparent light pass.
Notice
To set the value via the console, use the render_transparent_lightconsole command.

Arguments

  • int light - 1 to render the transparent light pass, 0 to skip it. The default value is 1.

int isTransparentLight ( ) #

Returns a value indicating if the transparent light pass is rendered.
Notice
To get the value via the console, use the render_transparent_lightconsole variable.

Return value

1 if the transparent light pass is rendered; otherwise, 0.

void setTransparentMultipleEnvProbes ( int probes ) #

Enables or disables rendering of the transparent multiple environment probes pass.
Notice
To set the value via the console, use the render_transparent_multiple_env_probesconsole command.

Arguments

  • int probes - 1 to render the transparent multiple environment probes pass, 0 to skip it. The default value is 1.

int isTransparentMultipleEnvProbes ( ) #

Returns a value indicating if the transparent multiple environment probes pass is rendered.
Notice
To get the value via the console, use the render_transparent_multiple_env_probesconsole variable.

Return value

1 if the transparent multiple environment probes pass is rendered; otherwise, 0.

void setSkyRotation ( const Math::quat & rotation ) #

Sets sky rotation.

Arguments

  • const Math::quat & rotation - Sky rotation quaternion.

Math::quat getSkyRotation ( ) #

Returns sky rotation.

Return value

Sky rotation quaternion.

void setSSAO ( int ssao ) #

Enables or disables the SSAO (Screen Space Ambient Occlusion) effect.

Arguments

  • int ssao - 1 to enable the SSAO effect, 0 to disable.

int isSSAO ( ) #

Returns the value indicating if the SSAO (Screen Space Ambient Occlusion) effect is enabled.

Return value

1 if the SSAO effect is enabled; otherwise, 0.

void setSSAOCavity ( int cavity ) #

Enables or disables the cavity option for the SSAO (Screen Space Ambient Occlusion) effect. This option improves (sharpens) the look of junction contours at low resolutions, so it should be used for detail enhancement (small stones, bolts and so on).

Arguments

  • int cavity - 1 to enable the cavity option for the SSAO effect, 0 to disable. The default value is 1.

int isSSAOCavity ( ) #

Returns the value indicating if the cavity option for the SSAO (Screen Space Ambient Occlusion) effect is enabled. This option improves (sharpens) the look of junction contours at low resolutions, so it should be used for detail enhancement (small stones, bolts and so on).

Return value

1 if the cavity option for the SSAO effect is enabled; otherwise, 0.

void setSSAOCavityIntensity ( float intensity ) #

Sets the intensity of sharpening of contours for the cavity option (see the setSSAOCavity() method).

Arguments

  • float intensity - Sharpening intensity value. The default value is 1.0f.

float getSSAOCavityIntensity ( ) #

Returns the intensity of sharpening of contours for the cavity option (see the setSSAOCavity() method).

Return value

Sharpening intensity value. The default value is 1.0f.

void setSSAOCavityRadius ( float radius ) #

Sets the size of junction contours area for the cavity option (see the setSSAOCavity() method).

Arguments

  • float radius - Size of junction contours area. The default value is 1.0f.

float getSSAOCavityRadius ( ) #

Returns the size of junction contours area for the cavity option (see the setSSAOCavity() method).

Return value

Size of junction contours area. The default value is 1.0f.

void setSSAOIntensity ( float intensity ) #

Sets the intensity of the SSAO (Screen Space Ambient Occlusion) for the scene. The intensity value affects brightness of shadows:
  • By the minimum value of 0.0f, the ambient occlusion shadowing is the lightest.

Arguments

  • float intensity - Intensity value of the SSAO (Screen Space Ambient Occlusion) for the scene. The default value is 1.0f.

float getSSAOIntensity ( ) #

Returns the intensity of the SSAO (Screen Space Ambient Occlusion) for the scene. The intensity value affects brightness of shadows:
  • By the minimum value of 0.0f, the ambient occlusion shadowing is the lightest.

Return value

SSAO intensity value. The default value is 1.0f.

void setSSAOIntensityLightedSide ( float side ) #

Sets the intensity of the SSAO (Screen Space Ambient Occlusion) for the scene object's lighted side.

Arguments

  • float side - SSAO intensity value for the scene object's lighted side. The default value is 1.0f.

float getSSAOIntensityLightedSide ( ) #

Returns the intensity of SSAO(Screen Space Ambient Occlusion) for the scene objects' lighted side.

Return value

SSAO intensity value for the scene object's lighted side. The default value is 1.0f.

void setSSAOIntensityReflection ( float reflection ) #

Sets the intensity of SSAO (Screen Space Ambient Occlusion) on reflections.

Arguments

  • float reflection - SSAO intensity value for reflections. The default value is 1.0f.

float getSSAOIntensityReflection ( ) #

Returns the intensity of SSAO (Screen Space Ambient Occlusion) on reflections.

Return value

SSAO intensity value for reflections. The default value is 1.0f.

void setSSAONoise ( int noise ) #

Enables or disables noise for the SSAO (Screen Space Ambient Occlusion) effect. This option reduces banding effect.
Notice
It is recommended to use noise with TAA enabled.

Arguments

  • int noise - 1 to enable SSAO noise, 0 to disable. The default value is 1.

int isSSAONoise ( ) #

Returns the value indicating if noise for the SSAO (Screen Space Ambient Occlusion) effect is enabled. This option reduces banding effect.
Notice
It is recommended to use noise with TAA enabled.

Return value

1 if SSAO noise is enabled; otherwise, 0.

void setSSAOQuality ( int quality ) #

Sets the quality of SSAO(Screen Space Ambient Occlusion).

Arguments

  • int quality - Quality of SSAO:
    • 0 - low quality.
    • 1 - medium quality (by default).
    • 2 - high quality.
    • 3 - ultra quality.

int getSSAOQuality ( ) #

Returns the quality of SSAO (Screen Space Ambient Occlusion).

Return value

Quality of SSAO:
  • 0 - low quality.
  • 1 - medium quality (by default).
  • 2 - high quality.
  • 3 - ultra quality.

void setSSAORadius ( float radius ) #

Sets the radius of SSAO (Screen Space Ambient Occlusion).The radius is the distance for each of the points in the world space, up to which they can shadow their neighboring points:
  • By low values, each point can cast shadows only on the points in the close range.
  • By high values, each point casts shadows on points at more distant locations.

Arguments

  • float radius - SSAO radius value. The default value is 1.0f.

float getSSAORadius ( ) #

Returns the radius of SSAO (Screen Space Ambient Occlusion).The radius is the distance for each of the points in the world space, up to which they can shadow their neighboring points:
  • By low values, each point can cast shadows only on the points in the close range.
  • By high values, each point casts shadows on points at more distant locations.

Return value

SSAO radius value.

void setSSAOThreshold ( float threshold ) #

Sets the threshold value for the SSAO (Screen Space Ambient Occlusion) effect.

Arguments

  • float threshold - SSAO threshold value in the range [0.0f; 1.0f]. The default value is 0.5f.

float getSSAOThreshold ( ) #

Returns the current threshold value for the SSAO (Screen Space Ambient Occlusion) effect.

Return value

Current SSAO threshold value.

void setSSAORayTracing ( int tracing ) #

Enables or disables ray tracing for SSAO (Screen Space Ambient Occlusion) calculation. When enabled, SSAO provides more realistic shadows between the objects.
Notice
Ray-traced SSAO calculation available only when the SSRTGI technique is enabled.

Arguments

  • int tracing - 1 to enable ray tracing for SSAO calculation, 0 to disable. The default value is 1.

int isSSAORayTracing ( ) #

Returns a value indicating if ray tracing is used for SSAO (Screen Space Ambient Occlusion) calculation. When enabled, SSAO provides more realistic shadows between the objects.
Notice
Ray-traced SSAO calculation available only when the SSRTGI technique is enabled.

Return value

1 if ray tracing is used for SSAO calculation; otherwise, 0.

void setSSAORayTracingDenoise ( int denoise ) #

Enables or disables noise reduction for the ray-traced SSAO (Screen Space Ambient Occlusion). This option reduces noise by using blur effect.
Notice
Ray-traced SSAO calculation available only when the SSRTGI technique is enabled.

Arguments

  • int denoise - 1 to enable noise reduction for the ray-traced SSAO, 0 to disable.

int isSSAORayTracingDenoise ( ) #

Returns the value indicating if noise reduction for the ray-traced SSAO (Screen Space Ambient Occlusion) is enabled. This option reduces noise by using blur effect.
Notice
Ray-traced SSAO calculation available only when the SSRTGI technique is enabled.

Return value

1 if noise reduction for the ray-traced SSAO is enabled; otherwise, 0.

void setSSAORayTracingThreshold ( float threshold ) #

Sets the threshold value for the ray-traced SSAO (Screen Space Ambient Occlusion).
Notice
Ray-traced SSAO calculation available only when the SSRTGI technique is enabled.

Arguments

  • float threshold - SSAO ray tracing threshold value. The default value is 1.0f.

float getSSAORayTracingThreshold ( ) #

Returns the current threshold value for the ray-traced SSAO (Screen Space Ambient Occlusion).
Notice
Ray-traced SSAO calculation available only when the SSRTGI technique is enabled.

Return value

SSAO ray tracing threshold value. The default value is 1.0f.

void setSSAOResolution ( int resolution ) #

Sets the resolution of SSAO (Screen Space Ambient Occlusion).

Arguments

  • int resolution - Resolution of SSAO:
    • 0 - quarter resolution.
    • 1 - half resolution (by default).
    • 2 - full resolution.

int getSSAOResolution ( ) #

Returns the resolution of SSAO (Screen Space Ambient Occlusion).

Return value

Resolution of SSAO:
  • 0 - quarter resolution.
  • 1 - half resolution (by default).
  • 2 - full resolution.

void setSSGI ( int ssgi ) #

Enables or disables the SSGI (Screen Space Global Illumination) effect.
Notice
To enable or disable the effect via the console, run the render_ssgiconsole command.

Arguments

  • int ssgi - 1 to enable the SSGI effect, 0 to disable it. The default value is 0.

int isSSGI ( ) #

Returns the value indicating if the SSGI (Screen Space Global Illumination) effect is enabled.
Notice
To check if the effect is enabled, use also the render_ssgiconsole variable.

Return value

1 if the SSGI effect is enabled; otherwise, 0.

void setSSGIIntensity ( float intensity ) #

Sets the intensity of the SSGI (Screen Space Global Illumination) for the scene.
  • By the minimum value of 0.0f, the global illumination is the darkest.
Notice
To set the intensity via the console, use the render_ssgi_intensityconsole command.

Arguments

  • float intensity - SSGI intensity value. The default value is 1.0f.

float getSSGIIntensity ( ) #

Returns the intensity of the SSGI (Screen Space Global Illumination) for the scene.
  • By the minimum value of 0.0f, the global illumination is the darkest.
Notice
To get the intensity via the console, use the render_ssgi_intensityconsole variable.

Return value

SSGI intensity value. The default value is 1.0f.

void setSSGINormalThreshold ( float threshold ) #

Sets the normal threshold of the SSGI (Screen Space Global Illumination). It determines sensitivity of GI to normals. Normals affect ray intensity: smaller angle of incidence increases ray intensity.
  • By the minimum value of 0.0f, normals are ignored.
Notice
To set the threshold via the console, use the render_ssgi_normal_thresholdconsole command.

Arguments

  • float threshold - SSGI normal threshold value. The default value is 1.0f.

float getSSGINormalThreshold ( ) #

Returns the normal threshold of the SSGI (Screen Space Global Illumination). It determines sensitivity of GI to normals. Normals affect ray intensity: smaller angle of incidence increases ray intensity.
  • By the minimum value of 0.0f, normals are ignored.
Notice
To get the threshold via the console, use the render_ssgi_normal_thresholdconsole variable.

Return value

SSGI normal threshold value.

void setSSGIQuality ( int quality ) #

Sets the quality of the SSGI (Screen Space Global Illumination). Quality means the number of the used samples:
  • Low — 4 samples
  • Medium — 8 samples
  • High — 16 samples
  • Ultra — 32 samples
Notice
To set the quality via the console, use the render_ssgi_qualityconsole command.

Arguments

  • int quality - SSGI quality:
    • 0 - Low
    • 1 - Medium (by default)
    • 2 - High
    • 3 - Ultra

int getSSGIQuality ( ) #

Returns the quality of the SSGI (Screen Space Global Illumination). Quality means the number of the used samples:
  • Low — 4 samples
  • Medium — 8 samples
  • High — 16 samples
  • Ultra — 32 samples
Notice
To get the quality via the console, use the render_ssgi_qualityconsole variable.

Return value

SSGI quality:
  • 0 - Low
  • 1 - Medium (by default)
  • 2 - High
  • 3 - Ultra

void setSSGIRadius ( float radius ) #

Sets the radius of the SSGI (Screen Space Global Illumination). The radius determines the size of the region surrounding a particular sampling point:
  • By low values, each point affects only the points in the close range.
  • By high values, each point affects farther positioned points.
Notice
To set the radius via the console, use the render_ssgi_radiusconsole command.

Arguments

  • float radius - SSGI radius value. The default value is 1.0f.

float getSSGIRadius ( ) #

Returns the radius of the SSGI (Screen Space Global Illumination). The radius determines the size of the region surrounding a particular sampling point:
  • By low values, each point affects only the points in the close range.
  • By high values, each point affects farther positioned points.
Notice
To get the radius via the console, use the render_ssgi_radiusconsole variable.

Return value

SSGI radius value. The default value is 1.0f.

void setSSGIRayTracing ( int tracing ) #

Enables or disables ray tracing for SSGI (Screen Space Global Illumination) calculation. When enabled, SSGI recreates light reflections from the object’s surface.
Notice
Ray-traced SSGI calculation available only when the SSRTGI technique is enabled.

Arguments

  • int tracing - 1 to enable ray tracing for SSGI calculation, 0 to disable. The default value is 1.

int isSSGIRayTracing ( ) #

Returns the value indicating if ray tracing is used for SSGI (Screen Space Global Illumination) calculation. When enabled, SSGI recreates light reflections from the object’s surface.
Notice
Ray-traced SSGI calculation available only when the SSRTGI technique is enabled.

Return value

1 if ray tracing is used for SSGI calculation; otherwise, 0.

void setSSGIRayTracingDenoise ( int denoise ) #

Enables or disables noise reduction for the ray-traced SSGI (Screen Space Global Illumination). This option reduces noise by using blur effect.
Notice
Ray-traced SSGI calculation available only when the SSRTGI technique is enabled.

Arguments

  • int denoise - 1 to enable noise reduction for the ray-traced SSGI, 0 to disable.

int isSSGIRayTracingDenoise ( ) #

Returns a value indicating if noise reduction for the ray-traced SSGI (Screen Space Global Illumination) is enabled. This option reduces noise by using blur effect.
Notice
Ray-traced SSGI calculation available only when the SSRTGI technique is enabled.

Return value

1 if noise reduction for the ray-traced SSGI is enabled; otherwise, 0.

void setSSGIRayTracingThreshold ( float threshold ) #

Sets the threshold value for the ray-traced SSGI (Screen Space Global Illumination).
Notice
Ray-traced SSGI calculation available only when the SSRTGI technique is enabled.

Arguments

  • float threshold - SSGI ray tracing threshold value. The default value is 1.0f.

float getSSGIRayTracingThreshold ( ) #

Returns the current threshold value for the ray-traced SSGI (Screen Space Global Illumination).
Notice
Ray-traced SSGI calculation available only when the SSRTGI technique is enabled.

Return value

SSGI ray tracing threshold value. The default value is 1.0f.

void setSSGIResolution ( int resolution ) #

Sets the resolution of SSGI (Screen Space Global Illumination).
Notice
To set the value via the console, use the render_ssgi_resolutionconsole command.

Arguments

  • int resolution - SSGI resolution:
    • 0 - quarter resolution.
    • 1 - half resolution (by default).
    • 2 - full resolution.

int getSSGIResolution ( ) #

Returns the resolution of SSGI (Screen Space Global Illumination).
Notice
To get the value via the console, use the render_ssgi_resolutionconsole variable.

Return value

SSGI resolution:
  • 0 - quarter resolution.
  • 1 - half resolution (by default).
  • 2 - full resolution.

void setSSGIResolutionColor ( int color ) #

Sets the resolution of the color buffer used for SSGI (Screen Space Global Illumination) calculation. This option significantly affects performance.

Arguments

  • int color - One of the following values:
    • 0 - quarter resolution.
    • 1 - half resolution (by default).
    • 2 - full resolution.

int getSSGIResolutionColor ( ) #

Returns the resolution of the color buffer used for SSGI (Screen Space Global Illumination) calculation.

Return value

One of the following values:
  • 0 - quarter resolution.
  • 1 - half resolution (by default).
  • 2 - full resolution.

void setSSR ( int ssr ) #

Enables or disables the SSR (Screen Space Reflections) effect.

Arguments

  • int ssr - 1 to enable the SSR effect, 0 to disable it.

int isSSR ( ) #

Returns the value indicating if the SSR (Screen Space Reflections) effect is enabled.

Return value

1 if the SSR effect is enabled; otherwise, 0. The default value is 1.

void setSSRDenoise ( int denoise ) #

Enables or disables noise reduction for the SSR (Screen Space Reflections) effect.

Arguments

  • int denoise - 1 to enable noise reduction for the SSR effect, 0 to disable it.

int isSSRDenoise ( ) #

Returns the value indicating if noise reduction for the SSR (Screen Space Reflections) effect is enabled.

Return value

1 if noise reduction for the SSR effect is enabled; otherwise, 0.

void setSSRFastTracing ( int tracing ) #

Enables or disables fast tracing for the SSR (Screen Space Reflections) effect. This mode makes it possible to obtain distant reflections using low number of steps while keeping performance high. However, tiny objects may not be reflected. Disabling this mode improves quality but significantly drops performance.

Arguments

  • int tracing - 1 to enable SSR fast tracing, 0 to disable it. The default value is 1.

int isSSRFastTracing ( ) #

Returns the value indicating if fast tracing for the SSR (Screen Space Reflections) effect is enabled.

Return value

1 if SSR fast tracing is enabled; otherwise, 0.

void setSSRImportanceSampling ( int sampling ) #

Enables or disables the importance sampling mode for the SSR (Screen Space Reflections) effect. Importance sampling provides more accurate but slower calculation of SSR roughness.

Arguments

  • int sampling - 1 to enable SSR importance sampling, 0 to disable it. The default value is 0.

int isSSRImportanceSampling ( ) #

Returns the value indicating if the importance sampling mode for the SSR (Screen Space Reflections) effect is enabled. Importance sampling provides more accurate but slower calculation of SSR roughness.

Return value

1 if SSR importance sampling is enabled; otherwise, 0.

void setSSRIncreasedAccuracy ( int accuracy ) #

Enables or disables increased accuracy for the SSR (Screen Space Reflections). This option reduces visual artifacts around objects, which can appear at resolution lower than full, by increasing accuracy of the last step.

Arguments

  • int accuracy - 1 to enable increased accuracy for the SSR, 0 to disable it. The default value is 0.

int isSSRIncreasedAccuracy ( ) #

Returns a value indicating if increased accuracy option is enabled for the SSR (Screen Space Reflections). This option reduces visual artifacts around objects, which can appear at resolution lower than full, by increasing accuracy of the last step.

Return value

1 if increased accuracy is enabled for the SSR; otherwise, 0.

void setSSRNoiseRay ( float ray ) #

Sets the intensity of the ray noise used for SSR (Screen Space Reflections) calculation. This parameter is used to reduce the banding effect on rough reflections by using the noise.
Notice
The option is available only when importance sampling is enabled.

Arguments

  • float ray - Ray noise intensity in range [0.0f;1.0f]. The default value is 0.5f. The higher is the value, the less pronounced is the banding effect.

float getSSRNoiseRay ( ) #

Returns the intensity of the ray noise used for SSR (Screen Space Reflections) calculation. This parameter is used to reduce the banding effect on rough reflections by using the noise.

Return value

Ray noise intensity.

void setSSRNoiseStep ( float step )