HLMS: crash on Met when ambient light is used with no lights

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


Post Reply
wraitii
Gnoblar
Posts: 20
Joined: Thu Mar 27, 2008 7:12 pm

HLMS: crash on Met when ambient light is used with no lights

Post by wraitii »

This is a rather specific bug that's unlikely to ever trigger in actual production code, but I ran into it while trying to set up Ogre v2.1 on OSX using metal.

As said in the title, using ambient light when there is no lights will not work on Ogre 2.1 - using the default lit HLMS - using Metal (and possibly otherwise…)

Most easily reproducible by calling

Code: Select all

sceneManager->setAmbientLight(Ogre::ColourValue(1.0,1.0,1.0), Ogre::ColourValue(0.0,0.0,0.0), Ogre::Vector3(0.0,1.0,0.0));
anywhere in the sample 2 (which has no light).

Metal bails out on a shader compilation error because viewDir is not defined - I suspect some conditionals have been forgotten somewhere but at this point I don't know the end-engine well enough to be sure.
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5296
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1278
Contact:

Re: HLMS: crash on Met when ambient light is used with no li

Post by dark_sylinc »

This bug affected all platforms. Fixed.

Thanks for the report!
Post Reply