Render Class
Unigine render. This interface provides access to Unigine rendering functions. For example, it is used by AppWall application to render onto multiple monitors.
To use this class, include the UnigineRender.h file.
Render Class
Members
void setBokehEnabled (int enable)
Sets a value indicating if a bokeh effect should be rendered for bright lights across the DOF-blurred range. Both HDR and DOF should be enabled to render this effect.Arguments
- int enable - Positive value to enable bokeh effect, 0 to disable.
float getDOFNearFocalRange ()
Returns the current area from the camera to the focal point for objects in crisp focus (not blurred).Return value
Near focal range in units.const char * getEnvironmentScatteringLightColorLUTName (int num)
Returns the path to the light color texture (the texture defining the color of the LightWorld for different times of the day).Arguments
- int num - Preset number.
Return value
Path to the texture.void setFilmicToeScale (float scale)
Sets the Toe Strength filmic tonemapping parameter value.Arguments
- float scale - Toe Strength value.
float getDOFNearBlurPower ()
Returns the current depth of field power that controls the rate with which objects become blurred across the near blur range.Return value
Blurring power.void setSSAORadius (float radius)
Sets a radius of ambient occlusion.Arguments
- float radius - Radius of ambient occlusion shadowing.
int getTexturesQuality ()
Returns the quality of textures.Return value
One of the RENDER_QUALITY_* pre-defined variables.void setFilmicToeNumerator (float numerator)
Sets the Toe Numerator filmic tonemapping parameter value.Arguments
- float numerator - Toe Numerator value.
float getColorSaturation ()
Returns the current overall saturation of the scene.Return value
Current saturation.Ptr<Texture> getBlackCubeTexture ()
Return black Cube texture.Return value
Black Cube texture.float getDOFFarBlurRadius ()
Returns the the blur factor used for out-of-focus objects across the far blur range.Return value
Far blur factor.void setCrossEnabled (int mode)
Enables or disables cross flares.Arguments
- int mode - Positive integer to enable cross flares, 0 to disable.
int saveState (const Ptr<Stream> & stream)
Saves a render state into the stream.Arguments
- const Ptr<Stream> & stream - Stream smart pointer.
Return value
Returns 1 if the operation was a success; otherwise, 0 is returned.float getSharpenIntensity ()
Returns intensity of the sharpening effect.Return value
Intensity of the sharpening effect.void renderImage2D (const Ptr<Camera> & camera, const Ptr<Image> & image, int skip_flags)
Renders the scene into a 2D image in accordance with the set parameters. The viewport position is taken from the camera created via Camera class.Arguments
- const Ptr<Camera> & camera - The Camera to be used.
- const Ptr<Image> & image - The Image to save the result to.
- int skip_flags - Skip the effects:
- VIEWPORT_SKIP_SHADOWS
- VIEWPORT_SKIP_VISUALIZER
- VIEWPORT_SKIP_SRGB
- VIEWPORT_SKIP_POSTEFFECTS
- VIEWPORT_SKIP_VELOCITY
- VIEWPORT_SKIP_DYNAMIC_REFLECTIONS
0 enables all the effects.
void setStereoRadius (float radius)
Set stereo radius.Arguments
- float radius - Stereo radius.
void setLensScale (float scale)
Sets the multiplier for color of HDR lens flares.Arguments
- float scale - Lens color scale. If a negative value is provided, 0 will be used instead.
void setEnvironmentScatteringBaseLUTName (int num, const char * arg2)
Sets the path to the base LUT texture (the texture defining the base color of the sky) for the given preset.Arguments
- int num - Preset number.
- const char * arg2 - Path to the texture.
float getBokehThreshold ()
Returns the brightness threshold for the bokeh effect. Increasing this value allows for rendering bokeh only for bright enough light points.Return value
Bokeh threshold.void setCameraEffectsThreshold (float threshold)
Updates 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.
void setColorContrast (float contrast)
Updates the current contrast of the scene.Arguments
- float contrast - Contrast. The provided value is saturated in the range [-1; 1].
void setBokehNearSize (float size)
Sets the size of the bokeh effect across the near blur range of DOF.Arguments
- float size - Near bokeh effect size. The provided value is clamped to the range [0;1].
int getParallax ()
Returns a value indicating if parallax occlusion mapping is enabled.Return value
1 if parallax occlusion mapping is enabled; otherwise, 0.Math::vec4 getCrossColor ()
Returns the color of a cross flare.Return value
Color of a cross flare.void setFilmicShoulderScale (float scale)
Sets the Shoulder Strength filmic tonemapping parameter value.Arguments
- float scale - Shoulder Strength value.
float getLensRadius ()
Returns the current radius of the spherical lens flares on the screen.Return value
Radius of the spherical lens flares.int getGPUName ()
Returns the name of the current GPU.Return value
GPU name flag.float getAnimationStem ()
Returns the current global scale for movement amplitude of vegetation stems.Return value
Global stem amplitude scale.void setDistanceScale (float scale)
Updates the global distance scale for all distance parameters: shadow distance, light distance, LOD distances, etc.Arguments
- float scale - Global distance scale.
const char * getDirtTextureName ()
Returns the name of the current texture that modulates the pattern of lens flares. For example, it can be used to create an effect of light reflections or unclean optics when the camera looks at the sun.Return value
Name of the lens flares modulation texture.int getAPI ()
Returns the current Graphics API, or API_UNKNOWN if API cannot be identified.Return value
The Graphics API flag (see API_* variables).const char * getShaderDefines ()
Return additional shader defines.Return value
Additional shader defines.void setCrossScale (float scale)
Sets the multiplier for color of HDR cross flares.Arguments
- float scale - Cross color scale. If a negative value is provided, 0 will be used instead.
int getDOF ()
Returns a value indicating if depth of field is enabled.Return value
1 if depth of field is enabled; otherwise, 0.void setExposureAdaptation (float adaptation)
Updates the current period of exposure adaptation.Arguments
- float adaptation - Period of adaptation in seconds. If a too small or even negative value is provided, 1E-6 will be used instead.
void setDOFNearFocalRange (float range)
Sets an area from the camera to the focal point for objects in crisp focus (not blurred).Arguments
- float range - Near focal range in units. If a negative value is provided, 0 will be used instead.
float getTessellationFactor ()
Returns the multiplier for the corresponding material parameter that controls subdivision of triangles into smaller ones.Return value
Tessellation factor multiplier.int isSunShaftsEnabled ()
Returns a value indicating if flare shafts are enabled.Return value
Positive integer if flare shafts are enabled; otherwise, 0.int getNumReflections ()
Returns the number of reflections drawn per frame that can be currently seen in the viewport. In case of cubemap reflections, if all six faces are updated, six reflections are rendered per each frame.Return value
The number of reflections.void setSunShaftsScale (float scale)
Sets the multiplier for color of HDR shaft flares.Arguments
- float scale - Shaft color scale. If a negative value is provided, 0 will be used instead.
int getAlphaFade ()
Returns a value indicating if alpha fading between object LODs is enabled.Return value
1 if alpha fading is enabled; otherwise, 0.void setPostMaterials (const char * materials)
Sets post postprocess materials that are applied after all other postprocess (such as HDR, DOF, etc.) are rendered. Materials are applied in the order of listing. They are used together with Player::setPostMaterials(), if any.Arguments
- const char * materials - List of comma-separated post postprocess material names.
const char * getBokehTextureName ()
Returns a custom texture used for the bokeh effect.Return value
Texture name.int getMotionBlur ()
Returns a value indicating if motion blur is enabled.Return value
1 if motion blur is enabled; otherwise, 0.Math::vec4 getEnvironmentTextureColor (int num)
Returns the environment color multiplier set for the given preset.Arguments
- int num - Preset number.
Return value
The environment color multiplier.void setCrossAngle (float angle)
Updates the angle between flare shafts of a cross flare.Arguments
- float angle - Angle in degrees.
Math::vec4 getEnvironmentScatteringGroundColor (int num)
Returns the current color set for the imitated landscape (ground).Arguments
- int num - Preset number.
Return value
Ground color.void setExposure (float exposure)
Updates the current exposure.Arguments
- float exposure - Exposure in seconds. The provided value is saturated in the range [0; 4].
void setDOFFarBlurPower (float power)
Updates the depth of field power that controls the rate with which objects become blurred across the far blur range.Arguments
- float power - Blurring power. If a too small or a negative value is provided, 1E-6 will be used instead.
void setDOFFarFocalPower (float power)
Updates the focal power that controls the smoothness of transition between in-focus and blurred areas (both the rate and intensity with which objects become blurred) across the far blur range.Arguments
- float power - Focal power. If a too small or a negative value is provided, 1E-6 will be used instead.
int isFlipped ()
Checks if the render orientation.Return value
1 if the render is flipped; otherwise, 0.void setLensEnabled (int mode)
Enables or disables lens flares.Arguments
- int mode - Positive integer to enable lens flares, 0 to disable.
float getBudget ()
Returns the value of the render budget, which limits the number of loaded/created graphics resources during a frame according to the loading/creation time.Return value
The budget value in seconds. The default value is 1/60.float getSSAORadius ()
Returns the radius of ambient occlusion.Return value
Radius of ambient occlusion shadowing.float getClutterDistance ()
Returns a distance, at which (and farther) objects with "clutter" flag on will not be rendered.Return value
Distance in units.int getGPUMemory ()
Returns an amount of memory provided by the current GPU.Return value
Amount of memory in Mbytes.void setTessellationScale (float scale)
Sets the multiplier for the corresponding material parameter. Tessellation scale determines displacement factor for tessellated surfaces (to what extent geometry is extruded).Arguments
- float scale - Tessellation scale multiplier. If a negative value is provided, 0 will be used instead.
float getEnvironmentHazeDensity (int num)
Returns the current haze density set for the given preset.Arguments
- int num - Preset number.
Return value
Haze density.void setDOFNearFocalPower (float power)
Updates the focal power that controls the smoothness of transition between in-focus and blurred areas (both the rate and intensity with which objects become blurred) across the near blur range.Arguments
- float power - Focal power. If a too small or a negative value is provided, 1E-6 will be used instead.
void setShadowShaftsLength (float length)
Sets the length of volumetric shadows.Arguments
- float length - Shadow length. The provided value will be saturated in the range [0; 1]. 0 means that there are no shadows. 0 means that the shadows are long enough to occupy the whole screen.
void setCrossShafts (int shafts)
Updates the number of cross flares.Arguments
- int shafts - The number of a cross flares. The provided value is saturated in the range [2; 32].
void setShadowShaftsAttenuation (float attenuation)
Sets the power of fading for volumetric shadows across their length.Arguments
- float attenuation - Fading power. The provided value is clamped to range [0;1].
Math::vec4 getBokehColor ()
Returns the current color for the bokeh effect.Return value
Bokeh color.float getSSAOIntensity ()
Return value
void setCrossLength (float length)
Updates the length of a cross flare.Arguments
- float length - Length of a cross flare relative to the screen width. The provided value is saturated in the range [0; 1].
float getDOFNearFocalScale ()
Returns a scale that shifts the near blur range further from the camera. (This is an interpolation coefficient between a non-blurred screen image and a blurred one.) The higher the value, the wider is the near blur range and the further from the camera the blurring ends.Return value
Near scale.void setAnimationTime (float time)
Updates the render animation time for vegetation.Arguments
- float time - Animation time in milliseconds.
int isCrossEnabled ()
Returns a value indicating if cross flares are enabled.Return value
Positive integer if cross flares are enabled; otherwise, 0.void setExposureMinLuminance (float luminance)
Sets the minimum luminance used for rendering of adaptive exposure effect.Arguments
- float luminance - Minimum luminance. The provided value is saturated in the range [-10; 10].
void setMotionBlurDepthFalloff (float falloff)
Sets motion blur falloff dependeing on depth.Arguments
- float falloff - Depth falloff.
void setDOFFocalDistance (float distance)
Updates the focal distance of the camera (in units), i.e. a point where objects are in-focus and clear. Used as a reference point to set the near and far blur range.Arguments
- float distance - Focal distance in units. If a negative value is provided, 0 will be used instead.
Ptr<Texture> getGray2DTexture ()
Return gray 2D texture.Return value
Gray 2D texture.const char * getCompositeMaterial ()
Returns a name of the current composite material that specifies a custom shader used for the final composition of the full-screen image instead of the default one.Return value
Name of the current composite material.void setSunShaftsColor (const Math::vec4 & color)
Updates the color of the lens shafts.Arguments
- const Math::vec4 & color - Color of lens shafts.
float getFieldDistance ()
Returns the distance, at which (and farther) Field nodes will not be rendered.Return value
Distance in units.void setColorWhite (const Math::vec4 & white)
Updates 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].
const char * getRenderMaterials ()
Returns names of the current postprocess materials that are applied before all other postprocess (such as HDR, DOF, etc.) are rendered. Materials are applied in the order of listing.Return value
Names of the current render materials.void setBloomEnabled (int enable)
Sets a value indicating if the bloom effect should be rendered.Arguments
- int enable - 1 value to enable the bloom effect, 0 to disable.
void setFilmicLinearScale (float scale)
Sets the Linear Strength filmic tonemapping parameter value.Arguments
- float scale - Linear Strength value.
void setLensThreshold (float threshold)
Updates the brightness threshold for lens flares.Arguments
- float threshold - Lens flares threshold.
float getShadowShaftsExposure ()
Returns the contrast used for volumetric shadows.Return value
Shadow contrast.void setMotionBlurVelocityScale (float scale)
Updates amount of motion blur for moving physical bodies.Arguments
- float scale - Scale of bodies' linear and angular velocities used for the motion blur. If a negative value is provided, 0 will be used instead.
const char * getColorTextureName ()
Returns the name of the current color transformation texture (LUT).Return value
Name of the current color transformation texture.void renderNodeImage2D (const Ptr<Camera> & camera, const Ptr<Node> & node, const Ptr<Image> & image, int skip_flags, int light_usage, const char * environment_texture_name)
Renders the given node into a 2D image in accordance with the set parameters. The viewport position is taken from the camera created via Camera class. The node can be rendered using the specific type of lighting and environment cubemap.Arguments
- const Ptr<Camera> & camera - The Camera to be used.
- const Ptr<Node> & node - The Node to be rendered.
- const Ptr<Image> & image - The Image to save the result to.
- int skip_flags - Skip the effects:
- VIEWPORT_SKIP_SHADOWS
- VIEWPORT_SKIP_VISUALIZER
- VIEWPORT_SKIP_SRGB
- VIEWPORT_SKIP_POSTEFFECTS
- VIEWPORT_SKIP_VELOCITY
- VIEWPORT_SKIP_DYNAMIC_REFLECTIONS
0 enables all the effects.
- int light_usage - Sets the light sources that will affect the node (one of the USAGE_*_LIGHTING Viewport class variables.)
- const char * environment_texture_name - Path to the environment cubemap to be used. Takes effect if the first (auxiliary light) or second (node light) lighting mode is used. In case LightWorld is used (zero mode), the environment cubemap used for the current world will be used.
float getStereoRadius ()
Get stereo radius.Return value
Stereo radius.int getNumDecals ()
Returns the number of rendered per frame decals that can be currently seen in the viewport (during all of the rendering passes).Return value
The number of decals.const char * getEnvironmentTextureName (int num)
Returns the path to the cubemap defining the environment color set for the given preset.Arguments
- int num - Preset number.
Return value
Path to the cubemap defining the environment color.void setFXAASampleOffset (float offset)
Sets the FXAA fragment sample offset.Arguments
- float offset - FXAA fragment sample offset.
setFXAAIntensity (float intensity)
Arguments
- float intensity
getFXAAIntensity ()
float getBokehFarSize ()
Returns the size of the bokeh effect across the far blur range of DOF.Return value
Far bokeh effect size.void setEnabled (int arg1)
Enable or disable the render.Arguments
- int arg1 - 1 to enable the render, 0 to disable it.
int isEnabled ()
Return a value indicating if the render is enabled.Return value
Return 1 if the render is enabled; otherwise, 0 is returned.float getShadowDistance ()
Returns the distance, at which (and farther) shadows will not be rendered.Return value
Distance in units.void setReflectionColor (const Math::vec4 & color)
Color that allows to adjust reflections of all meshes with reflective materials, i.e.:- mesh_reflection_2d_base
- mesh_reflection_cube_base
- mesh_paint_reflection_cube_base
- mesh_tessellation_reflection_2d_base
- mesh_tessellation_reflection_cube_base
- mesh_tessellation_paint_reflection_cube_base
Arguments
- const Math::vec4 & color - Reflection color for reflective mesh materials.
Math::vec4 getColorWhite ()
Returns the current white balance of the scene.Return value
Current white balance.void renderImageCube (const Ptr<Camera> & camera, const Ptr<Image> & image, int skip_flags)
Renders the scene into a cube map image.Arguments
- const Ptr<Camera> & camera - Projection matrix.
- const Ptr<Image> & image - Position from where to grab the cube map.
- int skip_flags - Texture image.
void setDOFFarBlurRadius (float radius)
Updates the the blur factor used for out-of-focus objects across the far blur range.Arguments
- float radius - Far blur factor. (It is calculated as a number of pixels relative to the resolution of 720p.) If a negative value is provided, 0 will be used instead.
int loadSettings (const char * file)
Loads the render settings from a given file.Arguments
- const char * file - Path to an xml file with desired settings.
Return value
Returns 1 if the settings are loaded successfully; otherwise, 0.void setBokehFarPower (float power)
Sets the power controlling how close the bokeh effect comes into action (across the far blur range of DOF). Decreasing this value enables to start rendering the bokeh effect closer to the camera. It means that the bokeh appears at once rather than gradually getting bigger.Arguments
- float power - Far bokeh power. If a too small or a negative value is provided, 1E-6 will be used instead.
void setBudget (float budget)
Sets the value of the render budget, which limits the number of loaded/created graphics resources during a frame according to the loading/creation time.Arguments
- float budget - The budget value in seconds.
void setFadeColor (const Math::vec4 & color)
Sets the current fade color for the scene on the screen. By gradually changing this value it is possible to create "fade in" and "fade out" effects depending on the w component of the given vector. For example, when the following vectors are passed the result will be:- vec4(1,1,1,1) - a fully white screen. Positive w results in additive blending.
- vec4(0.5,0.5,0.5,1) - light colors on the screen.
- vec4(1,0,0,1) - R channel for all screen colors is to its maximum; G and B without changes.
- vec4(0,0,0,0) - there is no fading (no color alterations are done to the screen).
- vec4(1,1,1,-1) - a fully black screen. Negative w results in scene colors * (1 - RGB), where RGB is the first three components of the passed vector.
- vec4(0.5,0.5,0.5,-1) - dark colors on the screen.
Arguments
- const Math::vec4 & color - Fade color for the scene on the screen. The provided vector represents RGB channel values (first three components) and a fading coefficient (w component). All components are saturated in the range [-1; 1].
float getColorGamma ()
Returns the current overall gamma of the scene.Return value
Current gamma.void setDOFNearBlurRange (float range)
Updates the range from the focal point towards the camera, within which objects are focused on (become clear). At the beginning of this distance, objects are blurred according to the blur radius.Arguments
- float range - Distance (in units) for focusing on objects. If a too small or a negative value is provided, 1E-6 will be used instead.
int getShadersQuality ()
Returns the quality of shaders.Return value
One of the RENDER_QUALITY_* pre-defined variables.void setShadowDistance (float distance)
Updates the distance, at which (and farther) shadows will not be rendered.Arguments
- float distance - Distance in units.
void setBokehTextureName (const char * name)
Sets a custom texture for the bokeh effect.Arguments
- const char * name - Texture name.
void setTessellationFactor (float factor)
Sets the multiplier for the corresponding material parameter. Tessellation factor that controls subdivision of triangles into smaller ones.Arguments
- float factor - Tessellation factor multiplier. If a negative value is provided, 0 will be used instead.
void setBokehThreshold (float threshold)
Sets the brightness threshold for the bokeh effect. Increasing this value allows for rendering bokeh only for bright enough light points.Arguments
- float threshold - Bokeh threshold. If a negative value is provided, 0 is used instead.
float getSunShaftsScale ()
Returns the current multiplier for color of HDR shaft flares.Return value
Shaft color scale.float getCameraEffectsThreshold ()
Returns the brightness threshold, which is used to detect if an object should be blurred in the HDR mode.Return value
HDR threshold.Math::vec4 getLensColor ()
Returns the color of a lens flare.Return value
Color of a lens flare.const char * getPostMaterials ()
Returns names of the current post postprocess materials that are applied after all other postprocess (such as HDR, DOF, etc.) are rendered. Materials are applied in the order of listing.Return value
Names of the current post postprocess materials.Math::vec3 getRefractionDispersion ()
Returns the refraction displacement for red, greed and blue channels (according to the refraction texture of refractive materials). It can be used to create light dispersion (chromatic aberrations).Return value
Dispersion displacement.float getDOFNearFocalPower ()
Returns the current focal power that controls the smoothness of transition between in-focus and blurred areas (both the rate and intensity with which objects become blurred) across the near blur range.Return value
Focal power.float getMotionBlurMaxVelocity ()
Returns the current maximum amount of motion blur for moving physical bodies.Return value
Maximum scaled velocity of bodies used for the motion blur.void renderProcedurals (const Vector< Ptr<Material> > & materials)
Render procedural materials.Arguments
- const Vector< Ptr<Material> > & materials - Procedural materials list.
int isFirstFrame ()
Return the first frame flag.Return value
Return the first frame flag.int getNumPrimitives ()
Returns the number of geometric rendered per frame primitives that can be currently seen in the viewport. See Rendering Profiler article for details.Return value
The number of primitives.void setExposureMode (int mode)
Arguments
- int mode
float getDOFFarBlurRange ()
Returns the current range from the focal point and away from the camera, within which objects are unfocused from. To the end of this distance, objects are blurred according to the blur radius.Return value
Distance in units for defocusing from objects.int getNumShaders ()
Returns the number of shaders set per frame. See Rendering Profiler article for details.Return value
The number of shaders.float getTessellationDistance ()
Returns the multiplier for the corresponding material parameter, that controls the distance after which surfaces are not tessellated.Return value
Tessellation distance multiplier.float getDOFNearBlurRange ()
Returns the current range from the focal point towards the camera, within which objects are focused on (become clear). At the beginning of this distance, objects are blurred according to the blur radius.Return value
Distance in units for focusing on objects.int getShadowShafts ()
Returns a value indicating if volumetric shadows are enabled.Return value
1 if volumetric shadows are enabled; otherwise, 0.void setBokehFarSize (float size)
Sets the size of the bokeh effect across the far blur range of DOF.Arguments
- float size - Far bokeh effect size. The provided value is clamped to the range [0;1].
float getExposure ()
Returns the current exposure.Return value
Current exposure in seconds.int getNumDips ()
Returns the number of draw calls used in the current scene. See Rendering Profiler article for details.Return value
The number of draw calls.void setEnvironmentScatteringGroundLUTName (int num, const char * arg2)
Sets the path to the ground LUT texture (the texture imitating lighting and reflections from the landscape) for the given preset.Arguments
- int num - Preset number.
- const char * arg2 - Path to the texture.
void setExposureBright (float bright)
Sets a coefficient for decreasing the brightness of all flares (lens, shaft ans cross ones). This function can be used in addition to overall HDR exposure.Arguments
- float bright - Coefficient for normalizing flares brightness.
float getLensLength ()
Returns the current length indicating if the whole radial lens flare is rendered on the screen or only a part of it. This option controls how lens flares pattern is distributed.Return value
Length of the lens flare.void setRenderMaterials (const char * materials)
Sets render postprocess materials that are applied before all other postprocess (such as HDR, DOF, etc.) are rendered. Materials are applied in the order of listing.Arguments
- const char * materials - List of comma-separated postprocess material names.
const char * getEnvironmentScatteringGroundLUTName (int num)
Returns the path to the ground LUT texture (the texture imitating lighting and reflections from the landscape) set for the given preset.Arguments
- int num - Preset number.
Return value
Path to the texture.float getReflectionDistance ()
Returns the distance, at which (and farther) reflections will not be rendered.Return value
Distance in units.int getNumProcedurals ()
Returns the number of procedurals that can be currently seen in the viewport.Return value
The number of procedurals.void setDecalDistance (float distance)
Updates the distance, at which (and farther) decals will not be rendered.Arguments
- float distance - Distance in units.
float getDOFFarFocalPower ()
Returns the current focal power that controls the smoothness of transition between in-focus and blurred areas (both the rate and intensity with which objects become blurred) across the far blur range.Return value
Focal power.void setShaderDefines (const char * defines)
Set additional shader defines.Arguments
- const char * defines - Additional shader defines.
void setAnimationLeaf (float leaf)
Updates 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.
void setAnimationWind (const Math::vec3 & wind)
Sets the direction of wind for all vegetation (grass and trees). It is a multiplier for the stem offset (in grass, stem and leaves materials).Arguments
- const Math::vec3 & wind - Offset for vegetation under wind by X, Y and Z axes.
int getReflection ()
Returns a value indicating if reflections are enabled.Return value
1 if reflections are enabled; otherwise, 0.void setFilmicToeDenominator (float denominator)
Sets the Toe Denominator filmic tonemapping parameter value.Arguments
- float denominator - Toe Denominator value.
void setBokehNearPower (float power)
Sets the power controlling how close to the focal point the bokeh effect comes into action (across the near blur range of DOF). Decreasing this value allows to render the bokeh effect closer to the focal point. It also means that the bokeh appears in its full size right near the focal point rather than gradually getting smaller up to the in-focus area.Arguments
- float power - Near bokeh power. If a too small or a negative value is provided, 1E-6 will be used instead.
void setReflectionDistance (float distance)
Updates the distance, at which (and farther) reflections will not be rendered.Arguments
- float distance - Distance in units.
float getAnimationScale ()
Returns the current global scale for rotation speed of vegetation leaves.Return value
Global leaf rotation speed.float getTessellationScale ()
Returns the multiplier for the corresponding material parameter that determines displacement factor for the tessellated surfaces (to what extent geometry is extruded).Return value
Tessellation scale multiplier.float getFilmicShoulderScale ()
Returns the current Shoulder Strength filmic tonemapping parameter value.Return value
Shoulder Strength value.void setEnvironmentHazeColor (int num, const Math::vec4 & arg2)
Sets the color of the haze for the given preset. This function will take effect only if the RENDER_HAZE_SOLID mode is used.Arguments
- int num - Preset number.
- const Math::vec4 & arg2 - Haze color.
int getNumShadows ()
Returns the number of shadow passes rendered per frame. See Rendering Profiler article for details.Return value
The number of shadow passes.void setDOFNearBlurPower (float power)
Updates the depth of field power that controls the rate with which objects become blurred across the near blur range.Arguments
- float power - Blurring power. If a too small or a negative value is provided, 1E-6 will be used instead.
float getBokehNearPower ()
Returns the current power controlling how close to the focal point the bokeh effect comes into action (across the near blur range of DOF). Decreasing this value allows to render the bokeh effect closer to the focal point. It also means that the bokeh appears in its full size right near the focal point rather than gradually getting smaller up to the in-focus area.Return value
Near bokeh power.void setFirstFrame (int frame)
The first frame flag.Arguments
- int frame - The first frame flag.
void setFieldDistance (float distance)
Sets the distance, at which (and farther) Field nodes will not be rendered.Arguments
- float distance - Distance in units.
const char * getEnvironmentScatteringBaseLUTName (int num)
Returns the path to the base LUT texture (the texture defining the base color of the sky) set for the given preset.Arguments
- int num - Preset number.
Return value
Path to the texture.void setSharpenIntensity (float intensity)
Sets intensity of the sharpening effect.Arguments
- float intensity - Intensity of the sharpening effect.
void setExposureMaxLuminance (float luminance)
Sets the maximum luminance used for rendering of adaptive exposure effect.Arguments
- float luminance - Maximum luminance. The provided value is saturated in the range [-10; 10].
void renderNodeImage2D (const Ptr<Camera> & camera, const Ptr<Node> & node, const Ptr<Image> & image, int skip_flags, int light_usage, const char * environment_texture_name)
Renders the 2D image of the given node in accordance with the set parameters. The viewport position is taken from the camera created via Camera class. The node can be rendered using the specific type of lighting and environment cubemap.Arguments
- const Ptr<Camera> & camera - The Camera to be used.
- const Ptr<Node> & node - The Node to be rendered.
- const Ptr<Image> & image - The Image to save the result to.
- int skip_flags - Skip the effects:
- VIEWPORT_SKIP_SHADOWS
- VIEWPORT_SKIP_VISUALIZER
- VIEWPORT_SKIP_SRGB
- VIEWPORT_SKIP_POSTEFFECTS
- VIEWPORT_SKIP_VELOCITY
- VIEWPORT_SKIP_DYNAMIC_REFLECTIONS
0 enables all the effects.
- int light_usage - Sets the light sources that will affect the node (one of the USAGE_*_LIGHTING Viewport class variables.)
- const char * environment_texture_name - Path to the environment cubemap to be used. Takes effect if the first (auxiliary light) or second (node light) lighting mode is used. In case LightWorld is used (zero mode), the environment cubemap used for the current world will be used.
int loadWorld (const Ptr<Xml> & xml)
Loads a render state from the Xml.Arguments
- const Ptr<Xml> & xml - Xml smart pointer.
Return value
Returns 1 if the operation was a success; otherwise, 0 is returned.Math::vec4 getSunShaftsColor ()
Returns the current color of the lens shafts.Return value
Color of lens shafts.float getDOFFarFocalScale ()
Returns a scale that shifts the far blur range closer to the camera. (This is an interpolation coefficient between a non-blurred screen image and a blurred one.) The higher the value, the smaller is the far blur range and the closer to the camera the blurring starts.Return value
Far scale.int isLensEnabled ()
Returns a value indicating if lens flares are enabled.Return value
Positive integer if lens flares are enabled; otherwise, 0.float getSSAOIntensityLightedSide ()
Return value
int saveWorld (const Ptr<Xml> & xml)
Saves a render state into the Xml.Arguments
- const Ptr<Xml> & xml - Xml node.
Return value
Returns 1 if the operation was a success; otherwise, 0 is returned.void setSunShaftsAttenuation (float attenuation)
Sets the power of fading for HDR shaft flare across its length.Arguments
- float attenuation - Fading power. The provided value is clamped to range [0;1].
void setEnvironmentTextureColor (int num, const Math::vec4 & arg2)
Sets the environment color multiplier for the given preset.Arguments
- int num - Preset number.
- const Math::vec4 & arg2 - The environment color multiplier.
void setDOFNearFocalScale (float scale)
Shifts the near blur range further from the camera. (This is an interpolation coefficient between a non-blurred screen image and a blurred one.)Arguments
- float scale - Near scale. The higher the value, the wider is the near blur range and the further from the camera the blurring ends. The value can be >=1.
Math::vec4 getSSSColor ()
Returns the current subsurface scattering color.Return value
A subsurface scattering color.float getFilmicLinearScale ()
Returns the current Linear Strength filmic tone mapping parameter value.Return value
Linear Strength value.void setDOFNearBlurRadius (float radius)
Updates the the blur factor used for out-of-focus objects across the near blur range.Arguments
- float radius - Near blur factor. (It is calculated as a number of pixels relative to the resolution of 720p.) If a negative value is provided, 0 will be used instead.
float getDOFFocalDistance ()
Returns a distance to objects in focus.Return value
Distance to the camera focus in units.void renderImage2D (const Ptr<Camera> & camera, const Ptr<Image> & image, int width, int height, int hdr, int skip_flags)
Renders the scene into a 2D image of the given size in accordance with the set parameters. The viewport position is taken from the camera created via Camera class.Arguments
- const Ptr<Camera> & camera - The Camera to be used.
- const Ptr<Image> & image - The Image to save the result to.
- int width - Width of the projected image, in units.
- int height - Height of the projected image, in units.
- int hdr - 1 - enable HDR, 0 - disable HDR.
- int skip_flags - Skip the effects:
- VIEWPORT_SKIP_SHADOWS
- VIEWPORT_SKIP_VISUALIZER
- VIEWPORT_SKIP_SRGB
- VIEWPORT_SKIP_POSTEFFECTS
- VIEWPORT_SKIP_VELOCITY
- VIEWPORT_SKIP_DYNAMIC_REFLECTIONS
0 enables all the effects.
void setWireframeColor (const Math::vec4 & color)
Sets the color fot the wireframe.Arguments
- const Math::vec4 & color - Wireframe color to be set.
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 - Name of the composite material.
float getExposureBright ()
Returns the current coefficient for decreasing the brightness of all HDR flares (lens, shaft ans cross ones). This function can be used in addition to overall HDR exposure.Return value
Coefficient for normalizing flares brightness.Math::vec4 getFadeColor ()
Returns the current fade color of the scene.Return value
The current fade color.float getSunShaftsThreshold ()
Returns the current brightness threshold for flare shafts.Return value
Flare shafts threshold.void setEnvironmentHazeMaxDistance (int num, float arg2)
Sets the distance at which the haze appears for the given preset.Arguments
- int num - Preset number.
- float arg2 - Haze maximum visibility distance.
int setColorTextureImage (const Ptr<Image> & image)
Sets a new color transformation image (LUT). This function resets a LUT texture name to null if it has been previously set via setColorTextureName().Arguments
- const Ptr<Image> & image - Color transformation image.
Return value
1 if the image is set successfully; otherwise, 0.float getExposureAdaptation ()
Returns the current period of exposure adaptation.Return value
Period of exposure adaptation in seconds.Math::vec4 getWireframeColor ()
Returns the color of the wireframe.Return value
Wireframe color.float getCrossLength ()
Returns the length of a cross flare.Return value
Length of a cross flare relative to the screen width.float getObjectDistance ()
Returns a distance, at which (and farther) objects will not be rendered.Return value
Distance in units.Math::vec4 getEnvironmentHazeColor (int num = -1)
Returns the current haze color set for the given preset.This function will return color only if the RENDER_HAZE_SOLID mode is used.
Arguments
- int num - Preset number.
Return value
Haze color.float getColorBrightness ()
Returns the current overall brightness of the scene.Return value
Current brightness.float getColorContrast ()
Returns the current overall contrast of the scene.Return value
Current contrast.float getDOFFarBlurPower ()
Returns the current depth of field power that controls the rate with which objects become blurred across the far blur range.Return value
Blurring power.float getStereoDistance ()
Get stereo distance.Return value
Stereo distance.void setLensColor (const Math::vec4 & color)
Updates the color of a lens flares.Arguments
- const Math::vec4 & color - Color of lens flares.
void setColorSaturation (float saturation)
Updates the current saturation of the scene.Arguments
- float saturation - Saturation. The provided value is saturated in the range [0; 2].
int getColorTextureImage (const Ptr<Image> & image)
Return the current color transformation image (LUT).Arguments
- const Ptr<Image> & image - Image to store the color transformation texture in.
Return value
1 if an image is successfully received; otherwise, 0.Ptr<Texture> getWhiteCubeTexture ()
Return white Cube texture.Return value
White Cube texture.int restoreState (const Ptr<Stream> & stream)
Restores a render state from the stream.Arguments
- const Ptr<Stream> & stream - Stream smart pointer.
Return value
Returns 1 if the operation was a success; otherwise, 0 is returned.float getDecalDistance ()
Returns the distance, at which (and farther) decals will not be rendered.Return value
Distance in units.float getBokehNearSize ()
Returns the size of the bokeh effect across the near blur range of DOF.Return value
Near bokeh effect size.const char * getEnvironmentScatteringMieLUTName (int num)
Returns the path to the Mie LUT texture (the texture for setting the Mie light) set for the given preset.Arguments
- int num - Preset number.
Return value
Path to the texture.Math::vec4 getReflectionColor ()
Returns the color that allows to adjust reflections of all meshes with reflective materials, i.e.:- mesh_reflection_2d_base
- mesh_reflection_cube_base
- mesh_paint_reflection_cube_base
- mesh_tessellation_reflection_2d_base
- mesh_tessellation_reflection_cube_base
- mesh_tessellation_paint_reflection_cube_base
Return value
Reflection color for reflective mesh materials.void setSunShaftsEnabled (int enable)
Enables or disables lens shafts.Arguments
- int enable - Positive integer to enable lens shafts, 0 to disable.
float getFilmicToeDenominator ()
Returns the current Toe Denominator filmic tonemapping parameter value.Return value
Toe Denominator value.float getFXAASampleOffset ()
Returns the current FXAA fragment sample offset.Return value
FXAA fragment sample offset.float getCrossScale ()
Returns the current multiplier for color of HDR cross flares.Return value
Cross color scale.const char * getData ()
Returns user string data associated with the world. This string is written directly into the data tag of the *.world file.Return value
User string data.Math::vec3 getAnimationWind ()
Returns the current direction of wind for all vegetation (grass and trees). It is a multiplier for the stem offset (in grass, stem and leaves materials).Return value
Offset for vegetation under wind by X, Y and Z axes.void setTessellationDistance (float distance)
Sets the multiplier for the corresponding material parameter. Tessellation distance sets the distance after which the surfaces are not tessellated.Arguments
- float distance - Tessellation distance multiplier. If a negative value is provided, 0 will be used instead.
void setCrossColor (const Math::vec4 & color)
Updates the color of a cross flares.Arguments
- const Math::vec4 & color - Color of cross flares.
int getExposureMode ()
Returns current adaptive exposure mode:- 0 - exposure is not used
- 1 - logarithmic adaptive exposure used
- 2 - quadratic adaptive exposure used
Return value
The type of exposure mode.int isBloomEnabled ()
Returns a value indicating if the bloom effect is enabled.Return value
1 if the bloom effect is enabled; otherwise, 0.float getAnimationTime ()
Returns the render animation time for vegetation.Return value
Animation time in milliseconds.int getTessellation ()
Returns a value indicating if tessellation is enabled.Return value
1 if tessellation is enabled; otherwise, 0.float getStereoOffset ()
Get stereo offset.Return value
Stereo offset.void setObjectDistance (float distance)
Updates the distance, at which (and farther) objects will not be rendered.Arguments
- float distance - Distance in units.
void setRefractionDispersion (const Math::vec3 & dispersion)
Updates the refraction displacement for red, greed and blue channels (according to refraction texture of refractive materials). Can be used to create light dispersion (chromatic aberrations).Arguments
- const Math::vec3 & dispersion - Dispersion displacement per channel. If a negative value is set for a channel, 0 will be used instead.
int getRefraction ()
Returns a value indicating if refraction is enabled.Return value
1 if refraction is enabled; otherwise, 0.float getFilmicToeNumerator ()
Sets the Toe Numerator filmic tonemapping parameter value.Return value
Toe Numerator value.int getGeometryShader ()
Returns a value indicating if geometry shader is used.Return value
1 if geometry shader is used; otherwise, 0.void setAnimationStem (float stem)
Updates 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 getCrossAngle ()
Returns the angle between flare shafts of a cross flare.Return value
Angle between flare shafts in degrees.setEnvironmentAmbientIntensity (int num, float density)
Arguments
- int num
- float density
getEnvironmentAmbientIntensity (int num = -1)
Arguments
- int num
void setEnvironmentTextureName (int num, const char * arg2)
Sets the path to the cubemap defining the environment color for the given preset.Arguments
- int num - Preset number.
- const char * arg2 - Path to the cubemap defining the environment color.
float getMotionBlurVelocityScale ()
Returns the current amount of motion blur for moving physical bodies.Return value
Scale of bodies' linear and angular velocities used for the motion blur.Math::vec3 getLensDispersion ()
Returns the current color displacement for red, greed and blue channels of the lens flares. Can be used to create light dispersion (chromatic aberrations).Return value
Lens dispersion displacement per channel.float getExposureMinLuminance ()
Returns the minimum luminance used for HDR rendering.Return value
Minimum luminance.void setSunShaftsLength (float length)
Updates the length of flare shafts.Arguments
- float length - Length of flare shafts relative to the screen width. The provided value is saturated in the range [0; 1].
int saveSettings (const char * file)
Saves the current render settings to a given file.Arguments
- const char * file - Path to a target file.
Return value
Returns 1 if the settings are saved successfully ; otherwise, 0.float getSunShaftsAttenuation ()
Returns the current power of fading for HDR shaft flare across its length.Return value
Fading power.float getBokehScale ()
Returns the multiplier for color of HDR lens flares.Return value
Bokeh color scale.float getMotionBlurDepthFalloff ()
Returns the motion blur falloff depending on depth.Return value
Depth falloffPtr<Texture> getWhite2DTexture ()
Return white 2D texture.Return value
White 2D texture.void setAnimationScale (float scale)
Updates the global scale for rotation speed of vegetation leaves.Arguments
- float scale - Global leaf rotation speed.
getAntialiasing ()
float getSSSRadius ()
Returns the current subsurface scattering radius.Return value
float getLensScale ()
Returns the current multiplier for color of HDR lens flares.Return value
Lens color scale.float getBokehFarPower ()
Returns the current power controlling how close to the focal point the bokeh effect comes into action (across the far blur range of DOF). The higher the value, the further (and smaller) bokeh effect starts to be rendered.Return value
Far bokeh power.void setFilmicWhiteLevel (float level)
Sets the Linear White Point filmic tonemapping parameter value.Arguments
- float level - Linear White Point value.
void setLensLength (float length)
Sets a length indicating if the whole radial lens flare is rendered on the screen or only a part of it. This option controls how lens flares pattern is distributed.Arguments
- float length - Length of the radial lens flare. The provided value is saturated in the range [0;1].
void setStereoDistance (float distance)
Set stereo distance.Arguments
- float distance - Stereo distance.
int getNumMaterials ()
Returns the number of materials set per frame (during all of the rendering passes) in the current scene.Return value
The number of materials.void setEnvironmentScatteringGroundColor (int num, const Math::vec4 & arg2)
Sets the color set for the imitated landscape (ground) for the given preset.Arguments
- int num - Preset number.
- const Math::vec4 & arg2 - Ground color.
setEnvironmentReflectionIntensity (int num, float density)
Arguments
- int num
- float density
getEnvironmentReflectionIntensity (int num = -1)
Arguments
- int num
setEnvironmentSkyIntensity (int num, float density)
Arguments
- int num
- float density
getEnvironmentSkyIntensity (int num = -1)
Arguments
- int num
void setDOFFarBlurRange (float range)
Updates the range from the focal point and away from the camera, within which objects are unfocused from. To the end of this distance, objects are blurred according to the blur radius.Arguments
- float range - Defocusing from objects distance (in units). If a too small or a negative value is provided, 1E-6 will be used instead.
void setDOFFarFocalRange (float range)
Sets an area from the focal point and further away from the camera for objects in crisp focus (not blurred).Arguments
- float range - Far focal range in units. If a negative value is provided, 0 will be used instead.
void setEnvironmentScatteringLightColorLUTName (int num, const char * arg2)
Sets the path to the light color texture (the texture defining the color of the LightWorld for different times of the day) for the given preset.Arguments
- int num - Preset number.
- const char * arg2 - Path to the texture.
Ptr<Texture> getBlack2DTexture ()
Return black 2D texture.Return value
Black 2D texture.float getShadowShaftsAttenuation ()
Returns the current power of fading for volumetric shadows across their length.Return value
Fading power.void setLensRadius (float radius)
Sets a radius of the spherical lens flares on the screen.Arguments
- float radius - Radius of the spherical lens flares. The provided value is saturated in the range [0;1], where 1 is a screen-wide radius (a lens flare is not visible).
void setFilmicLinearAngle (float angle)
Sets the Linear Angle filmic tonemapping parameter value.Arguments
- float angle - Liner Angle value.
float getDistanceScale ()
Returns the current global distance scale for all distance parameters: shadow distance, world lights shadows, LOD distances, etc.Return value
Global distance scale.float getDOFNearBlurRadius ()
Returns the the blur factor used for out-of-focus objects across the near blur range.Return value
Near blur factor.void setCrossThreshold (float threshold)
Returns the brightness threshold for cross flares.Arguments
- float threshold - Cross flares threshold.
float getExposureMaxLuminance ()
Returns the maximum luminance used for HDR rendering.Return value
Maximum luminance.void setLensDispersion (const Math::vec3 & dispersion)
Sets the color displacement for red, greed 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.
float getShadowShaftsLength ()
Returns the length of volumetric shadows.Return value
Shadow length.void setSSSColor (const Math::vec4 & color)
Sets a subsurface scattering color used to simulate the subsurface component of skin lighting, i.e. the light that bounces inside of the subsurface tissue layers (epidermis and dermis) before exiting. For skin, subsurface color is reddish, due to blood circulating in skin tissues.Arguments
- const Math::vec4 & color - A subsurface scattering color.
float getFilmicWhiteLevel ()
Returns the current Linear White Point filmic tonemapping parameter value.Return value
Linear White Point value.int getEnvironmentHazeMode ()
Returns the current mode set for the haze effect.Return value
One of the RENDER_HAZE_* variables.float getCrossThreshold ()
Returns the current brightness threshold for cross flares.Return value
Cross flares threshold.int getNumTriangles ()
Returns the number of rendered per frame triangles that can be currently seen in the viewport. See Rendering Profiler article for details.Return value
Number of triangles.void setClutterDistance (float distance)
Updates the distance, at which (and farther) objects with "clutter" flag on will not be rendered.Arguments
- float distance - Distance in units.
void setBokehColor (const Math::vec4 & color)
Sets the color for the bokeh effect.Arguments
- const Math::vec4 & color - Bokeh color.
void renderImageCube (const Ptr<Camera> & camera, const Ptr<Image> & image, int size, int hdr, int skip_flags)
Renders the scene into a cube map in accordance with the set parameters. The viewport position is taken from the camera created via Camera class.Arguments
- const Ptr<Camera> & camera - The Camera to be used.
- const Ptr<Image> & image - The Image to save the result to.
- int size - Texture dimensions (cube map edge size).
- int hdr - 1 - enable HDR; 0 - disable HDR.
- int skip_flags - Skip the effects:
- VIEWPORT_SKIP_SHADOWS
- VIEWPORT_SKIP_VISUALIZER
- VIEWPORT_SKIP_SRGB
- VIEWPORT_SKIP_POSTEFFECTS
- VIEWPORT_SKIP_VELOCITY
- VIEWPORT_SKIP_DYNAMIC_REFLECTIONS
0 enables all the effects.
void setData (const char * data)
Sets user data associated with the world. In the *.world file, the data is set in the data tag.Arguments
- const char * data - New user data.
void setSSAOIntensity (float intensity)
Arguments
- float intensity
int getNumLights ()
Returns the number of light passes rendered per frame. It means that the value contains the number of all light sources that are currently seen illuminating something in the viewport and also includes additional passes for rendering lights in the reflecting surfaces (if dynamical reflections are used). See Rendering Profiler article for details.Return value
The number of light passes.void setEnvironmentHazeDensity (int num, float arg2)
Sets the density of the haze for the given preset.Arguments
- int num - Preset number.
- float arg2 - Haze density.
void setDOFFarFocalScale (float scale)
Shifts the far blur range closer to the camera. (This is an interpolation coefficient between a non-blurred screen image and a blurred one.)Arguments
- float scale - Far scale. The higher the value, the less is the far blur range and the closer to the camera the blurring starts. The value can be >=1.
float getDOFFarFocalRange ()
Returns the current area from the focal point and further away from the camera for objects in crisp focus (not blurred).Return value
Far focal range in units.void setEnvironmentScatteringMieLUTName (int num, const char * arg2)
Sets the path to the Mie LUT texture (the texture for setting the Mie light) for the given preset.Arguments
- int num - Preset number.
- const char * arg2 - Path to the texture.
void setSSAOIntensityLightedSide (float side)
Arguments
- float side
void setColorGamma (float gamma)
Updates the current gamma of the scene.Arguments
- float gamma - Gamma. The provided value is saturated in the range [0.5; 1.5].
void setEnvironmentPresetIntensity (int num, float arg2)
Sets the intensity of the given preset.Arguments
- int num - Preset number.
- float arg2 - Intensity of the preset.
void setSSSRadius (float radius)
Sets the subsurface scattering radius: distance in the screen space, within which colors will be sampled. It controls how much wrinkles, pores and cavities will be blurred and highlighted. The higher the value, the farther subsurface scattering reaches. Too high values result in the ghosting effect. By the minimum value of 0, no subsurface scattering is rendered.Arguments
- float radius - Subsurface scattering radius.
void setStereoOffset (float offset)
Set stereo offset.Arguments
- float offset - Stereo offset.
void setSunShaftsThreshold (float threshold)
Updates the brightness threshold for flare shafts.Arguments
- float threshold - Flare shafts threshold.
void setMotionBlurMaxVelocity (float velocity)
Updates the maximum amount of motion blur for moving physical bodies.Arguments
- float velocity - Maximum scaled velocity of bodies used for the motion blur.
float getLightDistance ()
Returns the distance, at which (and farther) dynamic lights will not be rendered.Return value
Distance in units.void setColorTextureName (const char * name)
Sets the name of a new color transformation texture (LUT).Arguments
- const char * name - Name of the file with the texture. If NULL (0) is passed, the texture is cleared.
void setShadowShaftsExposure (float exposure)
Sets the contrast used for volumetric shadows.Arguments
- float exposure - Shadow contrast. The provided value will be saturated in the range [0; 1]. 0 means that the shadows are not seen at all.
void setLightDistance (float distance)
Updates the distance, at which (and farther) dynamic lights will not be rendered.Arguments
- float distance - Distance in units.
void setColorBrightness (float brightness)
Updates the current brightness of the scene.Arguments
- float brightness - Brightness. The provided value is saturated in the range [-1; 1].
float getEnvironmentHazeMaxDistance (int num)
Returns the current distance at which the haze effect appears for the given preset.Arguments
- int num - Preset number.
Return value
Haze maximum distance.float getLensThreshold ()
Returns the current brightness threshold for lens flares.Return value
Lens flares threshold.float getFilmicToeScale ()
Returns the current Toe Strength filmic tonemapping parameter value.Return value
Toe Strength value.void setDirtTextureName (const char * name)
Updates the 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.Arguments
- const char * name - Name of the lens flares modulation texture.
void setEnvironmentHazeMode (int mode)
Sets the mode for the haze effect.Arguments
- int mode - One of the RENDER_HAZE_* variables.
int isBokehEnabled ()
Sets a value indicating if a bokeh effect is rendered for bright lights across the DOF-blurred range. Both HDR and DOF should be enabled to render this effect.Return value
Positive integer if bokeh flares are enabled; otherwise, 0.void setBokehScale (float scale)
Sets the multiplier for color of HDR lens flares.Arguments
- float scale - Bokeh color scale. If a negative value is provided, 0 will be used instead.
float getSunShaftsLength ()
Returns the length of a flare shaft.Return value
Length of a flare shaft relative to the screen width.int getCrossShafts ()
Returns the number of cross flares.Return value
Number of cross flares.float getEnvironmentPresetIntensity (int num)
Returns the intensity of the given preset.Arguments
- int num - Preset number.
Return value
Intensity of the preset.int getAuxiliary ()
Returns a value indicating if auxiliary buffer is used.Return value
1 if auxiliary buffer is used; otherwise, 0.float getAnimationLeaf ()
Returns the current scale for rotation angle of vegetation leaves.Return value
Global leaf rotation angle.int getNumSurfaces ()
Returns the number of rendered per frame surfaces that can be currently seen in the viewport (in all rendering passes). See Rendering Profiler article for details.Return value
Number of surfaces.Ptr<Texture> getGrayCubeTexture ()
Return gray Cube texture.Return value
Gray Cube texture.float getFilmicLinearAngle ()
Returns the current Linear Angle filmic tone mapping parameter value.Return value
Liner Angle value.setBackgroundColor (const Math::vec4 & color)
Arguments
- const Math::vec4 & color
getBackgroundColor ()
int API_UNKNOWN
Description
Unknown API.int API_NULL
Description
Null API name.int API_OPENGL
int API_DIRECT3D11
Description
DIRECT3D 11 API.int GPU_UNKNOWN
Description
Unknown GPU.int GPU_AMD
Description
AMD GPU.int GPU_NVIDIA
Description
NVIDIA GPU.int GPU_INTEL
Description
Intel GPU.int GPU_ARM
Description
ARM GPU.int GPU_APPLE
Description
Apple GPU.int GPU_IMGTEC
Description
Imagination Technologies GPU.int GPU_QUALCOMM
Description
Qualcomm GPU.int QUALITY_LOW
Description
Low quality of textures and shaders. 1/16 of the original texture will be used.int QUALITY_MEDIUM
Description
Medium quality of textures and shaders. 1/4 of the original texture will be used.int QUALITY_HIGH
Description
High quality of textures and shaders.int EXPOSURE_DISABLED
Description
Rendering of the adaptive exposure effect is disabled.int EXPOSURE_LOGARITHMIC
Description
The logarithmic exposure effect is used.int EXPOSURE_QUADRATIC
Description
The adaptive exposure effect is rendered using quadratic function.int PASS_WIREFRAME
Description
The wireframe pass is enabled.int PASS_VISUALIZER_SOLID
int PASS_DEFERRED
int PASS_AUXILIARY
int PASS_EMISSION
int PASS_REFRACTION
int PASS_REFLECTION
int PASS_AMBIENT
int PASS_LIGHT_ENVIRONMENT_PROBE
int PASS_LIGHT_OMNI
int PASS_LIGHT_PROJ
int PASS_LIGHT_WORLD
int PASS_SHADOW
int PASS_ALPHA_TEST
int PASS_POST
int ENVIRONMENT_NUM_PRESETS
int HAZE_DISABLED
int HAZE_SOLID
int HAZE_SCATTERING
int NUM_PASSES
int PASS_DEPTH_PRE_PASS
Last update: 2017-07-03
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)