luismrsilva / cg-micromachines

3D version of the first MicroMachines game, made for the Computer Graphics course (2015/2016) at IST, CS BSc
1 stars 0 forks source link

Objects appear with strange colors #54

Closed luismrsilva closed 8 years ago

luismrsilva commented 8 years ago

Still present in d6d2489d9b7fbfd51390e6adbeebb653027d1d6e. Started when enabling textures in 357111e78d2349288d7af5254c071f3b412d91e6.

It may only happen with untextured objects.

Check how the materials are being applied to affected and not affected objects. This might have something to do with using Material::setColor() vs Material::draw(), but I did not check.

The car uses Material::draw() and appears fine. Oranges and Butters, for instance, only use Material::setColor() are affected.

luismrsilva commented 8 years ago

Got it: Material::_emission is not being initializated, so it gets random values. My bad (9955d7387fd35d0ad494bb5d6c23162aea956173). face palm