This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
Professional (SIM)
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Landscape Tool
Sandworm
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Warning
The scope of applications for UnigineScript is limited to implementing materials-related logic (material expressions, scriptable materials, brush materials). Do not use UnigineScript as a language for application logic, please consider C#/C++ instead, as these APIs are the preferred ones. Availability of new Engine features in UnigineScript (beyond its scope of applications) is not guaranteed, as the current level of support assumes only fixing critical issues.

Renderer Class

Members


int hasGeodeticPivot ( ) #

Returns a value indicating if the rendering scene has a GeodeticPivot.

Return value

1 if the rendering scene has a GeodeticPivot; otherwise, 0.

int isNode ( ) #

Returns a value indicating if node rendering is in progress.

Return value

1 if the node rendering is in progress, otherwise 0.

int isReflection ( ) #

Returns a value indicating if reflection rendering is in progress.

Return value

1 if reflection rendering is in progress, otherwise 0.

int isShadow ( ) #

Returns a value indicating if shadows are rendered.

Return value

1 if shadows are rendered; otherwise, 0.

int isStereo ( ) #

Returns a value indicating if stereo rendering is enabled.

Return value

1 if the stereo rendering is enabled; otherwise, 0.

RenderTarget getRenderTarget ( ) #

Returns the render target.

Return value

Render target.

RenderTarget getPostRenderTarget ( ) #

Returns the post texture render.

Return value

Post render target.

int useDynamicReflections ( ) #

Returns a value indicating if rendering of dynamic reflections is enabled.

Return value

1 if rendering of dynamic reflections is enabled; otherwise, 0.

int useOcclusionQueries ( ) #

Returns a value indicating if the occlusion query test is enabled.

Return value

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

int usePostEffects ( ) #

Returns a value indicating if rendering of post effects is enabled.

Return value

1 if rendering of post effects is enabled; otherwise, 0.

int useShadows ( ) #

Returns a value indicating if rendering of shadows is enabled.

Return value

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

int useTAA ( ) #

Returns a value indicating if the Temporal Anti-Aliasing (TAA) is enabled.

Return value

1 if the Temporal Anti-Aliasing (TAA) is enabled; otherwise, 0.

void setUseTAAOffset ( int offset ) #

Sets a value indicating if skipping render mode check is enabled for using TAA. Can be used to ensure proper TAA calculation when rendering mode for the Viewport is set to RENDER_DEPTH.

Arguments

  • int offset - true to enable skipping render mode check and use TAA; otherwise false.

int isUseTAAOffset ( ) #

Returns a value indicating if skipping render mode check is enabled for using TAA. Can be used to ensure proper TAA calculation when rendering mode for the Viewport is set to RENDER_DEPTH.

Return value

true if skipping render mode check is enabled for using TAA; otherwise false.

int useVelocityBuffer ( ) #

Returns a value indicating if rendering to the velocity buffer is enabled.

Return value

1 if rendering to the velocity buffer is enabled; otherwise, 0.

int useVisualizer ( ) #

Returns a value indicating if rendering of the visualizer is enabled.

Return value

1 if rendering of the visualizer is enabled; otherwise, 0.

Texture createCustomTexture3D ( string name, int width, int height, int depth, int format, int flags = 0 ) #

Creates a custom 3D texture. Such textures can be used in your materials.

In your base material:

Source code (XML)
<!-- ... -->
<texture type="texture_name"/>
<!-- ... -->

Create a corresponding custom texture via code:

Source code (C++)
// ...
 // creating a custom texture
 Renderer::createCustomTexture3D("texture_name", 512, 512, 512, Texture::FORMAT_RGBA8);

Arguments

  • string name - Texture name.
  • int width - Texture width, in pixels.
  • int height - Texture height, in pixels.
  • int depth - Texture depth, in pixels.
  • int format - Texture format, one of the TEXTURE_FORMAT_ values.
  • int flags - Texture flags. A combination of flags (such as TEXTURE_USAGE_, TEXTURE_WRAP_, etc.)

Return value

New created custom 3D texture.

Texture createCustomTexture2D ( string name, int width, int height, int format, int flags = 0 ) #

Creates a custom 2D texture array. Such texture can be used in your materials.

In your base material:

Source code (XML)
<!-- ... -->
<texture type="texture_name"/>
<!-- ... -->

Create a corresponding custom texture via code:

Source code (C++)
// ...
 // creating a custom texture
 Renderer::createCustomTexture2D("texture_name", 512, 512, Texture::FORMAT_RGBA8);

Arguments

  • string name - Texture name.
  • int width - Texture width, in pixels.
  • int height - Texture height, in pixels.
  • int format - Texture format, one of the TEXTURE_FORMAT_ values.
  • int flags - Texture flags. A combination of flags (such as TEXTURE_USAGE_, TEXTURE_WRAP_, etc.)

Return value

New created custom 2D texture.

Texture createCustomTexture2DArray ( string name, int width, int height, int depth, int format, int flags = 0 ) #

Creates a custom 2D texture array. Such texture can be used in your materials.

Source code (XML)
<!-- ... -->
<texture type="texture_name"/>
<!-- ... -->

Create a corresponding custom texture via code:

Source code (C++)
// ...
 // creating a custom texture
 Renderer::createCustomTexture2DArray("texture_name", 512, 512, 16, Texture::FORMAT_RGBA8);

Arguments

  • string name - Texture name.
  • int width - Texture width, in pixels.
  • int height - Texture height, in pixels.
  • int depth - Number of elements in the array.
  • int format - Texture format, one of the TEXTURE_FORMAT_ values.
  • int flags - Texture flags. A combination of flags (such as TEXTURE_USAGE_, TEXTURE_WRAP_, etc.)

Return value

New created custom 2D texture array.

Texture getCustomTexture ( string name ) #

Returns a custom texture by its name. Custom textures can be created using createCustomTexture3D(), createCustomTexture3D(), and createCustomTexture3D() methods.

Arguments

  • string name - Custom texture name.

Return value

Custom texture corresponding to the specified name, if it exists, otherwise NULL.

CBufferCamera getShaderCBufferCamera ( ) #

Returns a buffer containing camera parameters to be passed to a custom shader. This method can be used in a callback to obtain camera parameters at a certain stage of the rendering sequence and pass them to a custom shader.

Return value

Buffer containing camera parameters to be passed to a custom shader.

CBufferScattering getShaderCBufferScattering ( ) #

Returns a buffer containing scattering parameters to be passed to a custom shader. This method can be used in a callback to obtain scattering parameters at a certain stage of the rendering sequence and pass them to a custom shader.

Return value

Buffer containing scattering parameters to be passed to a custom shader.

Light getCurrentLight ( ) #

Returns the currently rendered light source. This method can be used to obtain shadow maps for a certain light source in a callback (see BEGIN_SHADOWS callbacks).

Return value

Currently rendered light source.

void setOverlapEnvironmentTexture ( Texture texture ) #

Sets a new environment cubemap texture.

Arguments

  • Texture texture - Environment cubemap texture to be used.

Texture getOverlapEnvironmentTexture ( ) #

Returns the currently used environment cubemap texture.

Return value

Currently used environment cubemap texture.

void resetOverlapEnvironmentTexture ( ) #

Resets the environment cubemap texture to default (no environment texture is used).

Texture getTextureNormalUnpack ( ) #

Texture getTextureLinearDepth ( ) #

void renderMeshStatic ( MeshStatic mesh, Material material, string pass_name, Mat4 transform, Camera camera ) #

Renders the specified static mesh with the specified material applied to it during the specified render pass as viewed from by specified camera.

Arguments

  • MeshStatic mesh - Static mesh to be rendered.
  • Material material - Material to be used to render the mesh.
  • string pass_name - Name of the rendering pass during which the mesh is to be rendered.
  • Mat4 transform - Transformation to be passed to shader for rendering.
  • Camera camera - Camera to be used for mesh rendering.
Last update: 2022-03-10
Build: ()