Volumetric Lighting Issue

Hi, I’ve recently been looking into the lighting and shading aspects of Panda to achieve higher quality renders. Today, I began experimenting with volumetric lighting, only to get this error message:

:gobj(error): Cg program too complex for driver: created-shader. Try choosing a different profile.

My graphics card is pretty powerful (ATI Radeon HD 4850) and supports OpenGL so I’m a bit confused as to why this is happening. I’ve seen others say that sometimes you need to add the following to the Config file, but doing this hasn’t alleviated the issue.

basic-shaders-only #f

Also, this is what the render looks like:

Here’s my code(shortened to save space):

import direct.directbase.DirectStart
from direct.interval.IntervalGlobal import *
from pandac.PandaModules import *
from direct.filter.CommonFilters import CommonFilters

...Setting up AntiAliasing...

...Loading models...

base.setBackgroundColor(0,0,0)
base.cam.setPos(0,-10,4.5)

light1 = PointLight("light1")
light1.setColor(VBase4(.1,.1,.1,1))
light1.setAttenuation(Point3(.1,0,.01))
l1np = render.attachNewNode(light1)
l1np.setPos(19.75, 19.75, 8)
render.setLight(l1np)

...More lights like the first one, plus an ambient light...

filters = CommonFilters(base.win, base.cam)
filters.setBloom()
filters.setVolumetricLighting(caster=l1np)

render.setShaderAuto()

run()

Any idea what the problem is or what it is that I’m missing?

Try setting these configuration variables:

basic-shaders-only #f
textures-auto-power-2 #t

Hmm, after doing that it still gives me the same error, but the red image is no longer smashed. It now fills the window with everything in proper proportions.

That’s very weird. Setting that configuration variable should fix that error, especially if your card is powerful.

Does reducing the amount of samples not help?

What do you mean by reducing the number of samples?

Setting the numsamples keyword parameter in the setVolumetricLighting sample. The default is 32.

Oh ok. No, that doesn’t seem to have any affect whatsoever on the render. The scene continues to look red and I get the same error message no matter what number of samples I use.

Hm… I’m suspecting that either the configuration variable wasn’t set/read properly, or your video card doesn’t support dynamic length loops.

Ok, hmm… Is there anyway to test for either of those?

Hm, I dunno. Maybe you can try querying the config value at runtime to make sure that it’s really set.

Alright, did that and it seems to be loading them properly (Had it print the current values of basic-shaders and textures-auto upon starting up). I guess it’s just my card. Thanks anyways rdb

I’ve the same graphic card, and the same problem… i’ve you found any solution ?
Thanks in advance

Me too.
Anybody can help
My video Card is AMD 4650

Isn’t this the ‘radeon curse’? Cg shaders are always compiled using the most basic profiles (arbfp1,arbvp1?) on ATI cards.
bugs.launchpad.net/panda3d/+bug/1154064

I don’t know !!! But it’s appear 3 year ago and it still doesn’t working now !!!

Fix will be in 1.8.2.