ShaderAttrib

class ShaderAttrib

Bases: RenderAttrib

Inheritance diagram

digraph inheritanceae980c69b1 { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "ReferenceCount" [URL="acron.core.ReferenceCount.html#acron.core.ReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "ReferenceCount" [arrowsize=0.75,style=""]; "RenderAttrib" [URL="acron.core.RenderAttrib.html#acron.core.RenderAttrib",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedWritableReferenceCount" -> "RenderAttrib" [arrowsize=0.75,style=""]; "ShaderAttrib" [URL="acron.core.ShaderAttrib.html#acron.core.ShaderAttrib",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "RenderAttrib" -> "ShaderAttrib" [arrowsize=0.75,style=""]; "TypedObject" [URL="acron.core.TypedObject.html#acron.core.TypedObject",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "TypedObject" [arrowsize=0.75,style=""]; "TypedWritable" [URL="acron.core.TypedWritable.html#acron.core.TypedWritable",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedObject" -> "TypedWritable" [arrowsize=0.75,style=""]; "TypedWritableReferenceCount" [URL="acron.core.TypedWritableReferenceCount.html#acron.core.TypedWritableReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedWritable" -> "TypedWritableReferenceCount" [arrowsize=0.75,style=""]; "ReferenceCount" -> "TypedWritableReferenceCount" [arrowsize=0.75,style=""]; }
ShaderAttrib.auto_gloss_on()
ShaderAttrib.auto_glow_on()
ShaderAttrib.auto_normal_on()
ShaderAttrib.auto_ramp_on()
ShaderAttrib.auto_shader()

If true, then this ShaderAttrib does not contain an explicit shader - instead, it requests the automatic generation of a shader.

ShaderAttrib.auto_shadow_on()
ShaderAttrib.clear_all_shader_inputs()

Clears all the shader inputs on the attrib.

ShaderAttrib.clear_flag()
ShaderAttrib.clear_shader()
ShaderAttrib.clear_shader_input()
static ShaderAttrib.get_class_slot()
static ShaderAttrib.get_class_type()
ShaderAttrib.get_flag()
ShaderAttrib.get_instance_count()

Returns the number of geometry instances. A value of 0 means not to use instancing at all. This value is ignored if F_hardware_instancing is set.

ShaderAttrib.get_shader()

Returns the shader object associated with the node. If get_override returns true, but get_shader returns NULL, that means that this attribute should disable the shader.

ShaderAttrib.get_shader_input()

Returns the ShaderInput of the given name. If no such name is found, this function does not return NULL — it returns the “blank” ShaderInput.

Returns the ShaderInput of the given name. If no such name is found, this function does not return NULL — it returns the “blank” ShaderInput.

ShaderAttrib.get_shader_input_buffer()

Returns the ShaderInput as a ShaderBuffer. Assertion fails if there is none, or if it is not a ShaderBuffer.

ShaderAttrib.get_shader_input_matrix()

Returns the ShaderInput as a matrix. Assertion fails if there is none, or if it is not a matrix or NodePath.

ShaderAttrib.get_shader_input_nodepath()

Returns the ShaderInput as a nodepath. Assertion fails if there is none, or if it is not a nodepath.

ShaderAttrib.get_shader_input_ptr()

Returns the ShaderInput as a ShaderPtrData struct. Assertion fails if there is none. or if it is not a PTA(double/float)

Returns the ShaderInput as a ShaderPtrData struct. Assertion fails if there is none. or if it is not a PTA(double/float)

ShaderAttrib.get_shader_input_texture()

Returns the ShaderInput as a texture. Assertion fails if there is none, or if it is not a texture.

If sampler is not NULL, the sampler state to use for this texture is assigned to it.

ShaderAttrib.get_shader_input_vector()

Returns the ShaderInput as a vector. Assertion fails if there is none, or if it is not a vector.

ShaderAttrib.get_shader_priority()
ShaderAttrib.has_shader()

If true, the shader field of this attribute overrides the shader field of the parent attribute.

ShaderAttrib.has_shader_input()

Returns true if there is a ShaderInput of the given name.

static ShaderAttrib.make()

Constructs a new ShaderAttrib object with nothing set.

static ShaderAttrib.make_default()

Returns a RenderAttrib that corresponds to whatever the standard default properties for render attributes of this type ought to be.

static ShaderAttrib.make_off()

Constructs a new ShaderAttrib object that disables the use of shaders (it does not clear out all shader data, however.)

static ShaderAttrib.register_with_read_factory()

Factory method to generate a Shader object

ShaderAttrib.set_flag()
ShaderAttrib.set_instance_count()

Sets the geometry instance count. Do not confuse this with instanceTo, which is used for animation instancing, and has nothing to do with this. A value of 0 means not to use instancing at all.

This value should not be set if F_hardware_instancing is also set.

ShaderAttrib.set_shader()
ShaderAttrib.set_shader_auto()

Set auto shader with bitmask to customize use, e.g., to keep normal, glow, etc., on or off

ShaderAttrib.set_shader_input()

Shader Inputs

ShaderAttrib.set_shader_inputs()

Returns a new ShaderAttrib with the given shader inputs set. This is a more efficient way to set multiple shader inputs than calling set_shader_input multiple times.

ShaderAttrib.set_shader_off()