TGEA 1.0.3 - Sunlight color wrong on atlas
by Jeff Faust · in Torque Game Engine Advanced · 09/01/2007 (12:54 pm) · 2 replies
This concerns the newly released 1.0.3 version of TGEA.
You won't notice this with a nearly white sun, but with a colored sun, it looks like green and blue are being swapped when applied to Atlas. Use a pure green sun and you get greenish buildings and bluish terrain. Pure blue sun gives you bluish buildings and greenish terrain. Pure red and you get something that looks about right.
This problem has been verified on stock terrain_water_demo.
You won't notice this with a nearly white sun, but with a colored sun, it looks like green and blue are being swapped when applied to Atlas. Use a pure green sun and you get greenish buildings and bluish terrain. Pure blue sun gives you bluish buildings and greenish terrain. Pure red and you get something that looks about right.
This problem has been verified on stock terrain_water_demo.
About the author
Jeff Faust creates special effects indie middleware and games for Faust Logic. --- Blog: Effectronica.com --- Twitter: @FaustLogic
#2
Thanks for finding the problem and the solution. I'll get that checked in soon. I figures that all of the lights I tested (sun and static lights) were pretty much white. I'll have to remember to test different colors when I'm doing lighting work in the future.
Thanks again!
09/01/2007 (11:08 pm)
Hah, I suck! ;)Thanks for finding the problem and the solution. I'll get that checked in soon. I figures that all of the lights I tested (sun and static lights) were pretty much white. I'll have to remember to test different colors when I'm doing lighting work in the future.
Thanks again!
Associate Jeff Faust
Faust Logic, Inc.
In atlasSceneLightmap.cpp, the color arguments for method AtlasInstanceColorSource::getColor() are in RBG order. This is unusual and the calling code is providing args in the more common RGB order.
(It's also wrong in atlasSceneLightmap.h and should be changed there also, to avoid confusion.)