Wind Bag (Composition by gtoledo3)

Author: gtoledo3
License: (unknown)
Date: 2009.06.30
Compatibility: 10.5
Categories:
Required plugins:
(none)

This is just one I have a great deal of fun with, and is kind of a workout of the GL Tools polygon mode, logic op, and GLSL vertex shading. I posted this on my "qc twit" blog... but I see that bandwidth must not be concerning Chris and Steve too much if they are now creating this section ;o)

PreviewAttachmentSize
wind bag 02.qtz19.8 KB

cybero's picture
Re: Wind Bag (Composition by gtoledo3)

Nicely customizable

dust's picture
Re: Wind Bag (Composition by gtoledo3)

this one is cool looks kind of like your noise sphere but with lines. i have been messing with the gl tools lately. actually trying to learn the core bit of glsl im on page 45 of the manual, looks a lot like c still trying to sort out varying and uniform etc.. thanks for the example they are helpful george.

cwright's picture
Re: Wind Bag (Composition by gtoledo3)

dust wrote:
still trying to sort out varying and uniform etc.

A uniform is a value that doesn't change for the vertex shader or the fragment shader. These are inputs on the GLSL patch (numbers, images, etc).

A varying is a value that the Vertex Shader writes and passes to the Fragment shader. If you were to do per-pixel lighting, for example, you'd need each pixel's normal. So you'd have the Vertex Shader pass the normal to the fragment shader via a varying. Varyings are linearly interpolated across a polygon's surface, so if you set a value of 1 at one vertex, and a value of 0 at another, fragments between those two vertices will each get unique values between 1 and 0.

(I'm not sure if matrices can be varyings -- I believe so, but I'm not sure how they're interpolated if they are)

toneburst's picture
Re: Wind Bag (Composition by gtoledo3)

I don't think matrices can be varyings. It's just floats and vec2/3/4 as far as I know. Nothing else makes sense, really.

a|x

jersmi's picture
Re: Wind Bag (Composition by gtoledo3)

Hey, that one rocks!

usefuldesign.au's picture
Re: Wind Bag (Composition by gtoledo3)

I love the magic mirror kind of twisting & turning transitions. Reminded me of just how powerful and simple the smooth patch is for it's effort. I need to start using it much more. Thanks for posting the source gtoledo3.

gtoledo3's picture
Re: Wind Bag (Composition by gtoledo3)

Indeed... yeah, go to textured mode, and you basically have the noise sphere.

gtoledo3's picture
Re: Wind Bag (Composition by gtoledo3)

Interesting... I've recall seeing this come up on the list (I think)...

I seem to recall the GLSL spec supporting varying matrices somehow, but I've never gotten that far into it (that aspect of GLSL). It seems like I messed with this one day (experimental mode, learning hat stuff), and kept getting the dreaded pink box, but I can't say I totally knew what I was doing either.