Skip to content

Color Channels

Swizzling

Material defines colorSets and extraVertexColorData.

  • colorSets is mapped to COLOR0 of the GLTF model.
  • extraVertexData is mapped to COLOR1 of the GLTF model.

Then COLOR0 and COLOR1 (which are Vector4 ARGB data) are mapped into USF color data. Each channel index is one byte. Simple explanation of mapping:

  • colorSet number 0 => channels 0, 1, 2, 3
  • colorSet number 1 => channels 4, 5, 6, 7
  • colorSet number 2 => channels 8, 9, 10, 11

And so on. If material uses channels 16, 17, 18, 19, COLOR0 will be mapped to colorSet number 4 and colorSets 0, 1, 2 and 3 will be created as padding.


Warhammer 40,000: Space Marine 2 © Games Workshop Limited 2024. Space Marine, the Space Marine logo, GW, Games Workshop, 40K, Warhammer, Warhammer 40,000, 40,000, the 'Aquila' Double-headed Eagle logo, and all associated logos, illustrations, images, names, creatures, races, vehicles, locations, weapons, characters, and the distinctive likeness thereof, are either ® or TM, and/or © Games Workshop Limited, variably registered around the world, and used under licence. Focus Entertainment and its logos are trademarks, registered or not, of Focus Entertainment. Saber Interactive and its logos are trademarks, registered or not, of Saber Interactive. Powered by Wwise © 2006 – 2024 Audiokinetic Inc. Havok software is © 2024 Microsoft. Uses Bink Video. Copyright © 1997-2024 by Epic Games Tools LLC. All rights reserved to their respective owners.