This page has been translated automatically.
Programming
Fundamentials
Setting Up Development Environment
UnigineScript
High-Level Systems
C++
C#
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Core Library
Containers
Engine Classes
Node-Related Classes
Rendering-Related Classes
Physics-Related Classes
Bounds-Related Classes
GUI-Related Classes
Controls-Related Classes
Pathfinding-Related Classes
Utility Classes
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

UUSL Parameters

UUSL defines parameters that passed by the engine to the shader. These parameters can be used in your shader programs to get the necessary data from the engine.

Common Parameters

UUSL parameterTypeDescription
s_viewportfloat4Viewport sizes: width, height, 1/width, 1/height.
s_depth_rangefloat4Depth range: near, far, 1/near, 1/far.
s_solid_colorfloat4Solid color.
s_reflection_colorfloat4Ambient color.
s_frameintThe current frame number.
s_taa_offsetfloat2TAA jittering
s_clutter_cluster_offsetfloat3Clutter/Cluster offset.

Camera Parameters

UUSL parameterTypeDescription
s_projectionfloat4x4Projection matrix.
s_iprojectionfloat4x4Inverse projection matrix.
s_imodelviewfloat4x4Inverse Model-View matrix.
s_old_imodelviewfloat4x4Old inverse Model-View matrix.
s_perspectivefloat4Perspective parameters: s_projection.m00, s_projection.m11, s_projection.m02 ,s_projection.m12
s_orthographicfloat4Orthographic parameters: s_projection.m00, s_projection.m11, s_projection.m03, s_projection.m13.
s_camera_offsetfloat3Camera position.
s_camera_positionfloatCamera position in world space.
s_camera_directionfloat3Camera direction vector.
s_camera_projectionfloat4x4Projection matrix of camera (not renderstate). For example: post have ortographic projection, but camera projection is perspective.
s_camera_iprojectionfloat4x4Inverse projection matrix of camera (not renderstate). For example: post have ortographic projection, but camera projection is perspective.

ModelView Projection Parameters

UUSL parameterTypeDescription
s_modelview_projection_xfloat4First column of the Model-View projection matrix.
s_modelview_projection_yfloat4Second column of the Model-View projection matrix.
s_modelview_projection_wfloat4Fourth column of the Model-View projection matrix.
s_modelview_untranslatedfloat4x4Model-View matrix without translate (only rotation).

Polygon Front Parameters

UUSL parameterTypeDescription
s_polygon_frontfloatPolygon front.

Transform Parameters

UUSL parameterTypeDescription
s_transform[3]float4Transformation matrix.

Old Transform Parameters

UUSL parameterTypeDescription
s_old_transform[3]float4Old transformation matrix.

Light Parameters

UUSL parameterTypeDescription
s_light_positionfloat3The position of the Light Source
s_light_directionfloat3The light direction.
s_light_colorfloat4Light color.
s_light_attenuationfloat4Light attenuation.
s_light_shapefloat4The shape of the light source.
s_light_transformfloat4x4Light transformation matrix.
s_light_projectionfloat4x4Light projection matrix.

Light Shadow Parameters

s_light_shadow_offsetfloat3Light shadow offset.
s_light_shadow_depth_biasfloat3Light shadow depth bias.
s_light_shadow_depth_rangefloat2Light shadow depth range.
s_light_shadow_projectionfloat4x4Light shadow projection matrix.
s_light_shadow_softnessfloatLight shadow softness value.
s_light_shadow_sharpnessfloatLight shadow sharpness value.
s_light_shadow_iradiusfloatLight shadow inverse radius.

Light Cascades Parameters

UUSL parameterTypeDescription
s_light_cascades_numintWorld light shadow cascades number.
s_light_cascades_projection[4]float4x4World light shadow cascades projection matrix.
s_light_cascades_bias[4]floatWorld light shadow cascades bias.

Scattering Parameters

UUSL parameterTypeDescription
s_scattering_sun_dirfloat3The direction of the sun scattering.
s_scattering_moon_dirfloat3The direction of the moon scattering.

Haze Parameters

UUSL parameterTypeDescription
s_haze_colorfloat4The color of the haze.
s_haze_max_distancefloatHaze maximum visible distance.
s_haze_densityfloatThe haze density.

Material Textures Parameters

UUSL parameterTypeDescription
s_material_textures[16]float4Material textures. Each 16 vectors contains: width, height, 1/width, 1/height of the texture slot.

Material Tessellation Parameters

UUSL parameterTypeDescription
s_material_tessellation_factorfloat4Tessellation factor.
s_material_tessellation_distancefloat3Tessellation distance.

Material Animation Parameters

UUSL parameterTypeDescription
s_material_animation_stemfloat4Animation stem.
s_material_old_animation_stemfloat4Old animation stem.
s_material_animation_leaffloat3Animation leaf.
s_material_old_animation_leaffloat3Old animation leaf.
s_material_animation_windfloat3Animation wind.

Material Ambient Parameters

UUSL parameterTypeDescription
s_material_reflection_transformfloat4x4Ambient transformation matrix.

Surface Parameters

UUSL parameterTypeDescription
s_surface_min_bound_spherefloat4Minimum size of the bounding sphere: center (x,y,z), radius(w).
s_surface_max_bound_spherefloat4Maximum size of the bounding sphere: center (x,y,z), radius(w).
s_surface_distancesfloat4Surface distances: min visible, max visible, imin fade, imax fade

FieldSpacer Parameters

UUSL parameterTypeDescription
s_field_spacer_num_spacersint2Number of FieldSpacer nodes.
s_field_spacer_parameters[24]float4FieldSpacer parameters.
s_field_spacer_transforms[24]float4FieldSpacer transforms.
Notice
To use these parameters, FIELD_SPACER should be defined

FieldAnimation Parameters

UUSL parameterTypeDescription
s_field_animation_num_animationsint2Number of FieldAnimation nodes.
s_field_animation_parameters[24]float4FieldAnimation parameters.
s_field_animation_transforms[24]float4FieldAnimation transforms.
Notice
To use these parameters, FIELD_ANIMATION should be defined
Last update: 03.07.2017
Build: ()