All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.dsl.functions.Sampler2DArrayFunctions.kt Maven / Gradle / Ivy

The newest version!
package org.openrndr.orsl.shadergenerator.dsl.functions

import org.openrndr.orsl.shadergenerator.dsl.*
import org.openrndr.orsl.shadergenerator.dsl.Generator
import org.openrndr.math.*
import kotlin.jvm.JvmName

@Suppress("INAPPLICABLE_JVM_NAME")
interface Sampler2DArrayFunctions : Generator {

    @JvmName("getSs2aSv3")
    operator fun Symbol.get(uvw: Symbol): Symbol =
        functionSymbol(this, uvw, "texture($0, $1)")

    @JvmName("getSs2aSv3Sd")
    operator fun Symbol.get(uvw: Symbol, lod: Symbol): Symbol =
        Function3Symbol(p0 = this, p1 = uvw, p2 = lod, function = "textureLod($0, $1, $2)", type = "vec4")

    @JvmName("sizeSs2aVi")
    fun Symbol.size(level: Int = 0): Symbol =
        functionSymbol(this, level, "textureSize($0, $1)")

    @JvmName("fetchSs2aSv3Vi")
    fun Symbol.fetch(uvw: Symbol, lod: Int): Symbol =
        Function3Symbol(p0 = this, p1 = uvw, v2 = lod, function = "texelFetch($0, $1, $2)", type = "vec4")
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy