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
Enums
PASS#
CORRECT_ROUGHNESS#
CALLBACK_INDEX#
Name | Description |
---|---|
CALLBACK_BEGIN = 0 | Beginning of the callback range. |
CALLBACK_BEGIN_SHADOWS = 1 | Callback before the shadows rendering stage. |
CALLBACK_BEGIN_WORLD_SHADOW = 2 | Callback before the stage of rendering shadows from World light sources. |
CALLBACK_END_WORLD_SHADOW = 3 | Callback after the stage of rendering shadows from World light sources. |
CALLBACK_BEGIN_PROJ_SHADOW = 4 | Callback before the stage of rendering shadows from Projected light sources. |
CALLBACK_END_PROJ_SHADOW = 5 | Callback after the stage of rendering shadows from Projected light sources. |
CALLBACK_BEGIN_OMNI_SHADOW = 6 | Callback before the stage of rendering shadows from Omni light sources. |
CALLBACK_END_OMNI_SHADOW = 7 | Callback after the stage of rendering shadows from Omni light sources. |
CALLBACK_END_SHADOWS = 8 | Callback after the shadows rendering stage. |
CALLBACK_BEGIN_SCREEN = 9 | Callback before the stage of rendering each screen (a stereo image has 2 screens, while a cubemap will have 6). |
CALLBACK_BEGIN_OPACITY_GBUFFER = 10 | Callback before filling the Gbuffer. |
CALLBACK_END_OPACITY_GBUFFER = 11 | Callback after filling the Gbuffer. |
CALLBACK_BEGIN_OPACITY_DECALS = 12 | Callback before the opacity decals rendering stage. |
CALLBACK_END_OPACITY_DECALS = 13 | Callback after the opacity decals rendering stage. |
CALLBACK_BEGIN_CURVATURE = 14 | Callback before the SSBevel effect rendering stage. |
CALLBACK_END_CURVATURE = 15 | Callback after the SSBevel effect rendering stage. |
CALLBACK_BEGIN_CURVATURE_COMPOSITE = 16 | Callback before the curvature rendering stage for the SSDirt effect. |
CALLBACK_END_CURVATURE_COMPOSITE = 17 | Callback after the curvature rendering stage for the SSDirt effect. |
CALLBACK_BEGIN_SSRTGI = 18 | Callback before the SSRTGI rendering stage. |
CALLBACK_END_SSRTGI = 19 | Callback after the SSRTGI rendering stage. |
CALLBACK_BEGIN_OPACITY_LIGHTS = 20 | Callback before the opacity lightgs rendering stage. |
CALLBACK_END_OPACITY_LIGHTS = 21 | Callback after the opacity lightgs rendering stage. |
CALLBACK_BEGIN_OPACITY_VOXEL_PROBES = 22 | Callback before the opacity voxel probes rendering stage. |
CALLBACK_END_OPACITY_VOXEL_PROBES = 23 | Callback after the opacity voxel probes rendering stage. |
CALLBACK_BEGIN_OPACITY_ENVIRONMENT_PROBES = 24 | Callback before the opacity environment probes rendering stage. |
CALLBACK_END_OPACITY_ENVIRONMENT_PROBES = 25 | Callback after the opacity environment probes rendering stage. |
CALLBACK_BEGIN_AUXILIARY_BUFFER = 26 | Callback before filling the auxiliary buffer. |
CALLBACK_END_AUXILIARY_BUFFER = 27 | Callback after filling the auxiliary buffer. |
CALLBACK_BEGIN_REFRACTION_BUFFER = 28 | Callback before filling the refraction buffer. |
CALLBACK_END_REFRACTION_BUFFER = 29 | Callback after filling the refraction buffer. |
CALLBACK_BEGIN_TRANSPARENT_BLUR_BUFFER = 30 | Callback before filling the transparent blur buffer. |
CALLBACK_END_TRANSPARENT_BLUR_BUFFER = 31 | Callback after filling the transparent blur buffer. |
CALLBACK_BEGIN_SSR = 32 | Callback before the SSR rendering stage. |
CALLBACK_END_SSR = 33 | Callback after the SSR rendering stage. |
CALLBACK_BEGIN_SSAO = 34 | Callback before the SSAO rendering stage. |
CALLBACK_END_SSAO = 35 | Callback after the SSAO rendering stage. |
CALLBACK_BEGIN_SSGI = 36 | Callback before the SSGI rendering stage. |
CALLBACK_END_SSGI = 37 | Callback after the SSGI rendering stage. |
CALLBACK_BEGIN_COMPOSITE_DEFERRED = 38 | Callback before the clouds deferred composite stage. |
CALLBACK_END_COMPOSITE_DEFERRED = 39 | Callback after the clouds deferred composite stage. |
CALLBACK_BEGIN_TRANSPARENT = 40 | Callback before the transparent objects rendering stage. |
CALLBACK_BEGIN_CLOUDS = 41 | Callback before the clouds rendering stage. |
CALLBACK_END_CLOUDS = 42 | Callback after the clouds rendering stage. |
CALLBACK_BEGIN_WATER = 43 | Callback before the water rendering stage. |
CALLBACK_BEGIN_WATER_DECALS = 44 | Callback before the water decals rendering stage. |
CALLBACK_END_WATER_DECALS = 45 | Callback after the water decals rendering stage. |
CALLBACK_BEGIN_WATER_LIGHTS = 46 | Callback before the water lights rendering stage. |
CALLBACK_END_WATER_LIGHTS = 47 | Callback after the water lights rendering stage. |
CALLBACK_BEGIN_WATER_VOXEL_PROBES = 48 | Callback before the water voxel probes rendering stage. |
CALLBACK_END_WATER_VOXEL_PROBES = 49 | Callback after the water voxel probes rendering stage. |
CALLBACK_BEGIN_WATER_ENVIRONMENT_PROBES = 50 | Callback before the water environment probes rendering stage. |
CALLBACK_END_WATER_ENVIRONMENT_PROBES = 51 | Callback after the water environment probes rendering stage. |
CALLBACK_END_WATER = 52 | Callback after the water rendering stage. |
CALLBACK_END_TRANSPARENT = 53 | Callback after the transparent objects rendering stage. |
CALLBACK_BEGIN_SRGB_CORRECTION = 54 | Callback before the sRGB correction stage. |
CALLBACK_END_SRGB_CORRECTION = 55 | Callback after the sRGB correction stage. |
CALLBACK_BEGIN_ADAPTATION_COLOR_AVERAGE = 56 | Callback before the calculation of automatic exposure and white balance correction. |
CALLBACK_END_ADAPTATION_COLOR_AVERAGE = 57 | Callback after the calculation of automatic exposure and white balance correction. |
CALLBACK_BEGIN_ADAPTATION_COLOR = 58 | Callback before the color adaptation rendering stage (automatic exposure and white balance correction). |
CALLBACK_END_ADAPTATION_COLOR = 59 | Callback after the color adaptation rendering stage (automatic exposure and white balance correction). |
CALLBACK_BEGIN_TAA = 60 | Callback before the Temporal Anti-Aliasing (TAA) pass. |
CALLBACK_END_TAA = 61 | Callback after the Temporal Anti-Aliasing (TAA) pass. |
CALLBACK_BEGIN_CAMERA_EFFECTS = 62 | Callback before the camera effects stage. |
CALLBACK_END_CAMERA_EFFECTS = 63 | Callback after the camera effects stage. |
CALLBACK_BEGIN_POST_MATERIALS = 64 | Callback before the post materials rendering stage. |
CALLBACK_END_POST_MATERIALS = 65 | Callback after the post materials rendering stage. |
CALLBACK_BEGIN_DEBUG_MATERIALS = 66 | Callback before the debug materials stage. |
CALLBACK_END_DEBUG_MATERIALS = 67 | Callback after the debug materials stage. |
CALLBACK_BEGIN_VISUALIZER = 68 | Callback before the visualizer rendering stage. |
CALLBACK_END_VISUALIZER = 69 | Callback after the visualizer rendering stage. |
CALLBACK_END_SCREEN = 70 | Callback after the stage of rendering each screen (a stereo image has 2 screens, while a cubemap will have 6). |
CALLBACK_END = 71 | End of the callback range. |
NUM_CALLBACKS = 72 | Callback counter. |
VIEWPORT_MODE#
Name | Description |
---|---|
VIEWPORT_MODE_DEFAULT = 0 | Enables the default stereo mode - no stereo and panoramic rendering in the current viewport is available. This mode is set by default for a new viewport. |
VIEWPORT_MODE_PANORAMA_CURVED_180 = 1 | Enables rendering of the viewport as a panorama with curved edges with an angle of 180 degrees. |
VIEWPORT_MODE_PANORAMA_CURVED_360 = 2 | Enables rendering of the viewport as a panorama with curved edges with an angle of 360 degrees. |
VIEWPORT_MODE_PANORAMA_LINEAR_180 = 3 | Enables rendering of the viewport as a linear panorama without distortion at the edges with an angle of 180 degrees. |
VIEWPORT_MODE_PANORAMA_LINEAR_360 = 4 | Enables rendering of the viewport as a linear panorama without distortion at the edges with an angle of 360 degrees. |
VIEWPORT_MODE_PANORAMA_FISHEYE_ORTHOGRAPHIC = 5 | Enables rendering of the viewport as an orthographic spherical panorama (fisheye). |
VIEWPORT_MODE_PANORAMA_FISHEYE_EQUDISTANT = 6 | Enables rendering of the viewport as an equidistant spherical panorama (fisheye). |
VIEWPORT_MODE_PANORAMA_FISHEYE_STEREOGRAPHIC = 7 | Enables rendering of the viewport as an stereographic spherical panorama (fisheye). |
VIEWPORT_MODE_PANORAMA_FISHEYE_EQUISOLID = 8 | Enables rendering of the viewport as an equisolid spherical panorama (fisheye). |
VIEWPORT_MODE_STEREO_ANAGLYPH = 9 | Enables the anaglyph stereo mode that is viewed with red-cyan anaglyph glasses. |
VIEWPORT_MODE_STEREO_INTERLACED = 10 | Enables the interlaced stereo mode that is used with interlaced stereo monitors and polarized 3D glasses. |
VIEWPORT_MODE_STEREO_HORIZONTAL = 11 | Enables the horizontal stereo mode that is supported on mobile devices. |
VIEWPORT_MODE_STEREO_VERTICAL = 12 | Enables the vertical stereo mode that is supported on mobile devices. |
VIEWPORT_MODE_STEREO_SEPARATE = 13 | Enables the replicate images stereo mode. |
VIEWPORT_MODE_STEREO_REPLICATE = 14 | Enables the separate images stereo mode. This mode serves to output two separate images for each of the eye. It can be used with any VR/AR output devices that support separate images output, e.g. for 3D video glasses or helmets (HMD). |
Members
void beginDebugGroup ( const char * name ) #
Starts a GPU debug group with a specified name in Microprofiler.Arguments
- const char * name - Name of debug group.
void endDebugGroup ( ) #
Ends a GPU debug group previously started via the beginDebugGroup() method.size_t getMaxTextureBufferSize ( ) #
Returns the maximum size of the texture buffer.Return value
Maximum size of the texture buffer.void setAlphaFade ( bool fade ) #
Arguments
- bool fade - 1 to enable alpha fading (dithering) for objects, 0 to disable it. The default value is 1.
bool isAlphaFade ( ) const#
Return value
1 if alpha fading is enabled; otherwise, 0.void setAnimationLeaf ( float leaf ) #
Arguments
- float leaf - Global leaf rotation angle. If a negative value is provided, 0 will be used instead.
float getAnimationLeaf ( ) const#
Return value
Global leaf rotation angle.float getAnimationOldTime ( ) const#
Returns the previous render animation time for vegetation.Return value
Animation time in milliseconds.void setAnimationScale ( float scale ) #
Arguments
- float scale - Global leaf rotation speed.
float getAnimationScale ( ) const#
Return value
Global leaf rotation speed.void setAnimationStem ( float stem ) #
Arguments
- float stem - Global stem amplitude scale. If a negative value is provided, 0 will be used instead.
float getAnimationStem ( ) const#
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 ( ) const#
Returns the render animation time for vegetation.Return value
Animation time in milliseconds.void setAnimationWind ( const Math::vec3 & wind ) #
Arguments
- const Math::vec3 & wind - Offset for vegetation under wind by X, Y and Z axes.
Math::vec3 getAnimationWind ( ) const#
Return value
Offset for vegetation under wind by X, Y and Z axes.void setBorder ( const Math::vec2 & border ) #
Arguments
- const Math::vec2 & border - Vector with components representing border sizes: X - width, Y - height.
Math::vec2 getBorder ( ) const#
Return value
Vector with components representing border sizes: X - width, Y - height.int getAPI ( ) const#
Returns the current Graphics API, or API_UNKNOWN if API cannot be identified.Return value
The Graphics API flag (see API_* variables).void setAuxiliary ( bool auxiliary ) #
Arguments
- bool auxiliary - 1 to use the auxiliary buffer, 0 not to use. The default value is 1.
bool isAuxiliary ( ) const#
Return value
1 if the auxiliary buffer is used; otherwise, 0.void setBackgroundColor ( const Math::vec4 & color ) #
Arguments
- const Math::vec4 & color - A background color vector.
Math::vec4 getBackgroundColor ( ) const#
Return value
A background color vector.void setBentNormalRayTracing ( bool tracing ) #
Arguments
- bool tracing - 1 to enable ray-traced bent normals calculation, 0 to disable. The default value is 1.
bool isBentNormalRayTracing ( ) const#
Return value
1 if ray-traced bent normals calculation is enabled; otherwise, 0.void setBentNormalFixOverlitAreas ( bool areas ) #
- 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
- bool areas - 1 to enable correction of overlit areas for bent normals calculation, 0 to disable it. The default value is 0.
bool isBentNormalFixOverlitAreas ( ) const#
- 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 ( bool denoise ) #
Enables or disables noise reduction for ray-traced bent normals calculation. This option reduces noise by using the blur effect.Arguments
- bool denoise - 1 to enable noise reduction for ray-traced bent normals calculation, 0 to disable. The default value is 1.
bool isBentNormalRayTracingDenoise ( ) const#
Returns a value indicating if noise reduction for ray-traced bent normals calculation is enabled. This option reduces noise by using blur effect.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.Arguments
- float threshold - Bent normals ray tracing threshold value. The default value is 1.0f.
float getBentNormalRayTracingThreshold ( ) const#
Returns the current threshold value for the ray-traced bent normals calculation.Return value
Bent normal ray tracing threshold value. The default value is 1.0f.Ptr<Texture> getBlack2DArrayTexture ( ) const#
Returns black 2D array texture.Return value
Black 2D array texture.Ptr<Texture> getBlack2DTexture ( ) const#
Returns black 2D texture.Return value
Black 2D texture.Ptr<Texture> getBlack3DTexture ( ) const#
Returns black 3D texture.Return value
Black 3D texture.Ptr<Texture> getBlackCubeTexture ( ) const#
Returns black Cube texture.Return value
Black Cube texture.void setBloom ( bool bloom ) #
Arguments
- bool bloom - 1 value to enable the bloom effect, 0 to disable.
bool isBloom ( ) const#
Return value
1 if the bloom effect is enabled; otherwise, 0.void setBloomPasses ( int passes ) #
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 ( ) const#
Return value
Number of bloom passes.void setBloomPower ( float power ) #
- 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 ( ) const#
- 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 ) #
Arguments
- int resolution - Resolution of the bloom effect:
- 0 - quarter resolution.
- 1 - half resolution (by default).
- 2 - full resolution.
int getBloomResolution ( ) const#
Return value
Resolution of the bloom effect:- 0 - quarter resolution.
- 1 - half resolution (by default).
- 2 - full resolution.
void setBloomScale ( float scale ) #
Arguments
- float scale - Bloom scale value within the [0.0f; 1.0f] range. The default value is 0.3f.
float getBloomScale ( ) const#
Return value
Bloom scale value within the [0.0f; 1.0f] range.void setBudget ( float budget ) #
Arguments
- float budget - Budget value in seconds. The default value is 1/60.
float getBudget ( ) const#
Return value
Budget value in seconds. The default value is 1/60.void setCameraEffectsThreshold ( float threshold ) #
Arguments
- float threshold - HDR threshold. If a negative value is provided, 0 will be used instead.
float getCameraEffectsThreshold ( ) const#
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.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::clearBufferMask(BUFFER_DEPTH_STENCIL);
Arguments
- int mask - Buffer mask: one of the RenderState::BUFFER_* variables.
int getClearBufferMask ( ) const#
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 setCloudDistortionTexture ( int texture ) #
Arguments
- int texture - One of the following values:
- 0 - 2D Texture - more performance-friendly, but may cause an excessive vertical extrusion of clouds.
- 1 - 3D Texture — ensures homogeneous detail distortion and better image quality, but at a higher performance cost.
int getCloudDistortionTexture ( ) const#
Return value
One of the following values:- 0 - 2D Texture - more performance-friendly, but may cause an excessive vertical extrusion of clouds.
- 1 - 3D Texture — ensures homogeneous detail distortion and better image quality, but at a higher performance cost.
void setCloudsAccurateLayersSorting ( bool sorting ) #
Sets a value indicating if correct sorting of intersecting cloud layers is enabled.Arguments
- bool sorting - true to enable correct sorting of intersecting cloud layers, false to disable it. The default value is false.
bool isCloudsAccurateLayersSorting ( ) const#
Returns a value indicating if correct sorting of intersecting cloud layers is enabled.Return value
true if rendering of shadows from the clouds on the ground is enabled; otherwise, false.void setCloudsStepAccuracy ( float accuracy ) #
Arguments
- float accuracy - New accuracy of ray marching steps to be set in the [0.0f; 1.0f] range. Lower numbers gain more performance.
float getCloudsStepAccuracy ( ) const#
Return value
Current accuracy of ray marching steps in the [0.0f; 1.0f] range. The default value is 0.5f.void setCloudsDepthBasedReconstruction ( bool reconstruction ) #
Sets a value indicating if clouds ray-marched depth is to be used for upsampling the downsampled clouds without obscuring the geometry and reprojection depending on the cloud depth. Recommended for flying through clouds.Arguments
- bool reconstruction - true to enable using clouds ray-marched depth for upsampling the downsampled clouds without obscuring the geometry and reprojection depending on the cloud depth; false - to disable.
bool isCloudsDepthBasedReconstruction ( ) const#
Returns a value indicating if clouds ray-marched depth is used for upsampling the downsampled clouds without obscuring the geometry and reprojection depending on the cloud depth. Recommended for flying through clouds.Return value
true if clouds ray-marched depth is used for upsampling the downsampled clouds without obscuring the geometry and reprojection depending on the cloud depth; otherwise false.void setCloudsDepthBasedReconstructionThreshold ( float threshold ) #
Sets depth threshold value for clouds depth-based reconstruction mode. This value defines the depth difference starting from which pixels are considered to be related to different surfaces.Arguments
- float threshold - New depth threshold value to be set for clouds depth-based reconstruction mode. The default value is 100.0f
float getCloudsDepthBasedReconstructionThreshold ( ) const#
Returnns the current depth threshold value for clouds depth-based reconstruction mode. This value defines the depth difference starting from which pixels are considered to be related to different surfaces.Return value
Current depth threshold value for clouds depth-based reconstruction mode. The default value is 100.0fvoid setCloudsDownsamplingRendering ( int rendering ) #
Arguments
- int rendering - One of the following values:
- 0 - full.
- 1 - half (by default).
- 2 - quarter.
int getCloudsDownsamplingRendering ( ) const#
Return value
One of the following values:- 0 - full.
- 1 - half (by default).
- 2 - quarter.
void setCloudsDynamicCoverageArea ( float area ) #
Arguments
- float area - Dynamic coverage area, in units. The default value is 10 000.
float getCloudsDynamicCoverageArea ( ) const#
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.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 ( ) const#
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 ( bool shadows ) #
Arguments
- bool shadows - true to enable rendering of shadows from the clouds on the ground, false to disable it. The default value is true.
bool isCloudsGroundShadows ( ) const#
Return value
true if rendering of shadows from the clouds on the ground is enabled; otherwise, false.void setCloudsInterleavedRendering ( int rendering ) #
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 ( ) const#
Return value
One of the following values:- 0 - disabled (by default).
- 1 - 2 x 2.
- 2 - 4 x 4.
- 3 - 8 x 8.
void setCloudsInterleavedRenderingTemporal ( bool temporal ) #
Sets a value indicating if temporal accumulation of noises for interleaved sampling for clouds is enabled.Arguments
- bool temporal - true to enable temporal accumulation of noises for interleaved sampling for clouds; false - to disable.
bool isCloudsInterleavedRenderingTemporal ( ) const#
Returns a value indicating if temporal accumulation of noises for interleaved sampling for clouds is enabled.Return value
true if temporal accumulation of noises for interleaved sampling for clouds is enabled; otherwise false.void setCloudsLightingConeRadius ( float radius ) #
Arguments
- float radius - Lighting cone radius in range [0.0f; 1.0f]. The default value is 0.3.
float getCloudsLightingConeRadius ( ) const#
Return value
Lighting cone radius in range [0.0f; 1.0f].void setCloudsLightingQuality ( int quality ) #
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 ( ) const#
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 ) #
Arguments
- float length - Lighting trace length in range [1.0f; 2048.0f], in units. The default value is 230.0f.
float getCloudsLightingTraceLength ( ) const#
Return value
Lighting trace length, in units.void setCloudsNoiseIterations ( float iterations ) #
Arguments
- float iterations - New value of the noise iterations parameter for clouds. The default value is 0.1f.
float getCloudsNoiseIterations ( ) const#
Return value
Current value of the noise iterations parameter for clouds. The default value is 0.1f.void setCloudsNoiseLighting ( float lighting ) #
Arguments
- float lighting - New value of the noise lighting parameter for clouds. The default value is 0.3f.
float getCloudsNoiseLighting ( ) const#
Return value
Current value of the noise lighting parameter for clouds. The default value is 0.3f.void setCloudsNoiseStep ( float step ) #
Arguments
- float step - New value of the noise step parameter for clouds. The default value is 0.3f.
float getCloudsNoiseStep ( ) const#
Return value
Current value of the noise step parameter for clouds. The default value is 0.3f.void setCloudsNoiseStepSkip ( float skip ) #
Arguments
- float skip - New value of the noise step skip parameter for clouds. The default value is 0.3f.
float getCloudsNoiseStepSkip ( ) const#
Return value
Current value of the noise step skip parameter for clouds. The default value is 0.3f.void setCloudsSamplesCount ( int count ) #
Arguments
- int count - Number of samples:
- 0 - low.
- 1 - medium.
- 2 - high (by default).
- 3 - ultra.
int getCloudsSamplesCount ( ) const#
Return value
One of the following values:- 0 - low.
- 1 - medium.
- 2 - high (by default).
- 3 - ultra.
void setCloudsSamplingQuality ( int quality ) #
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 ( ) const#
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 setCloudsSoftIntersection ( float intersection ) #
Arguments
- float intersection - Soft intersection distance (in meters) within the [0.0f; 100000.0f] range. The default value is 100.0f.
float getCloudsSoftIntersection ( ) const#
Return value
Soft intersection distance for clouds, in meters.void setCloudsTransparentOrder ( bool order ) #
Arguments
- bool order - 1 to enable rendering of clouds after transparent, 0 to disable. The default value is 0.
bool isCloudsTransparentOrder ( ) const#
Return value
1 if clouds are rendered after transparent; otherwise, 0.void setColorCorrectionBrightness ( 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 getColorCorrectionBrightness ( ) const#
Returns the current overall brightness of the scene.Return value
Current brightness.void setColorCorrectionContrast ( 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 getColorCorrectionContrast ( ) const#
Returns the current overall contrast of the scene.Return value
Current contrast.void setColorCorrectionGamma ( 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 getColorCorrectionGamma ( ) const#
Returns the current overall gamma of the scene.Return value
Current gamma.int setColorCorrectionLUTImage ( 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 setColorCorrectionLUTPath().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::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::setColorCorrectionLUTImage(lut);
Arguments
Return value
1 if the image is set successfully; otherwise, 0.int getColorCorrectionLUTImage ( const Ptr<Image> & image ) const#
Return the current color transformation image (LUT).Arguments
Return value
1 if an image is successfully received; otherwise, 0.void setColorCorrectionLUTPath ( const char * path ) #
Sets the name of a new color transformation texture (LUT).Arguments
- const char * path - Name of the file with the texture. If NULL (0) is passed, the texture is cleared.
const char * getColorCorrectionLUTPath ( ) const#
Returns the name of the current color transformation texture (LUT).Return value
Name of the current color transformation texture.Ptr<TextureCurve> getColorCorrectionCurve ( ) const#
Returns the current Color Correction curve texture.Return value
An instance of the TextureCurve class with 4 channels:- Channels 0, 1, 2 - the Red, Green and Blue channels of the Color Correction curve.
- Channel 3 - the Saturation Correction curve.
void resetColorCorrectionCurve ( ) #
Resets the Color Correction curve to the default value.
void resetColorCorrectionSaturationCurve ( ) #
Resets the Saturation Correction curve to the default value.
void setColorCorrectionSaturation ( const Palette & saturation ) #
Sets the current saturation adjustment values.Arguments
Palette getColorCorrectionSaturation ( ) const#
Returns the current saturation adjustment values.Return value
A Palette structure.void setColorCorrectionPreserveSaturation ( bool saturation ) #
Sets a value indicating if initial scene color saturation is to be preserved after applying color correction.Arguments
- bool saturation - true to preserve initial scene color saturation after applying color correction; otherwise, false.
bool isColorCorrectionPreserveSaturation ( ) const#
Returns a value indicating if initial scene color saturation is to be preserved after applying color correction.Return value
true if initial scene color saturation is to be preserved after applying color correction; otherwise, false.void setColorCorrectionHueShift ( const Palette & shift ) #
Sets the current hue adjustment values.Arguments
Palette getColorCorrectionHueShift ( ) const#
Returns the current hue adjustment values.Return value
A Palette structure.void setColorCorrectionWhite ( 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 getColorCorrectionWhite ( ) const#
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 ( ) const#
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 ( bool cross ) #
Arguments
- bool cross - 1 to enable cross flares, 0 to disable.
bool isCross ( ) const#
Return value
1 if cross flares are enabled; otherwise, 0.void setCrossAngle ( float angle ) #
Arguments
- float angle - Angle in degrees.
float getCrossAngle ( ) const#
Return value
Angle between flare shafts in degrees.void setCrossColor ( const Math::vec4 & color ) #
Arguments
- const Math::vec4 & color - Color of cross flares.
Math::vec4 getCrossColor ( ) const#
Return value
Color of the cross flares.void setCrossLength ( float length ) #
Arguments
- float length - Length of a cross flare relative to the screen width.
float getCrossLength ( ) const#
Return value
Length of a cross flare relative to the screen width.void setCrossScale ( float scale ) #
Arguments
- float scale - Cross color scale. If a negative value is provided, 0 will be used instead.
float getCrossScale ( ) const#
Return value
Cross color scale.void setCrossShafts ( int shafts ) #
- 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 ( ) const#
- 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 ) #
Arguments
- float threshold - Cross flares threshold.
float getCrossThreshold ( ) const#
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:<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 ( ) const#
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:<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 ( bool debug ) #
Arguments
- bool debug - 1 to enable rendering of debug materials, 0 to disable it. The default value is 0.
bool isDebug ( ) const#
Return value
1 if debug materials are rendered; otherwise, 0.void setDebugMaterials ( const char * materials ) #
Updates the list of debug materials to be rendered.Arguments
- const char * materials - List of debug materials (a comma separated string, e.g., "mat_1, mat_2, ... mat_n").
const char * getDebugMaterials ( ) const#
Returns the list of debug materials to be rendered as a string constant.Return value
List of debug materials (a comma separated string, e.g., "mat_1, mat_2, ... mat_n").void setDecalDistance ( float distance ) #
Arguments
- float distance - Distance in units.
float getDecalDistance ( ) const#
Return value
Distance in units.void setDecals ( bool decals ) #
Arguments
- bool decals - 1 to enable rendering of decals, 0 to disable it. The default value is 1.
bool isDecals ( ) const#
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 ( ) const#
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 ) #
Arguments
- float scale - Dirt scale value within the [0.0f; 1.0f] range. The default value is 0.5f.
float getDirtScale ( ) const#
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 ( ) const#
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 ) #
Arguments
- float scale - Global distance scale.
float getDistanceScale ( ) const#
Return value
Global distance scale.void setDOF ( bool dof ) #
Arguments
- bool dof - 1 to enable the DOF effect, 0 to disable it. The default value is 0.
bool isDOF ( ) const#
Return value
1 if the DOF effect is enabled; otherwise, 0.void setDOFBlur ( float blur ) #
Arguments
- float blur - DOF blur intensity value. The default value is 1.0f.
float getDOFBlur ( ) const#
Return value
DoF blur intensity value.void setDOFBokehMode ( int mode ) #
Arguments
- int mode - The Bokeh shape:
- 0 - ring (by default).
- 1 - circle.
int getDOFBokehMode ( ) const#
Return value
The Bokeh shape:- 0 - ring (by default).
- 1 - circle.
void setDOFChromaticAberration ( float aberration ) #
Arguments
- float aberration - DOF chromatic aberration intensity value. The default value is 0.0f.
float getDOFChromaticAberration ( ) const#
Return value
DOF chromatic aberration intensity value.void setDOFFarDistance ( float distance ) #
Arguments
- float distance - Far DOF limit value in units.
float getDOFFarDistance ( ) const#
Return value
Far DOF limit value in units.void setDOFFarFocalOffset ( float offset ) #
Arguments
- float offset - Far DOF focal offset value in units.
float getDOFFarFocalOffset ( ) const#
Return value
Far DOF focal offset value in units.void setDOFFocalDistance ( float distance ) #
Arguments
- float distance - Focal distance in units. If a negative value is provided, 0 will be used instead.
float getDOFFocalDistance ( ) const#
Return value
Focal distance in units.void setDOFFocusImprovement ( bool improvement ) #
Arguments
- bool improvement - 1 to enable focus improvement for the DOF effect, 0 to disable it. The default value is 0.
bool isDOFFocusImprovement ( ) const#
Return value
1 if focus improvement is enabled for the DOF effect; otherwise, 0.void setDOFIncreasedAccuracy ( bool accuracy ) #
Arguments
- bool accuracy - 1 to enable increased accuracy for the DOF effect, 0 to disable it. The default value is 0.
bool isDOFIncreasedAccuracy ( ) const#
Return value
1 if increased accuracy is enabled for the DOF effect; otherwise, 0.void setDOFNearDistance ( float distance ) #
Arguments
- float distance - Near DOF limit value in units.
float getDOFNearDistance ( ) const#
Return value
Near DOF limit value in units.void setDOFNearFocalOffset ( float offset ) #
Arguments
- float offset - Near DOF focal offset value in units.
float getDOFNearFocalOffset ( ) const#
Return value
Near DOF focal offset value in units.void setDOFQuality ( int quality ) #
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 ( ) const#
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 ) #
Arguments
- int resolution - Resolution of the DOF effect:
- 0 - quarter resolution.
- 1 - half resolution.
- 2 - full resolution (by default).
int getDOFResolution ( ) const#
Return value
Resolution of the DOF effect:- 0 - quarter resolution.
- 1 - half resolution.
- 2 - full resolution (by default).
void setEnabled ( int arg1 ) const#
Enables or disables the render.Arguments
- int arg1 - 1 to enable the render, 0 to disable it.
int isEnabled ( ) const#
Returns a value indicating if the render is enabled.Return value
1 if the render is enabled; otherwise, 0.void setEnvironment ( bool environment ) #
Arguments
- bool environment - 1 to enable rendering of environment, 0 to disable it. The default value is 1.
bool isEnvironment ( ) const#
Return value
1 rendering of environment is enabled; otherwise, 0.void setEnvironmentCubemapBlendMode ( int mode ) #
Arguments
- int mode - Cubemap blending mode:
- 0 - alpha blend (by default).
- 1 - additive blend.
- 2 - multiply.
- 3 - overlay.
int getEnvironmentCubemapBlendMode ( ) const#
Return value
Cubemap blending mode:- 0 - alpha blend (by default).
- 1 - additive blend.
- 2 - multiply.
- 3 - overlay.
void setEnvironmentHazeMode ( int mode ) #
Arguments
- int mode - Haze mode: one of the HAZE_* variables.
int getEnvironmentHazeMode ( ) const#
Return value
Haze mode: one of the HAZE_* variables.void setExposure ( float exposure ) #
- 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 ( ) const#
- 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 ) #
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 ( ) const#
Return value
Period of exposure adaptation in seconds.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.Arguments
- float luminance - Maximum luminance. The provided value is saturated in the range [-10.0f; 10.0f].
float getExposureMaxLuminance ( ) const#
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.Arguments
- float luminance - Minimum luminance. The provided value is clamped to the range [-10.0f; 10.0f].
float getExposureMinLuminance ( ) const#
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 ) #
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 ( ) const#
- 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 ) #
- 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 ( ) const#
Return value
The current fade color.void setFieldDistance ( float distance ) #
Arguments
- float distance - Distance in units.
float getFieldDistance ( ) const#
Return value
Distance in units.void setFieldHeightResolution ( int resolution ) #
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 ( ) const#
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 ( bool precision ) #
Arguments
- bool precision - Textures' precision:
- 0 - 16-bit precision R16 texture (by default).
- 1 - 32-bit precision R32F texture.
bool isFieldPrecision ( ) const#
Return value
Textures' precision:- 0 - 16-bit precision R16 texture (by default).
- 1 - 32-bit precision R32F texture.
void setFieldShorelineResolution ( int resolution ) #
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 ( ) const#
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 ( bool filmic ) #
Arguments
- bool filmic - 1 to enable the filmic tonemapping effect, 0 to disable it. The default value is 1.
bool isFilmic ( ) const#
Return value
1 if the filmic tonemapping effect is enabled; otherwise, 0.void setFilmicLinearAngle ( float angle ) #
Arguments
- float angle - Linear Angle value.
float getFilmicLinearAngle ( ) const#
Return value
Linear Angle value.void setFilmicLinearScale ( float scale ) #
Arguments
- float scale - Linear Strength value.
float getFilmicLinearScale ( ) const#
Return value
Linear Strength value.void setFilmicShoulderScale ( float scale ) #
Arguments
- float scale - Shoulder Strength value.
float getFilmicShoulderScale ( ) const#
Return value
Shoulder Strength value.void setFilmicToeDenominator ( float denominator ) #
Arguments
- float denominator - Toe Denominator value.
float getFilmicToeDenominator ( ) const#
Return value
Toe Denominator value.void setFilmicToeNumerator ( float numerator ) #
Arguments
- float numerator - Toe Numerator value.
float getFilmicToeNumerator ( ) const#
Return value
Toe Numerator value.void setFilmicToeScale ( float scale ) #
Arguments
- float scale - Toe scale value.
float getFilmicToeScale ( ) const#
Return value
Toe scale value.void setFilmicWhiteLevel ( float level ) #
Arguments
- float level - Linear White Point value.
float getFilmicWhiteLevel ( ) const#
Return value
Linear White Point value.void setFilmicSaturationRecovery ( float recovery ) #
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.
NoticeWhen the 1.0f value is set specular highlights appear too saturated, so the recommended value is 0.75f
float getFilmicSaturationRecovery ( ) const#
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.
void setFirstFrame ( bool frame ) #
Sets a value indicating if the first frame should be enabled over the current frame.Arguments
- bool frame - 1 to enable the first frame flag, 0 - to disable.
bool isFirstFrame ( ) const#
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.bool isFlipped ( ) const#
Checks render orientation.TexturePtr texture;
TexturePtr texture_2;
float uv_x, uv_y;
//...
float flip_sign = (Render::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 ) #
Arguments
- float intensity - Intensity value of the FXAA to be set.
float getFXAAIntensity ( ) const#
Return value
Intensity value of the FXAAvoid setGbufferLightmap ( bool lightmap ) #
Arguments
- bool lightmap - 1 to enable storing lightmap data in the GBuffer, 0 to disable it. The default value is 1.
bool isGbufferLightmap ( ) const#
Return value
1 if lightmap data is stored in the GBuffer; otherwise, 0.int getGPUMemory ( ) const#
Return value
Amount of memory in Mbytes.int getGPUName ( ) const#
Returns the name of the current GPU.Return value
GPU name flag.Ptr<Texture> getGray2DArrayTexture ( ) const#
Returns gray 2D array texture.Return value
Gray 2D array texture.Ptr<Texture> getGray2DTexture ( ) const#
Returns gray 2D texture.Return value
Gray 2D texture.Ptr<Texture> getGray3DTexture ( ) const#
Returns gray 3D texture.Return value
Gray 3D texture.Ptr<Texture> getGrayCubeTexture ( ) const#
Returns gray Cube texture.Return value
Gray Cube texture.void setLens ( bool lens ) #
Arguments
- bool lens - Positive integer to enable lens flares, 0 to disable.
bool isLens ( ) const#
Return value
Positive integer if lens flares are enabled; otherwise, 0.void setLensColor ( const Math::vec4 & color ) #
Arguments
- const Math::vec4 & color - Color of lens flares.
Math::vec4 getLensColor ( ) const#
Return value
Color of a lens flare.void setLensDispersion ( const Math::vec3 & dispersion ) #
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 ( ) const#
Return value
Lens dispersion displacement per channel.void setLensLength ( float length ) #
Arguments
- float length - Length of the radial lens flare. The provided value is saturated in the range [0.0f; 1.0f].
float getLensLength ( ) const#
Return value
Length of the lens flare.void setLensRadius ( float radius ) #
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 ( ) const#
Return value
Radius of the spherical lens flares.void setLensScale ( float scale ) #
Arguments
- float scale - Lens color scale. If a negative value is provided, 0.0f will be used instead.
float getLensScale ( ) const#
Return value
Lens color scale.void setLensThreshold ( float threshold ) #
Arguments
- float threshold - Lens flares threshold.
float getLensThreshold ( ) const#
Return value
Lens flares threshold.void setLightDistance ( float distance ) #
Arguments
- float distance - Distance in units.
float getLightDistance ( ) const#
Return value
Distance in units.void setLightsForwardPerObjectEnv ( int env ) #
Arguments
- int env - Maximum number of environment probes per object within the [0; 128] range. The default value is 4.
int getLightsForwardPerObjectEnv ( ) const#
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.Arguments
- int omni - Maximum number of omni lights per object within the [0; 128] range. The default value is 4.
int getLightsForwardPerObjectOmni ( ) const#
Returns the current maximum number of omni lights per object (available only for materials rendered in the forward rendering pass).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.Arguments
- int proj - Maximum number of projected lights per object within the [0; 128] range. The default value is 4.
int getLightsForwardPerObjectProj ( ) const#
Returns the current maximum number of projected lights per object (available only for materials rendered in the forward rendering pass).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.Arguments
- int voxel - Maximum number of voxel probes per object within the [0; 128] range.
int getLightsForwardPerObjectVoxel ( ) const#
Returns the current maximum number of voxel probes per object (available only for materials rendered in the forward rendering pass).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.Arguments
- int world - Maximum number of world lights per object within the [0; 128] range. The default value is 4.
int getLightsForwardPerObjectWorld ( ) const#
Returns the current maximum number of world lights per object (available only for materials rendered in the forward rendering pass).Return value
Maximum number of world lights per object within the [0; 128] range.void setLightsInterleaved ( bool interleaved ) #
Arguments
- bool interleaved - 1 to enable interleaved lights rendering mode, 0 to disable it.
bool isLightsInterleaved ( ) const#
Return value
1 if interleaved lights rendering mode is enabled; otherwise, 0.void setLightsInterleavedCatmullResampling ( bool 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
- bool resampling - 1 to enable the Catmull-Rom resampling for interleaved lights rendering mode, 0 to disable it.
bool isLightsInterleavedCatmullResampling ( ) const#
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 ( ) const#
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 ( bool flares ) #
Arguments
- bool flares - 1 to enable rendering of per-light lens flares, 0 to disable it. The default value is 1.
bool isLightsLensFlares ( ) const#
Return value
1 if rendering of per-light lens flares is enabled; otherwise, 0.void setLightsMaxPerBatch ( int batch ) #
Arguments
- int batch - Maximum number of lights per batch within the [0; 1024] range. The default value is 1024.
Notice0 disables batching optimization.
int getLightsMaxPerBatch ( ) const#
Return value
Maximum number of lights per batch within the [0; 1024] range.void setLightsTileGridSize ( int size ) #
Arguments
- int size - Number of grid tiles per axis within the [1; 32] range. The default value is 8.
int getLightsTileGridSize ( ) const#
Return value
Number of grid tiles per axis within the [1; 32] range.int getMaxFieldAnimations ( ) const#
Returns the maximum limit of FieldAnimation nodes allowed to be used in shaders.Return value
Maximum number of FieldAnimation nodes allowed.int getMaxFieldHeights ( ) const#
Returns the maximum limit of FieldHeight nodes allowed to be used in shaders.Return value
Maximum number of FieldHeight nodes allowed.int getMaxFieldShorelines ( ) const#
Returns the maximum limit of FieldShoreline nodes allowed to be used in shaders.Return value
Maximum number of FieldShoreline nodes allowed.int getMaxFieldSpacers ( ) const#
Returns the maximum limit of FieldSpacer nodes allowed to be used in shaders.Return value
Maximum number of FieldSpacer nodes allowed.void setMotionBlur ( bool blur ) #
Arguments
- bool blur - 1 to enable the motion blur effect, 0 to disable it. The default value is 1.
bool isMotionBlur ( ) const#
Return value
1 if the motion blur effect is enabled; otherwise, 0.void setMotionBlurCameraVelocity ( bool velocity ) #
Arguments
- bool velocity - 1 to take camera velocity into account in the motion blur effect; 0 to take into account velocities of objects only.
bool isMotionBlurCameraVelocity ( ) const#
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 ) #
- 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 ( ) const#
Return value
Maximum scaled velocity of moving physical bodies used for the motion blur effect.void setMotionBlurNeatSilhouettes ( bool silhouettes ) #
Arguments
- bool silhouettes - 1 to enable the neat silhouettes option for motion blur, 0 to disable it. The default value is 1.
bool isMotionBlurNeatSilhouettes ( ) const#
Return value
1 if the neat silhouettes option is enabled; otherwise, 0.void setMotionBlurNoiseIntensity ( float intensity ) #
Arguments
- float intensity - Noise intensity value within the [0.0f; 1.0f] range. The default value is 0.25f.
float getMotionBlurNoiseIntensity ( ) const#
Return value
Noise intensity.void setMotionBlurNumSteps ( int steps ) #
Arguments
- int steps - Number of steps in range [2;64]. The default value is 4.
int getMotionBlurNumSteps ( ) const#
Return value
Number of steps.void setMotionBlurVelocityScale ( float scale ) #
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 ( ) const#
Return value
Scale of bodies' linear and angular velocities used for the motion blur.int getNumDecals ( ) const#
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 ( ) const#
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 ( ) const#
Returns the maximum number of instances that can be rendered for each of the following node types:Return value
Maximum number of instances that can be rendered.int getNumLights ( ) const#
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 ( ) const#
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 ( ) const#
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 ( ) const#
Returns the number of procedurals that can be currently seen in the viewport.Return value
The number of procedurals.int getNumReflections ( ) const#
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 ( ) const#
Returns the number of shaders set per frame. See Rendering Profiler article for details.Return value
The number of shaders.int getNumShadows ( ) const#
Returns the number of shadow passes rendered per frame. See Rendering Profiler article for details.Return value
The number of shadow passes.int getNumSurfaces ( ) const#
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 ( ) const#
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 ) #
Arguments
- float distance - Distance in units.
float getObjectDistance ( ) const#
Return value
Distance in units.void setOccluders ( bool occluders ) #
Arguments
- bool occluders - 1 to enable rendering of occluders, 0 to disable it. The default value is 1.
bool isOccluders ( ) const#
Return value
1 if rendering of occluders is enabled; otherwise, 0. The default value is 1.void setOccludersResolution ( const Math::vec2 & resolution ) #
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 ( ) const#
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 ( bool shadows ) #
Arguments
- bool shadows - 1 to enable rendering of occluders for shadows, 0 to disable it. The default value is 0.
bool isOccludersShadows ( ) const#
Return value
1 if rendering of occluders for shadows is enabled; otherwise, 0. The default value is 0.void setOccludersShadowsResolution ( const Math::vec2 & resolution ) #
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 ( ) const#
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 ( bool queries ) #
Arguments
- bool queries - 1 to enable additional hardware occlusion query test, 0 to disable it. The default value is 1.
bool isOcclusionQueries ( ) const#
Return value
1 if if additional hardware occlusion query test is enabled; otherwise, 0.void setOcclusionQueriesNumFrames ( int frames ) #
Arguments
- int frames - Number of frames. The value within the [0; 1024] range. The default value is 5.
int getOcclusionQueriesNumFrames ( ) const#
Return value
Number of frames. The value within the [0; 1024] range.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 ( ) const#
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 ) #
Arguments
- float distance - Distance in units.
float getReflectionDistance ( ) const#
Return value
Distance in units.void setReflectionDynamic ( bool dynamic ) #
Arguments
- bool dynamic - 1 to enable dynamic reflections for materials, 0 to disable it. The default value is 1.
bool isReflectionDynamic ( ) const#
Return value
1 if dynamic reflections for materials are enabled; otherwise, 0.void setReflectionLods ( bool lods ) #
Arguments
- bool lods - 1 to enable reduction of resolution of dynamic reflections when the camera moves away, 0 to disable it. The default value is 1.
bool isReflectionLods ( ) const#
Return value
1 if reduction of resolution of dynamic reflections when the camera moves away is enabled; otherwise, 0.void setRefraction ( bool refraction ) #
Arguments
- bool refraction - 1 to enable refraction, 0 to disable it. The default value is 1.
bool isRefraction ( ) const#
Return value
1 if refraction is enabled; otherwise, 0.void setRefractionDispersion ( const Math::vec3 & dispersion ) #
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 ( ) const#
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 ( ) const#
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 ( bool precision ) #
Arguments
- bool precision - One of the following values:
- 0 - RG11B10F.
- 1 - RGBA16F (by default).
bool isScreenPrecision ( ) const#
Return value
One of the following values:- 0 - RG11B10F.
- 1 - RGBA16F (by default).
void setShaderDefines ( const char * defines ) #
Arguments
- const char * defines - Additional shader defines.
const char * getShaderDefines ( ) const#
Return value
Additional shader defines.void setShadowDistance ( float distance ) #
Arguments
- float distance - Distance in units.
float getShadowDistance ( ) const#
Return value
Distance in units.void setShadows ( bool shadows ) #
Arguments
- bool shadows - 1 to enable shadows rendering, 0 to skip it. The default value is 1.
bool isShadows ( ) const#
Return value
1 if shadows are rendered; otherwise, 0.void setShadowsAlphaTest ( bool test ) #
Arguments
- bool test - 1 to enable alpha test for shadows, 0 to disable it. The default value is 1.
bool isShadowsAlphaTest ( ) const#
Return value
1 if alpha test is enabled for shadows; otherwise, 0.void setShadowShafts ( bool shafts ) #
Arguments
- bool shafts - 1 to enable volumetric shadows, 0 to disable. The default value is 0.
bool isShadowShafts ( ) const#
Return value
1 if volumetric shadows are enabled; otherwise, 0.void setShadowShaftsExposure ( float exposure ) #
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 ( ) const#
Return value
Shadow contrast.void setShadowShaftsLength ( float length ) #
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 ( ) const#
Return value
Shadow length.void setShadowsScreenSpace ( bool space ) #
Arguments
- bool space - 1 to enable screen space shadows, 0 to disable. The default value is 1.
bool isShadowsScreenSpace ( ) const#
Return value
1 if screen space shadows are enabled; otherwise, 0.void setShadowsPenumbraMode ( int mode ) #
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 ( ) const#
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 ( bool noise ) #
Arguments
- bool noise - 1 to enable noise for penumbra rendering, 0 to disable. The default value is 1.
bool isShadowsPenumbraNoise ( ) const#
Return value
1 if noise for penumbra rendering is enabled; otherwise, 0.void setShadowsFilterMode ( int mode ) #
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 ( ) const#
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 ( bool noise ) #
Arguments
- bool noise - 1 to enable noise for shadow filtering, 0 to disable. The default value is 1.
bool isShadowsFilterNoise ( ) const#
Return value
1 if noise for shadow filtering is enabled; otherwise, 0.void setShadowsTranslucentDepth ( float depth ) #
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 ( ) const#
Return value
Current global translucence depth value. The higher the value, the deeper the light penetrates translucent objects shifting the shadow.void setShadowsWorldLerpCascades ( bool cascades ) #
Arguments
- bool cascades - 1 to enable shadows cascades lerp, 0 to disable it. The default value is 1.
bool isShadowsWorldLerpCascades ( ) const#
Return value
1 if shadows cascades lerp is enabled; otherwise, 0.void setSharpen ( bool sharpen ) #
Arguments
- bool sharpen - 1 to enable the sharpening post-processing effect, 0 to disable it. The default value is 0.
bool isSharpen ( ) const#
Return value
1 if the sharpening post-processing effect is enabled; otherwise, 0.void setSharpenIntensity ( float intensity ) #
Arguments
- float intensity - Intensity of the sharpening effect.
float getSharpenIntensity ( ) const#
Return value
Intensity of the sharpening effect.void setShowAlphaTest ( bool test ) #
Arguments
- bool test - 1 to display the visualizer for transparent objects using alpha test, 0 to hide it. The default value is 0.
bool isShowAlphaTest ( ) const#
Return value
1 if visualizer for transparent objects using alpha test is displayed; otherwise, 0.void setShowAmbient ( bool ambient ) #
Arguments
- bool ambient - 1 to display the ambient pass buffer, 0 to hide it. The default value is 0.
bool isShowAmbient ( ) const#
Return value
1 if the ambient pass buffer is displayed; otherwise, 0.void setShowCascades ( bool cascades ) #
Arguments
- bool cascades - 1 to display world shadow cascades, 0 to hide them. The default value is 0.
bool isShowCascades ( ) const#
Return value
1 if world shadow cascades are displayed; otherwise, 0.void setShowDecals ( bool decals ) #
Arguments
- bool decals - 1 to display the visualizer for decals, 0 to hide it. The default value is 0.
bool isShowDecals ( ) const#
Return value
1 if visualizer for decals is displayed; otherwise, 0.void setShowDynamic ( bool dynamic ) #
Arguments
- bool dynamic - true to display the visualizer for dynamic objects, false to hide it. The default value is false.
bool isShowDynamic ( ) const#
Return value
true if visualizer for dynamic objects is displayed; otherwise, false.void setShowGeodeticPivot ( bool pivot ) #
Arguments
- bool pivot - 1 to display geodetic pivots, 0 to hide them. The default value is 0.
bool isShowGeodeticPivot ( ) const#
Return value
1 if geodetic pivots are displayed; otherwise, 0.void setShowMipmaps ( bool mipmaps ) #
Arguments
- bool mipmaps - 1 to display texture mipmap levels, 0 to hide them. The default value is 0.
bool isShowMipmaps ( ) const#
Return value
1 if texture mipmap levels are displayed; otherwise, 0.void setShowOccluder ( bool occluder ) #
Arguments
- bool occluder - 1 to display the buffer used for occluders, 0 to hide it. The default value is 0.
bool isShowOccluder ( ) const#
Return value
1 if the buffer used for occluders is displayed; otherwise, 0.void setShowQueries ( bool queries ) #
Arguments
- bool queries - 1 to display occlusion query boxes, 0 to hide them. The default value is 0.
bool isShowQueries ( ) const#
Return value
1 if occlusion query boxes are displayed; otherwise, 0.void setShowScissors ( bool scissors ) #
Arguments
- bool scissors - 1 to display scissor rectangles, 0 to hide them. The default value is 0.
bool isShowScissors ( ) const#
Return value
1 if scissor rectangles are displayed; otherwise, 0.void setShowTextures ( int textures ) #
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 ( ) const#
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 ) #
Arguments
- int number - Number of buffers in a row. Value within the [1; 16] range. The default value is 7.
int getShowTexturesNumber ( ) const#
Return value
Number of buffers in a row.void setShowTexturesOffset ( int offset ) #
Arguments
- int offset - Number of the buffer to start displaying from. Value within the [0; 52] range. The default value is 0.
int getShowTexturesOffset ( ) const#
Return value
Number of the buffer to start displaying from. Value within the [0; 52] range.void setShowTransparent ( bool transparent ) #
Arguments
- bool transparent - 1 to display the visualizer for transparent objects, 0 to hide it. The default value is 0.
bool isShowTransparent ( ) const#
Return value
1 if visualizer for transparent objects is enabled; otherwise, 0.void setShowTriangles ( int 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 ( ) const#
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 ( bool enabled ) #
Arguments
- bool enabled - 0 to skip rendering of clouds, 1 to render clouds. The default value is 1.
bool isCloudsEnabled ( ) const#
Return value
1 if rendering of clouds is enabled; otherwise, 0.void setLightsEnabled ( bool enabled ) #
Arguments
- bool enabled - 0 to skip rendering of lights, 1 to render lights. The default value is 1.
bool isLightsEnabled ( ) const#
Return value
1 if rendering of lights is enabled; otherwise, 0.void setWaterEnabled ( bool enabled ) #
Arguments
- bool enabled - 0 to skip rendering of water, 1 to render water. The default value is 1.
bool isWaterEnabled ( ) const#
Return value
1 if rendering of water is enabled; otherwise, 0.void setScreenSpaceEffects ( bool effects ) #
Arguments
- bool effects - 1 to enable rendering of screen-space effects, 1 to skip them. The default value is 1.
bool isScreenSpaceEffects ( ) const#
Return value
1 if rendering of screen-space effects is enabled; otherwise, 0.void setPrePostMaterialsEnabled ( bool enabled ) #
Arguments
- bool enabled - 1 to render pre-post materials, 0 to skip them. The default value is 1.
bool isPrePostMaterialsEnabled ( ) const#
Return value
1 if rendering of pre-post materials is enabled; otherwise, 0.void setTransparentEnabled ( bool enabled ) #
Arguments
- bool enabled - 1 to render the transparent pass, 0 to skip it. The default value is 1.
bool isTransparentEnabled ( ) const#
Return value
1 if the transparent pass is rendered; otherwise, 0.void setTransparentAmbient ( bool ambient ) #
Arguments
- bool ambient - 1 to render the transparent ambient pass, 0 to skip it. The default value is 1.
bool isTransparentAmbient ( ) const#
Return value
1 if the transparent ambient pass is rendered; otherwise, 0.void setTransparentDeferred ( bool deferred ) #
Arguments
- bool deferred - 1 to render the transparent deferred pass, 0 to skip it. The default value is 1.
bool isTransparentDeferred ( ) const#
Return value
1 if the transparent deferred pass is rendered; otherwise, 0.void setTransparentLight ( bool light ) #
Arguments
- bool light - 1 to render the transparent light pass, 0 to skip it. The default value is 1.
bool isTransparentLight ( ) const#
Return value
1 if the transparent light pass is rendered; otherwise, 0.void setTransparentMultipleEnvProbes ( bool probes ) #
Enables or disables rendering of the transparent multiple environment probes pass.Arguments
- bool probes - 1 to render the transparent multiple environment probes pass, 0 to skip it. The default value is 1.
bool isTransparentMultipleEnvProbes ( ) const#
Returns a value indicating if the transparent multiple environment probes pass is rendered.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 ( ) const#
Returns sky rotation.Return value
Sky rotation quaternion.void setSSAO ( bool ssao ) #
Arguments
- bool ssao - 1 to enable the SSAO effect, 0 to disable.
bool isSSAO ( ) const#
Return value
1 if the SSAO effect is enabled; otherwise, 0.void setSSAOCavity ( bool cavity ) #
Arguments
- bool cavity - 1 to enable the cavity option for the SSAO effect, 0 to disable. The default value is 1.
bool isSSAOCavity ( ) const#
Return value
1 if the cavity option for the SSAO effect is enabled; otherwise, 0.void setSSAOCavityIntensity ( float intensity ) #
Arguments
- float intensity - Sharpening intensity value. The default value is 1.0f.
float getSSAOCavityIntensity ( ) const#
Return value
Sharpening intensity value. The default value is 1.0f.void setSSAOCavityRadius ( float radius ) #
Arguments
- float radius - Size of junction contours area. The default value is 1.0f.
float getSSAOCavityRadius ( ) const#
Return value
Size of junction contours area. The default value is 1.0f.void setSSAOIntensity ( float intensity ) #
- 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 ( ) const#
- 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 ) #
Arguments
- float side - SSAO intensity value for the scene object's lighted side. The default value is 1.0f.
float getSSAOIntensityLightedSide ( ) const#
Return value
SSAO intensity value for the scene object's lighted side. The default value is 1.0f.void setSSAOIntensityReflection ( float reflection ) #
Arguments
- float reflection - SSAO intensity value for reflections. The default value is 1.0f.
float getSSAOIntensityReflection ( ) const#
Return value
SSAO intensity value for reflections. The default value is 1.0f.void setSSAONoise ( bool noise ) #
Arguments
- bool noise - 1 to enable SSAO noise, 0 to disable. The default value is 1.
bool isSSAONoise ( ) const#
Return value
1 if SSAO noise is enabled; otherwise, 0.void setSSAOQuality ( int quality ) #
Arguments
- int quality - Quality of SSAO:
- 0 - low quality.
- 1 - medium quality (by default).
- 2 - high quality.
- 3 - ultra quality.
int getSSAOQuality ( ) const#
Return value
Quality of SSAO:- 0 - low quality.
- 1 - medium quality (by default).
- 2 - high quality.
- 3 - ultra quality.
void setSSAORadius ( float radius ) #
- 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 ( ) const#
- 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 ) #
Arguments
- float threshold - SSAO threshold value in the range [0.0f; 1.0f]. The default value is 0.5f.
float getSSAOThreshold ( ) const#
Return value
Current SSAO threshold value.void setSSAORayTracing ( bool tracing ) #
Arguments
- bool tracing - 1 to enable ray tracing for SSAO calculation, 0 to disable. The default value is 1.
bool isSSAORayTracing ( ) const#
Return value
1 if ray tracing is used for SSAO calculation; otherwise, 0.void setSSAORayTracingDenoise ( bool denoise ) #
Arguments
- bool denoise - 1 to enable noise reduction for the ray-traced SSAO, 0 to disable.
bool isSSAORayTracingDenoise ( ) const#
Return value
1 if noise reduction for the ray-traced SSAO is enabled; otherwise, 0.void setSSAORayTracingThreshold ( float threshold ) #
Arguments
- float threshold - SSAO ray tracing threshold value. The default value is 1.0f.
float getSSAORayTracingThreshold ( ) const#
Return value
SSAO ray tracing threshold value. The default value is 1.0f.void setSSAOResolution ( int resolution ) #
Arguments
- int resolution - Resolution of SSAO:
- 0 - quarter resolution.
- 1 - half resolution (by default).
- 2 - full resolution.
int getSSAOResolution ( ) const#
Return value
Resolution of SSAO:- 0 - quarter resolution.
- 1 - half resolution (by default).
- 2 - full resolution.
void setSSGI ( bool ssgi ) #
Arguments
- bool ssgi - 1 to enable the SSGI effect, 0 to disable it. The default value is 0.
bool isSSGI ( ) const#
Return value
1 if the SSGI effect is enabled; otherwise, 0.void setSSGIIntensity ( float intensity ) #
- By the minimum value of 0.0f, the global illumination is the darkest.
Arguments
- float intensity - SSGI intensity value. The default value is 1.0f.
float getSSGIIntensity ( ) const#
- By the minimum value of 0.0f, the global illumination is the darkest.
Return value
SSGI intensity value. The default value is 1.0f.void setSSGIRadius ( float radius ) #
- By low values, each point affects only the points in the close range.
- By high values, each point affects farther positioned points.
Arguments
- float radius - SSGI radius value. The default value is 1.0f.
float getSSGIRadius ( ) const#
- By low values, each point affects only the points in the close range.
- By high values, each point affects farther positioned points.
Return value
SSGI radius value. The default value is 1.0f.void setSSGIDenoise ( bool denoise ) #
Arguments
- bool denoise - true to enable noise reduction for the ray-traced SSGI, false to disable.
bool isSSGIDenoise ( ) const#
Return value
true if noise reduction for the ray-traced SSGI is enabled; otherwise, false.void setSSGIThreshold ( float threshold ) #
Arguments
- float threshold - SSGI ray tracing threshold value. The default value is 1.0f.
float getSSGIThreshold ( ) const#
Return value
SSGI ray tracing threshold value. The default value is 1.0f.void setSSGIResolutionColor ( int color ) #
Arguments
- int color - One of the following values:
- 0 - quarter resolution.
- 1 - half resolution (by default).
- 2 - full resolution.
int getSSGIResolutionColor ( ) const#
Return value
One of the following values:- 0 - quarter resolution.
- 1 - half resolution (by default).
- 2 - full resolution.
void setSSR ( bool ssr ) #
Arguments
- bool ssr - 1 to enable the SSR effect, 0 to disable it.
bool isSSR ( ) const#
Return value
1 if the SSR effect is enabled; otherwise, 0. The default value is 1.void setSSRDenoise ( bool denoise ) #
Arguments
- bool denoise - 1 to enable noise reduction for the SSR effect, 0 to disable it.
bool isSSRDenoise ( ) const#
Return value
1 if noise reduction for the SSR effect is enabled; otherwise, 0.void setSSRFastTracing ( bool tracing ) #
Arguments
- bool tracing - 1 to enable SSR fast tracing, 0 to disable it. The default value is 1.
bool isSSRFastTracing ( ) const#
Return value
1 if SSR fast tracing is enabled; otherwise, 0.void setSSRIncreasedAccuracy ( bool accuracy ) #
Arguments
- bool accuracy - 1 to enable increased accuracy for the SSR, 0 to disable it. The default value is 0.
bool isSSRIncreasedAccuracy ( ) const#
Return value
1 if increased accuracy is enabled for the SSR; otherwise, 0.void setSSRNoiseRay ( float ray ) #
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 ( ) const#
Return value
Ray noise intensity.void setSSRNoiseStep ( float step ) #
Arguments
- float step - Step noise intensity. The default value is 0.3f. The higher is the value, the less pronounced is the banding effect.
float getSSRNoiseStep ( ) const#
Return value
Step noise intensity.void setSSRNumRays ( int rays ) #
Arguments
- int rays - Number of rays per pixel within the [1; 64] range. The default value is 4.
int getSSRNumRays ( ) const#
Return value
Number of rays per pixel within the [1; 64] range.void setSSRNumSteps ( int steps ) #
Arguments
- int steps - Number of steps per ray within the [1; 64] range. The default value is 16.
int getSSRNumSteps ( ) const#
Return value
Number of steps per ray within the [1; 64] range.void setSSRResolution ( int resolution ) #
Arguments
- int resolution - SSR resolution:
- 0 - quarter resolution.
- 1 - half resolution (by default).
- 2 - full resolution.
int getSSRResolution ( ) const#
Return value
One of the following values:- 0 - quarter resolution.
- 1 - half resolution (by default).
- 2 - full resolution.
void setSSRResolutionColor ( int color ) #
Arguments
- int color - Color buffer resolution:
- 0 - quarter resolution (by default).
- 1 - half resolution.
- 2 - full resolution.
int getSSRResolutionColor ( ) const#
Return value
Color buffer resolution:- 0 - quarter resolution (by default).
- 1 - half resolution.
- 2 - full resolution.
void setSSRResolutionDepth ( int depth ) #
Arguments
- int depth - Depth buffer resolution:
- 0 - quarter resolution (by default).
- 1 - half resolution.
- 2 - full resolution.
NoticeTo gain performance, this option can be set to lower values while enabling increased accuracy.
int getSSRResolutionDepth ( ) const#
Return value
Depth buffer resolution:- 0 - quarter resolution (by default).
- 1 - half resolution.
- 2 - full resolution.
void setSSRStepSize ( float size ) #
Arguments
- float size - Step size. The default value is 1.0f.
float getSSRStepSize ( ) const#
Return value
Step size.void setSSRTGI ( bool ssrtgi ) #
Arguments
- bool ssrtgi - 1 to enable the SSRTGI effect, 0 to disable. The default value is 1.
bool isSSRTGI ( ) const#
Return value
1 if the SSRTGI effect is enabled; otherwise, 0.void setSSRTGIFastTracing ( bool tracing ) #
Arguments
- bool tracing - 1 to enable fast tracing for the SSRTGI, 0 to disable. The default value is 1.
bool isSSRTGIFastTracing ( ) const#
Return value
1 if the SSRTGI fast tracing is enabled; otherwise, 0.void setSSRTGIIncreasedAccuracy ( bool accuracy ) #
Arguments
- bool accuracy - 1 to enable increased accuracy for the SSRTGI, 0 to disable. The default value is 1.
bool isSSRTGIIncreasedAccuracy ( ) const#
Return value
1 if increased accuracy is enabled for the SSRTGI; otherwise, 0.void setSSRTGINoiseRay ( float ray ) #
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 getSSRTGINoiseRay ( ) const#
Return value
Ray noise intensity in range [0.0f;1.0f].void setSSRTGINoiseStep ( float step ) #
Arguments
- float step - Step 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 getSSRTGINoiseStep ( ) const#
Return value
Step noise intensity in range [0.0f;1.0f].void setSSRTGINumRays ( int rays ) #
Arguments
- int rays - Number of rays per pixel in range [1;1024]. The default value is 8.
int getSSRTGINumRays ( ) const#
Return value
Number of rays.void setSSRTGINumSteps ( int steps ) #
Arguments
- int steps - Number of steps in range [1;256]. The default value is 8.
int getSSRTGINumSteps ( ) const#
Return value
Number of steps in range [1;256].void setSSRTGIResolution ( int resolution ) #
Arguments
- int resolution - SSRTGI resolution:
- 0 - quarter resolution.
- 1 - half resolution (by default).
- 2 - full resolution.
int getSSRTGIResolution ( ) const#
Return value
SSRTGI resolution:- 0 - quarter resolution.
- 1 - half resolution (by default).
- 2 - full resolution.
void setSSRTGIResolutionDepth ( int depth ) #
Arguments
- int depth - Depth buffer resolution:
- 0 - quarter resolution (by default).
- 1 - half resolution.
- 2 - full resolution.
NoticeTo gain performance this option can be set to lower values while enabling the increased accuracy.
int getSSRTGIResolutionDepth ( ) const#
Return value
Depth buffer resolution:- 0 - quarter resolution (by default).
- 1 - half resolution.
- 2 - full resolution.
void setSSRTGIStepSize ( float size ) #
Arguments
- float size - Step size. The default value is 1.0f.
float getSSRTGIStepSize ( ) const#
Return value
Step size.void setSSRTGIUpscaling ( bool upscaling ) #
Arguments
- bool upscaling - 1 to enable upscaling for the SSRTGI, 0 to disable it. The default value is 1.
bool isSSRTGIUpscaling ( ) const#
Return value
1 if the SSRTGI upscaling is enabled; otherwise, 0.void setSSRThreshold ( float threshold ) #
Arguments
- float threshold - SSR threshold value. The default value is 1.0f
float getSSRThreshold ( ) const#
Return value
SSR threshold.void setSSRThresholdOcclusion ( float occlusion ) #
Arguments
- float occlusion - SSR threshold occlusion. The default value is 1.0f
float getSSRThresholdOcclusion ( ) const#
Return value
SSR threshold occlusion.void setSSRVisibilityRoughnessMax ( float val ) #
Arguments
- float val - Maximum roughness value within the [0.0f; 1.0f] range. The default value is 1.0f.
float getSSRVisibilityRoughnessMax ( ) const#
Return value
Maximum roughness value within the [0.0f; 1.0f] range.void setSSRVisibilityRoughnessMin ( float val ) #
Arguments
- float val - Minimum roughness value within the [0.0f; 1.0f] range. The default value is 1.0f.
float getSSRVisibilityRoughnessMin ( ) const#
Return value
Minimum roughness value within the [0.0f; 1.0f] range.void setSSSSS ( bool sssss ) #
Arguments
- bool sssss - 1 to enable the SSSSS effect, 0 to disable. The default value is 0.
bool isSSSSS ( ) const#
Return value
1 if the SSS effect is enabled; otherwise, 0.void setSSSSSColor ( const Math::vec4 & color ) #
Arguments
- const Math::vec4 & color - Subsurface scattering color.
Math::vec4 getSSSSSColor ( ) const#
Return value
Subsurface scattering color.void setSSSSSQuality ( int quality ) #
Arguments
- int quality - SSS quality:
- 0 - low quality.
- 1 - medium quality (by default).
- 2 - high quality.
- 3 - ultra quality.
int getSSSSSQuality ( ) const#
Return value
SSS quality:- 0 - low quality.
- 1 - medium quality (by default).
- 2 - high quality.
- 3 - ultra quality.
void setSSSSSRadius ( float radius ) #
Arguments
- float radius - Subsurface scattering radius. The default value is 1.0f.
float getSSSSSRadius ( ) const#
Return value
Subsurface scattering radius value.void setSSSSSResolution ( int resolution ) #
Arguments
- int resolution - SSS resolution:
- 0 - half resolution (by default).
- 1 - full resolution.
int getSSSSSResolution ( ) const#
Return value
SSS resolution:- 0 - half resolution (by default).
- 1 - full resolution.
void setViewportMode ( Render::VIEWPORT_MODE mode ) #
Arguments
- Render::VIEWPORT_MODE mode - New viewport mode to be set. One of the VIEWPORT_MODE_* values.
Render::VIEWPORT_MODE getViewportMode ( ) const#
Return value
Current viewport mode. One of the VIEWPORT_MODE_* values.bool isViewportModeStereo ( Render::VIEWPORT_MODE mode ) #
Returns a value indicating if the specified mode is one of the stereo rendering modes.Arguments
- Render::VIEWPORT_MODE mode - Viewport mode to be checked. One of the VIEWPORT_MODE_* values.
Return value
true if the specified mode is one of the stereo rendering modes; otherwise false.bool isViewportModePanorama ( Render::VIEWPORT_MODE mode ) #
Returns a value indicating if the specified mode is one of the panorama rendering modes.Arguments
- Render::VIEWPORT_MODE mode - Viewport mode to be checked. One of the VIEWPORT_MODE_* values.
Return value
true if the specified mode is one of the panorama rendering modes; otherwise false.void setStereoDistance ( float distance ) #
Sets the focal distance for stereo rendering (distance in the world space to the point where two views line up, i.e. to the zero parallax plane).Arguments
- float distance - Focal distance for stereo rendering, in units.
float getStereoDistance ( ) const#
Returns the focal distance for stereo rendering (distance in the world space to the point where two views line up).Return value
Focal distance for stereo rendering, in units.void setStereoOffset ( float offset ) #
Sets the virtual camera offset (an offset after the perspective projection).Arguments
- float offset - Virtual camera offset in units.
float getStereoOffset ( ) const#
Returns the virtual camera offset (an offset after the perspective projection).Return value
Virtual camera offset in units.void setStereoRadius ( float radius ) #
Sets the radius for stereo (the half of the separation distance between the cameras).Arguments
- float radius - Stereo radius, in units. If a negative value is provided, 0 will be used instead.
float getStereoRadius ( ) const#
Returns the current radius for stereo (the half of the separation distance between the cameras).Return value
Stereo radius, in units.void setSupersampling ( float supersampling ) #
Arguments
- float supersampling - Number of samples per pixel within the range [1e-6f; 8.0f]. The default value is 1.0f
float getSupersampling ( ) const#
Return value
Number of samples per pixel.void setTAAFramesByColor ( bool color ) #
Arguments
- bool color - 1 to enable the TAA color clamping option, 0 to disable it. The default value is 1.
bool isTAAFramesByColor ( ) const#
Return value
1 if TAA color clamping is enabled; otherwise, 0.void setTAADiagonalNeighbors ( bool neighbors ) #
Arguments
- bool neighbors - 1 to take diagonally neighboring pixels into account in the process of color clamping for TAA, 0 to ignore them.
bool isTAADiagonalNeighbors ( ) const#
Return value
1 if diagonally neighboring pixels are to be taken into account in the process of color clamping for TAA; otherwise, 0.void setTAAFixFlicker ( bool flicker ) #
Arguments
- bool flicker - 1 to enable the TAA fix flicker option, 0 to disable it. The default value is 1.
bool isTAAFixFlicker ( ) const#
Return value
1 if the TAA fix flicker option is enabled; otherwise, 0.void setTAAFrameCount ( float count ) #
Arguments
- float count - TAA frame count value. The default value is 30.0f.
float getTAAFrameCount ( ) const#
Return value
TAA frame count value.void setTAAMaxFramesByVelocity ( float velocity ) #
Arguments
- float velocity - Maximum TAA frame count value. The default value is 60.0f.
float getTAAMaxFramesByVelocity ( ) const#
Return value
Maximum TAA frame count value.void setTAAMinFramesByVelocity ( float velocity ) #
Arguments
- float velocity - Minimum TAA frame count value. The default value is 4.0f.
float getTAAMinFramesByVelocity ( ) const#
Return value
Minimum TAA frame count value.void setTAAPreserveDetails ( float details ) #
Arguments
- float details - TAA detail level value. The default value is 1.5f.
float getTAAPreserveDetails ( ) const#
Return value
TAA detail level value.void setTAAFramesByVelocity ( bool velocity ) #
Arguments
- bool velocity - 1 to enable the TAA velocity clamping option, 0 to disable it. The default value is 1.
bool isTAAFramesByVelocity ( ) const#
Return value
1 if TAA velocity clamping is enabled; otherwise, 0.void setTAAFramesVelocityThreshold ( float threshold ) #
Arguments
- float threshold - TAA velocity threshold value. The default value is 1.0f.
float getTAAFramesVelocityThreshold ( ) const#
Return value
TAA velocity threshold value.void setTerrainGlobalAnisotropy ( int anisotropy ) #
Arguments
- int anisotropy - Anisotropy level:
- 0 - anisotropy level 1.
- 1 - anisotropy level 2.
- 2 - anisotropy level 4 (by default).
- 3 - anisotropy level 8.
- 4 - anisotropy level 16.
int getTerrainGlobalAnisotropy ( ) const#
Return value
Anisotropy level:- 0 - anisotropy level 1.
- 1 - anisotropy level 2.
- 2 - anisotropy level 4 (by default).
- 3 - anisotropy level 8.
- 4 - anisotropy level 16.
void setTerrainGlobalDisplacement ( bool displacement ) #
Arguments
- bool displacement - true to enable displacement mapping for the global terrain; false to disable it. The default value is true.
bool isTerrainGlobalDisplacement ( ) const#
Return value
true if displacement mapping is enabled for the global terrain; otherwise, false.void setTerrainGlobalDisplacementNormal ( bool normal ) #
Enables or disables use of normals in displacement mapping for global terrain rendering.Arguments
- bool normal - true to enable displacement mapping for the global terrain; false to disable it. The default value is 1.
bool isTerrainGlobalDisplacementNormal ( ) const#
Returns a value indicating if displacement mapping for global terrain rendering uses normals.Return value
true if displacement mapping for global terrain rendering uses normals; otherwise, false.void setTerrainGlobalHoles ( bool holes ) #
Arguments
- bool holes - true to enable decal-based holes for the global terrain; otherwise, false.
bool isTerrainGlobalHoles ( ) const#
Return value
true if decal-based holes for the global terrain are enabled; otherwise, false.void setTerrainGlobalTriplanar ( bool triplanar ) #
Arguments
- bool triplanar - true to enable triplanar texture mapping for the global terrain; false to use planar UV mapping instead.
bool isTerrainGlobalTriplanar ( ) const#
Return value
true if triplanar texture mapping is enabled for the global terrain; otherwise, false.void setTexturesAnisotropy ( int anisotropy ) #
Arguments
- int anisotropy - Anisotropy level:
- 0 - anisotropy level 1.
- 1 - anisotropy level 2.
- 2 - anisotropy level 4.
- 3 - anisotropy level 8 (by default).
- 4 - anisotropy level 16.
int getTexturesAnisotropy ( ) const#
Return value
Anisotropy level:- 0 - anisotropy level 1.
- 1 - anisotropy level 2.
- 2 - anisotropy level 4.
- 3 - anisotropy level 8 (by default).
- 4 - anisotropy level 16.
void setTexturesFilter ( int filter ) #
Arguments
- int filter - Texture filtering mode:
- 0 - bilinear filtering.
- 1 - trilinear filtering (by default).
int getTexturesFilter ( ) const#
Return value
Texture filtering mode:- 0 - bilinear filtering.
- 1 - trilinear filtering (by default).
void setTexturesMaxResolution ( int resolution ) #
Arguments
- int resolution - Maximum resolution:
- 0 - 128 x 128.
- 1 - 256 x 256.
- 2 - 512 x 512.
- 3 - 1024 x 1024.
- 4 - 2048 x 2048.
- 5 - 4096 x 4096.
- 6 - 8192 x 8192 (by default).
- 7 - 16384 x 16384.
int getTexturesMaxResolution ( ) const#
Return value
Maximum resolution:- 0 - 128 x 128.
- 1 - 256 x 256.
- 2 - 512 x 512.
- 3 - 1024 x 1024.
- 4 - 2048 x 2048.
- 5 - 4096 x 4096.
- 6 - 8192 x 8192 (by default).
- 7 - 16384 x 16384.
void setTexturesMinResolution ( int resolution ) #
Arguments
- int resolution - Minimum 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.
- 7 - 16384 x 16384.
int getTexturesMinResolution ( ) const#
Return value
Minimum 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.
- 7 - 16384 x 16384.
void setTexturesQuality ( int quality ) #
Arguments
- int quality - One of the QUALITY_* pre-defined variables.
int getTexturesQuality ( ) const#
Return value
One of the QUALITY_* pre-defined variables.void setTransparentBlur ( bool blur ) #
Arguments
- bool blur - 1 to enable transparent blur for materials, 0 to disable it. The default value is 1.
bool isTransparentBlur ( ) const#
Return value
1 if transparent blur is enabled for materials; otherwise, 0.void setViewport ( const Ptr<Viewport> & viewport ) #
Sets a viewport for a main application window.Arguments
Ptr<Viewport> getViewport ( ) const#
Returns a main application window viewport.Return value
Pointer to Viewport.void setVirtualResolution ( const Math::vec2 & resolution ) #
Arguments
- const Math::vec2 & resolution - Virtual screen resolution (X, Y), in pixels. The default value is (-1, -1).
Math::vec2 getVirtualResolution ( ) const#
Return value
Virtual screen resolution (X, Y), in pixels.void setVREmulation ( int emulation ) #
Arguments
- int emulation - VR-emulation mode:
- 0 - disabled (by default).
- 1 - HTC Vive emulation.
- 2 - HTC Vive Pro emulation.
- 3 - Oculus Rift emulation.
int getVREmulation ( ) const#
Return value
VR-emulation mode:- 0 - disabled (by default).
- 1 - HTC Vive emulation.
- 2 - HTC Vive Pro emulation.
- 3 - Oculus Rift emulation.
void setWaterAnisotropy ( int anisotropy ) #
Arguments
- int anisotropy - Anisotropy level:
- 0 - anisotropy level 1.
- 1 - anisotropy level 2 (by default).
- 2 - anisotropy level 4.
- 3 - anisotropy level 8.
- 4 - anisotropy level 16.
int getWaterAnisotropy ( ) const#
Return value
Anisotropy level:- 0 - anisotropy level 1.
- 1 - anisotropy level 2 (by default).
- 2 - anisotropy level 4.
- 3 - anisotropy level 8.
- 4 - anisotropy level 16.
void setWaterEnvironmentProbes ( bool probes ) #
Arguments
- bool probes - 1 to enable rendering of environment probes on the water surface, 0 to disable it. The default value is 1.
bool isWaterEnvironmentProbes ( ) const#
Return value
1 if rendering of environment probes on the water surface is enabled; otherwise, 0.void setWaterVoxelProbes ( bool probes ) #
Arguments
- bool probes - 1 to enable voxel probes for water rendering, 0 to disable it. The default value is 1.
bool isWaterVoxelProbes ( ) const#
Return value
1 if voxel probes are enabled for water rendering; otherwise, 0.void setWaterLights ( bool lights ) #
Arguments
- bool lights - 1 to enable rendering of lights on the water surface, 0 to disable it. The default value is 1.
bool isWaterLights ( ) const#
Return value
1 if rendering of lights on the water surface is enabled; otherwise, 0.void setWaterOpacityDepth ( bool depth ) #
Arguments
- bool depth - 1 to enable writing depth data for water to the opacity buffer, 0 to disable it. The default value is 1.
bool isWaterOpacityDepth ( ) const#
Return value
1 if depth data for water is written to the opacity buffer; otherwise, 0.void setWaterRefractionQuality ( int quality ) #
Arguments
- int quality - Refraction quality:
- 0 - low quality.
- 1 - medium quality.
- 2 - high quality (by default).
- 3 - ultra quality.
int getWaterRefractionQuality ( ) const#
Return value
Refraction quality:- 0 - low quality.
- 1 - medium quality.
- 2 - high quality (by default).
- 3 - ultra quality.
void setWaterShafts ( bool shafts ) #
Arguments
- bool shafts - 1 to enable rendering of underwater shafts, 0 to disable it. The default value is 1.
bool isWaterShafts ( ) const#
Return value
1 if rendering of underwater shafts is enabled; otherwise, 0.void setWaterShorelineWetness ( bool wetness ) #
Arguments
- bool wetness - 1 to enable shoreline wetness, 0 to disable it. The default value is 1.
bool isWaterShorelineWetness ( ) const#
Return value
1 if shoreline wetness is enabled; otherwise, 0.void setWaterSSR ( bool waterssr ) #
Arguments
- bool waterssr - 1 to enable the SSR effect for water, 0 to disable.
bool isWaterSSR ( ) const#
Return value
1 if the SSR effect is enabled for water; otherwise, 0.void setWaterSSRIncreasedAccuracy ( bool accuracy ) #
Arguments
- bool accuracy - 1 to enable increased accuracy for the water SSR, 0 to disable. The default value is 0.
bool isWaterSSRIncreasedAccuracy ( ) const#
Return value
1 if increased accuracy is enabled for the water SSR; otherwise, 0.void setWaterSSRQuality ( int quality ) #
Arguments
- int quality - Water SSR quality:
- 0 - low quality.
- 1 - medium quality (by default).
- 2 - high quality.
- 3 - ultra quality.
int getWaterSSRQuality ( ) const#
Return value
Water SSR quality:- 0 - low quality.
- 1 - medium quality (by default).
- 2 - high quality.
- 3 - ultra quality.
Ptr<Texture> getWhite2DArrayTexture ( ) const#
Returns white 2D array texture.Return value
White 2D array texture.Ptr<Texture> getWhite2DTexture ( ) const#
Returns white 2D texture.Return value
White 2D texture.Ptr<Texture> getWhite3DTexture ( ) const#
Returns white 3D texture.Return value
White 3D texture.Ptr<Texture> getWhiteCubeTexture ( ) const#
Returns white Cube texture.Return value
White Cube texture.void setWireframeColor ( const Math::vec4 & color ) #
Arguments
- const Math::vec4 & color - Wireframe color to be set.
Math::vec4 getWireframeColor ( ) const#
Return value
Wireframe color.int compressImage ( Ptr<Image> & image, int quality = 1, int new_image_format = -1, int use_mip_maps = -1 ) #
Converts the image to a specified compressed format. If compression by the GPU is not supported, the Image::compress() method will be called instead.Arguments
- Ptr<Image> & image - Image to compress.
- int quality - Compression quality:
- 0 - fast compression, low compressed image quality.
- 1 - high compressed image quality, slow compression (by default).
- int new_image_format - Compressed texture format: one of the Texture::FORMAT_* variables. This is an optional argument. If no format is specified, default conversion will be performed (depending on the type of the source image).
- int use_mip_maps - Flag indicating whether texture mipmaps should be generated for the compressed image: 1 to generate mipmaps, 0 not to generate. This is an optional argument. If no value is specified, mipmaps will be generated only if the source image has the mipmaps.
Return value
1 if the image has been compressed successfully; otherwise, 0.int compressTexture ( const Ptr<Texture> & texture, Ptr<Image> & destination, int quality = 1, int new_texture_format = -1, int use_mip_maps = -1 ) #
Compresses the given texture to the specified format.Arguments
- const Ptr<Texture> & texture - Source texture to compress.
- Ptr<Image> & destination - Image into which the compressed texture will be saved.
- int quality - Compression quality:
- 0 - fast compression, low compressed image quality.
- 1 - high compressed image quality, slow compression (by default).
- int new_texture_format - Compressed texture format: one of the Texture::FORMAT_* variables. This is an optional argument. If no format is specified, default conversion will be performed (depending on the type of the source image).
- int use_mip_maps - Flag indicating whether texture mipmaps should be generated for the compressed image: 1 to generate mipmaps, 0 not to generate. This is an optional argument. If no value is specified, mipmaps will be generated only if the source image has the mipmaps.
Return value
1 if the texture has been compressed successfully; otherwise, 0.void convertColorSpecularToMetalness ( Math::vec4 & diffuse, Math::vec4 & specular, Math::vec4 & albedo, Math::vec4 & shading ) #
Performs color conversion from the specular workflow (diffuse, specular) to the metalness workflow (albedo, shading).Arguments
- Math::vec4 & diffuse - Input diffuse color.
- Math::vec4 & specular - Input specular color.
- Math::vec4 & albedo - Output albedo color.
- Math::vec4 & shading - Output shading color.
void convertImageSpecularToMetalness ( const Ptr<Image> & diffuse, const Ptr<Image> & specular, Ptr<Image> & albedo, Ptr<Image> & shading ) #
Performs texture conversion from the specular workflow (diffuse, specular) to the metalness workflow (albedo, shading).Arguments
- const Ptr<Image> & diffuse - Input diffuse texture.
- const Ptr<Image> & specular - Input specular texture.
- Ptr<Image> & albedo - Output albedo texture.
- Ptr<Image> & shading - Output shading texture.
int createMipmapsCubeGGX ( const Ptr<Image> & image, float quality ) #
Generates mipmaps for a cubemap using GGX BRDF microfacet model.Arguments
- const Ptr<Image> & image - Cubemap image. IMAGE_CUBE or IMAGE_CUBE_ARRAY types are accepted.
- float quality - Quality value within the [0.0f; 1.0f] range.
int createShorelineDistanceField ( const Ptr<Image> & image, const Ptr<Image> & mask, int shoreline_radius, int blur_radius, int downsample_resolution ) #
Grabs a shoreline distance field texture with the specified parameters.Arguments
- const Ptr<Image> & image - Image to grab a shoreline texture to.
- const Ptr<Image> & mask - An R16 mask texture Image. Each pixel of the mask has the following color value:0 if water level at this point of the grid is above the terrain level; otherwise, 65535.
- int shoreline_radius - Shoreline radius value within the [4; 128] range. Padding distance (from the shore to the beginning of swash zone).
- int blur_radius - Blur radius value within the [0; 32] range. Higher values make shoreline smoother.
- int downsample_resolution - Texture resolution value, can be one of the following: 16, 32, 64, 128, 256, 512, 1024, 2048.
Return value
1 if the shoreline distance field texture is grabbed successfully; otherwise, 0.bool loadSettings ( const char * file, bool clear = false ) #
Loads render settings from a given file.Arguments
- const char * file - Path to an XML file with desired settings.
- bool clear - Clear flag. Set true to clear settings before loading (new settings shall be applied right after loading them), or false not to clear.
Return value
1 if the settings are loaded successfully; otherwise, 0.bool loadWorld ( const Ptr<Xml> & xml ) #
Loads render state from the Xml.Arguments
Return value
1 if the state is loaded successfully; otherwise, 0.void renderComputeMaterial ( Render::PASS pass, const Ptr<Material> & material, int width, int height, int depth = 1 ) #
Sets up a material and dispatches to compute shader. The material must have a post shader associated with it.Arguments
- Render::PASS pass - Rendering pass number in range [0;NUM_PASSES) (one of the PASS_* variables).
- const Ptr<Material> & material - Smart pointer to the material.
- int width - Local X work-group size of the compute shader.
- int height - Local Y work-group size of the compute shader.
- int depth - Local Z work-group size of the compute shader. The default value is 1.
void renderImage2D ( const Ptr<Camera> & camera, const Ptr<Image> & image, int skip_flags ) #
Renders the scene into a 2D image in accordance with the specified parameters. The viewport position is taken from the camera created via Camera class.Arguments
- const Ptr<Camera> & camera - Camera to be used.
- const Ptr<Image> & image - Image to save the result to.
- int skip_flags - Skip the effects:
- VIEWPORT_SKIP_SHADOWS
- VIEWPORT_SKIP_VISUALIZER
- VIEWPORT_SKIP_SRGB
- VIEWPORT_SKIP_POSTEFFECTS
- VIEWPORT_SKIP_VELOCITY
- VIEWPORT_SKIP_DYNAMIC_REFLECTIONS
0 enables all the effects.
void renderImage2D ( const Ptr<Camera> & camera, const Ptr<Image> & image, int width, int height, int hdr, int skip_flags ) #
Renders the scene into a 2D image of the given size in accordance with the specified parameters. The viewport position is taken from the camera created via Camera class.Arguments
- const Ptr<Camera> & camera - Camera to be used.
- const Ptr<Image> & image - Image to save the result to.
- int width - Width of the projected image, in units.
- int height - Height of the projected image, in units.
- int hdr - 1 - enable HDR, 0 - disable HDR.
- int skip_flags - Skip the effects:
- VIEWPORT_SKIP_SHADOWS
- VIEWPORT_SKIP_VISUALIZER
- VIEWPORT_SKIP_SRGB
- VIEWPORT_SKIP_POSTEFFECTS
- VIEWPORT_SKIP_VELOCITY
- VIEWPORT_SKIP_DYNAMIC_REFLECTIONS
0 enables all the effects.
void renderImageCube ( const Ptr<Camera> & camera, const Ptr<Image> & image, int skip_flags ) #
Renders the scene into a cube map image in accordance with the specified parameters.Arguments
- const Ptr<Camera> & camera - Camera to be used.
- const Ptr<Image> & image - Image to save the result to.
- int skip_flags - Skip the effects:
- VIEWPORT_SKIP_SHADOWS
- VIEWPORT_SKIP_VISUALIZER
- VIEWPORT_SKIP_SRGB
- VIEWPORT_SKIP_POSTEFFECTS
- VIEWPORT_SKIP_VELOCITY
- VIEWPORT_SKIP_DYNAMIC_REFLECTIONS
0 enables all the effects.
void renderImageCube ( const Ptr<Camera> & camera, const Ptr<Image> & image, int size, int hdr, int skip_flags, bool local_space = 0 ) #
Renders the scene into a cube map in accordance with the specified parameters. The viewport position is taken from the camera created via Camera class.Arguments
- const Ptr<Camera> & camera - Camera to be used.
- const Ptr<Image> & image - Image to save the result to.
- int size - Texture dimensions (cube map edge size).
- int hdr - 1 - enable HDR; 0 - disable HDR.
- int skip_flags - Skip the effects:
- VIEWPORT_SKIP_SHADOWS
- VIEWPORT_SKIP_VISUALIZER
- VIEWPORT_SKIP_SRGB
- VIEWPORT_SKIP_POSTEFFECTS
- VIEWPORT_SKIP_VELOCITY
- VIEWPORT_SKIP_DYNAMIC_REFLECTIONS
0 enables all the effects.
- bool local_space - 1 - local space coordinates; 0 - world space coordinates.
void renderNodeImage2D ( const Ptr<Camera> & camera, const Ptr<Node> & node, const Ptr<Image> & image, int skip_flags, int light_usage, const char * environment_texture_name ) #
Renders the given node into a 2D image in accordance with the specified parameters. The viewport position is taken from the camera created via Camera class. The node can be rendered using the specific type of lighting and environment cubemap.Arguments
- const Ptr<Camera> & camera - Camera to be used.
- const Ptr<Node> & node - Node to be rendered.
- const Ptr<Image> & image - Image to save the result to.
- int skip_flags - Skip the effects. One of the SKIP_* variables should be specified. 0 enables all the effects.
- int light_usage - Sets the light sources that will affect the node (one of the USAGE_*_LIGHTING Viewport class variables.)
- const char * environment_texture_name - Path to the environment cubemap to be used. Takes effect if the first (auxiliary light) or second (node light) lighting mode is used (see the light_usage argument above). In case LightWorld is used (zero mode), the environment cubemap used for the current world will be used.
void renderNodeImage2D ( const Ptr<Camera> & camera, const Ptr<Node> & node, const Ptr<Image> & image, int width, int height, int hdr, int skip_flags, int light_usage, const char * environment_texture_name ) #
Renders the 2D image of the given node in accordance with the specified parameters. The viewport position is taken from the camera created via Camera class. The node can be rendered using the specific type of lighting and environment cubemap.Arguments
- const Ptr<Camera> & camera - Camera to be used.
- const Ptr<Node> & node - Node to be rendered.
- const Ptr<Image> & image - Image to save the result to.
- int width - Width of the image, in units.
- int height - Height of the image, in units.
- int hdr - HDR flag. This parameter determines the format of the 2D image:
- 1 - image format will be set to RGBA16F. It means that the HDR image buffer will store pixel values outside the [0;1] range (i.e. both negative and positive values).
- 0 - image format will be set to RGBA8.
- int skip_flags - Skip the effects. One of the SKIP_* variables should be specified. 0 enables all the effects.
- int light_usage - Sets the light sources that will affect the node (one of the USAGE_*_LIGHTING Viewport class variables).
- const char * environment_texture_name - Path to the environment cubemap to be used. Takes effect if the first (auxiliary light) or second (node light) lighting mode is used (see the light_usage argument above). In case LightWorld is used (zero mode), the environment cubemap used for the current world will be used.
void renderScreenMaterial ( const char * material_name ) #
Renders a screen-space material with the given name.RenderTargetPtr render_target;
//...
render_target->enable();
Render::renderScreenMaterial("new_material_post");
render_target->disable();
render_target->unbindColorTextures();
Arguments
- const char * material_name - Material name.
void renderScreenMaterial ( const char * material_name, const Ptr<Texture> & color_texture ) #
Renders a screen-space material with the specified name and the color texture.RenderTargetPtr render_target;
TexturePtr texture;
TexturePtr texture_2;
//...
render_target->bindColorTexture(0, texture);
render_target->enable();
Render::renderScreenMaterial("new_material_post", texture_2);
render_target->disable();
render_target->unbindColorTextures();
Arguments
- const char * material_name - Material name.
- const Ptr<Texture> & color_texture - Color texture smart pointer.
void renderScreenMaterial ( const char * material_name, const char * texture_name, const Ptr<Texture> & texture ) #
Renders a screen-space material with the given texture. For example:RenderTargetPtr render_target;
TexturePtr texture;
TexturePtr texture_2;
//...
render_target->bindColorTexture(0, texture);
render_target->enable();
MaterialPtr material = Materials::findMaterial("new_material_post");
Render::renderScreenMaterial(material, "color", texture_2);
render_target->disable();
render_target->unbindColorTextures();
Arguments
- const char * material_name - Material smart pointer.
- const char * texture_name - Material texture name.
- const Ptr<Texture> & texture - Texture smart pointer.
void renderTAA ( const Ptr<Texture> & color_texture, const Ptr<Texture> & color_old_texture ) #
Renders the TAA filter.RenderTargetPtr render_target;
TexturePtr buffer;
TexturePtr buffer_old;
TexturePtr buffer_taa;
//...
render_target->bindColorTexture(0, buffer_taa);
render_target->enable();
Render::renderTAA(buffer, buffer_old);
render_target->disable();
render_target->unbindColorTextures();
Arguments
- const Ptr<Texture> & color_texture - Color texture smart pointer.
- const Ptr<Texture> & color_old_texture - Old color texture smart pointer.
bool restoreState ( const Ptr<Stream> & stream ) #
Restores a render state from the stream.Arguments
Return value
true if the state is restored successfully; otherwise, false.bool saveSettings ( const char * file ) const#
Saves the current renderer settings to a given file.Arguments
- const char * file - Path to a target file.
Return value
true if the settings are saved successfully; otherwise, false.bool saveState ( const Ptr<Stream> & stream ) const#
Saves a render state into the stream.Arguments
Return value
true if the state is saved successfully; otherwise, false.bool saveWorld ( const Ptr<Xml> & xml ) const#
Saves the render state into the given Xml node.Arguments
Return value
true if the state is saved successfully; otherwise, false.void setEnvironmentHazeGradient ( int gradient ) #
Arguments
- int gradient - Haze gradient mode:
- 0 should be used for short distance range (e.g. near-surface haze).
- 1 should be used for long distance range (e.g. hazy mountains).
- 2 should be used for physically based haze simulation.
int getEnvironmentHazeGradient ( ) const#
Return value
Haze gradient mode:- 0 for short distance range (e.g. near-surface haze).
- 1 for long distance range (e.g. hazy mountains).
- 2 for physically based haze simulation.
Math::vec4 getEnvironmentHazeColor ( ) const#
Returns the current haze color for the preset that overlays the other ones.// get a haze color for the preset that overlays the others
Render::getEnvironmentHazeColor();
// get a haze color for the second environment preset
RenderEnvironmentPresetPtr preset = Render::getEnvironmentPreset(1);
preset->getHazeColor();
Return value
Haze color.float getEnvironmentHazeDensity ( ) const#
Returns the haze density set for the preset that overlays the other ones. To get the haze density for the specific preset, use RenderEnvironmentPreset::getHazeDensity().// get a haze density for the preset that overlays the others
Render::getEnvironmentHazeDensity();
// get a haze density for the second environment preset
RenderEnvironmentPresetPtr preset = Render::getEnvironmentPreset(1);
preset->getHazeDensity();
Return value
Haze density.float getEnvironmentHazeMaxDistance ( ) const#
Returns the distance starting at which the haze becomes completely solid, so nothing will be seen behind. To get the haze maximum visibility distance for the specific preset, use RenderEnvironmentPreset::getHazeMaxDistance().// get a haze maximum visibility distance for the preset that overlays the others
Render::getEnvironmentHazeMaxDistance();
// get a haze maximum visibility distance for the second environment preset
RenderEnvironmentPresetPtr preset = Render::getEnvironmentPreset(1);
preset->getHazeMaxDistance();
Return value
Haze maximum visibility distance.float getEnvironmentHazePhysicalStartHeight ( ) const#
Returns the current reference height value for the two parameters (Half Visibility Distance and Half Faloff Height). To get the current reference height value for the specific preset, use RenderEnvironmentPreset::getHazePhysicalStartHeight().// get a reference height value for the preset that overlays the others
Render::getEnvironmentHazePhysicalStartHeight();
// get a reference height value for the second environment preset
RenderEnvironmentPresetPtr preset = Render::getEnvironmentPreset(1);
preset->getHazePhysicalStartHeight();
Return value
Current reference height value, in units.float getEnvironmentHazePhysicalHalfVisibilityDistance ( ) const#
Returns the current distance to the boundary at which the visibility comprises 50%. There is no zero-visibility in the real world, so the half-visibility boundary is used to adjust haze distance.Return value
Current distance to the boundary at which the visibility comprises 50%, in units.float getEnvironmentHazePhysicalHalfFalloffHeight ( ) const#
Returns the current height of the haze density gradient. The higher the value, the longer the haze desity reduces as the height grows, making the transition between the clear sky and haze smoother.Return value
Current height of the haze density gradient.float getEnvironmentHazePhysicalAmbientLightIntensity ( ) const#
Returns the current intensity of the impact of the ambient lighting on haze (how much the ambient lighting affects the haze).Return value
Current value of intensity of the ambient lighting impact.float getEnvironmentHazePhysicalAmbientColorSaturation ( ) const#
Returns the current intensity of the ambient color's contribution to the haze (how much the sunlight affects the haze).Return value
Current value of intensity of the ambient color's contribution to the haze.float getEnvironmentHazePhysicalSunLightIntensity ( ) const#
Returns the current intensity of the impact of the sunlight on haze defining how much the sunlight affects the haze.Return value
Current value of intensity of the sunlight impact.float getEnvironmentHazePhysicalSunColorSaturation ( ) const#
Returns the current intensity of the impact of the sunlight on haze (how much the sunlight affects the haze).Return value
Current intensity of the sunlight color's contribution to the haze.float getEnvironmentSkyIntensity ( ) const#
Returns the intensity of the environment sky set for the preset that overlays the other ones. To get the sky intensity for the specific preset, use RenderEnvironmentPreset::getSkyIntensity().// get a sky intensity for the preset that overlays the others
Render::getEnvironmentSkyIntensity();
// get a sky intensity for the second environment preset
RenderEnvironmentPresetPtr preset = Render::getEnvironmentPreset(1);
preset->getSkyIntensity();
Return value
Intensity value of the environment sky.float getEnvironmentReflectionIntensity ( ) const#
Returns the intensity of the environment reflections for the preset that overlays the other ones. 0 value means no environment reflections for the preset. To get the reflection intensity for the specific preset, use RenderEnvironmentPreset::getReflectionIntensity().// get a reflection intensity for the preset that overlays the others
Render::getEnvironmentReflectionIntensity();
// get a reflection intensity for the second environment preset
RenderEnvironmentPresetPtr preset = Render::getEnvironmentPreset(1);
preset->getReflectionIntensity();
Return value
The intensity value of the environment reflections.float getEnvironmentAmbientIntensity ( ) const#
Returns the intensity of the environment ambient lighting for the preset that overlays the other ones. 0 value means no environment ambient lighting for the preset. The higher the value, the more ambient lighting affects environment. To get the ambient intensity for the specific preset, use RenderEnvironmentPreset::getAmbientIntensity().// get an ambient intensity for the preset that overlays the others
Render::getEnvironmentAmbientIntensity();
// get an ambient intensity for the second environment preset
RenderEnvironmentPresetPtr preset = Render::getEnvironmentPreset(1);
preset->getAmbientIntensity();
Return value
The intensity value of environment ambient lighting. The value can be greater than 1.0f.Ptr<RenderEnvironmentPreset> getEnvironmentPreset ( int num ) #
Returns the environment preset of the given number.// get the second environment preset
RenderEnvironmentPresetPtr preset = Render::getEnvironmentPreset(1);
// print the sky intensity of the obtained preset
Log::message("%f\n", preset->getSkyIntensity());
Arguments
- int num - The number of the environment preset. The value is clamped to the [0;2] range.
Return value
Environment preset.int getTAASamples ( ) const#
Return value
The number of the sample offsets:- 0 - 1 offset
- 1 - 4 offsets
- 2 - 8 offsets
- 3 - 16 offsets
bool isFXAA ( ) const#
Return value
1 if FXAA is enabled; otherwise, 0.void setTAACatmullResampling ( bool resampling ) #
Arguments
- bool resampling - 1 to enable Catmull-Rom resampling, 0 to disable it.
bool isTAA ( ) const#
Return value
1 if TAA is enabled; otherwise, 0.void setTAASamples ( int samples ) #
Arguments
- int samples - The number of the sample offsets:
- 0 - 1 offset
- 1 - 4 offsets
- 2 - 8 offsets
- 3 - 16 offsets
void setTAAPixelOffset ( float offset ) #
Arguments
- float offset - Size of the sample offset.
bool isTAACatmullResampling ( ) const#
Return value
1 if Catmull-Rom resampling is enabled; otherwise, 0.void setTAA ( bool taa ) #
Arguments
- bool taa - 1 to enable TAA, 0 to disable it.
void setFXAA ( bool fxaa ) #
Arguments
- bool fxaa - 1 to enable FXAA, 0 to disable it.
float getTAAPixelOffset ( ) const#
Return value
Size of the sample offset.bool isCameraEffectsTemporalFiltering ( ) const#
Returns the value indicating if temporal filtering is enabled. Temporal filtering reduces flickering of the bloom effect on the small bright objects (such flickering may appear when the camera moves). For example, it can be used in scenes with industrial pipes.Return value
1 if temporal filtering is enabled; otherwise, 0.void setCameraEffectsTemporalFiltering ( bool filtering ) #
Toggles temporal filtering on and off. Temporal filtering reduces flickering of the bloom effect on the small bright objects (such flickering may appear when the camera moves). For example, it can be used in scenes with industrial pipes.Arguments
- bool filtering - 1 to enable temporal filtering; 0 to disable it.
void setSSBevelQuality ( int quality ) #
Arguments
- int quality - The quality mode:
- 0 - low
- 1 - medium (by default)
- 2 - high
bool isSSBevel ( ) const#
Return value
1 if the effect is enabled; otherwise, 0.float getSSBevelRadius ( ) const#
Return value
Size of the bevel effect in range [0.0f; 10.0f]. The default value is 10.0f.void setSSBevelVertexNormal ( int normal ) #
- Better Edges smooths vertex and surface normals of the object. In this mode, the relief created by using Normal Mapping will be smoothed along with the mesh edges.
- Better Normals smooths only vertex normals. In this mode, only edges of the mesh geometry will be bevelled.
Arguments
- int normal - The mode of bevels rendering:
- 0 - the Better Edges mode.
- 1 - the Better Normals mode.
void setSSBevel ( bool bevel ) #
Arguments
- bool bevel - 1 to enable the effect, 0 to disable it.
void setSSBevelRadius ( float radius ) #
Arguments
- float radius - Size of the bevel effect in range [0.0f; 10.0f]. The default value is 10.0f.
int getSSBevelVertexNormal ( ) const#
- Better Edges smooths vertex and surface normals of the object. In this mode, the relief created by using Normal Mapping will be smoothed along with the mesh edges.
- Better Normals smooths only vertex normals. In this mode, only edges of the mesh geometry will be bevelled.
Return value
The mode of bevels rendering:- 0 - the Better Edges mode.
- 1 - the Better Normals mode.
int getSSBevelQuality ( ) const#
Return value
The quality mode:- 0 - low
- 1 - medium (by default)
- 2 - high
bool isSSBevelNoise ( ) const#
Return value
1 if smoothing is enabled; otherwise, 0.void setSSBevelNoise ( bool noise ) #
Arguments
- bool noise - 1 to enable smoothing, 0 to disable it.
void * addCallback ( int callback, Unigine::CallbackBase1< Unigine::Renderer * > * func ) #
Adds a callback for the specified stage of the rendering sequence. Callback functions can be used to get access to buffers and matrices at intermediate stages of the rendering sequence. Some of them are read-only, but most of them can be modified ad hoc.Callback function must be as follows:void callback_name(Renderer *renderer){
/* .. */
}
Arguments
- int callback - Stage of the rendering sequence for which a callback is to be added. One of the CALLBACK_* variables.
NoticeThe _BEGIN prefix corresponds to the beginning of the rendering pass, _END - to its completion.
- Unigine::CallbackBase1< Unigine::Renderer * > * func - Callback pointer.
Return value
ID of the last added callback of the specified type, if the callback was added successfully; otherwise, nullptr. This ID can be used to remove this callback when necessary.void clearCallbacks ( int callback ) #
Clears all added callbacks for the specified stage of the rendering sequence. Callback functions can be used to get access to buffers and matrices at intermediate stages of the rendering sequence. Some of them are read-only, but most of them can be modified ad hoc.Arguments
- int callback - Stage of the rendering sequence for which the callbacks are to be cleared. One of the CALLBACK_* variables.
NoticeThe _BEGIN prefix corresponds to the beginning of the rendering pass, _END - to its completion.
bool removeCallback ( int callback, void * id ) #
Removes the specified callback from the list of callbacks for the specified stage of the rendering sequence. Callback functions can be used to get access to buffers and matrices at intermediate stages of the rendering sequence. Some of them are read-only, but most of them can be modified ad hoc.Arguments
- int callback - Stage of the rendering sequence for which the callback is to be removed. One of the CALLBACK_* variables.
NoticeThe _BEGIN prefix corresponds to the beginning of the rendering pass, _END - to its completion.
- void * id - Callback ID obtained when adding it.
Return value
True if the callback with the given ID was removed successfully; otherwise false.void setMaxFPS ( float maxfps ) #
Arguments
- float maxfps - Maximum FPS value for clamping. 0 - disables FPS clamping. The default value is 0.
float getMaxFPS ( ) const#
Return value
Current maximum FPS value for clamping. 0 - FPS clamping is disabled.void setCameraMode ( int mode ) #
- If the physically-based camera mode is set, the real-world values are used to set up lighting and camera exposure: ISO, shutter speed, F-stop. At default values of these parameters, the static exposure value is near 1.
NoticeFor the physically-based mode, the exposure mode should be set to Static to avoid exposure issues.
- If the classic mode is set, the exposure is set by setExposure().
Arguments
- int mode - 0 for the classic camera mode; 1 for the physically-based camera mode.
int getCameraMode ( ) const#
- If the physically-based camera mode is set, the real-world values are used to set up lighting and camera exposure: ISO, shutter speed, F-stop. At default values of these parameters, the static exposure value is near 1.
NoticeFor the physically-based mode, the exposure mode should be set to Static to avoid exposure issues.
- If the classic mode is set, the exposure is set by setExposure().
Return value
0 if the classic camera mode is set; 1 if the physically-based camera mode is set.void setISO ( float iso ) #
Arguments
- float iso - ISO value.
float getISO ( ) const#
Return value
ISO value.void setShutterSpeed ( float speed ) #
Arguments
- float speed - Shutter speed.
float getShutterSpeed ( ) const#
Return value
Shutter speed.void setFStop ( float fstop ) #
Arguments
- float fstop - F-stop value.
float getFStop ( ) const#
Return value
F-stop value.void setDepthPrePass ( bool pass ) #
Arguments
- bool pass - 1 to enable depth pre-pass, 0 to disable it. The default value is 0.
bool isDepthPrePass ( ) const#
Return value
1 if depth pre-pass rendering is enabled; otherwise, 0.void setStereoHiddenArea ( int area ) #
Arguments
- int area - Culling mode for pixels that are not visible in VR mode. One of the following values:
- 0 - hidden area culling is disabled (by default).
- 1 - OpenVR-based culling mode. Culling is performed using meshes returned by OpenVR.
NoticeCulling result depends on HMD used.
- 2 - Custom culling mode. Culling is performed using mesehes returned by OpenVR and an oval or circular mesh determined by custom adjustable parameters (See the setStereoHiddenAreaTransform() method.
int getStereoHiddenArea ( ) const#
Return value
Current culling mode for pixels that are not visible in VR mode. One of the following values:- 0 - hidden area culling is disabled (by default).
- 1 - OpenVR-based culling mode. Culling is performed using meshes returned by OpenVR.
NoticeCulling result depends on HMD used.
- 2 - Custom culling mode. Culling is performed using meshes returned by OpenVR and an oval or circular mesh determined by custom adjustable parameters (See the setStereoHiddenAreaTransform() method.
void setStereoHiddenAreaExposureTransform ( const Math::vec4 & transform ) #
Sets the area to be used for exposure calculation, when culling of pixels, that are not visible in VR mode, is used. Correction of this area is used to avoid visual artefacts when clipped pixels affect exposure in visible areas.Arguments
- const
Math::vec4 & transform - Four-component vector (X, Y, Z, W), that determines a rectangular area to be used for exposure calculation, when culling of pixels, that are not visible in VR mode, is used:
- First two components (X, Y) - sizes along the X and Y axes respectively.
- Second two components (Z, W) - offset values along the X and Y axes respectively.
NoticeThese components are ignored when hidden area culling mode is set to 2
Math::vec4 getStereoHiddenAreaExposureTransform ( ) const#
Sets the area to be used for exposure calculation, when culling of pixels, that are not visible in VR mode, is used. Correction of this area is used to avoid visual artefacts when clipped pixels affect exposure in visible areas.Return value
Four-component vector (X, Y, Z, W), that determines a rectangular area to be used for exposure calculation, when culling of pixels, that are not visible in VR mode, is used:- First two components (X, Y) - sizes along the X and Y axes respectively.
- Second two components (Z, W) - offset values along the X and Y axes respectively.
NoticeThese components are ignored when hidden area culling mode is set to 2
void setStereoHiddenAreaTransform ( const Math::vec4 & transform ) #
Arguments
- const
Math::vec4 & transform - Four-component vector (X, Y, Z, W), that determines an area to be used for exposure calculation, when culling of pixels, that are not visible in VR mode, is used:
- First two components (X, Y) - sizes along the X and Y axes respectively.
- Second two components (Z, W) - offset values along the X and Y axes respectively.
NoticeThese components are ignored when hidden area culling mode is set to 2
Math::vec4 getStereoHiddenAreaTransform ( ) const#
Return value
Four-component vector (X, Y, Z, W), that determines an oval or circular mesh used for culling pixels, that are not visible in VR mode:- First two components (X, Y) - sizes along the X and Y axes respectively.
- Second two components (Z, W) - offset values along the X and Y axes respectively.
void setTAAAntialiasingInMotion ( bool motion ) #
Arguments
- bool motion - 1 to enable improved anti-aliasing in motion (for moving camera and objects), 0 to disable it. The default value is 0.
bool isTAAAntialiasingInMotion ( ) const#
Return value
1 if improved anti-aliasing in motion (for moving camera and objects) is enabled; otherwise, 0.void setWhiteBalance ( bool balance ) #
Arguments
- bool balance - 1 to enable automatic white balance correction, 0 to disable it. The default value is 1.
bool isWhiteBalance ( ) const#
Return value
1 if automatic white balance correction is enabled; otherwise, 0.void setWhiteBalanceIntensity ( float intensity ) #
Arguments
- float intensity - White balance correction intensity value in the range [0.0f, 1.0f]. The default value is 0.3f.
- By the minimum value of 0.0f, no white balance correction is performed.
- The higher the value, the stronger correction will be.
NoticeDo not set too high values for night-time and dimly lit scenes, as it may lead to heavy color distortion making the scene look totally unnatural.
float getWhiteBalanceIntensity ( ) const#
Return value
Current white balance correction intensity value in the range [0.0f, 1.0f]. The default value is 0.3f.void setWhiteBalanceAdaptationTime ( float time ) #
Arguments
- float time - Time period, in seconds, during which white balance correction is performed. If 0.0f is set, instant correction will be used. The default value is 1.0f.
NoticeIt is recommended to use lower values, when possible, to make correction process unnoticeable, otherwise it'll be slow and will catch user's eye. However, setting too low values may result in abrupt switching of colors as the camera moves. So, adjust this parameter carefully to make transition smoooth. You can set it equal to the Exposure Adaptation value.
float getWhiteBalanceAdaptationTime ( ) const#
Return value
Time period, in seconds, during which white balance correction is performed. If 0.0f is set, instant correction will be used. The default value is 1.0f.void setSSDirt ( bool dirt ) #
Arguments
- bool dirt - 1 to enable the SSDirt effect, 0 to disable it.
bool isSSDirt ( ) const#
Return value
1 if the SSDirt effect is enabled; otherwise, 0.void setSSDirtAngleBias ( float bias ) #
Arguments
- float bias - Angle bias value to be set in the range [0.0f; 1.0f]. The default value is 0.35f.
float getSSDirtAngleBias ( ) const#
Return value
Angle bias value in the range [0.0f; 1.0f].void setSSDirtCavityAlbedoTextureName ( const char * name ) #
Sets the name of the albedo texture to be used for cavities. This texture defines dirt and dust color pattern for all cavities globally. The SSDirt effect must be enabled (see the setSSDirt() method).Arguments
- const char * name - Name of the albedo texture to be used for cavities.
const char * getSSDirtCavityAlbedoTextureName ( ) const#
Returns the name of the albedo texture used for cavities. This texture defines dirt and dust color pattern for all cavities globally. The SSDirt effect must be enabled (see the setSSDirt() method).Return value
Name of the albedo texture used for cavities.void setSSDirtCavityColor ( const Math::vec4 & color ) #
Arguments
- const Math::vec4 & color - Color multiplier for the Albedo texture used for cavities. By default, the color is white.
Math::vec4 getSSDirtCavityColor ( ) const#
Return value
Color multiplier for the Albedo texture used for cavities.void setSSDirtCavityExponent ( float exponent ) #
Arguments
- float exponent - Exponent value to be set for cavities. Lower values make gradual change of intensity smoother. The default value is 1.0f.
float getSSDirtCavityExponent ( ) const#
Return value
Exponent value set for cavities. Lower values make gradual change of intensity smoother. The default value is 1.0f.void setSSDirtCavityMetalness ( float metalness ) #
Arguments
- float metalness - Metalness value for cavities in the range [0.0f, 1.0f]. When set to 0 (by default), the SSDirt effect does not modify metalness buffer in cavities.
float getSSDirtCavityMetalness ( ) const#
Return value
Current metalness value for cavities in the range [0.0f, 1.0f]. When set to 0 (by default), the SSDirt effect does not modify metalness buffer in cavities.void setSSDirtCavityMetalnessVisibility ( float visibility ) #
Sets the metalness visibility value for cavities. A multiplier that determines the degree of impact of the effect on metalness buffer. The SSDirt effect must be enabled (see the setSSDirt() method).Arguments
- float visibility - Metalness visibility value to be set for cavities in the range [0.0f, 1.0f]. The higherthe value the more metalness buffer is affected. The default value is 0.0f.
float getSSDirtCavityMetalnessVisibility ( ) const#
Returns the current metalness visibility value for cavities. A multiplier that determines the degree of impact of the effect on metalness buffer. The SSDirt effect must be enabled (see the setSSDirt() method).Return value
Current metalness visibility value for cavities.void setSSDirtCavityShadingTextureName ( const char * name ) #
Sets the name of the shading texture to be used for cavities. Red channel of this texture defines metalness pattern for all cavities globally (other channels are ignored). The SSDirt effect must be enabled (see the setSSDirt() method).Arguments
- const char * name - Name of the shading texture to be used for cavities.
const char * getSSDirtCavityShadingTextureName ( ) const#
Returns the name of the shading texture used for cavities. Red channel of this texture defines metalness pattern for all cavities globally (other channels are ignored). The SSDirt effect must be enabled (see the setSSDirt() method).Return value
Name of the shading texture used for cavities.void setSSDirtCavityTextureSize ( float size ) #
Arguments
- float size - Scaling factor to be set for the textures used for cavities. The default value is 1.0f
float getSSDirtCavityTextureSize ( ) const#
Return value
Current scaling factor for the textures used for cavities.void setSSDirtConvexityAlbedoTextureName ( const char * name ) #
Sets the name of the albedo texture to be used for convexities. This texture defines wear and scratch color pattern for all convexities globally. The SSDirt effect must be enabled (see the setSSDirt() method).Arguments
- const char * name - Name of the albedo texture to be used for convexities.
const char * getSSDirtConvexityAlbedoTextureName ( ) const#
Returns the name of the albedo texture used for convexities. This texture defines wear and scratch color pattern for all convexities globally. The SSDirt effect must be enabled (see the setSSDirt() method).Return value
Name of the albedo texture used for convexities.void setSSDirtConvexityColor ( const Math::vec4 & color ) #
Arguments
- const Math::vec4 & color - Color multiplier for the Albedo texture used for convexities. By default, the color is white.
Math::vec4 getSSDirtConvexityColor ( ) const#
Return value
Color multiplier for the Albedo texture used for convexities.void setSSDirtConvexityExponent ( float exponent ) #
Arguments
- float exponent - Exponent value to be set for convexities. Lower values make gradual change of intensity smoother. The default value is 1.0f.
float getSSDirtConvexityExponent ( ) const#
Return value
Exponent value set for convexities. Lower values make gradual change of intensity smoother. The default value is 1.0f.void setSSDirtConvexityMetalness ( float metalness ) #
Arguments
- float metalness - Metalness value for convexities in the range [0.0f, 1.0f]. When set to 0 (by default), the SSDirt effect does not modify metalness buffer in convex areas.
float getSSDirtConvexityMetalness ( ) const#
Return value
Current metalness value for convexities in the range [0.0f, 1.0f]. When set to 0 (by default), the SSDirt effect does not modify metalness buffer in convex areas.void setSSDirtConvexityMetalnessVisibility ( float visibility ) #
Sets the metalness visibility value for convexities. A multiplier that determines the degree of impact of the effect on metalness buffer. The SSDirt effect must be enabled (see the setSSDirt() method).Arguments
- float visibility - Metalness visibility value to be set for convexities in the range [0.0f, 1.0f]. The higherthe value the more metalness buffer is affected. The default value is 0.0f.
float getSSDirtConvexityMetalnessVisibility ( ) const#
Returns the current metalness visibility value for convexities. A multiplier that determines the degree of impact of the effect on metalness buffer. The SSDirt effect must be enabled (see the setSSDirt() method).Return value
Current metalness visibility value for convexities.void setSSDirtConvexityShadingTextureName ( const char * name ) #
Sets the name of the shading texture to be used for convexities. Red channel of this texture defines metalness pattern for all convexities globally (other channels are ignored). The SSDirt effect must be enabled (see the setSSDirt() method).Arguments
- const char * name - Name of the shading texture to be used for convexities.
const char * getSSDirtConvexityShadingTextureName ( ) const#
Returns the name of the shading texture used for convexities. Red channel of this texture defines metalness pattern for all convexities globally (other channels are ignored). The SSDirt effect must be enabled (see the setSSDirt() method).Return value
Name of the shading texture used for convexities.void setSSDirtConvexityTextureSize ( float size ) #
Arguments
- float size - Scaling factor to be set for the textures used for convexities. The default value is 1.0f
float getSSDirtConvexityTextureSize ( ) const#
Return value
Current scaling factor for the textures used for convexities.void setSSDirtIncreaseAccuracy ( bool accuracy ) #
Arguments
- bool accuracy - 1 to enable increased accuracy for the SSDirt effect, 0 to disable it. The default value is 0.
bool isSSDirtIncreaseAccuracy ( ) const#
Return value
1 if increased accuracy for the SSDirt effect is enabled; otherwise, 0.void setSSDirtIntensity ( float intensity ) #
Arguments
- float intensity - Intensity of the SSDirt effect.
- By the minimum value of 0.0f, the effect is not visible.
- Higher values make the effect more pronounced.
float getSSDirtIntensity ( ) const#
Return value
Current intensity of the SSDirt effect.- By the minimum value of 0.0f, the effect is not visible.
- Higher values make the effect more pronounced.
void setSSDirtPerspective ( float perspective ) #
- 0.0f - radius of the effect is bound to screen space (it remains constant relative to screen size, regardless of the distance to the camera).
- 1.0f - radius of the effect is bound to world space (it remains the same relative to objects, i.e. gets smaller as the camera moves away from them).
Arguments
- float perspective - Perspective value to be set in the range [0.0f, 1.0f]. The default value is 0.02f
float getSSDirtPerspective ( ) const#
- 0.0f - radius of the effect is bound to screen space (it remains constant relative to screen size, regardless of the distance to the camera).
- 1.0f - radius of the effect is bound to world space (it remains the same relative to objects, i.e. gets smaller as the camera moves away from them).
Return value
Current perspective value in the range [0.0f, 1.0f]. The default value is 0.02fvoid setSSDirtQuality ( int quality ) #
Arguments
- int quality - SSDirt effect quality to be set:
- 0 - low
- 1 - medium
- 2 - high (by default)
- 3 - ultra
int getSSDirtQuality ( ) const#
Return value
Current SSDirt effect quality:- 0 - low
- 1 - medium
- 2 - high (by default)
- 3 - ultra
void setSSDirtRadius ( float radius ) #
Arguments
- float radius - Size of the SSDirt effect to be set. The default value is 1.0f.
float getSSDirtRadius ( ) const#
void setSSDirtResolution ( int resolution ) #
Arguments
- int resolution - Resolution of the SSDirt effect to be set:
- 0 - quarter
- 1 - half (by default)
- 2 - full
int getSSDirtResolution ( ) const#
Return value
Current resolution of the SSDirt effect:- 0 - quarter
- 1 - half (by default)
- 2 - full
void setSSDirtThreshold ( float threshold ) #
Arguments
- float threshold - SSDirt threshold value to be set in the range [0.0f; 1.0f]. Higher values make the effect less pronounced. The default value is 1.0f.
float getSSDirtThreshold ( ) const#
Return value
Current SSDirt threshold value in the range [0.0f; 1.0f]. Higher values make the effect less pronounced. The default value is 1.0f.void setLatency ( int latency ) #
Arguments
- int latency - Maximum number of back buffer frames allowed:
- 0 - sequential rendering CPU-GPU-CPU-GPU...
- 1 - 1 buffer (by default)
- 2 - 2 buffers
- 3 - 3 buffers
NoticeValues 1-3 are available for DirectX only.
int getLatency ( ) const#
Return value
Maximum number of back buffer frames currently allowed:- 0 - sequential rendering CPU-GPU-CPU-GPU...
- 1 - 1 buffer (by default)
- 2 - 2 buffers
- 3 - 3 buffers
void setStreamingMode ( int mode ) #
Arguments
- int mode - Streaming mode to be set: one of the STREAMING_* variables.
int getStreamingMode ( ) const#
Return value
Current streaming mode: one of the STREAMING_* variables.void setStreamingUseMemoryLimit ( bool limit ) #
Arguments
- bool limit - 1 to enable memory limitation for asynchronous resource loading (meshes and textures), 0 to disable it. The default value is 1.
bool isStreamingUseMemoryLimit ( ) const#
Return value
1 if memory limitation for asynchronous resource loading (meshes and textures) is currently enabled; otherwise, 0.void setStreamingMaxThreads ( int threads ) #
Arguments
- int threads - Maximum number of threads to be used for streaming, within the [1; 256] range. The default value is 1.
NoticeHigher number of threads results in faster streaming, but may cause spikes in case of excessive consumption of GPU resources.
int getStreamingMaxThreads ( ) const#
Return value
Current maximum number of threads used for streaming, within the [1; 256] range. The default value is 1.void setStreamingDestroyDuration ( int duration ) #
Arguments
- int duration - Resource cleanup interval, in number of frames, within the [0; 300] range. The default value is 30.
int getStreamingDestroyDuration ( ) const#
Return value
Resource cleanup interval, in number of frames, within the [0; 300] range.void setStreamingParticlesMemoryLimit ( int limit ) #
Sets cache memory limit used for streaming of vertices of particle systems.Arguments
- int limit - Cache memory limit for vertices of particle systems to be set, in percentage of the total GPU memory. The default value is 3.
int getStreamingParticlesMemoryLimit ( ) const#
Returns the current cache memory limit used for streaming of vertices of particle systems.Return value
Current cache memory limit for vertices of particle systems, in percentage of the total GPU memory.void setStreamingTexturesMemoryLimit ( int limit ) #
Sets cache memory limit used for texture streaming.Arguments
- int limit - Cache memory limit for textures to be set, in percentage of the total GPU memory. The default value is 65.
int getStreamingTexturesMemoryLimit ( ) const#
Returns the current cache memory limit used for texture streaming.Return value
Current cache memory limit for textures, in percentage of the total GPU memory.void setStreamingTexturesCacheResolution ( int resolution ) #
Sets resolution for texture cache elements. These minimized copies of textures are used instead of the originals.Arguments
- int resolution - Resolution for texture cache elements. One of the following values:
- 0 - is 8x8
- 1 - is 16x16 (by default)
- 2 - is 32x32
- 3 - is 64x64
- 4 - is 128x128
- 5 - is 256x256
- 6 - is 512x512
int getStreamingTexturesCacheResolution ( ) const#
Returns current resolution for texture cache elements. These minimized copies of textures are used instead of the originals.Return value
Current resolution for texture cache elements. One of the following values:- 0 - is 8x8
- 1 - is 16x16 (by default)
- 2 - is 32x32
- 3 - is 64x64
- 4 - is 128x128
- 5 - is 256x256
- 6 - is 512x512
void setStreamingMeshesMemoryLimit ( int limit ) #
Arguments
- int limit - Cache memory limit for meshes to be set, in percentage of the total GPU memory. The default value is 15.
int getStreamingMeshesMemoryLimit ( ) const#
Return value
Current cache memory limit for meshes, in percentage of the total GPU memory.void setShadersPreload ( bool preload ) #
Arguments
- bool preload - 1 to enable pre-loading for shaders, 0 to disable it. The default value is 0.
bool isShadersPreload ( ) const#
Return value
1 if pre-loading for shaders is enabled; otherwise, 0.void destroyCacheTexture ( const UGUID & guid ) #
Deletes cache (images and metadata) stored on disk for the texture with the specified GUID. Corresponding files in the data/.cache_textures will be removed.Arguments
- const UGUID & guid - Texture file GUID.
void createCacheTexture ( const UGUID & guid ) #
Generates cache for the texture with the specified GUID.Arguments
- const UGUID & guid - Texture file GUID.
void destroyCacheTextures ( ) #
Clears texture cache (images and metadata) stored on disk. All files in the data/.cache_textures will be removed.void unloadCacheTextures ( ) #
Unloads texture cache from the memory. This method does not delete files in the data/.cache_textures.void createCacheTextures ( ) #
Generates texture cache for all textures used in the project.void loadCacheTextures ( ) #
void setTranslucentColor ( const Math::vec4 & color ) #
Arguments
- const Math::vec4 & color - Color to be used for translucent objects globally. By default, the color is white.
Math::vec4 getTranslucentColor ( ) const#
Return value
Color used for translucent objects globally. By default, the color is white.void setShadowDistanceScale ( float scale ) #
Arguments
- float scale - Global shadow distance scale multiplier to be set in [0.0f; inf] range. The default value is 1.0f.
float getShadowDistanceScale ( ) const#
Return value
Current global shadow distance scale multiplier in [0.0f; inf] range.void addScriptableMaterial ( const Ptr<Material> & material ) #
Adds a new global scriptable material. To apply a scriptable material per-camera or per-player, use the addScriptableMaterial() method of the Camera class or the same method of the Player class respectively. The order of execution for scripts assigned to scriptable materials is defined by material's number in the list of materials applied globally.Arguments
void insertScriptableMaterial ( int num, const Ptr<Material> & material ) #
Inserts a new global scriptable material to the list of globally applied scriptable materials. To apply a scriptable material per-camera or per-player, use the insertScriptableMaterial() method of the Camera class or the same method of the Player class respectively. The order of execution for scripts assigned to scriptable materials is defined by material's number in the list of materials applied globally.Arguments
- int num - Position at which a new scriptable material is to be inserted.
- const Ptr<Material> & material - Scriptable material to be inserted into the list of globally applied scriptable materials.
void removeScriptableMaterial ( int num ) #
Removes the global scriptable material with the specified number.Arguments
- int num - Scriptable material number in the range from 0 to the total number of scriptable materials.
int getNumScriptableMaterials ( ) const#
Returns the total number of scriptable materials applied globally.Return value
Total number of scriptable materials applied globally.int findScriptableMaterial ( const Ptr<Material> & material ) const#
Returns the number of the specified scriptable material applied globally. This number determines the order in which the assigned expressions are executed.Arguments
Return value
Scriptable material number in the range from 0 to the total number of scriptable materials, or -1 if the specified material was not found.void setScriptableMaterial ( int num, const Ptr<Material> & material ) #
Replaces the scriptable material with the specified number with the new scriptable material specified. The number of material determines the order in which the expressions assigned to it are executed.Arguments
- int num - Scriptable material number in the range from 0 to the total number of scriptable materials.
- const Ptr<Material> & material - New scriptable material to replace the one with the specified number.
Ptr<Material> getScriptableMaterial ( int num ) const#
Returns a scriptable material applied globally by its number.Arguments
- int num - Scriptable material number in the range from 0 to the total number of scriptable materials.
Return value
Scriptable material applied globally with the specified number.void setScriptableMaterialEnabled ( int num, bool enabled ) #
Enables or disables the scriptable material with the specified number. When a material is disabled (inactive), the scripts attached to it are not executed.Arguments
- int num - Scriptable material number in the range from 0 to the total number of scriptable materials.
- bool enabled - 1 to enable the scriptable material with the specified number, 0 to disable it.
bool getScriptableMaterialEnabled ( int num ) const#
Returns a value indicating if the scriptable material with the specified number is enabled (active). When a material is disabled (inactive), the scripts attached to it are not executed.Arguments
- int num - Scriptable material number in the range from 0 to the total number of scriptable materials.
Return value
1 if the scriptable material with the specified number is enabled; otherwise, 0.void swapScriptableMaterials ( int num_0, int num_1 ) #
Swaps two scriptable materials with specified numbers. The number of material determines the order in which the expressions assigned to it are executed.Arguments
- int num_0 - Number of the first scriptable material in the range from 0 to the total number of scriptable materials.
- int num_1 - Number of the second scriptable material in the range from 0 to the total number of scriptable materials.
void clearScriptableMaterials ( ) #
Clears all global scriptable materials.int getHDRTextureFormat ( ) const#
Returns the currently used HDR texture format.Return value
Current HDR texture format. One of the following values:Ptr<Texture> getTemporaryTexture ( int width, int height, int format, int flags = 0, const char * name = 0 ) #
Allocates a temporary render texture with the specified width, height, format, and flags. This function can be used when you need a quick render texture to perform some temporary calculations. Release it using releaseTemporaryTexture() as soon as you're done with it, so another call can start reusing it, if necessary. In any case, such texture shall be released automatically in the next frame.
UNIGINE keeps an internal pool of temporary render textures, so a call to this method most often just returns an already created one (if the size and format match). These temporary textures are actually destroyed when they aren't used for a couple of frames.
If you are doing a series of post-processing "blits", it's best for performance to get and release a temporary render texture for each blit, instead of getting one or two render textures upfront and reusing them.
It also automatically gives names to resources, which can be used for identification in debug.
Arguments
- int width - Width of the texture, in pixels.
- int height - Height of the texture, in pixels.
- int format - Texture format: one of the Texture::FORMAT_* values.
- int flags - Texture flags.
- const char * name - Name to be used for this temporary texture (optional).
Return value
Temporary texture.Ptr<Texture> getTemporaryTexture ( int format, const char * name = 0 ) #
Allocates a temporary render texture of the specified format. This function can be used when you need a quick render texture to perform some temporary calculations. Release it using releaseTemporaryTexture() as soon as you're done with it, so another call can start reusing it, if necessary. In any case, such texture shall be released automatically in the next frame.
UNIGINE keeps an internal pool of temporary render textures, so a call to this method most often just returns an already created one (if the size and format match). These temporary textures are actually destroyed when they aren't used for a couple of frames.
If you are doing a series of post-processing "blits", it's best for performance to get and release a temporary render texture for each blit, instead of getting one or two render textures upfront and reusing them.
It also automatically gives names to resources, which can be used for identification in debug.
Arguments
- int format - Texture format: one of the Texture::FORMAT_* values.
- const char * name - Name to be used for this temporary texture (optional).
Return value
Temporary texture.Ptr<Texture> getTemporaryTexture ( const Ptr<Texture> & texture ) #
Allocates a temporary render texture with the specified width, height, format, and flags. This function can be used when you need a quick render texture to perform some temporary calculations. Release it using releaseTemporaryTexture() as soon as you're done with it, so another call can start reusing it, if necessary. In any case, such texture shall be released automatically in the next frame.
UNIGINE keeps an internal pool of temporary render textures, so a call to this method most often just returns an already created one (if the size and format match). These temporary textures are actually destroyed when they aren't used for a couple of frames.
If you are doing a series of post-processing "blits", it's best for performance to get and release a temporary render texture for each blit, instead of getting one or two render textures upfront and reusing them.
It also automatically gives names to resources, which can be used for identification in debug.
Arguments
- const Ptr<Texture> & texture - Source texture for which a temporary texture is to be allocated in the pool.
Return value
Temporary texture.Ptr<Texture> getTemporaryTexture ( const Ptr<Texture> & texture, const char * name = 0 ) #
Allocates a temporary render texture for the specified source texture (using all its parameters: resolution, flags, etc.). This function can be used when you need a quick render texture to perform some temporary calculations. Release it using releaseTemporaryTexture() as soon as you're done with it, so another call can start reusing it, if necessary. In any case, such texture shall be released automatically in the next frame.
UNIGINE keeps an internal pool of temporary render textures, so a call to this method most often just returns an already created one (if the size and format match). These temporary textures are actually destroyed when they aren't used for a couple of frames.
If you are doing a series of post-processing "blits", it's best for performance to get and release a temporary render texture for each blit, instead of getting one or two render textures upfront and reusing them.
It also automatically gives names to resources, which can be used for identification in debug.
Arguments
- const Ptr<Texture> & texture - Source texture for which a temporary texture is to be allocated in the pool.
- const char * name - Name to be used for this temporary texture (optional).
Return value
Temporary texture.Ptr<Texture> getTemporary2DArrayTexture ( int width, int height, int depth, int format, int flags = 0, const char * name = 0 ) #
Allocates a temporary 2D array texture with the specified width, height, number of layers, format, and flags. This function can be used when you need a quick render texture to perform some temporary calculations. Release it using releaseTemporaryTexture() as soon as you're done with it, so another call can start reusing it, if necessary. In any case, such texture shall be released automatically in the next frame.
UNIGINE keeps an internal pool of temporary render textures, so a call to this method most often just returns an already created one (if the size and format match). These temporary textures are actually destroyed when they aren't used for a couple of frames.
If you are doing a series of post-processing "blits", it's best for performance to get and release a temporary render texture for each blit, instead of getting one or two render textures upfront and reusing them.
Arguments
- int width - Width of the 2D array texture, in pixels.
- int height - Height of the 2D array texture, in pixels.
- int depth - Number of layers in the 2D array texture.
- int format - Texture format: one of the Texture::FORMAT_* values.
- int flags - Texture flags.
- const char * name - Name to be used for this temporary 2D array texture (optional).
Return value
Temporary 2D array texture.Ptr<Texture> getTemporary3DTexture ( int width, int height, int depth, int format, int flags = 0, const char * name = 0 ) #
Allocates a temporary 3D texture with the specified width, height, depth, format, and flags. This function can be used when you need a quick render texture to perform some temporary calculations. Release it using releaseTemporaryTexture() as soon as you're done with it, so another call can start reusing it, if necessary. In any case, such texture shall be released automatically in the next frame.
UNIGINE keeps an internal pool of temporary render textures, so a call to this method most often just returns an already created one (if the size and format match). These temporary textures are actually destroyed when they aren't used for a couple of frames.
If you are doing a series of post-processing "blits", it's best for performance to get and release a temporary render texture for each blit, instead of getting one or two render textures upfront and reusing them.
Arguments
- int width - Width of the 3D texture, in pixels.
- int height - Height of the 3D texture, in pixels.
- int depth - Depth of the 3D texture, in pixels.
- int format - Texture format: one of the Texture::FORMAT_* values.
- int flags - Texture flags.
- const char * name - Name to be used for this temporary 3D texture (optional).
Return value
Temporary 3D texture.void releaseTemporaryTexture ( const Ptr<Texture> & texture ) #
Releases the temporary texture previously obtained via getTemporaryTexture(), getTemporary2DArrayTexture(), or getTemporary3DTexture() method and returns it to the pool.Arguments
Ptr<RenderTarget> getTemporaryRenderTarget ( ) #
Allocates a temporary render target. This function can be used when you need a quick render target to perform some temporary calculations. Release it using releaseTemporaryRenderTarget() as soon as you're done with it, so another call can start reusing it if necessary. In any case such render target shall be released automatically in the next frame.
UNIGINE keeps an internal pool of temporary render targets, so a call to this method most often just returns an already created one (if the size and format matches). These temporary render targets are actually destroyed when they aren't used for a couple of frames.
If you are doing a series of post-processing "blits", it's best for performance to get and release a temporary render targets for each blit, instead of getting one or two render targets upfront and reusing them.
Return value
Temporary render target.void releaseTemporaryRenderTarget ( const Ptr<RenderTarget> & render_target ) #
Releases the temporary render target previously obtained via getTemporaryRenderTarget() method and returns it to the pool.Arguments
- const Ptr<RenderTarget> & render_target - Temporary render target to be returned to the pool.
void setLightsInterleavedSamples ( int samples ) #
Arguments
- int samples - Interleaved rendering mode for lighting during the deferred pass to be set, one of the following:
- 0 - half of all pixels is rendered skipping each second line (1 x 2)
- 1 - quarter of all pixels is rendered skipping each second line and row (2 x 2)
int getLightsInterleavedSamples ( ) const#
Return value
Current interleaved rendering mode for lighting during the deferred pass, one of the following:- 0 - half of all pixels is rendered skipping each second line (1 x 2)
- 1 - quarter of all pixels is rendered skipping each second line and row (2 x 2)
void setSSAODenoiseQuality ( int quality ) #
Arguments
- int quality - Noise reduction quality to be set:
- 0 - Low
- 1 - Medium (by default)
- 2 - High
- 3 - Ultra
int getSSAODenoiseQuality ( ) const#
Return value
Current noise reduction quality:- 0 - Low
- 1 - Medium (by default)
- 2 - High
- 3 - Ultra
void setSSGIDenoiseQuality ( int quality ) #
Arguments
- int quality - Noise reduction quality to be set:
- 0 - Low
- 1 - Medium (by default)
- 2 - High
- 3 - Ultra
int getSSGIDenoiseQuality ( ) const#
Return value
Current noise reduction quality:- 0 - Low
- 1 - Medium (by default)
- 2 - High
- 3 - Ultra
void setSSGIDenoiseIntensity ( float intensity ) #
Arguments
- float intensity - Noise reduction intensity value in range [0.0f; 1.0f] to be set. Higher values provide a less noisy, but more blurred result. The default value is 0.2f.
float getSSGIDenoiseIntensity ( ) const#
Return value
Noise reduction intensity value in range [0.0f; 1.0f]. Higher values provide a less noisy, but more blurred result. The default value is 0.2f.void setSSGIDenoiseGaussianSigma ( float sigma ) #
Arguments
- float sigma - Gaussian blur sigma parameter value in range [0.0f; 100.0f] to be set. The default value is 10.0f.
float getSSGIDenoiseGaussianSigma ( ) const#
Return value
Gaussian blur sigma parameter value in range [0.0f; 100.0f]. The default value is 10.0f.void setSSGIDenoiseThreshold ( float threshold ) #
Arguments
- float threshold - Threshold value for color difference of neighboring pixels in range [0.0f; 1.0f] to be set. The default value is 0.1f.
float getSSGIDenoiseThreshold ( ) const#
Return value
Threshold value for color difference of neighboring pixels in range [0.0f; 1.0f]. The default value is 0.1f.void setSSGIDenoiseRadius ( int radius ) #
Arguments
- int radius - Radius to be affected by noise reduction, an integer value in range [1; 3] to be set. The default value is 1.
int getSSGIDenoiseRadius ( ) const#
Return value
Radius to be affected by noise reduction, an integer value in range [1; 3]. The default value is 1.void setSSGIColorClampingIntensity ( float intensity ) #
Arguments
- float intensity - Intensity of TAA color clamping at zero pixel velocity in range [0.0f; 1.0f]. Lower values result in more accumulated frames combined, which reduces noise flickering, but increases ghosting effect (to reduce ghosting in this case you can use SSGI Color Clamping Velocity Threshold), while higher values reduce ghosting effect, but increase flickering. The default value is 1.0f.
float getSSGIColorClampingIntensity ( ) const#
Return value
Intensity of TAA color clamping at zero pixel velocity in range [0.0f; 1.0f]. Lower values result in more accumulated frames combined, which reduces noise flickering, but increases ghosting effect (to reduce ghosting in this case you can use SSGI Color Clamping Velocity Threshold), while higher values reduce ghosting effect, but increase flickering. The default value is 1.0f.void setSSGIColorClampingVelocityThreshold ( float threshold ) #
Sets the sensitivity of TAA color clamping for the SSGI (Screen Space Global Illumination) effect to pixel velocity change. This parameter is used to reduce ghosting effect for lower Color Clamping Intensity values: it automatically increases clamping intensity for higher velocities, and disables clamping for low velocity values.Arguments
- float threshold - Sensitivity of TAA color clamping for the SSGI (Screen Space Global Illumination) effect to pixel velocity change in range [0.0f; 1.0f] to be set. Lower values result in more accumulated frames combined, which reduces noise flickering, but increases ghosting effect (to reduce ghosting in this case you can use SSGI Color Clamping Velocity Threshold), while higher values reduce ghosting effect, but increase flickering. The default value is 1.0f.
float getSSGIColorClampingVelocityThreshold ( ) const#
Returns the current sensitivity of TAA color clamping for the SSGI (Screen Space Global Illumination) effect to pixel velocity change. This parameter is used to reduce ghosting effect for lower Color Clamping Intensity values: it automatically increases clamping intensity for higher velocities, and disables clamping for low velocity values.Return value
Sensitivity of TAA color clamping for the SSGI (Screen Space Global Illumination) effect to pixel velocity change in range [0.0f; 1.0f]. Lower values result in more accumulated frames combined, which reduces noise flickering, but increases ghosting effect (to reduce ghosting in this case you can use SSGI Color Clamping Velocity Threshold), while higher values reduce ghosting effect, but increase flickering. The default value is 1.0f.void setBentNormalDenoiseQuality ( int quality ) #
Arguments
- int quality - Noise reduction quality to be set:
- 0 - Low
- 1 - Medium (by default)
- 2 - High
- 3 - Ultra
int getBentNormalDenoiseQuality ( ) const#
Return value
Current noise reduction quality:- 0 - Low
- 1 - Medium (by default)
- 2 - High
- 3 - Ultra
void setSSRDenoiseQuality ( int quality ) #
Arguments
- int quality - Noise reduction quality to be set:
- 0 - Low
- 1 - Medium (by default)
- 2 - High
- 3 - Ultra
int getSSRDenoiseQuality ( ) const#
Return value
Current noise reduction quality:- 0 - Low
- 1 - Medium (by default)
- 2 - High
- 3 - Ultra
void setSSRDenoiseIntensity ( float intensity ) #
Arguments
- float intensity - Noise reduction intensity value in range [0.0f; 1.0f] to be set. Higher values provide a less noisy, but more blurred result. The default value is 0.2f.
float getSSRDenoiseIntensity ( ) const#
Return value
Noise reduction intensity value in range [0.0f; 1.0f] to be set. Higher values provide a less noisy, but more blurred result. The default value is 0.2f.void setSSRDenoiseGaussianSigma ( float sigma ) #
Arguments
- float sigma - Gaussian blur sigma parameter value in range [0.0f; 100.0f] to be set. The default value is 10.0f.
float getSSRDenoiseGaussianSigma ( ) const#
Return value
Gaussian blur sigma parameter value in range [0.0f; 100.0f]. The default value is 10.0f.void setSSRDenoiseThreshold ( float threshold ) #
Arguments
- float threshold - Threshold value for color difference of neighboring pixels in range [0.0f; 1.0f] to be set. The default value is 0.1f.
float getSSRDenoiseThreshold ( ) const#
Return value
Threshold value for color difference of neighboring pixels in range [0.0f; 1.0f]. The default value is 0.1f.void setSSRDenoiseRadius ( int radius ) #
Arguments
- int radius - Radius to be affected by noise reduction, an integer value in range [1; 3] to be set. The default value is 1.
int getSSRDenoiseRadius ( ) const#
Return value
Radius to be affected by noise reduction, an integer value in range [1; 3]. The default value is 1.void setSSRColorClampingIntensity ( float intensity ) #
Arguments
- float intensity - Intensity of TAA color clamping at zero pixel velocity in range [0.0f; 1.0f]. Lower values result in more accumulated frames combined, which reduces noise flickering, but increases ghosting effect (to reduce ghosting in this case you can use SSR Color Clamping Velocity Threshold), while higher values reduce ghosting effect, but increase flickering. The default value is 1.0f.
float getSSRColorClampingIntensity ( ) const#
Return value
Intensity of TAA color clamping at zero pixel velocity in range [0.0f; 1.0f]. Lower values result in more accumulated frames combined, which reduces noise flickering, but increases ghosting effect (to reduce ghosting in this case you can use SSR Color Clamping Velocity Threshold), while higher values reduce ghosting effect, but increase flickering. The default value is 1.0f.void setSSRColorClampingVelocityThreshold ( float threshold ) #
Arguments
- float threshold - Sensitivity of TAA color clamping for the SSR (Screen-Space Reflections) effect to pixel velocity change in range [0.0f; 1.0f] to be set. Lower values result in more accumulated frames combined, which reduces noise flickering, but increases ghosting effect (to reduce ghosting in this case you can use SSR Color Clamping Velocity Threshold), while higher values reduce ghosting effect, but increase flickering. The default value is 1.0f.
float getSSRColorClampingVelocityThreshold ( ) const#
Return value
Sensitivity of TAA color clamping for the SSR (Screen-Space Reflections) effect to pixel velocity change in range [0.0f; 1.0f]. Lower values result in more accumulated frames combined, which reduces noise flickering, but increases ghosting effect (to reduce ghosting in this case you can use SSR Color Clamping Velocity Threshold), while higher values reduce ghosting effect, but increase flickering. The default value is 1.0f.void setSSSSSDiffuse ( bool diffuse ) #
Arguments
- bool diffuse - 1 to enable the SSSSS calculation for diffuse lighting;0 — to disable it.
bool isSSSSSDiffuse ( ) const#
Return value
1 if the SSSSS calculation for diffuse lighting is enabled; otherwise, 0.void setSSSSSAmbient ( bool ambient ) #
Arguments
- bool ambient - 1 to enable the SSSSS calculation for ambient lighting; 0 — to disable it.
bool isSSSSSAmbient ( ) const#
Return value
1 if the SSSSS calculation for ambient lighting is enabled; otherwise, 0.void setSSSSSMinThreshold ( float threshold ) #
Arguments
- float threshold - Threshold scattering value for the material's Translucent parameter equal to 0.
float getSSSSSMinThreshold ( ) const#
Return value
Threshold scattering value for the material's Translucent parameter equal to 0.void setSSSSSMaxThreshold ( float threshold ) #
Arguments
- float threshold - Threshold scattering value for the material's Translucent parameter equal to 1.
float getSSSSSMaxThreshold ( ) const#
Return value
Threshold scattering value for the material's Translucent parameter equal to 1.void setSSSSSNoiseStep ( float step ) #
Arguments
- float step - Intensity of the step noise used for SSSSS calculation.
float getSSSSSNoiseStep ( ) const#
Return value
Intensity of the step noise used for SSSSS calculation.void setSSSSSNoiseRay ( float ray ) #
Arguments
- float ray - Intensity of the ray noise used for SSSSS calculation.
float getSSSSSNoiseRay ( ) const#
Return value
Intensity of the ray noise used for SSSSS calculation.void setSSSSSInterleaved ( bool interleaved ) #
Arguments
- bool interleaved - 1 to enable the interleaved mode for SSSSS; 0 — to disable it.
bool isSSSSSInterleaved ( ) const#
Return value
1 if the interleaved mode for SSSSS is enabled; otherwise, 0.void setSSSSSInterleavedColorClamping ( int clamping ) #
Sets the color clamping mode used to reduce ghosting effect.Arguments
- int clamping - One of the color clamping modes:
- 0 — disabled
- 1 — low
- 2 — medium
- 3 — high
- 4 — high + velocity
int getSSSSSInterleavedColorClamping ( ) const#
Returns the color clamping mode used to reduce ghosting effect.Return value
One of the color clamping modes:- 0 — disabled
- 1 — low
- 2 — medium
- 3 — high
- 4 — high + velocity
void setSSSSSInterleavedSamples ( int samples ) #
Arguments
- int samples -
- 0 — half of all pixels is rendered skipping each second line (1 x 2)
- 1 — quarter of all pixels is rendered skipping each second line and row (2 x 2)
int getSSSSSInterleavedSamples ( ) const#
Return value
- 0 — half of all pixels is rendered skipping each second line (1 x 2)
- 1 — quarter of all pixels is rendered skipping each second line and row (2 x 2)
void setSSSSSTAAFixFlicker ( bool flicker ) #
Arguments
- bool flicker - true to enable the Fix Flicker effect; false — to disable it.
bool isSSSSSTAAFixFlicker ( ) const#
Return value
true if the Fix Flicker effect is enabled; otherwise, false.void setSSSSSTAAAntialiasingInMotion ( bool motion ) #
Enables or disables antialiasing in motion (for moving camera and objects) for the SSSSS (Screen-Space Subsurface Scattering) effect.Arguments
- bool motion - 1 to enable antialiasing in motion; 0 — to disable it.
bool isSSSSSTAAAntialiasingInMotion ( ) const#
Returns a value indicating if antialiasing in motion is enabled for the SSSSS (Screen-Space Subsurface Scattering) effect.Return value
1 if antialiasing in motion is enabled; otherwise, 0.void setSSSSSTAAFramesByColor ( bool color ) #
Arguments
- bool color - 1 to enable the Frames By Color option; 0 — to disable it.
bool isSSSSSTAAFramesByColor ( ) const#
Return value
1 if the Frames By Color option is enabled; otherwise, 0.void setSSSSSTAAFramesByVelocity ( bool velocity ) #
Arguments
- bool velocity - 1 to enable the Frames By Velocity option; 0 — to disable it.
bool isSSSSSTAAFramesByVelocity ( ) const#
Return value
1 if the Frames By Velocity option is enabled; otherwise, 0.void setSSSSSTAAPreserveDetails ( float details ) #
Arguments
- float details - The TAA detail level.
float getSSSSSTAAPreserveDetails ( ) const#
Return value
The TAA detail level.void setSSSSSTAAFrameCount ( float count ) #
Arguments
- float count - The number of frames for velocity buffer. The default value is 30.0f
float getSSSSSTAAFrameCount ( ) const#
Return value
The number of frames for velocity buffer. The default value is 30.0fvoid setSSSSSTAAFramesVelocityThreshold ( float threshold ) #
Sets the threshold value defining sensitivity to velocity change (velocity threshold at which pixels are treated as fast moving) for the SSSSS (Screen-Space Subsurface Scattering) effect.Arguments
- float threshold - Velocity threshold at which pixels are treated as fast-moving.
float getSSSSSTAAFramesVelocityThreshold ( ) const#
Returns the threshold value defining sensitivity to velocity change (velocity threshold at which pixels are treated as fast moving) for the SSSSS (Screen-Space Subsurface Scattering) effect.Return value
Velocity threshold at which pixels are treated as fast-moving.void setSSSSSTAAMaxFramesByVelocity ( float velocity ) #
Sets the number of frames combined and blended for pixels that don't move relative to the screen space — the maximum frame count of TAA (Temporal Anti-Aliasing) for the SSSSS (Screen-Space Subsurface Scattering) effect.Arguments
- float velocity - Maximum number of frames for velocity buffer. The default value is 60.0f.
float getSSSSSTAAMaxFramesByVelocity ( ) const#
Returns the number of frames combined and blended for pixels that don't move relative to the screen space — the maximum frame count of TAA (Temporal Anti-Aliasing) for the SSSSS (Screen-Space Subsurface Scattering) effect.Return value
Maximum number of frames for velocity buffer.void setSSSSSTAAMinFramesByVelocity ( float velocity ) #
Sets the number of frames combined and blended for fast-moving pixels on the screen — the minimum frame count of TAA (Temporal Anti-Aliasing) for the SSSSS (Screen-Space Subsurface Scattering) effect.Arguments
- float velocity - Minimum number of frames for velocity buffer. The default value is 4.0f.
float getSSSSSTAAMinFramesByVelocity ( ) const#
Returns the number of frames combined and blended for fast-moving pixels on the screen — the minimum frame count of TAA (Temporal Anti-Aliasing) for the SSSSS (Screen-Space Subsurface Scattering) effect.Return value
Minimum number of frames for velocity buffer.void setSSSSSTAACatmullResampling ( bool resampling ) #
Arguments
- bool resampling - true to enable Catmull-Rom resampling; false — to disable it.
bool isSSSSSTAACatmullResampling ( ) const#
Return value
true if Catmull-Rom resampling is enabled; otherwise, false.void setSSSSSTAASamples ( int samples ) #
Arguments
- int samples - One of the values defining the number of samples:
- 0 — 1 sample offset, no anti-aliasing
- 1 — 4 offsets
- 2 — 8 offsets
- 3 — 16 offsets
int getSSSSSTAASamples ( ) const#
Return value
One of the values defining the number of samples:- 0 — 1 sample offset, no anti-aliasing
- 1 — 4 offsets
- 2 — 8 offsets
- 3 — 16 offsets
void setEnvironmentCorrectRoughness ( Render::CORRECT_ROUGHNESS roughness ) #
Arguments
- Render::CORRECT_ROUGHNESS roughness - One of the CORRECT_ROUGHNESS_* modes.
Render::CORRECT_ROUGHNESS getEnvironmentCorrectRoughness ( ) const#
Return value
One of the CORRECT_ROUGHNESS_* modes.void getScreenshot ( const Ptr<Image> & image ) #
Takes a screenshot and puts it to the specified image.Arguments
void setShowLandscapeAlbedo ( bool albedo ) #
Arguments
- bool albedo - true to enable visualization of albedo data of the Landscape Terrain; false — to disable it.
bool isShowLandscapeAlbedo ( ) const#
Return value
true if visualization of albedo data of the Landscape Terrain is enabled; otherwise, false.void setShowLandscapeMask ( int mask ) #
Arguments
- int mask - Number of landscape terrain detail mask to be visualized in the [1; 20] range, or 0 - to disable mask visualization.
int getShowLandscapeMask ( ) const#
Return value
Number of the currently visualized landscape terrain detail mask in the [1; 20] range, or 0 if mask visualization is disabled.void setShowLandscapeTerrainVTStreaming ( bool streaming ) #
Sets a value indicating if visualization is enabled for streaming of tiles of the landscape terrain megatexture. This method can be used for visual adjustment of the streaming process. This parameter is stored in the following configuration file:Arguments
- bool streaming - true to enable visualization of streaming of landscape terrain tiles; false — to disable it.
bool isShowLandscapeTerrainVTStreaming ( ) const#
Returns a value indicating if visualization is enabled for streaming of tiles of the landscape terrain megatexture. This method can be used for visual adjustment of the streaming process. This parameter is stored in the following configuration file:Return value
true if visualization for streaming of tiles of the landscape terrain megatexture is enabled; otherwise, false.void setLandscapeTerrainVTMemorySize ( float size ) #
Sets a value defining memory consumption for the Landscape Terrain textures.Arguments
- float size - Memory consumption factor in the [0.0f; 1.0f] range:
- 0.0f corresponds to 3072 x 3072 (~200 MB of VRAM)
- 1.0f corresponds to 16384 x 16384 (~3.1 GB of VRAM)
float getLandscapeTerrainVTMemorySize ( ) const#
Returns a value defining memory consumption for the Landscape Terrain textures.Return value
Memory consumption factor in the [0.0f; 1.0f] range:- 0.0f corresponds to 3072 x 3072 (~200 MB of VRAM)
- 1.0f corresponds to 16384 x 16384 (~3.1 GB of VRAM)
void setLandscapeTerrainVTTargetResolution ( const Math::vec2 & resolution ) #
Sets the target resolution for the landscape terrain.Arguments
- const Math::vec2 & resolution - Two-component vector defining the target viewport resolution along X and Y axes. The default value is 1344 x 756.
Math::vec2 getLandscapeTerrainVTTargetResolution ( ) const#
Returns the current target resolution for the landscape terrain.Return value
Two-component vector defining the target viewport resolution along X and Y axes. The default value is 1344 x 756.void setLandscapeTerrainVTDetailLevelByAngle ( float angle ) #
Sets a value indicating detail level reduction depending on the inclination of the the Landscape Terrain polygons relative to viewing direction. Can be used to reduce streaming load and memory consumption.Arguments
- float angle - Detail level quality value in the [0.0f; 1.0f] range:
- 1.0f - pixel-to-pixel quality
- lower values decrease quality
float getLandscapeTerrainVTDetailLevelByAngle ( ) const#
Returns a value indicating detail level reduction depending on the inclination of the the Landscape Terrain polygons relative to viewing direction. Can be used to reduce streaming load and memory consumption.Return value
Detail level quality value in the [0.0f; 1.0f] range:- 1.0f - pixel-to-pixel quality
- lower values decrease quality
void setLandscapeTerrainVTFiltering ( int filtering ) #
Sets the filtering mode for the Landscape Terrain textures.Arguments
- int filtering - Filtering mode to be used:
- 0 — Low (lower mip-level is used)
- 1 — Medium (higher mip-level is used)
- 2 — High (linear interpolation between adjacent mip-levels)
int getLandscapeTerrainVTFiltering ( ) const#
Returns the filtering mode currently used for the Landscape Terrain textures.Return value
Filtering mode currently used:- 0 — Low (lower mip-level is used)
- 1 — Medium (higher mip-level is used)
- 2 — High (linear interpolation between adjacent mip-levels)
void setLandscapeTerrainVTTilesUpdatePerFrame ( int frame ) #
Sets the number of tiles passed to the virtual texture of the Landscape Terrain each frame.Arguments
- int frame - Number of terrain tiles to be passed to the virtual texture each frame, in the [1; 256] range. The default value is 60.
int getLandscapeTerrainVTTilesUpdatePerFrame ( ) const#
Returns the current number of tiles passed to the virtual texture of the Landscape Terrain each frame.Return value
Number of tiles currently passed to the virtual texture each frame, in the [1; 256] range. The default value is 60.void setLandscapeTerrainVTTilesLoadPerFrame ( int frame ) #
Sets the number of landscape terrain tiles to be loaded per frame. You can decrease the value of this parameter to reduce spikes, but in this case streaming becomes slower and more noticeable.Arguments
- int frame - Number of landscape terrain tiles to be loaded per frame, in the [1; 64] range. The default value is 4.
int getLandscapeTerrainVTTilesLoadPerFrame ( ) const#
Returns the current number of landscape terrain tiles loaded per frame. You can decrease the value of this parameter to reduce spikes, but in this case streaming becomes slower and more noticeable.Return value
Number of landscape terrain tiles currently loaded per frame, in the [1; 64] range. The default value is 4.void setLandscapeTerrainVTTilesReloadPerFrame ( int frame ) #
Sets the number of tiles to be reloaded per frame after applying changes to the Landscape Terrain surface.Arguments
- int frame - Number of tiles to be reloaded per frame, in the [1; 64] range. The default value is 4.
int getLandscapeTerrainVTTilesReloadPerFrame ( ) const#
Returns the current number of tiles to be reloaded per frame after applying changes to the Landscape Terrain surface.Return value
Number of tiles to be reloaded per frame, in the [1; 64] range. The default value is 4.void setLandscapeTerrainDetailResolutionAdditionalMask ( int mask ) #
Sets the resolution of the additional mask texture for details of the landscape terrain.Arguments
- int mask - Texture resolution to be set. One of the following values:
- 0 - 64×64
- 1 - 128×128
- 2 - 256×256
- 3 - 512×512
- 4 - 1024×1024 (default)
- 5 - 2048×2048
- 6 - 4096×4096
- 7 - 8192×8192
- 8 - 16384×16384
int getLandscapeTerrainDetailResolutionAdditionalMask ( ) const#
Returns the current resolution of the additional mask texture for details of the landscape terrain.Return value
Current texture resolution. One of the following values:- 0 - 64×64
- 1 - 128×128
- 2 - 256×256
- 3 - 512×512
- 4 - 1024×1024 (default)
- 5 - 2048×2048
- 6 - 4096×4096
- 7 - 8192×8192
- 8 - 16384×16384
void setLandscapeTerrainDetailResolutionAlbedo ( int albedo ) #
Sets the resolution of the albedo texture for details of the landscape terrain.Arguments
- int albedo - Texture resolution to be set. One of the following values:
- 0 - 64×64
- 1 - 128×128
- 2 - 256×256
- 3 - 512×512
- 4 - 1024×1024 (default)
- 5 - 2048×2048
- 6 - 4096×4096
- 7 - 8192×8192
- 8 - 16384×16384
int getLandscapeTerrainDetailResolutionAlbedo ( ) const#
Returns the current resolution of the albedo texture for details of the landscape terrain.Return value
Current texture resolution. One of the following values:- 0 - 64×64
- 1 - 128×128
- 2 - 256×256
- 3 - 512×512
- 4 - 1024×1024 (default)
- 5 - 2048×2048
- 6 - 4096×4096
- 7 - 8192×8192
- 8 - 16384×16384
void setLandscapeTerrainDetailResolutionHeight ( int height ) #
Sets the resolution of the height texture for details of the landscape terrain.Arguments
- int height - Texture resolution to be set. One of the following values:
- 0 - 64×64
- 1 - 128×128
- 2 - 256×256
- 3 - 512×512
- 4 - 1024×1024 (default)
- 5 - 2048×2048
- 6 - 4096×4096
- 7 - 8192×8192
- 8 - 16384×16384
int getLandscapeTerrainDetailResolutionHeight ( ) const#
Returns the current resolution of the height texture for details of the landscape terrain.Return value
Current texture resolution. One of the following values:- 0 - 64×64
- 1 - 128×128
- 2 - 256×256
- 3 - 512×512
- 4 - 1024×1024 (default)
- 5 - 2048×2048
- 6 - 4096×4096
- 7 - 8192×8192
- 8 - 16384×16384
void setLandscapeTerrainMaskDithering ( float dithering ) #
Sets a new global dither amount multiplier to be used for rendering details of the landscape terrain. Dithering enables reduction of graphical artefacts in case of increased Mask Contrast values set for a detail. This is a global multiplier for dithering values set for each detail mask.Arguments
- float dithering - New global dither amount multiplier to be set in the [0.0f; 1.0f] range. The default value is 1.0f.
float getLandscapeTerrainMaskDithering ( ) const#
Returns the current global dither amount multiplier to be used for rendering details of the landscape terrain. Dithering enables reduction of graphical artefacts in case of increased Mask Contrast values set for a detail. This is a global multiplier for dithering values set for each detail mask.Return value
Current global dither amount multiplier in the [0.0f; 1.0f] range.void setLandscapeTerrainVisibleDistance ( float distance ) #
Sets the maximum visibility distance for the landscape terrain. The terrain is visible, as long as the distance between the camera and the terrain does not exceed this value.Arguments
- float distance - Maximum visibility distance to be set for the landscape terrain, in meters. The default value is 30 km.
float getLandscapeTerrainVisibleDistance ( ) const#
Returns the current maximum visibility distance for the landscape terrain. The terrain is visible, as long as the distance between the camera and the terrain does not exceed this value.Return value
Maximum visibility distance for the landscape terrain, in meters. The default value is 30 km.void setLandscapeTerrainGeometryHoles ( bool holes ) #
Sets a value indicating if decal-based holes for the landscape terrain are enabled.Arguments
- bool holes - true to enable decal-based holes for the landscape terrain; otherwise, false.
bool isLandscapeTerrainGeometryHoles ( ) const#
Returns a value indicating if decal-based holes for the landscape terrain are enabled.Return value
true if decal-based holes are enabled for the landscape terrain; otherwise, false.void setLandscapeTerrainGeometryPolygonSize ( float size ) #
Sets the size of Landscape Terrain polygons defining the maximum allowed density of Landscape Terrain geometry.Arguments
- float size - New size of Landscape Terrain polygons to be set (in units), in the [0.0001f, 1000.0f] range. The default value is 0.01f.
float getLandscapeTerrainGeometryPolygonSize ( ) const#
Returns the size of Landscape Terrain polygons defining the maximum allowed density of Landscape Terrain geometry.Return value
Current size of Landscape Terrain polygons (in units), in the [0.0001f, 1000.0f] range. The default value is 0.01f.void setLandscapeTerrainGeometryProgression ( float progression ) #
Sets the progression of Landscape Terrain geometry tessellation.Arguments
- float progression - New progression value to be set in the [0.0f; 50.0f] range. The default value is 1.5f.
float getLandscapeTerrainGeometryProgression ( ) const#
Returns the current progression of Landscape Terrain geometry tessellation.Return value
Current progression value in the [0.0f; 50.0f] range. The default value is 1.5f.void setLandscapeTerrainGeometryFadeLods ( float lods ) #
Sets the intensity of fading between levels of Landscape Terrain geometry tessellation. This value can be increased to remove sharp edges between areas with different geometry density.Arguments
- float lods - Fading intensity value to be set, in the [0.0f; 1.0f] range. The default value is 0.5f.
float getLandscapeTerrainGeometryFadeLods ( ) const#
Returns the current intensity of fading between levels of Landscape Terrain geometry tessellation. This value can be increased to remove sharp edges between areas with different geometry density.Return value
Current fading intensity value in the [0.0f; 1.0f] range. The default value is 0.5f.void setLandscapeTerrainGeometrySubpixelReduction ( float reduction ) #
Sets the minimum ratio between the polygon size (in screen space) to the size of an area in the viewport for skipping polygons rendering (the ones having a lower ratio will be removed).Arguments
- float reduction - Subpixel reduction ratio to be set, in the [0.0f; 50.0f] range. The default value is 6.0f.
NoticeSetting too high values may cause small but noticeable visual artifacts when the camera moves.
float getLandscapeTerrainGeometrySubpixelReduction ( ) const#
Returns the minimum ratio between the polygon size (in screen space) to the size of an area in the viewport for skipping polygons rendering (the ones having a lower ratio will be removed).Return value
Current subpixel reduction ratio, in the [0.0f; 50.0f] range. The default value is 6.0f.void setLandscapeTerrainCullingAggressive ( bool aggressive ) #
Sets a value indicating if frustum culling optimization is enabled for the Landscape Terrain. When enabled, the number of culled polygons increases thereby increasing performance. In case of any issues with polygons rendering, try disabling this option (however, note that performance may drop).Arguments
- bool aggressive - true to enable frustum culling optimization for the Landscape Terrain; false - to disable it.
bool isLandscapeTerrainCullingAggressive ( ) const#
Returns a value indicating if frustum culling optimization is enabled for the Landscape Terrain. When enabled, the number of culled polygons increases thereby increasing performance. In case of any issues with polygons rendering, try disabling this option (however, note that performance may drop).Return value
true if frustum culling optimization is enabled for the landscape terrain; otherwise, false.void setLandscapeTerrainCullingFrustumPadding ( float padding ) #
Sets a multiplier for the size of viewing frustum to be used for culling polygons of the Landscape Terrain.Arguments
- float padding - Frustumn padding multiplier to be set, in the [0.0f; 1.0f] range. The default value is 0.1f.
float getLandscapeTerrainCullingFrustumPadding ( ) const#
Returns the current multiplier for the size of viewing frustum used for culling polygons of the Landscape Terrain.Return value
Current frustumn padding multiplier, in the [0.0f; 1.0f] range. The default value is 0.1f.void setLandscapeTerrainCullingBackFace ( float face ) #
Sets the threshold used for culling tessellation patches of the Landscape Terrain oriented to the camera with their back faces (it is a multiplier for the angle between the tessellation patch normal and the camera's view direction). Higher values result in a smaller angle between the patch normal and the camera's view direction required for culling this patch.Arguments
- float face - Backface culling threshold value to be set in the [0.0f; 1.0f] range. The default value is 0.5f.
float getLandscapeTerrainCullingBackFace ( ) const#
Returns the current threshold used for culling tessellation patches of the Landscape Terrain oriented to the camera with their back faces (it is a multiplier for the angle between the tessellation patch normal and the camera's view direction). Higher values result in a smaller angle between the patch normal and the camera's view direction required for culling this patch.Return value
Current backface culling threshold value in the [0.0f; 1.0f] range. The default value is 0.5f.void setLandscapeTerrainCullingObliqueFrustum ( float frustum ) #
Sets the multiplier for culling of tessellation patches of the Landscape Terrain beyond the oblique frustum plane.Arguments
- float frustum - Multiplier value to be set, in the [0.0f, 1.0f] range. Higher values result in more patches culled. The default value is 0.9f.
float getLandscapeTerrainCullingObliqueFrustum ( ) const#
Returns the current multiplier for culling of tessellation patches of the Landscape Terrain beyond the oblique frustum plane.Return value
Current multiplier value, in the [0.0f, 1.0f] range. Higher values result in more patches culled. The default value is 0.9f.void setLandscapeTerrainTexelSize ( float size ) #
Arguments
- float size - Landscape Terrain texel size (in meters), in the [0.0001f, 1.0f] range. The default value is 0.001f.
float getLandscapeTerrainTexelSize ( ) const#
Return value
Landscape Terrain texel size (in meters), in the [0.0001f, 1.0f] range. The default value is 0.001f.void setLandscapeCacheCPUSize ( int size ) #
Arguments
- int size - New СPU cache size to be set, in percentage of the total СPU memory. The default value is 10%.
int getLandscapeCacheCPUSize ( ) const#
Return value
Current CPU cache size, in percentage of the total GPU memory. The default value is 10%.void setLandscapeCacheGPUSize ( int size ) #
Arguments
- int size - New GPU cache size to be set, in percentage of the total GPU memory. The default value is 4%.
int getLandscapeCacheGPUSize ( ) const#
Return value
Current GPU cache size, in percentage of the total GPU memory. The default value is 4%.void setLandscapeCacheGPULifeTime ( int time ) #
Arguments
- int time - New GPU cache lifetime to be set, number of frames in the [1; 60] range. The default value is 4.
int getLandscapeCacheGPULifeTime ( ) const#
Return value
Current GPU cache lifetime, number of frames in the [1; 60] range. The default value is 4.void setWireframeAntialiasing ( bool antialiasing ) #
Arguments
- bool antialiasing - true to enable antialiasing for wireframe rendering; false - to disable it.
bool isWireframeAntialiasing ( ) const#
Return value
true if antialiasing is enabled for wireframe rendering; otherwise, false.void setFfpAntialiasingLines ( bool lines ) #
Arguments
- bool lines - true to enable antialiasing for visualizer rendering; false - to disable it.
bool isFfpAntialiasingLines ( ) const#
Return value
true if antialiasing is enabled for rendering of the Visualizer and other FFP lines; otherwise, false.bool isAPISupported ( int api ) #
Returns a value indicating if the specified graphics API (Null/OpenGL/DirectX) is currently supported.Arguments
- int api - Graphics API ID. One of the API_* values.
Return value
true if the specified graphics API is currently supported; otherwise, false.void setCloudsFixCoverageTiling ( bool tiling ) #
Arguments
- bool tiling - true to enable tiling reduction for the clouds coverage texture; false - to disable it.
bool isCloudsFixCoverageTiling ( ) const#
Return value
true if tiling reduction for the clouds coverage texture is enabled; otherwise, false.void setCloudsRounded ( bool rounded ) #
Arguments
- bool rounded - true to enable curving for clouds; false - to disable it.
bool isCloudsRounded ( ) const#
Return value
true if visual curving for clouds is enabled; otherwise, false.void setCloudsRoundedPlanetRadius ( float radius ) #
Arguments
- float radius - Planet radius to be used for clouds curving, in units.
float getCloudsRoundedPlanetRadius ( ) const#
Return value
Planet radius used for clouds curving, in units.void setPanoramaFisheyeFov ( float fov ) #
Arguments
- float fov - Field of View, in degrees.
float getPanoramaFisheyeFov ( ) const#
Return value
Field of View, in degrees.void setSRAA ( bool sraa ) #
Arguments
- bool sraa - 1 to enable SRAA, 0 to disable it.
bool isSRAA ( ) const#
void setSRAASamples ( int samples ) #
Arguments
- int samples - The number of depth geometry samples per pixel. This value may significantly affect performance, so keep it low when the image quality differences are not apparent.
- 0 - 2 depth samples per pixel
- 1 - 4 depth samples per pixel
- 2 - 8 depth samples per pixel
int getSRAASamples ( ) const#
void setSRAATemporal ( bool temporal ) #
Arguments
- bool temporal - true to enable TAA, false to disable it.
bool isSRAATemporal ( ) const#
void setSRAADebug ( bool debug ) #
Arguments
- bool debug - 1 to enable debug mode, 0 to disable it.
bool isSRAADebug ( ) const#
void setSRAADepthThreshold ( float threshold ) #
Arguments
- float threshold - The depth threshold. Minimum value is 0.0f.
float getSRAADepthThreshold ( ) const#
void setSSGIIntensityBoost ( int boost ) #
Arguments
- int boost - The value to which the intensity is raised. The set of accepted values: 1, 2, 3 and 4.
int getSSGIIntensityBoost ( ) const#
void setTessellationDensityMultiplier ( float multiplier ) #
Sets the current global Density multiplier for the Tessellated Displacement effect.Arguments
- float multiplier - Tessellation Density multiplier in the [0.0f, 10.0f] range.
float getTessellationDensityMultiplier ( ) const#
Returns the current global Density multiplier for the Tessellated Displacement effect.Return value
Tessellation Density multiplier.void setTessellationShadowDensityMultiplier ( float multiplier ) #
Sets the current global Shadow Density multiplier for the Tessellated Displacement effect.Arguments
- float multiplier - Tessellation Shadow Density multiplier in the [0.0f, 10.0f] range.
float getTessellationShadowDensityMultiplier ( ) const#
Returns the current global Shadow Density multiplier for the Tessellated Displacement effect.Return value
Tessellation Shadow Density multiplier.void setTessellationDistanceMultiplier ( float multiplier ) #
Sets the current global multiplier for all distance parameters of the Tessellated Displacement effect.Arguments
- float multiplier - Tessellation distance multiplier in the [0.0f, 10.0f] range.
float getTessellationDistanceMultiplier ( ) const#
Returns the current global multiplier for all distance parameters of the Tessellated Displacement effect.Return value
Tessellation distance multiplier.void setSSRNormalBias ( float bias ) #
Arguments
- float bias - Normal bias value within the [0; 1] range.
float getSSRNormalBias ( ) const#
Return value
Normal bias value within the [0; 1] range.void setSSRViewBias ( float bias ) #
Arguments
- float bias - View bias value within the [0; 1] range.
float getSSRViewBias ( ) const#
Return value
View bias value within the [0; 1] range.void setLightmapColor ( const Math::vec4 & color ) #
Arguments
- const Math::vec4 & color - Color multiplier.