If a lot of meshes use the same material,they will be rendered under the same render state to improve the performance.I mean that activatePass once,then renderpass one renderable after another.
However,I found at least 2 problem here.
1.For shadow mapper.although the depth map pass is almost always under the same state for all meshes,now they have to change the render state again and again because they belong to different materials.
2.For light picker.Even the same object,like 2 basketball,because they are in diffent place where there are diffent lighting,I have to give 2 materials not 1.
So if you have many objects with the same material,if they are movable,and you have diffent lights in different places,you have to give them each one by one material instance,which means they have to change render state when rendering.I mean maybe just the light color is diffent,the render state maybe do not need to change,but this design based on material makes it hard to control.
The Material design has some problems to improve the performanceSoftware: Away3D 4.x |
||
bxc, Newbie
Posted: 24 March 2014 12:45 PM Total Posts: 19 |
||
bxc, Newbie
Posted: 29 March 2014 03:18 AM Total Posts: 19 [ # 1 ] I have a simple solution.I think it will save lots of memory and time. |