[1.3.3071] Verse.Widget.ThingIcon renders with mainTexture only, ignores mask te

Started by flyfire2002, July 25, 2021, 12:24:29 PM

Previous topic - Next topic

flyfire2002

I was researching how to apply a mask texture for apparels. I was able to give mask to its on-ground graphic and worn graphic with
<graphicData>
  <shaderType>CutoutComplex</shaderType>
</graphicData>

and

<apparel>
  <useWornGraphicMask>true</useWornGraphicMask>
</apparel>

respectively. However, the icon in the Gear Tab would not apply the mask because it renders with essentially only the thing from graphicPath


// in Verse.Widget.ThingIcon
resolvedIcon = thing.Graphic.ExtractInnerGraphicFor(thing).MatAt(thing.def.defaultPlacingRot, null).mainTexture; // mainTexture doesn't include mask


Therefore when the Gear tab applies color from for example graphicData.color or CompColorable.color, it will paint over the whole thing.

Is this intended?

Pheanox

I'll have a dev review your findings to get a verdict, thanks for taking the time to look in to the code.