This commit is contained in:
2023-05-29 22:16:16 +02:00
parent a6c457788c
commit 1ad383448b
5 changed files with 23 additions and 8 deletions

View File

@@ -32,7 +32,7 @@ Support of games primarily depends on who developed them - Games with structural
* [x] Moorhuhn Schatzjäger 3
* [ ] Moorhuhn Invasion
* `.sar` Starforce 3D Engine (Visual Imagination Software "VIS" GbR): LightWave 3D + Open Dynamics Engine + CEGUI
* [ ] Moorhuhn Kart 3
* [x] Moorhuhn Kart 3
* [ ] Moorhuhn Director's Cut
* [ ] Moorhuhn Kart Thunder
* `*.dat` "Phenomedia 2D Engine"

View File

@@ -50,17 +50,17 @@ vec3 project(
case 4: // Front Projection
return vec3(0.0, 1.0, 0.0);
case 3:
vec3 p = (transform * vec4(position, 1.0)).xyz / 10.0;
vec3 p = (transform * vec4(position, 1.0)).xyz;
vec3 n = normalize(abs(mat3(transform) * normal));
vec2 uv2 = (n.x > n.y && n.x > n.z) ? vec2(p.z, p.y)
: ((n.y > n.x && n.y > n.z) ? vec2(p.x, p.z) : vec2(p.x, p.y));
return texture(tex, uv2).rgb;
return texture(tex, uv2 + 0.5).rgb;
case 2: // Spherical
return vec3(0.0, 0.0, 1.0);
case 1: // Cylindrical
return vec3(1.0, 1.0, 0.0);
case 0: // Planar
return texture(tex, (transform * vec4(position, 1.0)).xz / 10.0).rgb;
return texture(tex, (transform * vec4(position, 1.0)).xz).rgb;
default:
return vec3(0.0);
}

View File

@@ -5,9 +5,23 @@ resource_name = "load"
script/source = "@tool
extends Node3D
@export var load_list = [
\"anlagen\",
\"boden\",
\"bok\",
\"fensterscheiben\",
\"gelaender\",
\"kraftfelder\",
\"rundgang\",
\"stampfer\",
\"timetunnel\",
\"waende\",
]
func _ready():
var scene = load(\"sar://D:/Moorhuhnkart/3dobjects_tracks/track07_ufo/waende.lwo\").instantiate()
add_child(scene)
for item in load_list:
var scene = load(\"sar://D:/Moorhuhnkart/3dobjects_tracks/track07_ufo/%s.lwo\" % item).instantiate()
add_child(scene)
"
[node name="test" type="Node3D"]

View File

@@ -34,12 +34,12 @@ pub fn collect_clip(target: &mut HashMap<u32, Gd<Texture2D>>, clip: ImageClip) {
if sequence.data.flags & 0x1 != 1 {
godot_error!("Non-looping animated textures are not supported!")
}
let mut frame_duration = 15.0 / 60.0;
let mut frame_duration = 1.0 / 15.0;
for meta in attributes {
match meta {
ImageClipSubChunk::Time(time) => {
frame_duration = time.frame_rate as f64 / 60.0;
frame_duration = 1.0 / time.frame_rate as f64;
}
x => godot_error!("TODO: {:?}", x),
}

View File

@@ -163,6 +163,7 @@ impl MaterialUvInfo {
.scaled(size),
origin: pos,
}
.affine_inverse()
.to_variant(),
));
}