<div dir="ltr">Yes I implemented something like that! Thanks !<br></div><div class="gmail_extra"><br><div class="gmail_quote">2017-06-29 19:45 GMT+01:00 Christian Buchner <span dir="ltr"><<a href="mailto:christian.buchner@gmail.com" target="_blank">christian.buchner@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br>A uniform specific to each tile that defines the dimensions for the valid part of the tile? The shader would get the gl_FragCoord, compare it against the threshold and return a transparent color for pixels outside the valid bounds.<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888">Christian<br><br></font></span></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">2017-06-29 11:28 GMT+02:00 Bruno Oliveira <span dir="ltr"><<a href="mailto:bruno.manata.oliveira@gmail.com" target="_blank">bruno.manata.oliveira@gmail.<wbr>com</a>></span>:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div><div><div><div>Hello,<br><br><br></div>I have a big image to be rendered (100k pixels each side), hence I am partitioning that image in Image Tiles.<br><br></div>Each tile has 256 x 256 pixels. Each tile consists of a osg::Geometry quad, with a texture bound to it. I put all those tiles in an osg::Group.<br></div>I use a fragment shader that is global to all tiles (I apply it to the osg::Group's StateSet). It is a very simple shader and consists only of a texture lookup in each tile:<br><br>    gl_FragColor = texture2D(texture, vec2(x, y));<br><br></div>The problem now is that in the image limits, some extra pixels are rendered (because my images' size is not multiple of 256). For instance, if my image size is 1000 pixels in x, the last 24 pixels are not valid and shall be transparent (because it will have 4 tiles = 256 * 4 pixels = 1024). The last tile should only be rendered up to the pixel 232 ( 256 - 24 = 232)<br><br>What is the best way of limiting my rendering up to that pixel, WITHOUT defining a new shader for EVERY tile? ( I really want a single fragment shader bound to the whole group for performance reasons)<br></div>
<br></div></div><span class="">______________________________<wbr>_________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph<wbr>.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.or<wbr>g/listinfo.cgi/osg-users-opens<wbr>cenegraph.org</a><br>
<br></span></blockquote></div><br></div>
<br>______________________________<wbr>_________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.<wbr>openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.<wbr>org/listinfo.cgi/osg-users-<wbr>openscenegraph.org</a><br>
<br></blockquote></div><br></div>