Mario Kart 8/Materials
From Wexos's Wiki
(Redirected from Materials In Mario Kart 8 Deluxe)
In Mario Kart 8 and Mario Kart 8 Deluxe most (if not all) BFRES models store its BFSHA file as an external file into the BFRES, named Turbo_UBER.bfsha. While the shader file has been compiled for each model specifilly, meaning the file is different, the shader source is still the same. This article describes the different uniform variables and shader variations and their purpose.
Render Infos
The following render infos are supported. Note that Switch stores additional system render infos which is not directly used by the shader.
Name | Type | Description |
---|---|---|
gsys_pass | String | Unknown. |
gsys_dynamic_depth_shadow | String | Unknown. |
gsys_dynamic_depth_shadow_only | String | Unknown. |
gsys_static_depth_shadow | String | Unknown. |
gsys_static_depth_shadow_only | String | Unknown. |
gsys_cube_map | String | Unknown. |
gsys_cube_map_only | String | Unknown. |
gsys_dynamic_reflection | String | Unknown. |
gsys_multi_filter | String | Unknown. |
gsys_priority_hint | String | Unknown. |
gsys_priority | Int32 | Unknown. |
gsys_light_diffuse | String | Unknown. |
gsys_env_obj_set | String | Unknown. |
gsys_bake_group | String | Unknown. |
gsys_bake_texel_param | Float | Unknown. |
gsys_bake_uv_unite | String | Unknown. |
Shader Options
The following shader options are supported:
Name | Description |
---|---|
gsys_alpha_test_enable | Unknown. |
gsys_alpha_test_func | Unknown. |
enable_far_infinity | Unknown. |
enable_far_inf_ignore_y | Unknown. |
gsys_invalidate_world_srt | Unknown. |
gsys_invalidate_texture_srt | Unknown. |
gsys_invalidate_xlu_zprepass | Unknown. |
enable_normal_map | Enables normal map 0. |
gsys_normalmap_BC1 | Sets if normal maps are in UNORM or SNORM format, 1 meaning UNORM. |
gsys_enable_normal_map2 | Enables normal map 1. |
gsys_enable_area_env | Unknown. |
enable_area_env_direct | Unknown. |
gsys_enable_light_probe | Unknown. |
enable_indirect | Enables indirect texture. |
indirect_world_scale | Unknown. |
indirect_texture_is_BC5s | Unknown. |
indirect_effect_albedo | Unknown. |
indirect_effect_normal | Unknown. |
indirect_effect_normal2 | Unknown. |
indirect_effect_specmask | Unknown. |
indirect_effect_emission | Unknown. |
indirect_effect_multiA | Unknown. |
indirect_effect_multiB | Unknown. |
select_indirect_mag_albedo | Unknown. |
select_indirect_mag_normal | Unknown. |
select_indirect_mag_normal2 | Unknown. |
select_indirect_mag_specmask | Unknown. |
select_indirect_mag_emission | Unknown. |
select_indirect_mag_multiA | Unknown. |
select_indirect_mag_multiB | Unknown. |
enable_color_buffer | Unknown. |
color_buffer_as_albedo | Unknown. |
color_buffer_as_multi_A | Unknown. |
color_buffer_as_multi_B | Unknown. |
enable_refraction | Unknown. |
mii_albedo_skin_color | Unknown. |
mii_albedo_tex_skin_color | Unknown. |
mii_albedo_favorite_color | Unknown. |
mii_albedo_tex_favorite_color | Unknown. |
mii_reg0_skin_color | Unknown. |
mii_reg0_favorite_color | Unknown. |
enable_multi_texture | Unknown. |
multi_tex_output_type | Unknown. |
multi_tex_calc_type_color | Unknown. |
multi_tex_calc_type_alpha | Unknown. |
enable_geo_multi | Unknown. |
geo_multi_alpha_type | Unknown. |
geo_multi_specmask_calc_type | Unknown. |
enable_diffuse2 | Unknown. |
enable_albedo | Enables albedo maps. |
enable_vtx_color_diff | Enables vertex color. |
enable_diffuse | Unknown. |
enable_opa_trans | Unknown. |
enable_opa_trans_tex | Unknown. |
enable_opa_trans_albedo | Unknown. |
enable_edge_light | Unknown. |
enable_vtx_color_edge_light | Unknown. |
enable_specular | Unknown. |
enable_specular_mask | Unknown. |
enable_specular_mask_rougness | Unknown. |
specular_mask_is_color | Unknown. |
enable_specular_shadow_link | Unknown. |
enable_vtx_color_spec | Unknown. |
enable_fresnel | Unknown. |
enable_emission | Unknown. |
enable_emission_map | Unknown. |
enable_vtx_color_emission | Unknown. |
enable_bake_texture | Enables bake maps. |
enable_bake_shadow_mask | Unknown. |
enable_bake_l_cancel_s | Unknown. |
enable_d_shadow_bake_l_cancel | Unknown. |
enable_projection_shadow | Unknown. |
enable_projection_light | Unknown. |
enable_static_depth_shadow | Unknown. |
enable_dynamic_depth_shadow | Unknown. |
enable_decal_ao | Unknown. |
enable_albedo_ao | Unknown. |
enable_fog | Unknown. |
enable_fog_y | Unknown. |
fog_game_effect_order | Unknown. |
enable_fog_y_prim | Unknown. |
enable_fog_emission | Unknown. |
enable_fog_edge | Unknown. |
enable_vtx_alpha_trans | Unknown. |
enable_color_buffer_blend | Unknown. |
enable_edge_xlu | Unknown. |
enable_edge_xlu_rev | Unknown. |
enable_water_surface | Unknown. |
enable_shiny_specular | Unknown. |
enable_fresnel_look_depend | Unknown. |
enable_fresnel_look_factor | Unknown. |
enable_game_effect | Unknown. |
gamefx_lerp_type | Unknown. |
enable_gamefx_edge | Unknown. |
enable_gamefx_edge_fragment | Unknown. |
enable_specular_dirty_mask | Unknown. |
enable_light_pre_pass_intensity | Unknown. |
enable_white_exposure | Unknown. |
enable_cascade_shadow_force1 | Unknown. |
enable_vertex_billboard | Unknown. |
enable_screen_fake_scale | Unknown. |
texcoord_calc_texcoord0 | Unknown. |
texcoord_calc_texcoord2 | Unknown. |
texcoord_calc_texcoord3 | Unknown. |
texcoord_aspect_mod_texcoord0 | Unknown. |
texcoord_aspect_mod_texcoord2 | Unknown. |
texcoord_aspect_mod_texcoord3 | Unknown. |
texcoord_select_specmask | Specular map texture coordinate. |
texcoord_select_normal | Normal map 0 texture coordinate. |
texcoord_select_normal2 | Normal map 1 texture coordinate. |
texcoord_select_indirectA | Indirect map texture coordinate. |
texcoord_select_multiA | Albedo map 1 texture coordinate. |
texcoord_select_multiB | Albedo map 2 texture coordinate. |
texcoord_select_emission | Emission map texture coordinate. |
texcoord_select_transmitt | Unknown. |
enable_specular_aniso | Unknown. |
bake_shadow_type | Unknown. |
bake_light_type | Unknown. |
bake_debug_disable_shadow | Unknown. |
enable_light_pre_pass | Unknown. |
enable_light_pre_pass_no_effect | Unknown. |
decal_trail_type | Unknown. |
gsys_renderstate | Unknown. |
Vertex Attributes
The following vertex attributes are supported:
ID | Location | Description |
---|---|---|
_p0 | 0 | Position attribute. |
_n0 | 1 | Normal attribute. |
_t0 | 2 | Tangent attribute. |
_b0 | 3 | Binormal attribute. |
_w0 | 4 | Blend weight attribute. |
_i0 | 5 | Blend index attribute. |
_u0 | 6 | Texture coordinate 0 attribute. |
_u1 | 7 | Texture coordinate 1 attribute. |
_u2 | 8 | Texture coordinate 2 attribute. |
_u3 | 9 | Texture coordinate 3 attribute. |
_c0 | 10 | Color 0 attribute. |
_c1 | 11 | Color 1 attribute. |
Texture Samplers
The following texture samplers are supported:
ID | Description |
---|---|
_a0 | Albedo map 0. |
_s0 | Specular map 0. |
_n0 | Normal map 0. |
_a3 | Albedo map 3. Used for indirect texturing. |
_a1 | Albedo map 1. Used for multi texturing. |
_a2 | Albedo map 2. Used for multi texturing. |
_e0 | Emission map 0. |
_n1 | Normal map 1. |
_b0 | Bake map 0. |
_b1 | Bake map 1. |
Shader Parameters
Name | Type | Description |
---|---|---|
edge_light_rim_i | Float | Unknown. |
d_shadow_bake_l_cancel_rate | Float | Unknown. |
gsys_i_color_ratio0 | Float | Unknown. |
gsys_edge_ratio0 | Float | Unknown. |
gsys_edge_width0 | Float | Unknown. |
bloom_intensity | Float | Unknown. |
gsys_outline_width | Float | Unknown. |
gsys_alpha_threshold | Float | Unknown. |
game_edge_pow | Float | Unknown. |
edge_alpha_scale | Float | Unknown. |
post_multi_texture | Float | Unknown. |
edge_alpha_width | Float | Unknown. |
edge_alpha_pow | Float | Unknown. |
transparency | Float | Transparency for xlu. |
alphat_out_start | Float | Unknown. |
alphat_out_end | Float | Unknown. |
gsys_area_env_index_diffuse | Float | Unknown. |
shadow_density | Float | Unknown. |
ao_density | Float | Unknown. |
transmit_intensity | Float | Unknown. |
edge_light_vc_intensity | Float | Unknown. |
specular_aniso_power | Float | Unknown. |
transmit_shadow_intensity | Float | Unknown. |
edge_light_intensity | Float | Unknown. |
light_pre_pass_intensity | Float | Unknown. |
gsys_bake_opacity | Float | Unknown. |
shiny_specular_intensity | Float | Unknown. |
specular_intensity | Float | Unknown. |
specular_roughness | Float | Unknown. |
specular_fresnel_i | Float | Unknown. |
specular_fresnel_s | Float | Unknown. |
specular_fresnel_m | Float | Unknown. |
shiny_specular_sharpness | Float | Unknown. |
emission_intensity | Float | Unknown. |
soft_edge_dist_inv | Float | Unknown. |
silhoutte_depth | Float | Unknown. |
refraction_intensity | Float | Unknown. |
normal_map_weight | Float | Normal map weight between map 0 and map 1. 0 means only normal map 0 and 1 mean only normal map 1. |
shiny_specular_fresnel | Float | Unknown. |
silhoutte_depth_contrast | Float | Unknown. |
fresnel_look_depend_factor | Float | Unknown. |
mii_hair_specular_intensity | Float | Unknown. |
decal_trail_intensity | Float | Unknown. |
screen_fake_scale_begin_ratio | Float | Unknown. |
fog_emission_intensity | Float | Unknown. |
fog_emission_effect | Float | Unknown. |
fog_edge_power | Float | Unknown. |
fog_edge_width | Float | Unknown. |
gsys_alpha_test_ref_value | Float | Unknown. |
edge_light_sharpness | Float | Unknown. |
indirect_mag | Float_2D | Unknown. |
indirect_magB | Float_2D | Unknown. |
silhoutte_depth_color | Float_3D | Unknown. |
gsys_mii_skin_color | Float_3D | Unknown. |
gsys_mii_favorite_color | Float_3D | Unknown. |
gsys_point_light_color | Float_3D | Unknown. |
gsys_edge_color0 | Float_3D | Unknown. |
transmit_color | Float_3D | Unknown. |
gsys_i_color0 | Float_3D | Unknown. |
gsys_i_color0_b | Float_3D | Unknown. |
gsys_bake_light_scale | Float_3D | Unknown. |
gsys_bake_light_scale1 | Float_3D | Unknown. |
gsys_bake_light_scale2 | Float_3D | Unknown. |
albedo_tex_color | Float_3D | Albedo color which is multiplied to the albedo texture color. |
decal_trail_color | Float_3D | Unknown. |
fog_emission_color | Float_3D | Unknown. |
screen_fake_scale_factor | Float_3D | Unknown. |
edge_light_color | Float_3D | Unknown. |
shiny_specular_color | Float_3D | Unknown. |
specular_color | Float_3D | Specular color which is multiplied to the specular texture color. |
emission_color | Float_3D | Emission color which is multiplied to the emission texture color. |
gsys_depth_silhoutte_color | Float_4D | Unknown. |
gsys_outline_color | Float_4D | Unknown. |
gsys_area_env_data0 | Float_4D | Unknown. |
gsys_area_env_data1 | Float_4D | Unknown. |
gsys_bake_st0 | Float_4D | Bake map 0 UV transformation. First two floats are scale, last two floats are translation. |
gsys_bake_st1 | Float_4D | Bake map 1 UV transformation. First two floats are scale, last two floats are translation. |
multi_tex_reg0 | Float_4D | Unknown. |
multi_tex_reg1 | Float_4D | Unknown. |
multi_tex_param0 | Float_4D | Unknown. |
fog_edge_color | Float_4D | Unknown. |
gsys_xlu_zprepass_alpha | Float_4D | Unknown. |
multi_tex_reg2 | Float_4D | Unknown. |
gsys_sssss_color | Float_4D | Unknown. |
tex_mtx1 | Texture_SRT | Texture transformation for UV 1. |
tex_mtx2 | Texture_SRT | Texture transformation for UV 2. |
tex_mtx0 | Texture_SRT | Texture transformation for UV 0. |