Unreal Engine - Packing/Unpacking a color into 1 Custom Float to change the material in an Instance

Опубликовано: 06 Январь 2025
на канале: Last Iberian Lynx GameDev
44
0

In some projects, your material might have excessive PerInstanceCustomData or Vertex Interpolators.
In order to have an instance of an HISM with a custom color, you will need 3 PICD.
However there are 2 ways you can use to do it with only 1 PICD:

1) Using hue shift, its innacurate and best for random colors.

2) Packing the color into 1 variable.

You need to first pack the color in the code.
Then in the material you unpack it.