Re: Tricky question on shader
Ian Mallett <[email protected]>
| Newsgroups | gmane.comp.python.opengl.user |
|---|---|
| Message-ID | <CAG4NV=vhcVtTF7OgpMPJCAm_goCGr7C8guT80s_1JHt1MxR4XQ@mail.gmail.com> |
On Wed, Aug 31, 2011 at 3:48 PM, Nicolas Rougier <[email protected]>wrote: > > Hi folks, > > I've been playing with gaussian texture filtering using shaders and I > obtained a strange "grid" effect on a completely uniform texture. Since all > fragments get the same processing and same neighbouring values,I wonder if > the grid is the result of some kind of artifact with floating points or the > way texture coordinates are interpolated. Or I missed something completely > obvious… > > I attached the code below. It is self-contained and you should see the grid > I'm talking about. > > Nicolas It feels like the texture coordinates as you calculate them in interpolate(...), and the offsets in filter(...) are to blame. I assume you're trying to do something like a "manual" minification filter using a gauss kernel. Without knowing more about the algorithm, I can't say. My recommendation is to try gamedev.net in the OpenGL forum, as there are a large number of people there who can help. Ian ------------------------------------------------------------------------------ Special Offer -- Download ArcSight Logger for FREE! Finally, a world-class log management solution at an even better price-free! And you'll get a free "Love Thy Logs" t-shirt when you download Logger. Secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsisghtdev2dev _______________________________________________ PyOpenGL Homepage http://pyopengl.sourceforge.net _______________________________________________ PyOpenGL-Users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pyopengl-users