GLSL Vertex Shader Texture Support QC4

toneburst's picture

I've just noticed vertex texture fetch (ie using textures in a GLSL vertex shader), seems to be working with video input on my new MacBook Pro in QC4/Snow Leopard. There has been much discussion around this whole issue on Kineme, so I'm wondering if maybe some of you could try this simple example composition on your systems, and let me know if it works for you, and if you get reasonable frame-rates. I'm intrigued to know if VTF has finally been fixed so it works with non-static images, and on the GPU, and if so, on which hardware.

Cheers guys,

a|x

PreviewAttachmentSize
tb QC4 VTF Test 01.qtz4.71 KB

cybero's picture
Re: GLSL Vertex Shader Texture Support QC4

a|x

Works like the proverbial charm, hooked up the width to looped Interpolators, still works like a charm.

Beautiful work, a|x.

I was a little puzzled at first at the publishing of the vImg input, wherefore, I did wonder , was the corresponding input patch, but then figured that out as being the Vertex Shader input & not the standard texture input [image required :-)].

Aren't these GLSL Shader items exceedingly delicate [fragile labelling required :- ) like leave as is unless you are happy to see something intricate break] ?

Haven't Inspected via Instruments, how I wish the Performance Inspector was SL compatible .

iMac 24", SL, 10.6.1 nVidia 9400M.

Just protocolized the composition for iTunes and thus far it does indeed work AOK.

leegrosbauer's picture
Re: GLSL Vertex Shader Texture Support QC4

Intel Core 2 Duo X7900, ATI RadeonHD2600, OS X 10.6.1. Seems to work. Central cam image surrounded by portions of cam images? I don't know which processors it's running on. How do we determine that? 59-74 FPS.

toneburst's picture
Re: GLSL Vertex Shader Texture Support QC4

Hi Lee,

Thanks for testing it for me.

Quote:
Central cam image surrounded by portions of cam images

This doesn't sound right to me. You should just get an odd kind of blurry triangular pixellation effect, with the resolution settings changing the scale of the effect.

Can you post a screenshot, maybe?

a\x

toneburst's picture
Re: GLSL Vertex Shader Texture Support QC4

Hiya Cybero,

thanks for giving it a go.

You're right about the 'vImg' input. That's a GLSL uniform variable, which is a variable used in the shader code that appears as a port on the left side of the GLSL Shader macro patch.

I wonder if you're getting what I'm getting, though... As I said in my reply below, you should be seeing a kind of triangular pixellation effect.

a|x

leegrosbauer's picture
Re: GLSL Vertex Shader Texture Support QC4

Three grabs. Numbers refer to horizontal and vertical resolutions.

PreviewAttachmentSize
10:10.jpg
10:10.jpg28.19 KB
100:100.jpg
100:100.jpg64.53 KB
45:45.jpg
45:45.jpg50.17 KB

toneburst's picture
Re: GLSL Vertex Shader Texture Support QC4

Thanks for those, mate.

I've just realised the repeating is an error in my code, in fact. Ooops...

Looks fine other than that, though.

a|x

leegrosbauer's picture
Re: GLSL Vertex Shader Texture Support QC4

Good! My pleasure. :-)

gtoledo3's picture
Re: GLSL Vertex Shader Texture Support QC4

I know I've praised you on this a million times, but this thread just brings back to mind how indispensable your GLSL lighting qtz has been for me over time. I can not give ENOUGH thanks on that one... even the very structure of it was an eye opener for me when I started getting into quartz for stuff beyond CI filters.

sbn..'s picture
Re: GLSL Vertex Shader Texture Support QC4

I can second this, or at least I just exmined this GLSL patch and learned something. I thought the strange CI kernel GLslang dialect was the one to use for QC, but this showed me differently. Thanks.

Anyway, 30-60 fps on a C2D/2.5, GF9400M, with Blender baking a complex cloth sim in the background.