Forum Discussion

waynecochran's avatar
waynecochran
Explorer
11 days ago
Solved

How to set alphaMode on custom material?

I only see the alphaMode in the SceneMaterial constructor, but not in the SceneMaterial.custom function? Not is there a settable property for this?

 I want objects with some of my custom materials to use the TRANSLUCENT_POST option.

  • Hi! AlphaMode is effectively specifying both a blend mode and a sort order.

    When using a custom SceneMaterial, you cannot specify the AlphaMode but rather you can control SortOrder (SceneMaterial.setSortOrder()) and BlendMode (SceneMaterial.setBlendMode()) individually. For TRANSLUCENT_POST, you will probably need to use BlendMode.TRANSLUCENT and SortOrder.POSTPROCESS.

     

    Hope this helps!

1 Reply

  • dav-s's avatar
    dav-s
    Meta Employee

    Hi! AlphaMode is effectively specifying both a blend mode and a sort order.

    When using a custom SceneMaterial, you cannot specify the AlphaMode but rather you can control SortOrder (SceneMaterial.setSortOrder()) and BlendMode (SceneMaterial.setBlendMode()) individually. For TRANSLUCENT_POST, you will probably need to use BlendMode.TRANSLUCENT and SortOrder.POSTPROCESS.

     

    Hope this helps!