## Material.Shaders

### Description

Returns a ShaderCollection containing all shaders directly attached to the material.
Note: This property returns only those shaders which are directly attached to the material, not all shaders attached to the entire render tree.

### C# Syntax

    // get accessor

    ShaderCollection rtn = Material.Shaders;

### Examples

#### VBScript Example

    '

    ' This example illustrates how to enumerate all parameters under a material and

    ' any connected shaders.

    '

    if Selection.Count <> 0 then

    	set oObject = Selection(0)

    else

    	set oRoot = Application.ActiveProject.ActiveScene.Root

    	set oObject = oRoot.AddGeometry("Cylinder", "MeshSurface")

    	ApplyShader "Material\Constant", oObject

    end if

    set oMaterial = oObject.Material

    ' Log material parameters

    Application.LogMessage "Material: " & oMaterial.FullName

    For each oParam in oMaterial.Parameters

    	Application.LogMessage oParam.FullName

    Next

    ' Log shader parameters

    For each oShader in oMaterial.Shaders

    	Application.LogMessage "Shader: " & oShader.FullName

    	For each oParam in oShader.Parameters

    		Application.LogMessage oParam.FullName

    	Next

    Next