from direct.showbase.ShadowDemo import ShadowCaster, arbitraryShadow, avatarShadow, piratesAvatarShadow
Create a cheesy shadow effect by rendering the view of an object (e.g. the local avatar) from a special camera as seen from above (as if from the sun), using a solid gray foreground and a solid white background, and then multitexturing that view onto the world.
This is meant primarily as a demonstration of multipass and multitexture rendering techniques. It’s not a particularly great way to do shadows.
- class ShadowCaster(lightPath, objectPath, filmX, filmY)
- __init__(self, lightPath, objectPath, filmX, filmY)
Undoes the effect of the ShadowCaster.
- setGround(self, groundPath)
Specifies the part of the world that is to be considered the ground: this is the part onto which the rendered texture will be applied.
- texXSize = 128
- texYSize = 128