Skip to content

Conversation

@hemebond
Copy link
Contributor

@hemebond hemebond commented Dec 28, 2024

Changes mtexinfo_s vecs property from float to double so that lightmaps are aligned correctly. Fixes #232.

@Cloudwalk9
Copy link
Contributor

Cloudwalk9 commented Apr 26, 2025

This doesn't feel correct. DotProduct is a macro that makes no assumption of the datatype. You'd want to cast to double in the original DotProduct invocation. So we shouldn't need a double variant. But this smells like an internal double to float downcasting bug and casting feels like a hack without further investigation into why the lightmaps suck.

@hemebond hemebond marked this pull request as draft April 26, 2025 16:48
@hemebond
Copy link
Contributor Author

Very good point. I'm still testing, but it looks like I can change mtexinfo_s->vecs from float to double and achieve the same results.

@hemebond hemebond marked this pull request as ready for review April 26, 2025 17:17
@hemebond hemebond changed the title Add DotProductDouble macro and use it in Mod_Q1BSP_LoadFaces Change mtexinfo_s vecx from float to double to fix lightmap issues May 28, 2025
@redactedontop
Copy link

@hemebond Updates? LGTM.

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

Successfully merging this pull request may close these issues.

Incorrect lightmap rendering

3 participants