API reference
API reference
Select your platform
No SDKs available
No versions available

SceneMaterial

SceneMaterial

class SceneMaterial

Constructors

NameSummary
SceneMaterial
constructor(texture: SceneTexture, alphaMode: AlphaMode = AlphaMode.OPAQUE, shader: String = "")

Types

NameSummary
Companion
object Companion

Properties

NameSummary
handle
var handle: Long
params
var params: Array<SceneMaterialAttribute>?
texture
var texture: SceneTexture?
textures
var textures: <Error class: unknown class>

Functions

NameSummary
destroy
fun destroy()
fun getAttributeIndex(name: String): Int
setAlbedoColor
fun setAlbedoColor(color: <Error class: unknown class>)
setAlbedoTexture
fun setAlbedoTexture(texture: SceneTexture?)
setAttribute
fun setAttribute(index: Int, v: Vector4)
fun setAttribute(index: Int, v: SceneTexture?)
fun setAttribute(name: String, v: Vector4)
fun setAttribute(name: String, v: SceneTexture?)
setBlendMode
fun setBlendMode(blendMode: BlendMode)
setColorWrite
fun setColorWrite(mask: Int)
setDepthTest
fun setDepthTest(depthTest: DepthTest)
setDepthWrite
fun setDepthWrite(depthWrite: DepthWrite)
setMetalRoughness
fun setMetalRoughness(roughness: Float)
setRepeat
fun setRepeat(scaleX: Float, scaleY: Float, offsetX: Float, offsetY: Float)
setRoughness
fun setRoughness(roughness: Float)
setRoughnessMetallicness
fun setRoughnessMetallicness(roughness: Float, metallicnesss: Float)
setSidedness
fun setSidedness(sidedness: MaterialSidedness)
setSortOrder
fun setSortOrder(sortOrder: SortOrder)
setStereoMode
fun setStereoMode(mode: StereoMode)
setTexture
fun setTexture(binding: String, texture: SceneTexture)
setUnlit
fun setUnlit(isUnlit: Boolean)

Companion

object Companion

Properties

NameSummary
HOLE_PUNCH_PANEL_SHADER
val HOLE_PUNCH_PANEL_SHADER: String
Shader similar to HOLE_PUNCH_SHADER but instead factors in the transparency of the base color (panel). This shader will likely need to be used if you have transparency in your panel so we don’t have to punch holes on the areas that are transparent. If you are setting this on your panel, you will likely need to use forceSceneTexture = true.
HOLE_PUNCH_SHADER
val HOLE_PUNCH_SHADER: String
Hole punch shader to indescriminately punch holes on the geometry. Hole punching is used to cut out space for layers to be rendered.
PHYSICALLY_BASED_SHADER
val PHYSICALLY_BASED_SHADER: String
Our default physically based renderer. This is complete with lighting and IBL. Has the highest graphical fidelity but is also the most compute intensive
TEXTURED_UNLIT_SHADER
val TEXTURED_UNLIT_SHADER: String
UNLIT_SHADER
val UNLIT_SHADER: String

Functions

NameSummary
custom
fun custom(shader: String, params: Array<SceneMaterialAttribute>): SceneMaterial
depthOnly
fun depthOnly(isPrePass: Boolean): SceneMaterial
passthrough
fun passthrough(): SceneMaterial
Did you find this page helpful?
Thumbs up icon
Thumbs down icon