SinglePass technique not supporting Ambient and Spot light? [fixed]

I was modifying my material definition for my bloom filter and I got a crash saying:

[java]java.lang.UnsupportedOperationException: Unknown type of light: Ambient[/java]

I’m wondering if that’s by design. Is it an omission or those two types of light are not supported, or are they not supported yet? If they are not and won’t be, would it be possible to have something like:



case Spot:

case Ambient:

throw new UnsupportedOperationException("Unsupported type of light: " + l.getType());



throw new UnsupportedOperationException("Unknown type of light: " + l.getType());



or if they will eventually, maybe say "Not supported yet: "

It would help understand why there’s a crash. :slight_smile:

uh…where is that code you’re quoting? Ambient lights are supported.

And…why would you have to modify the material definition for the bloom filter?

It’s from

[java]java.lang.UnsupportedOperationException: Unknown type of light: Ambient

at com.jme3.material.Material.updateLightListUniforms(

at com.jme3.material.Material.render(



As for the second question, since the BloomFilter wiki you linked mentions SinglePass but Lighting.j3md doesn’t have it, I copied it and added that to it then renamed it. That’s how I got the error.

BTW, I’m getting some results, but don’t like the look of it yet. :wink:

Should be fixed now


Thanks for the fix.