Skip to content

Commit 6c5b772

Browse files
committed
FBXLoader: Add sRGB -> Linear-sRGB conversion for vertex colors.
1 parent b0202e5 commit 6c5b772

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

examples/jsm/loaders/FBXLoader.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2217,6 +2217,12 @@ class GeometryParser {
22172217

22182218
}
22192219

2220+
for ( let i = 0, c = new Color(); i < buffer.length; i += 4 ) {
2221+
2222+
c.fromArray( buffer, i ).convertSRGBToLinear().toArray( buffer, i );
2223+
2224+
}
2225+
22202226
return {
22212227
dataSize: 4,
22222228
buffer: buffer,

0 commit comments

Comments
 (0)