ShaderAttrib¶
-
class ShaderAttrib¶
Bases:
RenderAttribInheritance 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
ShaderAttribdoes 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
ShaderInputof the given name. If no such name is found, this function does not return NULL — it returns the “blank”ShaderInput.Returns the
ShaderInputof 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
ShaderInputas aShaderBuffer. Assertion fails if there is none, or if it is not aShaderBuffer.
- ShaderAttrib.get_shader_input_matrix()¶
Returns the
ShaderInputas a matrix. Assertion fails if there is none, or if it is not a matrix orNodePath.
- ShaderAttrib.get_shader_input_nodepath()¶
Returns the
ShaderInputas a nodepath. Assertion fails if there is none, or if it is not a nodepath.
- ShaderAttrib.get_shader_input_ptr()¶
Returns the
ShaderInputas a ShaderPtrData struct. Assertion fails if there is none. or if it is not a PTA(double/float)Returns the
ShaderInputas 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
ShaderInputas 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
ShaderInputas 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
ShaderInputof the given name.
- static ShaderAttrib.make()¶
Constructs a new
ShaderAttribobject with nothing set.
- static ShaderAttrib.make_default()¶
Returns a
RenderAttribthat corresponds to whatever the standard default properties for render attributes of this type ought to be.
- static ShaderAttrib.make_off()¶
Constructs a new
ShaderAttribobject 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
ShaderAttribwith the given shader inputs set. This is a more efficient way to set multiple shader inputs than callingset_shader_inputmultiple times.
- ShaderAttrib.set_shader_off()¶