I'm trying to get a volumetric lighting effect to work with the following code:
- Code: Select all
from direct.directbase.DirectStart import *
from direct.filter.CommonFilters import CommonFilters
base.setBackgroundColor(0, 0, 0)
self.sun2 = loader.loadModel("models/sphere")
self.filters = None
self.filters = CommonFilters(base.win, base.cam)
self.sun = loader.loadModel("models/sphere")
def timer(self, task):
World = World()
And the result I'm willing to achieve is the one on the left of this pic. The one I'm getting is the right.
This code was taken from Demomaster's sun example. When ran via the demomaster's environment, the result is the one I want (left), and when run as a standalone panda script, I get the right result.
Anyone have any idea on how to fix this?