Broken light in software mode

Started by zammbi, September 26, 2010, 06:51:17 AM

Previous topic - Next topic

zammbi

So I was trying out my new obj cave model but when I loaded the textures, things really got messy. But when I used hardware mode everything was fine again. Bug? solutions?

Software mode:


Hardware mode:



EgonOlsen

Are these polygons just black or are they missing at all? Any unusual log messages?

zammbi

Just black. I seem to found the issue. It only happens when I turn on mipmapping.
No unusual messages that I can see.

I could send over the model if that helps you solve it.

EgonOlsen

Yes, models and textures please. Seems to be a problem in software renderer's mipmap generation or calculation code then.

EgonOlsen


zammbi

Sorry I been busy, been meaning too. I'll upload it after work today.

zammbi

Sorry for the delay. Have too much to do lately.

Here's the files.
http://www.mediafire.com/?damm6rkqlatqp2m

EgonOlsen

Can't access it, it's set to private... :(

zammbi


EgonOlsen

#9
The download works fine now. However, i can't verify the problem. Everything works as expected in my tests. But it may be caused by the size of those textures. They are 2048*2048. which is huge. Creating mip maps for these beats requires some memory, because it creates a new image from the pixel data (which is 16mb for one texture alone), i.e. 16 mb pixel data + 16mb image + the scaled instances and the pixel data of those leads to some serious memory usage. Maybe it's running into an OutOfMemory-Exception that somehow gets swallowed by your code leaving the generated mip maps in some in-between state.

BTW: 2048*2048 is pretty huge anyway. It will cause bad performance of the software renderer due to cache misses and it's not cheap on slower hardware either. Consider using a reduced version of the textures.