Wednesday 3 January 2007

Conspiracies I say!

Thats right, new year is a conspiracy in order for us to leave the comfort of our homes and go look at shiny things that like to go pop. I am ofcourse talking about firewoks. What happens in your home while you are gone is a completely different story. Little minions crawl out of the pores on your couch and re-arrange your pots of chocolate into a less decorated mess...

Aaaanyway, I finally found a solution to the RenderBin bug; Each Shape has a Material which inturn has many Passes. The problem was extracting the Pass and coupling it with the shape it represents. This eventually meant that a new Shape/Pass pairing had to be per pass per object per frame! The number of objects that were created was herrendous.

The solution was, as kindly donated by kevglass, was to get rid of Material and introduce the Passes straight into Shape. But, when introducting this, you create a Map.Entry that takes the shape and the pass you want to add. Then, the RenderBin can use these pairings to render. Near zero objection creation! Yay!

No comments: