<div dir="ltr">On 9 December 2013 18:42, Anuj Phogat <span dir="ltr"><<a href="mailto:anuj.phogat@gmail.com" target="_blank">anuj.phogat@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On Mon, Dec 9, 2013 at 10:02 AM, Paul Berry <span dir="ltr"><<a href="mailto:stereotype441@gmail.com" target="_blank">stereotype441@gmail.com</a>></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><div>On 6 November 2013 17:24, Anuj Phogat <span dir="ltr"><<a href="mailto:anuj.phogat@gmail.com" target="_blank">anuj.phogat@gmail.com</a>></span> wrote:<br>
</div></div><div class="gmail_extra"><div class="gmail_quote"><div><div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">+ static const char *frag_template =<br>
+ "#version 130\n"<br>
+ "%s\n"<br>
+ "uniform %s tex;\n"<br>
+ "uniform int samples;\n"<br>
<div>+ "out vec4 out_color;\n"<br>
+ "void main()\n"<br>
+ "{\n"<br>
</div>+ " int i = 0;\n"<br>
+ " bool pass = true;\n"<br>
+ " int mask = (int(gl_FragCoord.x) * 0x10204081) ^\n"<br>
+ " (int(gl_FragCoord.y) * 0x01010101);\n"<br>
+ " vec4 green = vec4(0.0, 1.0, 0.0, 1.0);\n"<br>
+ " vec4 black = vec4(0.0, 0.0, 0.0, 0.0);\n"<br>
+ " do {\n"<br></blockquote></div></div><div><div><div><br></div></div></div><div>Any particular reason not to use a for loop here? (i.e. for (int i = 0; i < samples; i++))<br></div></div></div>
</div></blockquote>
<div><br></div></div></div><div>I used do-while to include testing of 'samples == 0' case.</div></div></div></div></blockquote><div><br></div><div>Oh, ok. Would you mind putting a comment just above the loop to explain that? With the comment added I'm ok with the loop as is.<br>
</div></div></div></div>