Changing Fog colour in a Task

Hi all,

A fairly simple issue, but one that has been persistent regardless; I have a linear-fog object that I attach to the camera like this:

   linfog = Fog("fogNode")
   linfog.setColor(colz.x, colz.y, colz.z)
   linfog.setLinearRange(0, 300)

I’m testing changing the fog colour in a task this way:

def fogTaskTest(self,task):
    return task.cont

Now, while the values being printed out indicate that the fog is changing colour, the actual colour of the fog on the screen stays the same, or changes once before remaining the same. Is there more to changing the colour of a fog after it has been created, say within a task?

Thanks in advance.

That should do it, smells like a bug. Does it make a difference whether you have the auto-shader generator enabled or not?

This turned out to be trivial to fix.

Will be in 1.10.13.

1 Like

Yes, I had it on: render.setShaderAuto() to enable shadow casting, not turning it on did resolve the issue.