---
title: "UNIGINE 2.1.1: UUSL Improvements, SDK Browser Usability, and Bugfixes"
version: "2.1.1"
release_date: 2015-12-10
lang: en
slug: "unigine2.1.1"
entry_id: 126
author: "binstream@unigine.com"
source: "20151210-unigine-2.1.1/index.xml"
source_url: "https://developer.unigine.com/devlog/20151210-unigine-2.1.1"
---

# UNIGINE 2.1.1: UUSL Improvements, SDK Browser Usability, and Bugfixes

## Key Changes

- Added Port Angeles demo
- Improved UUSL consistency
- Extended C++/C# API
- Added Grass and Clutter samples
- Bugfixes

This is mainly a maintenance release.

![](https://developer.unigine.com/devlog/20151210-unigine-2.1.1/port_angeles.jpg)

## Port Angeles Demo

We introduced the Port Angeles demo at SIGGRAPH Asia a year ago, and now it is available for download to all UNIGINE Pro and UNIGINE Sim customers via the SDK Browser. The demo has the following features:

- Highly detailed terrain (2500 square kilometers) based on real geospatial data
- Road network based on vector geodata (OSM)
- Dynamic sky with volumetric clouds and a day-night cycle
- Multiple interactive modes
- Airfield illumination

![](https://developer.unigine.com/devlog/20151210-unigine-2.1.1/port_angeles2.jpg)

We suggest the following (or better) hardware for the best experience in this demo:

- CPU: Intel Core i5-4670 (Haswell 4th generation) or faster
- RAM: 8 GB
- GPU: NVIDIA GeForce GTX Titan / 780 or faster
- VRAM: 3 GB
- SSD disk, at least 10 GB free space

![](https://developer.unigine.com/devlog/20151210-unigine-2.1.1/port_angeles3.jpg)

## Renderer

- Added the following console commands for better SSAO control:
    - `render_ssao_resolution` renders SSAO in half (**0**) or full (**1**) resolution.
    - `render_ssao_cavity` disables (**0**) or enables (**1**) cavity.
    - `render_ssao_quality` sets the SSAO quality: **0** - use 4 samples, **1** - use 8 samples, **2** - use 16 samples, **3** - use 32 samples.
- Improved shadows performance.
- Fixed emission compensation for sRGB.
- Fixed fading for *LightOmni* and *LightProj* sources.
- Removed the `render_rwtextures` console command, the USE_RW_TEXTURES define should be used instead (enabled by default for Windows/Linux, disabled for OS X).
- Changed noise pattern for shadows.
- Removed the `render_optimization_cleargbuffer` and `render_optimization_normalbuffer` console commands, these are now always enabled.
- Fixed central screen rendering for *AppSurround* mode with TAA enabled.
- Changed the `render_show_textures` behavior:
    - **0** - all buffers are hidden.
    - **1** - shows a few most important targets, including G-buffer, refraction, SSAO, etc.
    - **2** - shows all rendering targets.
- Fixed water rendering in stereo mode.

## UUSL Improvements

Unified UNIGINE Shader Language (UUSL) has been improved in terms of consistency and ease of use.

- Added the ability to [pass textures to functions](https://developer.unigine.com/docs/code/wrapper/textures#textures_in_functions) as arguments:
    - [TEXTURE_OUT(NUM)](https://developer.unigine.com/docs/code/wrapper/textures#texture_out_num)
    - [TEXTURE_OUT_2(NUM,NUM)](https://developer.unigine.com/docs/code/wrapper/textures#texture_out_2_num0_num1)
    - [TEXTURE_OUT_3(NUM,NUM,NUM)](https://developer.unigine.com/docs/code/wrapper/textures#texture_out_3_num0_num1_num2)
    - [TEXTURE_OUT_4(NUM,NUM,NUM,NUM)](https://developer.unigine.com/docs/code/wrapper/textures#texture_out_3_num0_num1_num2_num3)
    - [TEXTURE_IN(NAME)](https://developer.unigine.com/docs/code/wrapper/textures#texture_in_name)
    - [TEXTURE_IN_2(NAME,NAME)](https://developer.unigine.com/docs/code/wrapper/textures#texture_in_2_name0_name2)
    - [TEXTURE_IN_3(NAME,NAME,NAME](https://developer.unigine.com/docs/code/wrapper/textures#texture_in_3_name0_name1_name2))
    - [TEXTURE_IN_4(NAME,NAME,NAME,NAME)](https://developer.unigine.com/docs/code/wrapper/textures#texture_in_3_name0_name1_name2_name3)
    - [TEXTURE_IN_CUBE(NAME)](https://developer.unigine.com/docs/code/wrapper/textures#texture_in_cube_name)
    - [TEXTURE_IN_3D(NAME)](https://developer.unigine.com/docs/code/wrapper/textures#texture_in_3d_name)
    - [TEXTURE_IN_ARRAY(NAME)](https://developer.unigine.com/docs/code/wrapper/textures#texture_in_array_name)
    - [TEXTURE_IN_SHADOW(NAME)](https://developer.unigine.com/docs/code/wrapper/textures#texture_in_shadow_name)
    - [TEXTURE_IN_ARRAY_SHADOW(NAME)](https://developer.unigine.com/docs/code/wrapper/textures#texture_in_array_shadow_name)
    - [TEXTURE_IN_CUBE_SHADOW(NAME)](https://developer.unigine.com/docs/code/wrapper/textures#texture_in_cube_shadow_name)
- Removed TEXTURE_DEFERRED_RECT() and TEXTURE_LOAD_ZERO() textures.
- Removed NOISE_FLOAT() function.
- Added a bunch of intrinsic functions:
    - `[getViewDirection()](https://developer.unigine.com/docs/code/wrapper/types#getViewDirection_position)` returns the current viewing direction.
    - `[min3()](https://developer.unigine.com/docs/code/wrapper/types#min3_value)` returns the smallest of the first three vector components.
    - `[min4()](https://developer.unigine.com/docs/code/wrapper/types#min4_value)` returns the smallest of the four vector components.
    - `[nrand()](https://developer.unigine.com/docs/code/wrapper/types#nrand_seed)` returns a random value within the range of [0;1].
    - `[nrand()](https://developer.unigine.com/docs/code/wrapper/types#nrand_seed0_seed1)` returns a float2 vector with random values within the range of [0;1].
    - `[nrandTiled()](https://developer.unigine.com/docs/code/wrapper/types#nrandtiled_seed_tiled)` returns a random value within the range of [0;1] divided by the tiled seed.
    - `[nrandTiled()](https://developer.unigine.com/docs/code/wrapper/types#nrandtiled_seed0_seed1_tiled)` returns a float2 vector with random values within the range of [0;1] divided by the tiled seed.
    - `[nrand2Tiled()](https://developer.unigine.com/docs/code/wrapper/types#nrand2_value_tiled)` returns a float2 vector with random values within the range of [0;1] divided by the tiled seed (For the second seed, the function shifts the vector: float2(x,y) -> float2(y,x)).
    - `[nrandTAA()](https://developer.unigine.com/docs/code/wrapper/types#nrandtaa_seed_tiled)` returns a value (that is changed each frame) within the range of [0;1] divided by the tiled seed.
    - `[nrandTAA()](https://developer.unigine.com/docs/code/wrapper/types#nrandtaa_seed0_seed1_tiled)` returns a float2 vector with random values (that is changed each frame) within the range of [0;1] divided by the tiled seed.
    - `[nrand2TAA()](https://developer.unigine.com/docs/code/wrapper/types#nrand2taa_value_tiled)` returns a float2F vector with random values (that is changed each frame) within the range of [0;1] divided by the tiled seed (For the second seed, the function shifts the vector: float2(x,y) -> float2(y,x)).
    - `[nrandTemporal()](https://developer.unigine.com/docs/code/wrapper/types#nrandtemporal_seed_tiled)` returns a value (that is changed each frame) within the range of [0;1] divided by the tiled seed.
    - `[nrandTemporal()](https://developer.unigine.com/docs/code/wrapper/types#nrandtemporal_seed0_seed1_tiled)` returns a float2 vector with random values (that is changed each frame) within the range of [0;1] divided by the tiled seed.
    - `[nrand2Temporal()](https://developer.unigine.com/docs/code/wrapper/types#nrand2temporal_value_tiled)` returns a float2 vector with random values (that is changed each frame) within the range of [0;1] divided by the tiled seed (For the second seed, the function shifts the vector: float2(x,y) -> float2(y,x)).
- Expanded the Direct3D API [flow control](https://developer.unigine.com/docs/code/wrapper/types#hlsl_flow_attributes) attributes:
    - MAX_VEC4(value) -> max4(value)
    - MAX_VEC3(value) -> max3(value)
    - MAX_VEC2(value) -> max2(value)
    - MIN_VEC2(value) -> min2(value)
    - POW_2(value) -> pow2(value)
    - ANY(value) -> any(value)
    - ATAN2(value) -> atan2(value)
    - ABS_NOISE_FLOAT(float2 seed) -> nrand(float2 seed)
    - dot_fixed(V0,V1) -> dotFixed(V0,V1)
    - lerp_fixed(V0,V1,FACTOR) -> lerpFixed(V0,V1,FACTOR)
    - BRANCH -> branch
    - LOOP -> loop
    - UNROLL -> unroll
    - FLATTEN -> flatten
    - EARLYDEPTHSTENCIL -> earlydepthstencil
- Changed the input and output [structures semantics](https://developer.unigine.com/docs/code/wrapper/semantics):
    - IN_POS -> IN_POSITION
    - IN_VEC(NUM) -> IN_DATA(NUM)
    - IN_GEOM_VEC(NUM,INDEX) -> IN_GEOM_DATA(NUM,INDEX)
    - INIT_OUT_COLOR -> INIT_COLOR(TYPE)
    - INIT_OUT_DATA(TYPE,NUM) -> INIT_MRT(TYPE,NUM)
    - INIT_OUT_DEPTH -> INIT_DEPTH
    - OUT_VEC(NUM) -> OUT_DATA(NUM)
    - OUT_DATA(NUM) -> OUT_MRT(NUM)
    - OUT_GEOM_VEC(NUM) -> OUT_GEOM_DATA(NUM)
- Added functions for scattering adjustments:
    - `hazeScattering()` calculates the haze in the scattering mode.
    - `hazeForward()` calculates the haze in the forward mode.
    - `hazeAlpha()` calculates the haze transparency.
    - `hazeSolid()` calculates the haze in the solid mode.
    - `hazeForwardSimple()` calculates the haze for objects rendered in the forward mode, can be used in the vertex shader, turns objects to transparency.
- Removed the `s_time`() parameter.
- Added the `s_perspective` (the perspective camera), `s_orthographic` (the orthographic camera), `s_frame` (the current frame number) and `s_taa_offset` (TAA jittering) parameters.

## C++ and C# API

- Added basic access to physics: Body, BodyDummy and PhysicalTrigger interfaces.
- Added `[set/getNormal()](https://developer.unigine.com/docs/cpp_api/reference/api_objectbillboards_class#c_setNormal_int_vec3)` method to ObjectBillboards that enables orienting a specific billboard (works only if the `billboards_impostor_base` material is assigned).
- Added `[isFlipped()](https://developer.unigine.com/docs/cpp_api/reference/api_objectbillboards_class#c_isFlipped)` method to the *Render* class. Old `Texture::isRenderFlipped()` method has been removed.

## UnigineScript

- Added `[set/getNormal()](https://developer.unigine.com/docs/scripting/library/objects/class.objectbillboards#setNormal_int_vec3_void)` method to ObjectBillboards that enables orienting a specific billboard (works only if the `billboards_impostor_base` material is assigned).
- Added `[set/getSSAOBlur()](https://developer.unigine.com/docs/scripting/library/engine/engine.render#engine.render.getSSAOBlur)` method to the `engine.render` class that sets/returns the SSAO blur value.
- Added `[set/getSSAOCavityScale()](https://developer.unigine.com/docs/scripting/library/engine/engine.render#engine.render.getSSAOCavityScale)` method to the `engine.render` class that sets/returns the SSAO cavity intensity.
- Added `[set/getMotionBlurDepthFalloff()](https://developer.unigine.com/docs/scripting/library/engine/engine.render#engine.render.getMotionBlurDepthFalloff)` method to the `engine.render` class that sets/returns the value of the motion blur effect depending on the fragments depth (takes effect only if `render_motion_blur_quality` is set to **1**).

## SDK Browser

- Added "*Remember me*" option on the login.
- Added "Off","TAA", and "FXAA" antialiasing options for projects in 2.1+ SDKs.
- Better support for OS X El Capitan.
- Added "*Video Debug*" option that enables the debug context for OpenGL or DirectX 11.
- Improved offline license activation usability.
- Improved behavior in case of a unstable internet connection.
- Only add-ons compatible with the default SDK will be displayed.
- Various bugfixes.

## Samples

Added more samples on built-in objects to the *Samples* demo.

Grass:

![](https://developer.unigine.com/devlog/20151210-unigine-2.1.1/samples-grass.jpg)

Clutter:

![](https://developer.unigine.com/devlog/20151210-unigine-2.1.1/samples-clutter.jpg)

## Documentation

- Added a [FAQ](https://developer.unigine.com/docs/code/wrapper/#uusl_faq) on UUSL.
- Added new tutorials on creating of custom shaders for [forward](https://developer.unigine.com/docs/code/wrapper/create_forward) and [post-processing](https://developer.unigine.com/docs/code/wrapper/create_post) rendering passes.
- Added an article on the [post_sensor](https://developer.unigine.com/docs/content/materials/postprocess/post_sensor/) material.
- Added Chinese translations of the following articles:
    - [Getting Started](https://developer.unigine.com/ch/docs/start/).
    - [Project Workflow](https://developer.unigine.com/ch/docs/start/workflow/).
    - [SDK Browser](https://developer.unigine.com/ch/docs/start/sdk/).
    - [Virtual World Structure](https://developer.unigine.com/ch/docs/principles/world_structure/).
    - [World Management](https://developer.unigine.com/ch/docs/principles/world_management/).
    - [Physics](https://developer.unigine.com/ch/docs/principles/physics/).
    - [Nodes](https://developer.unigine.com/ch/docs/objects/nodes/), [Objects](https://developer.unigine.com/ch/docs/objects/objects/), [Effects](https://developer.unigine.com/ch/docs/objects/effects/), [Decals](https://developer.unigine.com/ch/docs/objects/decals/), [Players](https://developer.unigine.com/ch/docs/objects/players/) and [Worlds](https://developer.unigine.com/ch/docs/objects/worlds/).
    - [Execution Sequence](https://developer.unigine.com/ch/docs/code/execution_sequence/).
    - [Setting Up Development Environment](https://developer.unigine.com/ch/docs/code/environment/).
    - [Programming Overview](https://developer.unigine.com/ch/docs/code/programming_overview/).
    - [Double Precision of Coordinates](https://developer.unigine.com/ch/docs/code/environment/double_precision/).
    - [Performance Analyzer](https://developer.unigine.com/ch/docs/code/console_performance_analyzer).
    - [Mesh File Formats](https://developer.unigine.com/ch/docs/code/file_formats).

## Other Changes

- Improved data streaming on extremely complex projects.
- Added *Drop to ground* to ObjectBillboards GUI allowing you to automatically place billboards onto the surface.
- Added adjustable *Up* direction for ObjectBillboards.
- Fixed the ObjectText crash on `video_restart`.
- Fixed crashes on very fast movements over detailed terrains.
- Added support for importing both morph targets and skinned mesh animations from FBX files.
- Reduced memory allocations and fragmentation.
- Fixed GLAppSDL sample for OS X.
- Fixed copy and paste in engine console on Linux.
- Reduced Syncker UDP packet size to 1 Kb.
- Changed the way of ObjectMeshSkinned synchronization via Syncker. Transformations specified in the code and physics applied to the bones won't be synchronized, only the animation frames will. You must have a single file containing all the animations and specify the path to it via `setAnimName()`.
- Various bugfixes.
