What does the "image texturing properties" patch do?

pbourke's picture

Some time back I commissioned (Christopher Wright) to develop the "pbmesh" pacth ... it has proven very successful and is in regular use within planetariums and in various iDome setups http://local.wasp.uwa.edu.au/~pbourke/exhibition/iDome/

In order to support larger size movies for which the QC performance seem to be a limiting factor a separate application has been written that essentially does the same thing. It certainly performs better for the larger size movies, eg: 4K wide). But there is a problem, here's the deal, I've tried to make it as clear and minimal as I can, please feel free to ask questions.

In the archive found here http://local.wasp.uwa.edu.au/~pbourke/tmp/evan.zip there are two Quartz Composer compositions, warpplayer, a short segment from a cylindrical movie and a warp map that converts a cylindrical projection to a perspective projection.

The two QC compositions are identical except for the "image texturing properties" where the target is set to "2D". As the name implies, the one using the "image texturing properties" works on every graphics card I have tried it on. The other works on no graphics card I have tried it on.

The error is shown in the screen dump (also in the archive), the texture does not wrap but creates that smeared out effect.

Now to warpplayer, on some older ATI graphics cards the warpplayer functions correctly, for example my home laptop with a ATI X1600, and on a work machine with a ATI 2600. As far as I am aware it has never worked with any nVidia cards ... by "work" I mean the smearing effect of the no wrapping of the texture. What has brought this to a head is that with the new wave of machines it no longer wraps properly irrespective of whether it is an ATI or nVidia card.

I repeat, the non-wrapping error is, as far as I can tell, exactly the same as the QC example provided. I'm hoping that the "image texturing properties" patch gives a clue. Or put another way, how would we perform the same thing in the warpplayer application?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

cwright's picture
Texture Wrapping

Texture wrapping/"smearing" (clamping) is supposed to be controlled by the glTexParameterf() function, as in


(used after a glBindTexture). I think the image texture properties patch essentially does just this.

If the cards don't honour this setting, I don't think they can claim to be OpenGL compliant. That said, "fixed-function" texture and lighting stuff is getting thrown away for shader capabilities anyway. And lucky for you, writing a wrapping shader is exceptionally easy.

If you're going to be working in QC, you should probably try your hand at a CoreImage filter, or possibly a GLSL shader (the fragment shader is what you'd be interested in there). If you're not in QC, you'll probably have to stick with GLSL. (I think warpplayer falls under this category).