<div dir="ltr">It is getting to a point where I can start experimenting with new techniques, such as drawing wires and lighting in a single pass.  It is quite a bit just to refactor things so that everything can be drawn using GLSL, so that was my focus this summer.<div>
<br></div><div>Of note is that I have a &#39;basic&#39; shader for drawing almost everything, but also made a separate &#39;raster&#39; shader for various deprecated line and polygon raster features such as stippling.  Since these features are never used with texturing or lighting I figured I&#39;d factor them out to save on complexity in the &#39;basic&#39; shader (each new feature doubles the number of combinations).</div>
<div><br></div><div>I didn&#39;t occur to me to combine them into a single pass, because that would require reworking code at a higher level than I&#39;ve been focused on, but that is something I&#39;d like to think about now.</div>
<div><br></div><div>Also, the wireframe isn&#39;t exactly one-to-one with the primitives used to draw the solid, so it would actually be rather complicated to pass which edges to draw into the shader (at least, it would require a lot of work to rewrite it work right).</div>
<div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Sep 21, 2013 at 1:40 AM, David Jeske <span dir="ltr">&lt;<a href="mailto:davidj@gmail.com" target="_blank">davidj@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Thanks. For now I just want to read the code. I&#39;m fishing through your branch now.</div><div><br>
</div><div>On bf-funboard I recently I suggested we could probably get much better viewport performance for most machines by adding a single-pass OpenGL 2.1 / GLSL120+geometry_EXT draw-method, especially for draw_em_fancy. </div>


<div><br></div><div>I did a little (non-blender) experiment, implementing <a href="http://strattonbrazil.blogspot.com/2011/09/single-pass-wireframe-rendering_10.html" target="_blank">single-pass-wireframes</a> in a GLSL-120 shader, and it was super easy to code and is super-fast. The technique is easily extendable to points, face-highlighting, and can trivially do things that are impossible with old fixed-function drawing. (such as dynamic wireframe color adjustment to maintain contrast) Not sure yet about outlines. </div>


<div><br></div><div>I wondered if your viewport-fx consolidated into a single pass. If I understand what I&#39;m seeing, it looks like it leaves all the passes in-fact. </div><div><br></div></div>
<br>_______________________________________________<br>
Soc-2013-dev mailing list<br>
<a href="mailto:Soc-2013-dev@blender.org">Soc-2013-dev@blender.org</a><br>
<a href="http://lists.blender.org/mailman/listinfo/soc-2013-dev" target="_blank">http://lists.blender.org/mailman/listinfo/soc-2013-dev</a><br>
<br></blockquote></div><br></div>