Open lxw404 opened 2 months ago
Looks like the MaskTexture
on the MainAndMaskTexturePropertyBlock
only gets applied if you have a MaskTexture
set on the main material. In your example, the material variant is not using a MaskTexture
and by the time it gets to the PropertyBlock there is no MaskTexture
to replace as the variant doesn't include it.
With a white texture used as the Mask Variant 6:
Without a Mask, Variant 4:
That is definitely confusing from a usage standpoint since the MainTexture
can apply without having to set it on the material itself. I do notice that this happens on the UnlitMaterial
as well with MaskTexture
since its base variant does not have this property.
Seeking feedback from either of @Frooxius or @Geenz - this sounds like it might be a consequence of how the shader variants are toggled between rather than explicitly being a bug?
There'd probably need to be a mechanism implemented to switch a shader variant when it is being referenced in a property block component.
As @XDelta highlighted above- it seems this issue can be worked around through use of a dummy/placeholder texture to ensure the material is using the proper variant with the appropriate properties.
Describe the bug?
The
MaskTexture
on theMainAndMaskTexturePropertyBlock
seemingly has no effect on any material whatsoever.To Reproduce
UI_UnlitMaterial
to the object with no texturesMainAndMaskTexturePropertyBlock
on the objectMaskTexture
Observe that the mask texture is not applied. The above can be done for any material with a
MaskTexture
, and the result is the same.Here is a minimal example object: resrec:///U-LuxKitty/R-A15215D5EF0A13C36AE3482BFA61369C0F54355976695B3C721E0650C6BA59B3
Expected behavior
The
MaskTexture
in the property block should apply to theMaskTexture
in a material with that property.Screenshots
Resonite Version Number
2024.3.1.1178
What Platforms does this occur on?
Windows
What headset if any do you use?
Valve Index, Desktop
Log Files
MainAndMaskTexturePropertyBlock Mask - 2024.3.1.1178 - 2024-03-07 07_31_42.log
Additional Context
No response
Reporters
LuxKitty