On Monday 28 January 2013 08:02:14 Renk Thorsten wrote: > > Any > > additional uniform takes time to be set up in the driver. Any code that > > is in the shader and that cannot be optimized away at *link* time of the > > shader may > > take registers which affects the partitioning and the amount of paralell > > executed threads in the GPU. > > You mean to say a shader which isn't even compiled takes away performance? > (A non-functional shader doesn't throw a compile error unless it is > actually switched on in the GUI, so they don't seem to be compiled up-front > just in case).
No, I think what he meant is that (without me ever even seeing shader code) something like: if (enable_light_scattering) { a = b + c; } compromises performance, even if light_scattering is disabled because the compiler would assign registers to this code (the a = b + c), even though it will never be executed. These registers could be used to more efficiently execute the code that actually runs. Stefan
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------------ 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/learnnow-d2d
_______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel