> Yes. Any uniform needs to be handled by the driver. And any of them  
> takes cpu
> cycles to load. I think having lots of them is one factor that accounts  
> for
> the long draw times I see here. Looking at profiles the function  
> collecting
> them and putting it into a buffer for use in the gpu is always in the  
> top 5
> functions on the cpu where exactly this takes a lot of cpu time.
> So, just putting a lot of uniforms somewere because the maximum allowed  
> number
> is so far away is not a good idea.

Well, that wasn't quite the question. I know that having lots of uniforms is 
more expensive than not having lots of uniforms. But if I want to have 10 
different hues of rock - is it preferable to create 10 different rock textures 
and manage those, or is it better to have one rock texture and a uniform vec3 
for each?

Likewise, if I have to decide between running 5 different shaders or one shader 
taking two uniforms to configure its action - what is more efficient (leaving 
aside the fact that just having one is vastly more maintenance-friendly).

* Thorsten
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_123012
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to