Interface MaterialFinder

All Superinterfaces:
MaterialView

public interface MaterialFinder extends MaterialView
Finds standard RenderMaterial instances used to communicate quad rendering characteristics to the renderer.

Must be obtained via Renderer.materialFinder().

  • Method Details

    • blendMode

      MaterialFinder blendMode(BlendMode blendMode)
      Controls how sprite pixels should be blended with the scene.

      The default value is BlendMode.DEFAULT.

      See Also:
    • emissive

      MaterialFinder emissive(boolean isEmissive)
      When true, sprite texture and color will be rendered at full brightness. Lightmap values provided via QuadView.lightmap(int) will be ignored.

      This is the preferred method for emissive lighting effects. Some renderers with advanced lighting pipelines may not use block lightmaps and this method will allow per-sprite emissive lighting in future extensions that support overlay sprites.

      Note that color will still be modified by diffuse shading and ambient occlusion, unless disabled via disableDiffuse(boolean) and ambientOcclusion(TriState).

      The default value is false.

    • disableDiffuse

      MaterialFinder disableDiffuse(boolean disable)
      Controls whether vertex colors should be modified for diffuse shading. This property is inverted, so a value of false means that diffuse shading will be applied.

      The default value is false.

      This property is guaranteed to be respected in block contexts. Some renderers may also respect it in item contexts, but this is not guaranteed.

    • ambientOcclusion

      MaterialFinder ambientOcclusion(TriState mode)
      Controls whether vertex colors should be modified for ambient occlusion.

      If set to TriState.DEFAULT, ambient occlusion will be used if the model uses ambient occlusion and the block state has a luminance of 0. Set to TriState.TRUE or TriState.FALSE to override this behavior. TriState.TRUE will not have an effect if ambient occlusion is disabled globally.

      The default value is TriState.DEFAULT.

      This property is respected only in block contexts. It will not have an effect in other contexts.

    • glintMode

      MaterialFinder glintMode(GlintMode mode)
      Controls how glint should be applied.

      If set to GlintMode.DEFAULT, glint will be applied in item contexts based on the glint type of the layer. Set to another value to override this behavior.

      The default value is GlintMode.DEFAULT.

      This property is guaranteed to be respected in item contexts. Some renderers may also respect it in block contexts, but this is not guaranteed.

    • shadeMode

      MaterialFinder shadeMode(ShadeMode mode)
      A hint to the renderer about how the quad is intended to be shaded, for example through ambient occlusion and diffuse shading. The renderer is free to ignore this hint.

      The default value is ShadeMode.ENHANCED.

      This property is respected only in block contexts. It will not have an effect in other contexts.

      See Also:
    • copyFrom

      MaterialFinder copyFrom(MaterialView material)
      Copies all properties from the given MaterialView to this material finder.
    • clear

      Resets this instance to default values. Values will match those in effect when an instance is newly obtained via Renderer.materialFinder().
    • find

      Returns the standard material encoding all the current settings in this finder. The settings in this finder are not changed.

      Resulting instances can and should be re-used to prevent needless memory allocation. Renderer implementations may or may not cache standard material instances.