ShaderAttrib

from panda3d.core import ShaderAttrib
class ShaderAttrib

Bases: RenderAttrib

Inheritance diagram

Inheritance diagram of ShaderAttrib

F_disable_alpha_write = 1
F_hardware_instancing = 16
F_hardware_skinning = 4
F_shader_point_size = 8
F_subsume_alpha_test = 2
__init__(*args, **kwargs)
autoGlossOn()

C++ Interface: auto_gloss_on(ShaderAttrib self)

/**

*/

autoGlowOn()

C++ Interface: auto_glow_on(ShaderAttrib self)

/**

*/

autoNormalOn()

C++ Interface: auto_normal_on(ShaderAttrib self)

autoRampOn()

C++ Interface: auto_ramp_on(ShaderAttrib self)

/**

*/

autoShader()

C++ Interface: auto_shader(ShaderAttrib self)

/**
  • If true, then this ShaderAttrib does not contain an explicit shader -

  • instead, it requests the automatic generation of a shader.

*/

autoShadowOn()

C++ Interface: auto_shadow_on(ShaderAttrib self)

/**

*/

auto_gloss_on()

C++ Interface: auto_gloss_on(ShaderAttrib self)

/**

*/

auto_glow_on()

C++ Interface: auto_glow_on(ShaderAttrib self)

/**

*/

auto_normal_on()

C++ Interface: auto_normal_on(ShaderAttrib self)

auto_ramp_on()

C++ Interface: auto_ramp_on(ShaderAttrib self)

/**

*/

auto_shader()

C++ Interface: auto_shader(ShaderAttrib self)

/**
  • If true, then this ShaderAttrib does not contain an explicit shader -

  • instead, it requests the automatic generation of a shader.

*/

auto_shadow_on()

C++ Interface: auto_shadow_on(ShaderAttrib self)

/**

*/

class_slot = 25
clearAllShaderInputs()

C++ Interface: clear_all_shader_inputs(ShaderAttrib self)

/**
  • Clears all the shader inputs on the attrib.

*/

clearFlag()

C++ Interface: clear_flag(ShaderAttrib self, int flag)

/**

*/

clearShader()

C++ Interface: clear_shader(ShaderAttrib self)

/**

*/

clearShaderInput()

C++ Interface: clear_shader_input(ShaderAttrib self, const InternalName id) clear_shader_input(ShaderAttrib self, str id)

/**

*/

/**

*/

clear_all_shader_inputs()

C++ Interface: clear_all_shader_inputs(ShaderAttrib self)

/**
  • Clears all the shader inputs on the attrib.

*/

clear_flag()

C++ Interface: clear_flag(ShaderAttrib self, int flag)

/**

*/

clear_shader()

C++ Interface: clear_shader(ShaderAttrib self)

/**

*/

clear_shader_input()

C++ Interface: clear_shader_input(ShaderAttrib self, const InternalName id) clear_shader_input(ShaderAttrib self, str id)

/**

*/

/**

*/

getClassSlot()

C++ Interface: get_class_slot()

getClassType()

C++ Interface: get_class_type()

getFlag()

C++ Interface: get_flag(ShaderAttrib self, int flag)

/**

*/

getInstanceCount()

C++ Interface: get_instance_count(ShaderAttrib self)

/**
  • 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.

*/

getShader()

C++ Interface: get_shader(ShaderAttrib self)

/**
  • 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.

*/

getShaderInput()

C++ Interface: get_shader_input(ShaderAttrib self, const InternalName id) get_shader_input(ShaderAttrib self, str id)

/**
  • 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.

*/

getShaderInputBuffer()

C++ Interface: get_shader_input_buffer(ShaderAttrib self, const InternalName id)

/**
  • Returns the ShaderInput as a ShaderBuffer. Assertion fails if there is

  • none, or if it is not a ShaderBuffer.

*/

getShaderInputMatrix()

C++ Interface: get_shader_input_matrix(ShaderAttrib self, const InternalName id, LMatrix4f matrix)

/**
  • Returns the ShaderInput as a matrix. Assertion fails if there is none, or

  • if it is not a matrix or NodePath.

*/

getShaderInputNodepath()

C++ Interface: get_shader_input_nodepath(ShaderAttrib self, const InternalName id)

/**
  • Returns the ShaderInput as a nodepath. Assertion fails if there is none,

  • or if it is not a nodepath.

*/

getShaderInputTexture()

C++ Interface: get_shader_input_texture(ShaderAttrib self, const InternalName id, SamplerState sampler)

/**
  • 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.

*/

getShaderInputVector()

C++ Interface: get_shader_input_vector(ShaderAttrib self, InternalName id)

/**
  • Returns the ShaderInput as a vector. Assertion fails if there is none, or

  • if it is not a vector.

*/

getShaderPriority()

C++ Interface: get_shader_priority(ShaderAttrib self)

/**

*/

get_class_slot()

C++ Interface: get_class_slot()

get_class_type()

C++ Interface: get_class_type()

get_flag()

C++ Interface: get_flag(ShaderAttrib self, int flag)

/**

*/

get_instance_count()

C++ Interface: get_instance_count(ShaderAttrib self)

/**
  • 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.

*/

get_shader()

C++ Interface: get_shader(ShaderAttrib self)

/**
  • 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.

*/

get_shader_input()

C++ Interface: get_shader_input(ShaderAttrib self, const InternalName id) get_shader_input(ShaderAttrib self, str id)

/**
  • 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.

*/

get_shader_input_buffer()

C++ Interface: get_shader_input_buffer(ShaderAttrib self, const InternalName id)

/**
  • Returns the ShaderInput as a ShaderBuffer. Assertion fails if there is

  • none, or if it is not a ShaderBuffer.

*/

get_shader_input_matrix()

C++ Interface: get_shader_input_matrix(ShaderAttrib self, const InternalName id, LMatrix4f matrix)

/**
  • Returns the ShaderInput as a matrix. Assertion fails if there is none, or

  • if it is not a matrix or NodePath.

*/

get_shader_input_nodepath()

C++ Interface: get_shader_input_nodepath(ShaderAttrib self, const InternalName id)

/**
  • Returns the ShaderInput as a nodepath. Assertion fails if there is none,

  • or if it is not a nodepath.

*/

get_shader_input_texture()

C++ Interface: get_shader_input_texture(ShaderAttrib self, const InternalName id, SamplerState sampler)

/**
  • 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.

*/

get_shader_input_vector()

C++ Interface: get_shader_input_vector(ShaderAttrib self, InternalName id)

/**
  • Returns the ShaderInput as a vector. Assertion fails if there is none, or

  • if it is not a vector.

*/

get_shader_priority()

C++ Interface: get_shader_priority(ShaderAttrib self)

/**

*/

hasShader()

C++ Interface: has_shader(ShaderAttrib self)

/**
  • If true, the shader field of this attribute overrides the shader field of

  • the parent attribute.

*/

hasShaderInput()

C++ Interface: has_shader_input(ShaderAttrib self, const InternalName id)

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

*/

has_shader()

C++ Interface: has_shader(ShaderAttrib self)

/**
  • If true, the shader field of this attribute overrides the shader field of

  • the parent attribute.

*/

has_shader_input()

C++ Interface: has_shader_input(ShaderAttrib self, const InternalName id)

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

*/

instance_count
make()

C++ Interface: make(const Shader shader, int priority)

/**
  • Constructs a new ShaderAttrib object with nothing set.

*/

makeDefault()

C++ Interface: make_default()

/**
  • Returns a RenderAttrib that corresponds to whatever the standard default

  • properties for render attributes of this type ought to be.

*/

makeOff()

C++ Interface: make_off()

/**
  • Constructs a new ShaderAttrib object that disables the use of shaders (it

  • does not clear out all shader data, however.)

*/

make_default()

C++ Interface: make_default()

/**
  • Returns a RenderAttrib that corresponds to whatever the standard default

  • properties for render attributes of this type ought to be.

*/

make_off()

C++ Interface: make_off()

/**
  • Constructs a new ShaderAttrib object that disables the use of shaders (it

  • does not clear out all shader data, however.)

*/

registerWithReadFactory()

C++ Interface: register_with_read_factory()

/**
  • Factory method to generate a Shader object

*/

register_with_read_factory()

C++ Interface: register_with_read_factory()

/**
  • Factory method to generate a Shader object

*/

setFlag()

C++ Interface: set_flag(ShaderAttrib self, int flag, bool value)

/**

*/

setInstanceCount()

C++ Interface: set_instance_count(ShaderAttrib self, int 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.

*/

setShader()

C++ Interface: set_shader(ShaderAttrib self, const Shader s, int priority)

/**

*/

setShaderAuto()

C++ Interface: set_shader_auto(ShaderAttrib self) set_shader_auto(ShaderAttrib self, BitMask shader_switch, int priority) set_shader_auto(ShaderAttrib self, int priority)

/**

*/

/**
  • Set auto shader with bitmask to customize use, e.g., to keep normal, glow,

  • etc., on or off

*/

setShaderInput()

C++ Interface: set_shader_input(ShaderAttrib self, const ShaderInput input) set_shader_input(ShaderAttrib self, const InternalName param0, object param1, int priority)

// Shader Inputs

/**

*/

/**

*/

/**

*/

/**

*/

/**

*/

/**

*/

/**

*/

/**

*/

/**

*/

/**

*/

/**

*/

/**

*/

/**

*/

/**

*/

/**

*/

/**

*/

/**

*/

setShaderInputs()

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.

setShaderOff()

C++ Interface: set_shader_off(ShaderAttrib self, int priority)

/**

*/

set_flag()

C++ Interface: set_flag(ShaderAttrib self, int flag, bool value)

/**

*/

set_instance_count()

C++ Interface: set_instance_count(ShaderAttrib self, int 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.

*/

set_shader()

C++ Interface: set_shader(ShaderAttrib self, const Shader s, int priority)

/**

*/

set_shader_auto()

C++ Interface: set_shader_auto(ShaderAttrib self) set_shader_auto(ShaderAttrib self, BitMask shader_switch, int priority) set_shader_auto(ShaderAttrib self, int priority)

/**

*/

/**
  • Set auto shader with bitmask to customize use, e.g., to keep normal, glow,

  • etc., on or off

*/

set_shader_input()

C++ Interface: set_shader_input(ShaderAttrib self, const ShaderInput input) set_shader_input(ShaderAttrib self, const InternalName param0, object param1, int priority)

// Shader Inputs

/**

*/

/**

*/

/**

*/

/**

*/

/**

*/

/**

*/

/**

*/

/**

*/

/**

*/

/**

*/

/**

*/

/**

*/

/**

*/

/**

*/

/**

*/

/**

*/

/**

*/

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.

set_shader_off()

C++ Interface: set_shader_off(ShaderAttrib self, int priority)

/**

*/

shader