Shader:sendImage

Sends a Texture to a Shader for writing. This is meant to be used with compute shaders and only works with uniforms declared as image2D, imageCube, image2DArray, and image3D. The normal Shader:send function accepts Textures and should be used most of the time.

Shader:sendImage(name, slice, mipmap, access)

Arguments

NameTypeDefaultDescription
namestringThe name of the image uniform.
slicenumbernilThe slice of a cube, array, or volume texture to use, or nil for all slices.
mipmapnumber1The mipmap of the texture to use.
accessUniformAccessreadwriteWhether the image will be read from, written to, or both.

Returns

Nothing


Shader:sendImage(name, index, slice, mipmap, access)

Arguments

NameTypeDefaultDescription
namestringThe name of the image uniform.
indexnumberThe array index to set.
slicenumbernilThe slice of a cube, array, or volume texture to use, or nil for all slices.
mipmapnumber1The mipmap of the texture to use.
accessUniformAccessreadwriteWhether the image will be read from, written to, or both.

Returns

Nothing

See also