Add kart game

This commit is contained in:
2023-06-01 01:05:41 +02:00
parent 445611db4c
commit 7bc752209b
6 changed files with 434 additions and 389 deletions

View File

@@ -198,18 +198,17 @@ impl MaterialUvInfo {
);*/
let channel_name = match &chan {
TextureChannel::Color => "color",
// this is a bit confusing, but this is actually diffuse *lighting*
// aka baked lightmaps
TextureChannel::Diffuse => "diffuse",
x => {
godot_error!("TODO: Texture channel {:?} is not supported", x);
"color"
} /*TextureChannel::Luminosity => "luminosity",
TextureChannel::Specular => "specular",
TextureChannel::Glossy => "glossy",
TextureChannel::Reflectivity => "reflectivity",
TextureChannel::Transparency => "transparency",
TextureChannel::RefractiveIndex => "refractive_index",
TextureChannel::Translucency => "translucency",
TextureChannel::Bump => "bump",*/
TextureChannel::Bump => "bump",
TextureChannel::Specular => "specular",
TextureChannel::Glossy => "glossy",
TextureChannel::Reflectivity => "reflectivity",
TextureChannel::Transparency => "transparency",
TextureChannel::RefractiveIndex => "refractive_index",
TextureChannel::Translucency => "translucency",
TextureChannel::Luminosity => "luminosity",
};
m.material.set_shader_parameter(
format!("tex_{}_axis", channel_name).into(),

View File

@@ -78,8 +78,8 @@ impl SurfaceInfo {
pub fn collect_from_layer(layer: &IntermediateLayer, material: &MaterialUvInfo) -> Self {
let uv_names = [
material.diffuse_channel.as_ref(),
material.color_channel.as_ref(),
material.diffuse_channel.as_ref(),
];
let uv_subset = uv_names