ComputeShader.SetTexture

function SetTexture (kernelIndex : int, name : String, texture : Texture) : void

Description

Set a texture parameter.

This function can either set a regular texture that is read in the compute shader, or an output texture that is written into by the shader. For an output texture, it has to be a RenderTexture with random write flag enabled, see RenderTexture.enableRandomWrite.

See Also: FindKernel, RenderTexture.enableRandomWrite.