- Home /
 
               Question by 
               Hyster · Jan 13, 2015 at 12:32 PM · 
                meshperformancecombinemany  
              
 
              Many meshes with different color performance
I want to create an application that allows user to load an image and makes 3d visualization of this image. The final effect will be like this: 
Currently I create a cube for each pixel in the image. Each mesh has it's own material, cause they have different colors. This causes very low performance. Is there a way to optimise it? Draw calls depends on the image loaded, in this case it's about 16k.
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by tanoshimi · Jan 13, 2015 at 12:33 PM
16,000 draw calls is crazy! Assign vertex colours to the vertices of each cube and then use a single material with a vertex-colour shader instead = 1 Draw Call.
Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                