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_perspective | float4 | Perspective parameters: s_projection.m00, s_projection.m11, s_projection.m02 ,s_projection.m12 |
s_orthographic | float4 | Orthographic parameters: s_projection.m00, s_projection.m11, s_projection.m03, s_projection.m13. |
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. |
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. |
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_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. |
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. |
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. |
To use these parameters, FIELD_ANIMATION should be defined
Last update: 2017-07-03
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)