This page has been translated automatically.
Programming
Fundamentals
Setting Up Development Environment
UnigineScript
High-Level Systems
C++
C#
File Formats
Rebuilding the Engine and 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
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
Rendering-Related 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 parameter Type Description
s_viewport float4 Viewport sizes: width, height, 1/width, 1/height.
s_depth_range float4 Depth range: near, far, 1/near, 1/far.
s_solid_color float4 Solid color.
s_reflection_color float4 Ambient color.
s_frame int The current frame number.
s_taa_offset float2 TAA jittering
s_clutter_cluster_offset float3 Clutter/Cluster offset.

Camera Parameters

UUSL parameter Type Description
s_projection float4x4 Projection matrix.
s_iprojection float4x4 Inverse projection matrix.
s_imodelview float4x4 Inverse Model-View matrix.
s_old_imodelview float4x4 Old inverse Model-View matrix.
s_camera_offset float3 Camera position.
s_camera_position float Camera position in world space.
s_camera_direction float3 Camera direction vector.
s_camera_projection float4x4 Projection matrix of camera (not renderstate). For example: post have ortographic projection, but camera projection is perspective.
s_camera_iprojection float4x4 Inverse projection matrix of camera (not renderstate). For example: post have ortographic projection, but camera projection is perspective.

Cube Render Parameters

UUSL parameter Type Description
s_iface_rotation[6] float4x4 Inverted cubemap face rotation parameter.

ModelView Projection Parameters

UUSL parameter Type Description
s_modelview_projection_x float4 First column of the Model-View projection matrix.
s_modelview_projection_y float4 Second column of the Model-View projection matrix.
s_modelview_projection_w float4 Fourth column of the Model-View projection matrix.
s_modelview_untranslated float4x4 Model-View matrix without translate (only rotation).

Polygon Front Parameters

UUSL parameter Type Description
s_polygon_front float Polygon front.

Transform Parameters

UUSL parameter Type Description
s_transform[3] float4 Transformation matrix.

Old Transform Parameters

UUSL parameter Type Description
s_old_transform[3] float4 Old transformation matrix.

Light Parameters

UUSL parameter Type Description
s_light_position float3 The position of the Light Source
s_light_direction float3 The light direction.
s_light_color float4 Light color.
s_light_attenuation float4 Light attenuation.
s_light_shape float4 The shape of the light source.
s_light_transform float4x4 Light transformation matrix.
s_light_projection float4x4 Light projection matrix.
s_light_penumbra float Project light source penumbra parameter.
s_light_reflection_color float4 Environment probe's reflection color.
s_light_ambient_color float4 Environment Probe's ambient color.
s_light_mipmaps float Environment Probe's number of mipmaps.

Light Shadow Parameters

s_light_shadow_offset float3 Light shadow offset.
s_light_shadow_depth_bias float3 Light shadow depth bias.
s_light_shadow_depth_range float2 Light shadow depth range.
s_light_shadow_projection float4x4 Light shadow projection matrix.
s_light_shadow_softness float Light shadow softness value.
s_light_shadow_sharpness float Light shadow sharpness value.
s_light_shadow_iradius float Light shadow inverse radius.

Light Cascades Parameters

UUSL parameter Type Description
s_light_cascades_offset float World light cascades offset.
s_light_cascades_num int World light shadow cascades number.
s_light_cascades_projection[4] float4x4 World light shadow cascades projection matrix.
s_light_cascades_bias[4] float World light shadow cascades bias.

Scattering Parameters

UUSL parameter Type Description
s_scattering_sun_dir float3 The direction of the sun scattering.
s_scattering_moon_dir float3 The direction of the moon scattering.

Environment Parameters

UUSL parameter Type Description
s_environment_ambient_intensity float Environment ambient intensity parameter.
s_environment_reflection_intensity float Environment reflection intensity parameter.

Haze Parameters

UUSL parameter Type Description
s_haze_color float4 The color of the haze.
s_haze_max_distance float Haze maximum visible distance.
s_haze_density float The haze density.

Material Textures Parameters

UUSL parameter Type Description
s_material_textures[16] float4 Material textures. Each 16 vectors contains: width, height, 1/width, 1/height of the texture slot.

Material Tessellation Parameters

UUSL parameter Type Description
s_material_tessellation_factor float4 Tessellation factor.
s_material_tessellation_distance float3 Tessellation distance.

Material Animation Parameters

UUSL parameter Type Description
s_material_animation_stem float4 Animation stem.
s_material_old_animation_stem float4 Old animation stem.
s_material_animation_leaf float3 Animation leaf.
s_material_old_animation_leaf float3 Old animation leaf.
s_material_animation_wind float3 Animation wind.

Material Ambient Parameters

UUSL parameter Type Description
s_material_reflection_transform float4x4 Ambient transformation matrix.

Surface Parameters

UUSL parameter Type Description
s_surface_min_bound_sphere float4 Minimum size of the bounding sphere: center (x,y,z), radius(w).
s_surface_max_bound_sphere float4 Maximum size of the bounding sphere: center (x,y,z), radius(w).
s_surface_distances float4 Surface distances: min visible, max visible, imin fade, imax fade

FieldSpacer Parameters

UUSL parameter Type Description
s_field_spacer_num_spacers int2 Number of FieldSpacer nodes.
s_field_spacer_parameters[24] float4 FieldSpacer parameters.
s_field_spacer_transforms[24] float4 FieldSpacer transforms.
Notice
To use these parameters, FIELD_SPACER should be defined.

FieldAnimation Parameters

UUSL parameter Type Description
s_field_animation_num_animations int2 Number of FieldAnimation nodes.
s_field_animation_parameters[24] float4 FieldAnimation parameters.
s_field_animation_transforms[24] float4 FieldAnimation transforms.
Notice
To use these parameters, FIELD_ANIMATION should be defined.

FieldHeight Parameters

UUSL parameter Type Description
s_field_height_num_heights int2 Number of FieldHeight nodes.
s_field_height_projections[8] float4x4 ---.
s_field_height_planes[8] float4 ---.
s_field_height_parameters[8] float4 FieldHeight parameters.
s_field_height_texture_ids[8] float ---.
Notice
To use these parameters, FIELD_HEIGHT should be defined.
Last update: 2017-07-03
Build: ()