Fix casting typo in D3MFExporter::writeBaseMaterials (color channels < 1.0f were zeroed out) (#5681)

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
pull/5675/head^2
Olivier Chafik 2024-08-29 20:27:13 +01:00 committed by GitHub
parent 11daaf79a5
commit f39f53e860
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 4 deletions

View File

@ -249,10 +249,10 @@ void D3MFExporter::writeBaseMaterials() {
if (color.r <= 1 && color.g <= 1 && color.b <= 1 && color.a <= 1) { if (color.r <= 1 && color.g <= 1 && color.b <= 1 && color.a <= 1) {
hexDiffuseColor = ai_rgba2hex( hexDiffuseColor = ai_rgba2hex(
(int)((ai_real)color.r) * 255, (int)(((ai_real)color.r) * 255),
(int)((ai_real)color.g) * 255, (int)(((ai_real)color.g) * 255),
(int)((ai_real)color.b) * 255, (int)(((ai_real)color.b) * 255),
(int)((ai_real)color.a) * 255, (int)(((ai_real)color.a) * 255),
true); true);
} else { } else {