Shader:hasBlock

Returns whether a Shader has a block.

A block is added to the Shader code at creation time using ShaderBlock:getShaderCode. The block name (not the namespace) is used to link up the ShaderBlock object to the Shader. This function can be used to check if a Shader was created with a block using the given name.

present = Shader:hasBlock(block)

Arguments

NameTypeDescription
blockstringThe name of the block.

Returns

NameTypeDescription
presentbooleanWhether the shader has the specified block.

See also