What might work is detecting if the final derived mesh has any users outside the draw code, and if it does not then it may be possible to use some sort of shader and do the calculation there. If it does, then we will be needing the full result anyway, so we can just upload that and skip the vertex shader cost. Some modifiers, such as the array modifier can also benefit from similar code (+ instancing) but they also need a way to detect cornercases (such as the object used as a duplicated mesh for instance).
I must say though, I am not sure if using vertex shaders is the best way to go, because it makes material shaders depend on modifiers which means more shader bind calls plus materials would need a more elaborate shader storing scheme for every material/modifier combination. Maybe the way OpenSubdiv handles this can be generalized, but we'll see if that's possible when/if we have full support in the future. Probably the depsgraph might support these kinds of queries, though Sergey, Lukas or Joshua would know best. The DAG should also be used to detect what mesh data need to be reuploaded to the GPU due to some underlying mesh change as well. Currently though, I'm still porting all mesh code to use vertex buffer objects properly and haven't checked the depsgraph at all. On 2 August 2015 at 19:07, joe <joe...@gmail.com> wrote: > Who's doing the viewport optimization work? I have some experience here. > The key thing is to limit OpenGL commands, and also the data sent per-frame > to the GPU. It might also be a good idea to move the simpler deform > modifiers into vertex shaders (and make sure to use a node system--it's > actually easier to use a DAG system than to try and code all the edge cases > by hand). > > > > On Sun, Aug 2, 2015 at 9:16 AM, Ton Roosendaal <t...@blender.org> wrote: > >> Hi all, >> >> Here are the notes from today's meeting in irc.freenode.net >> #blendercoders. >> >> 1) Upcoming 2.76 release >> >> - OpenSubdiv: an essential fix was made by the Pixar team, we we can move >> on. (3.0.1 will be out soon). >> Unfortunately 3.0 has no UV texture support yet, will be in 3.1 later this >> year. >> >> For that reason Sergey will add it as optional choice, mainly for >> animation editing and playback >> in viewport. >> >> - Still waiting for a short document outlining the viewport Mesh >> performance work. >> >> - Reminder: anyone who wants to add something that affects users or other >> developers (APIs): >> always make a nice doc! *Before the commit* Even when you think it's not >> interesting (like optimizing). >> Blender work is interesting to share by default! :) >> >> - Due to holidays (2+ weeks absence of several core devs) we also extend >> the 2.76 with two weeks. >> >> - Current projects and planning: >> http://wiki.blender.org/index.php/Dev:Doc/Projects >> >> - Splash: suggested is to do a public contest in BA forums again. Still >> need a proposal for >> who will do the judging... and would we do a theme again? Tradition is to >> have the previous >> team/panel who selected a splash appoint the next. I'll ask the artists >> here to propose something. >> >> - Kevin Dietrich: OpenVDB patch is still waiting for review. There are >> also two (small) Cycles >> features using OpenVDB ready. The platform maintainers have to check on >> inclusion of new libs though. >> >> Check this: >> http://wiki.blender.org/index.php/User:Kevindietrich/OpenVDBRendering >> And this: >> http://wiki.blender.org/index.php/User:Kevindietrich/OpenVDBSmokeExport >> >> Laters, >> >> -Ton- >> >> -------------------------------------------------------- >> Ton Roosendaal - t...@blender.org - www.blender.org >> Chairman Blender Foundation - Producer Blender Institute >> Entrepotdok 57A - 1018AD Amsterdam - The Netherlands >> >> >> >> _______________________________________________ >> Bf-committers mailing list >> Bf-committers@blender.org >> http://lists.blender.org/mailman/listinfo/bf-committers >> > _______________________________________________ > Bf-committers mailing list > Bf-committers@blender.org > http://lists.blender.org/mailman/listinfo/bf-committers _______________________________________________ Bf-committers mailing list Bf-committers@blender.org http://lists.blender.org/mailman/listinfo/bf-committers