PbrShaderData

@Serializable
data class PbrShaderData(val baseColor: MaterialAttribute = ConstColorAttribute(ColorData(MdColor.GREY toneLin 500)), val roughness: MaterialAttribute = ConstValueAttribute(0.5f), val metallic: MaterialAttribute = ConstValueAttribute(0f), val emission: MaterialAttribute = ConstColorAttribute(ColorData(Color.BLACK.toLinear())), val normalMap: MapAttribute? = null, val aoMap: MapAttribute? = null, val displacementMap: MapAttribute? = null, val parallaxStrength: Float = 1.0f, val parallaxOffset: Float = 0.0f, val parallaxSteps: Int = 16, val genericSettings: GenericMaterialSettings = GenericMaterialSettings()) : MaterialShaderData

Constructors

Link copied to clipboard
constructor(baseColor: MaterialAttribute = ConstColorAttribute(ColorData(MdColor.GREY toneLin 500)), roughness: MaterialAttribute = ConstValueAttribute(0.5f), metallic: MaterialAttribute = ConstValueAttribute(0f), emission: MaterialAttribute = ConstColorAttribute(ColorData(Color.BLACK.toLinear())), normalMap: MapAttribute? = null, aoMap: MapAttribute? = null, displacementMap: MapAttribute? = null, parallaxStrength: Float = 1.0f, parallaxOffset: Float = 0.0f, parallaxSteps: Int = 16, genericSettings: GenericMaterialSettings = GenericMaterialSettings())

Properties

Link copied to clipboard
val aoMap: MapAttribute? = null
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val normalMap: MapAttribute? = null
Link copied to clipboard
val parallaxOffset: Float = 0.0f
Link copied to clipboard
val parallaxSteps: Int = 16
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
open fun copy(genericSettings: GenericMaterialSettings = this.genericSettings): MaterialShaderData
Link copied to clipboard
suspend fun PbrShaderData.createPbrShader(meshLayoutInfo: MeshLayoutInfo, modelMats: List<ModelMatrixComposition>, sceneShaderData: SceneShaderData): KslPbrShader
Link copied to clipboard
suspend fun MaterialShaderData.createShader(meshLayoutInfo: MeshLayoutInfo, modelMats: List<ModelMatrixComposition>, sceneShaderData: SceneShaderData): DrawShader
Link copied to clipboard
fun PbrShaderData.matchesPbrShaderConfig(shader: DrawShader?): Boolean
Link copied to clipboard
fun MaterialShaderData.matchesShader(shader: DrawShader?): Boolean
Link copied to clipboard
suspend fun PbrShaderData.updatePbrShader(shader: KslPbrShader, sceneShaderData: SceneShaderData): Boolean
Link copied to clipboard
suspend fun MaterialShaderData.updateShader(shader: DrawShader?, sceneShaderData: SceneShaderData): Boolean