Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect tex coords #2

Open
DotWith opened this issue Mar 7, 2023 · 1 comment
Open

Incorrect tex coords #2

DotWith opened this issue Mar 7, 2023 · 1 comment

Comments

@DotWith
Copy link
Member

DotWith commented Mar 7, 2023

Tex coords are never align. Even though I copied the rmesh parser in scpcb.

Converted to rust. How would we use two sets of uvs in a single mesh?

for k in 0..2 {
    let u = cursor.read_f32::<LittleEndian>()?;
    let v = cursor.read_f32::<LittleEndian>()?;
}
@DotWith
Copy link
Member Author

DotWith commented Mar 23, 2023

The textures are sorted in uv layers (Ex. lightmap.png next whitewall.jpg). I do believe the same sorting is done with the uvs/texture coords.

An example of the tex coords potential rework:

let mut lm_uv = [0.0; 2];
cursor.read_f32_into::<LittleEndian>(&mut lm_uv);

let mut tex_uv = [0.0; 2];
cursor.read_f32_into::<LittleEndian>(&mut tex_uv);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant