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 |
Camera Parameters
UUSL parameter | Type | Description |
---|---|---|
s_projection | float4x4 | 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_position | float3 | Camera position. |
s_camera_height | float | z-component of the camera position. |
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. |
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_iradius | float4 | The light inverse radius. |
s_light_transform | float4x4 | Light transformation matrix. |
s_light_projection | float4x4 | Light projection matrix. |
s_light_shadow_offset | float3 | Light shadow offset. |
s_light_shadow_iradius | float4 | Light shadow inverse radius. |
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. |
Light World Parameters
UUSL parameter | Type | Description |
---|---|---|
s_light_shadow_offsets[4] | float4 | World light shadow offsets. |
s_light_shadow_projections[4] | float4x4 | World light shadow projection matrix. |
s_light_shadow_splits | int | World light shadow splits. |
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. |
s_material_reflection_center | float3 | Ambient center. |
s_material_reflection_color | float3 | Ambient color. |
s_material_reflection_radius | float | Ambient radius. |
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. |
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. |
Last update: 2017-07-03
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)