LightLensNode
from panda3d.core import LightLensNode
- class LightLensNode
Bases:
A derivative of Light and of Camera. The name might be misleading: it does not directly derive from
LensNode
, but through the Camera class. The Camera serves no purpose unless shadows are enabled.Inheritance diagram
- static get_class_type() TypeHandle
- get_shadow_buffer(gsg: GraphicsStateGuardianBase) GraphicsOutputBase
Returns the buffer that has been constructed for a given GSG, or NULL if no such buffer has (yet) been constructed. This should be used for debugging only, you will not need to call this normally.
- get_shadow_buffer_size() LVecBase2i
Returns the size of the shadow buffer to be created for this light source.
- get_shadow_buffer_sort() int
Returns the sort of the shadow buffer to be created for this light source.
- has_specular_color() bool
Returns true if this light defines a specular color, false if the specular color is derived automatically from the light color.
- output(out: ostream)
We have to explicitly publish these because they resolve the multiple inheritance.
- set_shadow_buffer_size(size: LVecBase2i)
Sets the size of the shadow buffer to be created for this light source.
- set_shadow_caster(caster: bool)
Sets the flag indicating whether this light should cast shadows or not. This is the variant without buffer size, meaning that the current buffer size will be kept (512x512 is the default). Note that enabling shadows will require the shader generator to be enabled on the scene.
- set_shadow_caster(caster: bool, buffer_xsize: int, buffer_ysize: int, sort: int)
Sets the flag indicating whether this light should cast shadows or not. The xsize and ysize parameters specify the size of the shadow buffer that will be set up, the sort parameter specifies the sort. Note that enabling shadows will require the shader generator to be enabled on the scene.
- property shadow_buffer_size LVecBase2i
Returns/Sets the size of the shadow buffer to be created for this light source.