ComputeStyle

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val buffers: MutableMap<String, String>
Link copied to clipboard
open override val bufferTypes: MutableMap<String, String>
Link copied to clipboard
open override var bufferValues: MutableMap<String, Any>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val imageArrayLength: MutableMap<String, Int>
Link copied to clipboard
open override val imageBindings: MutableMap<String, Int>
Link copied to clipboard
open override val imageFlags: MutableMap<String, Set<ImageFlag>>
Link copied to clipboard
open override val imageTypes: MutableMap<String, String>
Link copied to clipboard
open override val imageValues: MutableMap<String, Array<out ImageBinding>>
Link copied to clipboard

The GLSL libraries the code of this compute style uses, their code is emitted before the preamble when it reads their names

Link copied to clipboard
Link copied to clipboard
open override var parameterValues: MutableMap<String, Any>
Link copied to clipboard
open override var textureBaseIndex: Int
Link copied to clipboard

The size of the compute work group

Functions

Link copied to clipboard
open fun buffer(name: String, buffer: AtomicCounterBuffer)
@JvmName(name = "bufferCommand")
open fun buffer(name: String, buffer: CommandBuffer<Command>)
@JvmName(name = "bufferIndexedCommand")
open fun buffer(name: String, buffer: CommandBuffer<IndexedCommand>)
open fun buffer(name: String, buffer: IndexBuffer)
open fun buffer(name: String, buffer: ShaderStorageBuffer)
Link copied to clipboard
fun ComputeStyle.execute(width: Int = 1, height: Int = 1, depth: Int = 1)
Link copied to clipboard
open fun image(name: String, values: Array<out ImageBinding>)
open fun image(name: String, value: ImageBinding)
open fun image(name: String, arrayTextures: Array<ArrayTexture>, levels: Array<Int> = Array(arrayTextures.size) { 0 })
open fun image(name: String, colorBuffers: Array<ColorBuffer>, levels: Array<Int> = Array(colorBuffers.size) { 0 })
open fun image(name: String, cubemaps: Array<Cubemap>, levels: Array<Int> = Array(cubemaps.size) { 0 })
open fun image(name: String, volumeTextures: Array<VolumeTexture>, levels: Array<Int> = Array(volumeTextures.size) { 0 })
open fun image(name: String, arrayTexture: ArrayTexture, level: Int = 0)
open fun image(name: String, colorBuffer: ColorBuffer, level: Int = 0)
open fun image(name: String, cubemap: Cubemap, level: Int = 0)
open fun image(name: String, volumeTexture: VolumeTexture, level: Int = 0)

open fun image(name: String, arrayCubemap: ArrayCubemap, level: Int = 0)

Binds an ArrayCubemap as an image to be used in computations such as shaders. Validates the presence of an existing image binding with the specified name and configures the binding using the given ArrayCubemap and mipmap level.

Link copied to clipboard
Link copied to clipboard
open fun <R : Any> Parameter(customName: String? = null, initialValue: R? = null): Parameter<R>

Creates a Parameter property with the specified constraints and associates it with a custom name or the property name.

Link copied to clipboard
open fun parameter(name: String, value: Array<ColorRGBa>)
open fun parameter(name: String, value: Array<Matrix33>)
open fun parameter(name: String, value: Array<Matrix44>)
open fun parameter(name: String, value: Array<Vector2>)
open fun parameter(name: String, value: Array<Vector3>)
open fun parameter(name: String, value: Array<Vector4>)
open fun parameter(name: String, value: Boolean)
open fun parameter(name: String, value: Double)
open fun parameter(name: String, value: DoubleArray)
open fun parameter(name: String, value: Float)
open fun parameter(name: String, value: Int)
open fun parameter(name: String, value: IntArray)
open fun parameter(name: String, value: ColorRGBa)
open fun parameter(name: String, value: ArrayCubemap)
open fun parameter(name: String, value: ArrayTexture)
open fun parameter(name: String, value: BufferTexture)
open fun parameter(name: String, value: ColorBuffer)
open fun parameter(name: String, value: Cubemap)
open fun parameter(name: String, value: DepthBuffer)
open fun parameter(name: String, value: VolumeTexture)
open fun parameter(name: String, value: BooleanVector2)
open fun parameter(name: String, value: BooleanVector3)
open fun parameter(name: String, value: BooleanVector4)
open fun parameter(name: String, value: IntVector2)
open fun parameter(name: String, value: IntVector3)
open fun parameter(name: String, value: IntVector4)
open fun parameter(name: String, value: Matrix33)
open fun parameter(name: String, value: Matrix44)
open fun parameter(name: String, value: Vector2)
open fun parameter(name: String, value: Vector3)
open fun parameter(name: String, value: Vector4)

open fun parameter(name: String, value: DynamicParameter)

Sets name to a parameter that is resolved in the shader, read from a texture or computed by GLSL code

open fun parameter(name: String, value: DynamicParameterSource)

Sets name to the dynamic parameter that value provides, it is read from value when the style is used

Link copied to clipboard
inline fun <T : Struct<T>> StyleParameters.parameter(name: String, value: T)
inline fun <T : Struct<T>> StyleParameters.parameter(name: String, value: Array<T>)
Link copied to clipboard
open fun StyleImageBindings.registerImageBinding(name: String, access: ImageAccess = ImageAccess.READ_WRITE, flags: Set<ImageFlag>, arrayLength: Int = -1)
Link copied to clipboard
inline fun <T : Struct<T>> StyleBufferBindings.registerStructuredBuffer(name: String, access: BufferAccess = BufferAccess.READ_WRITE, flags: Set<BufferFlag> = emptySet())
Link copied to clipboard

This compute style with its dynamic parameters and libraries resolved: the compute style itself when it has none, otherwise a compute style that reads them through resolver functions and has the code of the libraries it uses in its preamble. Compute style managers use it to make compute shaders.

Link copied to clipboard