This page has been translated automatically.
Видеоуроки
Interface
Essentials
Advanced
Полезные советы
Программирование на C#
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Настройки и предпочтения
Работа с проектами
Настройка параметров узла
Setting Up Materials
Setting Up Properties
Освещение
Landscape Tool
Sandworm (Experimental)
Использование инструментов редактора для конкретных задач
Extending Editor Functionality
Встроенные объекты
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Objects
Sound Objects
Pathfinding Objects
Players
Программирование
Основы
Настройка среды разработки
Примеры использования
UnigineScript
C++
C#
Унифицированный язык шейдеров UUSL
File Formats
Rebuilding the Engine Tools
GUI
Двойная точность координат
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Работа с контентом
Оптимизация контента
Материалы
Art Samples
Tutorials
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

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#

NameDescription
PASS_WIREFRAME = 0Wireframe pass.
PASS_VISUALIZER_SOLID = 1Visualizer pass.
PASS_DEFERRED = 2Deferred pass.
PASS_AUXILIARY = 3Auxiliary pass.
PASS_EMISSION = 4Emission pass.
PASS_REFLECTION = 5Reflection pass.
PASS_REFRACTION = 6Refraction pass.
PASS_TRANSPARENT_BLUR = 7Transparent blur pass.
PASS_AMBIENT = 8Ambient pass.
PASS_LIGHT_VOXEL_PROBE = 9Light voxel probe pass.
PASS_LIGHT_ENVIRONMENT_PROBE = 10Light environment probe pass.
PASS_LIGHT_OMNI = 11Omni light pass.
PASS_LIGHT_PROJ = 12Proj light pass.
PASS_LIGHT_WORLD = 13World light pass.
PASS_SHADOW = 14Shadow pass.
PASS_DEPTH_PRE_PASS = 15Depth pre-pass.
PASS_MS_DEPTH = 16
PASS_POST = 17Post materials pass.
PASS_PROCEDURAL_DECALS = 18Pass for rendering of particles into procedural textures to be used by orthographic decals.
PASS_PROCEDURAL_FIELDS = 19Pass for rendering of particles into procedural textures to be used by height fields.
PASS_CUSTOM_0 = 20Custom pass (unassigned).
PASS_CUSTOM_1 = 21Custom pass (unassigned).
PASS_CUSTOM_2 = 22Custom pass (unassigned).
PASS_CUSTOM_3 = 23Custom pass (unassigned).
PASS_CUSTOM_4 = 24Custom pass (unassigned).
PASS_CUSTOM_5 = 25Custom pass (unassigned).
PASS_CUSTOM_6 = 26Custom pass (unassigned).
PASS_CUSTOM_7 = 27Custom pass (unassigned).
PASS_CUSTOM_8 = 28Custom pass (unassigned).
PASS_CUSTOM_9 = 29Custom pass (unassigned).
PASS_CUSTOM_10 = 30Custom pass (unassigned).
PASS_CUSTOM_11 = 31Custom pass (unassigned).
PASS_CUSTOM_12 = 32Custom pass (unassigned).
PASS_CUSTOM_13 = 33Custom pass (unassigned).
PASS_CUSTOM_14 = 34Custom pass (unassigned).
PASS_CUSTOM_15 = 35Custom pass (unassigned).
PASS_CUSTOM_16 = 36Custom pass (unassigned).
PASS_CUSTOM_17 = 37Custom pass (unassigned).
PASS_CUSTOM_18 = 38Custom pass (unassigned).
PASS_CUSTOM_19 = 39Custom pass (unassigned).
PASS_CUSTOM_20 = 40Custom pass (unassigned).
PASS_CUSTOM_21 = 41Custom pass (unassigned).
PASS_CUSTOM_22 = 42Custom pass (unassigned).
PASS_CUSTOM_23 = 43Custom pass (unassigned).
PASS_CUSTOM_24 = 44Custom pass (unassigned).
PASS_CUSTOM_25 = 45Custom pass (unassigned).
PASS_CUSTOM_26 = 46Custom pass (unassigned).
PASS_CUSTOM_27 = 47Custom pass (unassigned).
PASS_CUSTOM_28 = 48Custom pass (unassigned).
PASS_CUSTOM_29 = 49Custom pass (unassigned).
PASS_CUSTOM_30 = 50Custom pass (unassigned).
PASS_CUSTOM_31 = 51Custom pass (unassigned).
PASS_CUSTOM_32 = 52Custom pass (unassigned).
NUM_PASSES = 53Total number of rendering passes.

CORRECT_ROUGHNESS#

NameDescription
CORRECT_ROUGHNESS_DISABLED = 0Disabled roughness correction.
CORRECT_ROUGHNESS_LOW = 1Roughness correction of minimum quality.
CORRECT_ROUGHNESS_MEDIUM = 2Roughness correction of medium quality.
CORRECT_ROUGHNESS_HIGH = 3Roughness correction of high quality.
CORRECT_ROUGHNESS_ULTRA = 4Roughness correction of ultra-high quality.

CALLBACK_INDEX#

NameDescription
CALLBACK_BEGIN = 0Beginning of the callback range.
CALLBACK_BEGIN_SHADOWS = 1Callback before the shadows rendering stage.
CALLBACK_BEGIN_WORLD_SHADOW = 2Callback before the stage of rendering shadows from World light sources.
CALLBACK_END_WORLD_SHADOW = 3Callback after the stage of rendering shadows from World light sources.
CALLBACK_BEGIN_PROJ_SHADOW = 4Callback before the stage of rendering shadows from Projected light sources.
CALLBACK_END_PROJ_SHADOW = 5Callback after the stage of rendering shadows from Projected light sources.
CALLBACK_BEGIN_OMNI_SHADOW = 6Callback before the stage of rendering shadows from Omni light sources.
CALLBACK_END_OMNI_SHADOW = 7Callback after the stage of rendering shadows from Omni light sources.
CALLBACK_END_SHADOWS = 8Callback after the shadows rendering stage.
CALLBACK_BEGIN_SCREEN = 9Callback before the stage of rendering each screen (a stereo image has 2 screens, while a cubemap will have 6).
CALLBACK_BEGIN_OPACITY_GBUFFER = 10Callback before filling the Gbuffer.
CALLBACK_END_OPACITY_GBUFFER = 11Callback after filling the Gbuffer.
CALLBACK_BEGIN_OPACITY_DECALS = 12Callback before the opacity decals rendering stage.
CALLBACK_END_OPACITY_DECALS = 13Callback after the opacity decals rendering stage.
CALLBACK_BEGIN_CURVATURE = 14Callback before the SSBevel effect rendering stage.
CALLBACK_END_CURVATURE = 15Callback after the SSBevel effect rendering stage.
CALLBACK_BEGIN_CURVATURE_COMPOSITE = 16Callback before the curvature rendering stage for the SSDirt effect.
CALLBACK_END_CURVATURE_COMPOSITE = 17Callback after the curvature rendering stage for the SSDirt effect.
CALLBACK_BEGIN_SSRTGI = 18Callback before the SSRTGI rendering stage.
CALLBACK_END_SSRTGI = 19Callback after the SSRTGI rendering stage.
CALLBACK_BEGIN_OPACITY_LIGHTS = 20Callback before the opacity lightgs rendering stage.
CALLBACK_END_OPACITY_LIGHTS = 21Callback after the opacity lightgs rendering stage.
CALLBACK_BEGIN_OPACITY_VOXEL_PROBES = 22Callback before the opacity voxel probes rendering stage.
CALLBACK_END_OPACITY_VOXEL_PROBES = 23Callback after the opacity voxel probes rendering stage.
CALLBACK_BEGIN_OPACITY_ENVIRONMENT_PROBES = 24Callback before the opacity environment probes rendering stage.
CALLBACK_END_OPACITY_ENVIRONMENT_PROBES = 25Callback after the opacity environment probes rendering stage.
CALLBACK_BEGIN_AUXILIARY_BUFFER = 26Callback before filling the auxiliary buffer.
CALLBACK_END_AUXILIARY_BUFFER = 27Callback after filling the auxiliary buffer.
CALLBACK_BEGIN_REFRACTION_BUFFER = 28Callback before filling the refraction buffer.
CALLBACK_END_REFRACTION_BUFFER = 29Callback after filling the refraction buffer.
CALLBACK_BEGIN_TRANSPARENT_BLUR_BUFFER = 30Callback before filling the transparent blur buffer.
CALLBACK_END_TRANSPARENT_BLUR_BUFFER = 31Callback after filling the transparent blur buffer.
CALLBACK_BEGIN_SSR = 32Callback before the SSR rendering stage.
CALLBACK_END_SSR = 33Callback after the SSR rendering stage.
CALLBACK_BEGIN_SSAO = 34Callback before the SSAO rendering stage.
CALLBACK_END_SSAO = 35Callback after the SSAO rendering stage.
CALLBACK_BEGIN_SSGI = 36Callback before the SSGI rendering stage.
CALLBACK_END_SSGI = 37Callback after the SSGI rendering stage.
CALLBACK_BEGIN_COMPOSITE_DEFERRED = 38Callback before the clouds deferred composite stage.
CALLBACK_END_COMPOSITE_DEFERRED = 39Callback after the clouds deferred composite stage.
CALLBACK_BEGIN_TRANSPARENT = 40Callback before the transparent objects rendering stage.
CALLBACK_BEGIN_CLOUDS = 41Callback before the clouds rendering stage.
CALLBACK_END_CLOUDS = 42Callback after the clouds rendering stage.
CALLBACK_BEGIN_WATER = 43Callback before the water rendering stage.
CALLBACK_BEGIN_WATER_DECALS = 44Callback before the water decals rendering stage.
CALLBACK_END_WATER_DECALS = 45Callback after the water decals rendering stage.
CALLBACK_BEGIN_WATER_LIGHTS = 46Callback before the water lights rendering stage.
CALLBACK_END_WATER_LIGHTS = 47Callback after the water lights rendering stage.
CALLBACK_BEGIN_WATER_VOXEL_PROBES = 48Callback before the water voxel probes rendering stage.
CALLBACK_END_WATER_VOXEL_PROBES = 49Callback after the water voxel probes rendering stage.
CALLBACK_BEGIN_WATER_ENVIRONMENT_PROBES = 50Callback before the water environment probes rendering stage.
CALLBACK_END_WATER_ENVIRONMENT_PROBES = 51Callback after the water environment probes rendering stage.
CALLBACK_END_WATER = 52Callback after the water rendering stage.
CALLBACK_END_TRANSPARENT = 53Callback after the transparent objects rendering stage.
CALLBACK_BEGIN_SRGB_CORRECTION = 54Callback before the sRGB correction stage.
CALLBACK_END_SRGB_CORRECTION = 55Callback after the sRGB correction stage.
CALLBACK_BEGIN_ADAPTATION_COLOR_AVERAGE = 56Callback before the calculation of automatic exposure and white balance correction.
CALLBACK_END_ADAPTATION_COLOR_AVERAGE = 57Callback after the calculation of automatic exposure and white balance correction.
CALLBACK_BEGIN_ADAPTATION_COLOR = 58Callback before the color adaptation rendering stage (automatic exposure and white balance correction).
CALLBACK_END_ADAPTATION_COLOR = 59Callback after the color adaptation rendering stage (automatic exposure and white balance correction).
CALLBACK_BEGIN_TAA = 60Callback before the Temporal Anti-Aliasing (TAA) pass.
CALLBACK_END_TAA = 61Callback after the Temporal Anti-Aliasing (TAA) pass.
CALLBACK_BEGIN_CAMERA_EFFECTS = 62Callback before the camera effects stage.
CALLBACK_END_CAMERA_EFFECTS = 63Callback after the camera effects stage.
CALLBACK_BEGIN_POST_MATERIALS = 64Callback before the post materials rendering stage.
CALLBACK_END_POST_MATERIALS = 65Callback after the post materials rendering stage.
CALLBACK_BEGIN_DEBUG_MATERIALS = 66Callback before the debug materials stage.
CALLBACK_END_DEBUG_MATERIALS = 67Callback after the debug materials stage.
CALLBACK_BEGIN_VISUALIZER = 68Callback before the visualizer rendering stage.
CALLBACK_END_VISUALIZER = 69Callback after the visualizer rendering stage.
CALLBACK_END_SCREEN = 70Callback after the stage of rendering each screen (a stereo image has 2 screens, while a cubemap will have 6).
CALLBACK_END = 71End of the callback range.
NUM_CALLBACKS = 72Callback counter.

VIEWPORT_MODE#

NameDescription
VIEWPORT_MODE_DEFAULT = 0Enables 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 = 1Enables rendering of the viewport as a panorama with curved edges with an angle of 180 degrees.
VIEWPORT_MODE_PANORAMA_CURVED_360 = 2Enables rendering of the viewport as a panorama with curved edges with an angle of 360 degrees.
VIEWPORT_MODE_PANORAMA_LINEAR_180 = 3Enables rendering of the viewport as a linear panorama without distortion at the edges with an angle of 180 degrees.
VIEWPORT_MODE_PANORAMA_LINEAR_360 = 4Enables rendering of the viewport as a linear panorama without distortion at the edges with an angle of 360 degrees.
VIEWPORT_MODE_PANORAMA_FISHEYE_ORTHOGRAPHIC = 5Enables rendering of the viewport as an orthographic spherical panorama (fisheye).
VIEWPORT_MODE_PANORAMA_FISHEYE_EQUDISTANT = 6Enables rendering of the viewport as an equidistant spherical panorama (fisheye).
VIEWPORT_MODE_PANORAMA_FISHEYE_STEREOGRAPHIC = 7Enables rendering of the viewport as an stereographic spherical panorama (fisheye).
VIEWPORT_MODE_PANORAMA_FISHEYE_EQUISOLID = 8Enables rendering of the viewport as an equisolid spherical panorama (fisheye).
VIEWPORT_MODE_STEREO_ANAGLYPH = 9Enables the anaglyph stereo mode that is viewed with red-cyan anaglyph glasses.
VIEWPORT_MODE_STEREO_INTERLACED = 10Enables the interlaced stereo mode that is used with interlaced stereo monitors and polarized 3D glasses.
VIEWPORT_MODE_STEREO_HORIZONTAL = 11Enables the horizontal stereo mode that is supported on mobile devices.
VIEWPORT_MODE_STEREO_VERTICAL = 12Enables the vertical stereo mode that is supported on mobile devices.
VIEWPORT_MODE_STEREO_SEPARATE = 13Enables the replicate images stereo mode.
VIEWPORT_MODE_STEREO_REPLICATE = 14Enables 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 ) #

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

Arguments

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

bool isAlphaFade ( ) const#

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

Return value

1 if alpha fading is enabled; otherwise, 0.

void setAnimationLeaf ( float leaf ) #

Console: render_animation_leaf
Sets the global scale for rotation angle of vegetation leaves.

Arguments

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

float getAnimationLeaf ( ) const#

Console: render_animation_leaf
Returns the current scale for rotation angle of vegetation leaves.

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 ) #

Console: render_animation_scale
Sets the global scale for rotation speed of vegetation leaves.

Arguments

  • float scale - Global leaf rotation speed.

float getAnimationScale ( ) const#

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

Return value

Global leaf rotation speed.

void setAnimationStem ( float stem ) #

Console: render_animation_stem
Sets the global scale for movement amplitude of vegetation stems.

Arguments

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

float getAnimationStem ( ) const#

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

Return value

Global stem amplitude scale.

void setAnimationTime ( float time ) #

Sets the render animation time for vegetation.

Arguments

  • float time - Animation time in milliseconds.

float getAnimationTime ( ) const#

Returns the render animation time for vegetation.

Return value

Animation time in milliseconds.

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

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

Arguments

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

Math::vec3 getAnimationWind ( ) const#

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

Return value

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

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

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

Arguments

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

Math::vec2 getBorder ( ) const#

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

Return value

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

int getAPI ( ) 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 ) #

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

Arguments

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

bool isAuxiliary ( ) const#

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

Return value

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

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

Console: render_background_color
Sets the background color by using given vector.

Arguments

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

Math::vec4 getBackgroundColor ( ) const#

Console: render_background_color
Returns the background color vector.

Return value

A background color vector.

void setBentNormalRayTracing ( bool tracing ) #

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

Arguments

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

bool isBentNormalRayTracing ( ) const#

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

Return value

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

void setBentNormalFixOverlitAreas ( bool areas ) #

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

Arguments

  • 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#

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

Return value

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

void setBentNormalRayTracingDenoise ( bool denoise ) #

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

Arguments

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

bool isBentNormalRayTracingDenoise ( ) const#

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

Return value

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

void setBentNormalRayTracingThreshold ( float threshold ) #

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

Arguments

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

float getBentNormalRayTracingThreshold ( ) const#

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

Return value

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

Ptr<Texture> getBlack2DArrayTexture ( ) 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 ) #

Console: render_bloom
Enables or disables the bloom effect.

Arguments

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

bool isBloom ( ) const#

Console: render_bloom
Returns a value indicating if the bloom effect is enabled.

Return value

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

void setBloomPasses ( int passes ) #

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

Arguments

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

int getBloomPasses ( ) const#

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

Return value

Number of bloom passes.

void setBloomPower ( float power ) #

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

Arguments

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

float getBloomPower ( ) const#

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

Return value

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

void setBloomResolution ( int resolution ) #

Console: render_bloom_resolution
Sets the resolution of the bloom effect.

Arguments

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

int getBloomResolution ( ) const#

Console: render_bloom_resolution
Returns the current resolution of the bloom effect.

Return value

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

void setBloomScale ( float scale ) #

Console: render_bloom_scale
Sets the scale of the bloom effect.

Arguments

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

float getBloomScale ( ) const#

Console: render_bloom_scale
Returns the scale of the bloom effect.

Return value

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

void setBudget ( float budget ) #

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

Arguments

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

float getBudget ( ) const#

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

Return value

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

void setCameraEffectsThreshold ( float threshold ) #

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

Arguments

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

float getCameraEffectsThreshold ( ) const#

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

Return value

HDR threshold.

void setClearBufferMask ( int mask ) #

Sets the buffer cleanup mask. This mask determines which buffers are to be cleared next time the Engine::render() is called. Thus, you can determine the contents of which buffers is to be kept, avoiding situations, when necessary data is cleared.
Source code (C++)
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 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 ) #

Console: render_clouds_distortion_texture
Sets a value indicating which texture type is to be used for clouds distortion.

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#

Console: render_clouds_distortion_texture
Returns a value indicating which texture type is currently used for clouds distortion.

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 ) #

Console: render_clouds_accurate_layers_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#

Console: render_clouds_accurate_layers_sorting
Returns a value indicating if correct sorting of intersecting cloud layers is enabled.
Notice
Enabling this feature may reduce raymarching quality as samples shall be distributed among all layers.

Return value

true if rendering of shadows from the clouds on the ground is enabled; otherwise, false.

void setCloudsStepAccuracy ( float accuracy ) #

Console: render_clouds_step_accuracy
Sets the accuracy of ray marching steps. This parameter enables you to improve the visual look of clouds when viewed from inside a cloud layer. It reduces the noise of lighting and clouds shape for long ray marching distances, adds some noise-based blur to a sharp border at the bottom sphere of the cloud layer (rounded) and removes popping effect when leaving a rounded cloud layer.

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#

Console: render_clouds_step_accuracy
Returns the current accuracy of ray marching steps. This parameter enables you to improve the visual look of clouds when viewed from inside a cloud layer.

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 ) #

Console: render_clouds_depth_based_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.
Notice
Works only with clouds domnsampling rendering mode is set to half and/or clouds interleaved rendering mode is set to 2x2.

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#

Console: render_clouds_depth_based_reconstruction
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.
Notice
Works only with clouds domnsampling rendering mode is set to half and/or clouds interleaved rendering mode is set to 2x2.

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 ) #

Console: render_clouds_depth_based_reconstruction_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#

Console: render_clouds_depth_based_reconstruction_threshold
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.0f

void setCloudsDownsamplingRendering ( int rendering ) #

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

Arguments

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

int getCloudsDownsamplingRendering ( ) const#

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

Return value

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

void setCloudsDynamicCoverageArea ( float area ) #

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

Arguments

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

float getCloudsDynamicCoverageArea ( ) const#

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

Return value

Dynamic coverage area, in units.

void setCloudsDynamicCoverageResolution ( int resolution ) #

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

Arguments

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

int getCloudsDynamicCoverageResolution ( ) const#

Console: render_clouds_dynamic_coverage_resolution
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 ) #

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

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#

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

Return value

true if rendering of shadows from the clouds on the ground is enabled; otherwise, false.

void setCloudsInterleavedRendering ( int rendering ) #

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

Arguments

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

int getCloudsInterleavedRendering ( ) const#

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

Return value

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

void setCloudsInterleavedRenderingTemporal ( bool temporal ) #

Console: render_clouds_interleaved_rendering_temporal
Sets a value indicating if temporal accumulation of noises for interleaved sampling for clouds is enabled.
Notice
Works only when clouds interleaved rendering mode set to 2x2.

Arguments

  • bool temporal - true to enable temporal accumulation of noises for interleaved sampling for clouds; false - to disable.

bool isCloudsInterleavedRenderingTemporal ( ) const#

Console: render_clouds_interleaved_rendering_temporal
Returns a value indicating if temporal accumulation of noises for interleaved sampling for clouds is enabled.
Notice
Works only when clouds interleaved rendering mode set to 2x2.

Return value

true if temporal accumulation of noises for interleaved sampling for clouds is enabled; otherwise false.

void setCloudsLightingConeRadius ( float radius ) #

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

Arguments

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

float getCloudsLightingConeRadius ( ) const#

Console: render_clouds_lighting_cone_radius
Returns the current lighting cone sampling radius for clouds lighting.

Return value

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

void setCloudsLightingQuality ( int quality ) #

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

Arguments

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

int getCloudsLightingQuality ( ) const#

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

Return value

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

void setCloudsLightingTraceLength ( float length ) #

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

Arguments

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

float getCloudsLightingTraceLength ( ) const#

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

Return value

Lighting trace length, in units.

void setCloudsNoiseIterations ( float iterations ) #

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

Arguments

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

float getCloudsNoiseIterations ( ) const#

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

Return value

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

void setCloudsNoiseLighting ( float lighting ) #

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

Arguments

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

float getCloudsNoiseLighting ( ) const#

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

Return value

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

void setCloudsNoiseStep ( float step ) #

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

Arguments

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

float getCloudsNoiseStep ( ) const#

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

Return value

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

void setCloudsNoiseStepSkip ( float skip ) #

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

Arguments

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

float getCloudsNoiseStepSkip ( ) const#

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

Return value

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

void setCloudsSamplesCount ( int count ) #

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

Arguments

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

int getCloudsSamplesCount ( ) const#

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

Return value

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

void setCloudsSamplingQuality ( int quality ) #

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

Arguments

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

int getCloudsSamplingQuality ( ) const#

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

Return value

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

void setCloudsSoftIntersection ( float intersection ) #

Console: render_clouds_soft_intersection
Sets the soft intersection distance for clouds.

Arguments

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

float getCloudsSoftIntersection ( ) const#

Console: render_clouds_soft_intersection
Returns the current soft intersection distance for clouds.

Return value

Soft intersection distance for clouds, in meters.

void setCloudsTransparentOrder ( bool order ) #

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

Arguments

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

bool isCloudsTransparentOrder ( ) const#

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

Return value

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

void 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().
Source code (C++)
ImagePtr lut;
ImagePtr lut_0;
ImagePtr lut_1;

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

float k = sin(Game::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

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

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

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

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:

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

  • const Palette & saturation - A set of color values in a Palette structure.

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 ) #

Console: render_cross
Enables or disables cross flares.

Arguments

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

bool isCross ( ) const#

Console: render_cross
Returns a value indicating if cross flares are enabled.

Return value

1 if cross flares are enabled; otherwise, 0.

void setCrossAngle ( float angle ) #

Console: render_cross_angle
Sets the cross flares orientation angle.

Arguments

  • float angle - Angle in degrees.

float getCrossAngle ( ) const#

Console: render_cross_angle
Returns the cross flares orientation angle.

Return value

Angle between flare shafts in degrees.

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

Console: render_cross_color
Sets the color of the cross flares.

Arguments

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

Math::vec4 getCrossColor ( ) const#

Console: render_cross_color
Returns the color of the cross flares.

Return value

Color of the cross flares.

void setCrossLength ( float length ) #

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

Arguments

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

float getCrossLength ( ) const#

Console: render_cross_length
Returns the length of a cross flare.

Return value

Length of a cross flare relative to the screen width.

void setCrossScale ( float scale ) #

Console: render_cross_scale
Sets a multiplier for color of cross flares.

Arguments

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

float getCrossScale ( ) const#

Console: render_cross_scale
Returns the current multiplier for color of cross flares.

Return value

Cross color scale.

void setCrossShafts ( int shafts ) #

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

Arguments

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

int getCrossShafts ( ) const#

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

Return value

Number of cross flares.

void setCrossThreshold ( float threshold ) #

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

Arguments

  • float threshold - Cross flares threshold.

float getCrossThreshold ( ) const#

Console: render_cross_threshold
Returns the current brightness threshold for areas to produce flare.

Return value

Cross flares threshold.

void setData ( const char * data ) #

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

Arguments

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

const char * getData ( ) 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:
Source code (XML)
<world version="1.21">
	<render>
		<data>User data</data>
	</render>
</world>

Return value

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

void setDebug ( bool debug ) #

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

Arguments

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

bool isDebug ( ) const#

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

Return value

1 if debug materials are rendered; otherwise, 0.

void setDebugMaterials ( const char * materials ) #

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

Arguments

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

const char * getDebugMaterials ( ) const#

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

Return value

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

void setDecalDistance ( float distance ) #

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

Arguments

  • float distance - Distance in units.

float getDecalDistance ( ) const#

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

Return value

Distance in units.

void setDecals ( bool decals ) #

Console: render_decals
Enables or disables rendering of decals.

Arguments

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

bool isDecals ( ) const#

Console: render_decals
Returns the value indicating if rendering of decals is enabled.

Return value

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

void setDeferredMaterial ( const char * material ) #

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

Arguments

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

const char * getDeferredMaterial ( ) 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 ) #

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

Arguments

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

float getDirtScale ( ) const#

Console: render_dirt_scale
Returns the scale of lens dirt effect modulating the pattern of lens flares.

Return value

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

void setDirtTextureName ( const char * name ) #

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

Arguments

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

const char * getDirtTextureName ( ) 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 ) #

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

Arguments

  • float scale - Global distance scale.

float getDistanceScale ( ) const#

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

Return value

Global distance scale.

void setDOF ( bool dof ) #

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

Arguments

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

bool isDOF ( ) const#

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

Return value

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

void setDOFBlur ( float blur ) #

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

Arguments

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

float getDOFBlur ( ) const#

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

Return value

DoF blur intensity value.

void setDOFBokehMode ( int mode ) #

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

Arguments

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

int getDOFBokehMode ( ) const#

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

Return value

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

void setDOFChromaticAberration ( float aberration ) #

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

Arguments

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

float getDOFChromaticAberration ( ) const#

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

Return value

DOF chromatic aberration intensity value.

void setDOFFarDistance ( float distance ) #

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

Arguments

  • float distance - Far DOF limit value in units.

float getDOFFarDistance ( ) const#

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

Return value

Far DOF limit value in units.

void setDOFFarFocalOffset ( float offset ) #

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

Arguments

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

float getDOFFarFocalOffset ( ) const#

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

Return value

Far DOF focal offset value in units.

void setDOFFocalDistance ( float distance ) #

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

Arguments

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

float getDOFFocalDistance ( ) const#

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

Return value

Focal distance in units.

void setDOFFocusImprovement ( bool improvement ) #

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

Arguments

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

bool isDOFFocusImprovement ( ) const#

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

Return value

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

void setDOFIncreasedAccuracy ( bool accuracy ) #

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

Arguments

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

bool isDOFIncreasedAccuracy ( ) const#

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

Return value

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

void setDOFNearDistance ( float distance ) #

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

Arguments

  • float distance - Near DOF limit value in units.

float getDOFNearDistance ( ) const#

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

Return value

Near DOF limit value in units.

void setDOFNearFocalOffset ( float offset ) #

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

Arguments

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

float getDOFNearFocalOffset ( ) const#

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

Return value

Near DOF focal offset value in units.

void setDOFQuality ( int quality ) #

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

Arguments

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

int getDOFQuality ( ) const#

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

Return value

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

void setDOFResolution ( int resolution ) #

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

Arguments

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

int getDOFResolution ( ) const#

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

Return value

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

void setEnabled ( int arg1 ) 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 ) #

Console: render_environment
Enables or disables rendering of environment of the scene.

Arguments

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

bool isEnvironment ( ) const#

Console: render_environment
Returns the value indicating if rendering of environment of the scene is enabled.

Return value

1 rendering of environment is enabled; otherwise, 0.

void setEnvironmentCubemapBlendMode ( int mode ) #

Console: render_environment_cubemap_blend
Sets the environment cubemap blending mode.

Arguments

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

int getEnvironmentCubemapBlendMode ( ) const#

Console: render_environment_cubemap_blend
Returns the current environment cubemap blending mode.

Return value

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

void setEnvironmentHazeMode ( int mode ) #

Console: render_environment_haze
Sets the mode for the haze effect.

Arguments

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

int getEnvironmentHazeMode ( ) const#

Console: render_environment_haze
Returns the current mode set for the haze effect.

Return value

Haze mode: one of the HAZE_* variables.

void setExposure ( float exposure ) #

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

Arguments

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

float getExposure ( ) const#

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

Return value

Current multiplier of the scene luminance and brightness.

void setExposureAdaptation ( float adaptation ) #

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

Arguments

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

float getExposureAdaptation ( ) const#

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

Return value

Period of exposure adaptation in seconds.

void setExposureMaxLuminance ( float luminance ) #

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

Arguments

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

float getExposureMaxLuminance ( ) 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.
Notice
If the specified value is greater than the current maximum luminance, the maximum luminance value will be changed to the specified minimum luminance so that they are equal.

Arguments

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

float getExposureMinLuminance ( ) 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 ) #

Console: render_exposure_mode
Sets the mode of the adaptive exposure effect.

Arguments

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

int getExposureMode ( ) const#

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

Return value

The type of the exposure mode.

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

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

Arguments

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

Math::vec4 getFadeColor ( ) const#

Console: render_fade_color
Returns the current fade color of the scene.

Return value

The current fade color.

void setFieldDistance ( float distance ) #

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

Arguments

  • float distance - Distance in units.

float getFieldDistance ( ) const#

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

Return value

Distance in units.

void setFieldHeightResolution ( int resolution ) #

Console: render_field_height_resolution
Sets the resolution of the FieldHeight.

Arguments

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

int getFieldHeightResolution ( ) const#

Console: render_field_height_resolution
Returns the value indicating the resolution of the FieldHeight.

Return value

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

void setFieldPrecision ( bool precision ) #

Console: render_field_precision
Sets the precision of textures used for field objects.

Arguments

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

bool isFieldPrecision ( ) const#

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

Return value

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

void setFieldShorelineResolution ( int resolution ) #

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

Arguments

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

int getFieldShorelineResolution ( ) const#

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

Return value

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

void setFilmic ( bool filmic ) #

Console: render_filmic
Enables or disables the filmic tonemapping effect.

Arguments

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

bool isFilmic ( ) const#

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

Return value

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

void setFilmicLinearAngle ( float angle ) #

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

Arguments

  • float angle - Linear Angle value.

float getFilmicLinearAngle ( ) const#

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

Return value

Linear Angle value.

void setFilmicLinearScale ( float scale ) #

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

Arguments

  • float scale - Linear Strength value.

float getFilmicLinearScale ( ) const#

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

Return value

Linear Strength value.

void setFilmicShoulderScale ( float scale ) #

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

Arguments

  • float scale - Shoulder Strength value.

float getFilmicShoulderScale ( ) const#

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

Return value

Shoulder Strength value.

void setFilmicToeDenominator ( float denominator ) #

Console: render_filmic_toe_denominator
Sets the Toe Denominator filmic tonemapping parameter value.

Arguments

  • float denominator - Toe Denominator value.

float getFilmicToeDenominator ( ) const#

Console: render_filmic_toe_denominator
Returns the current Toe Denominator filmic tonemapping parameter value.

Return value

Toe Denominator value.

void setFilmicToeNumerator ( float numerator ) #

Console: render_filmic_toe_numerator
Sets the Toe Numerator filmic tonemapping parameter value.

Arguments

  • float numerator - Toe Numerator value.

float getFilmicToeNumerator ( ) const#

Console: render_filmic_toe_numerator
Sets the Toe Numerator filmic tonemapping parameter value.

Return value

Toe Numerator value.

void setFilmicToeScale ( float scale ) #

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

Arguments

  • float scale - Toe scale value.

float getFilmicToeScale ( ) const#

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

Return value

Toe scale value.

void setFilmicWhiteLevel ( float level ) #

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

Arguments

  • float level - Linear White Point value.

float getFilmicWhiteLevel ( ) const#

Console: render_filmic_white_level
Returns the current Linear White Point filmic tonemapping parameter value.

Return value

Linear White Point value.

void setFilmicSaturationRecovery ( float recovery ) #

Console: render_filmic_saturation_recovery
Sets the color saturation recovery value for the filmic tonemapper.

Arguments

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

float getFilmicSaturationRecovery ( ) const#

Console: render_filmic_saturation_recovery
Returns the current color saturation recovery value value for the filmic tonemapper.

Return value

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

void setFirstFrame ( 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.
Source code (C++)
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 ) #

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

Arguments

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

float getFXAAIntensity ( ) const#

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

Return value

Intensity value of the FXAA

void setGbufferLightmap ( bool lightmap ) #

Console: render_gbuffer_lightmap
Enables or disables storing lightmap data in the GBuffer.

Arguments

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

bool isGbufferLightmap ( ) const#

Console: render_gbuffer_lightmap
Returns a value indicating if lightmap data is stored in the GBuffer.

Return value

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

int getGPUMemory ( ) const#

Console: gpu_memory
Returns an amount of memory provided by the current GPU.

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 ) #

Console: render_lens
Enables or disables lens flares.

Arguments

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

bool isLens ( ) const#

Console: render_lens
Returns a value indicating if lens flares are enabled.

Return value

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

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

Console: render_lens_color
Sets the color of a lens flares.

Arguments

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

Math::vec4 getLensColor ( ) const#

Console: render_lens_color
Returns the color of a lens flare.

Return value

Color of a lens flare.

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

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

Arguments

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

Math::vec3 getLensDispersion ( ) const#

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

Return value

Lens dispersion displacement per channel.

void setLensLength ( float length ) #

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

Arguments

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

float getLensLength ( ) const#

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

Return value

Length of the lens flare.

void setLensRadius ( float radius ) #

Console: render_lens_radius
Sets a radius of the spherical lens flares on the screen.

Arguments

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

float getLensRadius ( ) const#

Console: render_lens_radius
Returns the current radius of the spherical lens flares on the screen.

Return value

Radius of the spherical lens flares.

void setLensScale ( float scale ) #

Console: render_lens_scale
Sets the multiplier for color of HDR lens flares.

Arguments

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

float getLensScale ( ) const#

Console: render_lens_scale
Returns the current multiplier for color of HDR lens flares.

Return value

Lens color scale.

void setLensThreshold ( float threshold ) #

Console: render_lens_threshold
Sets the brightness threshold for lens flares.

Arguments

  • float threshold - Lens flares threshold.

float getLensThreshold ( ) const#

Console: render_lens_threshold
Returns the current brightness threshold for lens flares.

Return value

Lens flares threshold.

void setLightDistance ( float distance ) #

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

Arguments

  • float distance - Distance in units.

float getLightDistance ( ) const#

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

Return value

Distance in units.

void setLightsForwardPerObjectEnv ( int env ) #

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

Arguments

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

int getLightsForwardPerObjectEnv ( ) const#

Console: render_lights_forward_per_object_env
Returns the current maximum number of environment probes per object (available only for materials rendered in the forward rendering pass).

Return value

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

void setLightsForwardPerObjectOmni ( int omni ) #

Console: render_lights_forward_per_object_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#

Console: render_lights_forward_per_object_omni
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 ) #

Console: render_lights_forward_per_object_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#

Console: render_lights_forward_per_object_proj
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 ) #

Console: render_lights_forward_per_object_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#

Console: render_lights_forward_per_object_voxel
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 ) #

Console: render_lights_forward_per_object_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#

Console: render_lights_forward_per_object_world
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 ) #

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

Arguments

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

bool isLightsInterleaved ( ) const#

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

Return value

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

void setLightsInterleavedCatmullResampling ( bool resampling ) #

Console: render_lights_interleaved_catmull_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#

Console: render_lights_interleaved_catmull_resampling
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 ) #

Console: render_lights_interleaved_color_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#

Console: render_lights_interleaved_color_clamping
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 ) #

Console: render_lights_lens_flares
Enables or disables rendering of per-light lens 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#

Console: render_lights_lens_flares
Returns the value indicating if rendering of per-light lens flares is enabled.

Return value

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

void setLightsMaxPerBatch ( int batch ) #

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

Arguments

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

int getLightsMaxPerBatch ( ) const#

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

Return value

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

void setLightsTileGridSize ( int size ) #

Console: render_lights_tile_grid_size
Sets the number of grid tiles per axis for tiled rendering optimization. During this optimization, the screen space is divided into tiles that render lights in batches. The optimization works only for omni lights with point shape and without shadows.

Arguments

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

int getLightsTileGridSize ( ) const#

Console: render_lights_tile_grid_size
Returns the current number of grid tiles per axis for tiled rendering optimization. During this optimization, the screen space is divided into tiles that render lights in batches. The optimization works only for omni lights with point shape and without shadows.

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.
Notice
Higher values will affect shader compilation time and performance

int getMaxFieldHeights ( ) const#

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

Return value

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

int getMaxFieldShorelines ( ) const#

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

Return value

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

int getMaxFieldSpacers ( ) const#

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

Return value

Maximum number of FieldSpacer nod