shader

GLSL : Graphic card bug ? QC bug ? Bad code ?

benoitlahoz's picture

Hi !

I've been fascinated for months with toneburst CI implementation of Light Scattering, from GPU Gems. So I decided to try to make a GLSL Shader with it. In fact, while googling I found some simple GLSL code coming directly from GPU Gems (http://stackoverflow.com/questions/13489703/sfml-2-0-glsl-volumetric-lig...).

But, it is very buggy, and it looks like a graphic card bug, or maybe I'm not dealing with the texture properly, or... could it be a QC bug ? (I'm on 10.8)

I would be extremely grateful for any advice on this :-)

Thanks.

Ben

Pacman Core Image (Composition by gtoledo3)

Author: gtoledo3
License: Creative Commons Attribution-NonCommercial
Date: 2012.11.11
Compatibility: 10.5, 10.6, 10.7, 10.8
Categories:
Required plugins:
(none)

This is a pacman animation, working in core image.

Raytrace Core Image (Composition by gtoledo3)

Author: gtoledo3
License: Creative Commons Attribution-NonCommercial
Date: 2012.11.11
Compatibility: 10.5, 10.6, 10.7, 10.8
Categories:
Required plugins:
(none)

Nothing super fancy, but a raytracer working in core image.

I'd been thinking about doing this for awhile, from being interested in the way core image always has a dedicated image output without having to render to screen/texture to do something with the result.

It's a little bit of a pain because of typically used functions and working styles not being supported, but it works if you stay within the boundaries. It seems a little slower than GLSL. Less substantial/2D oriented fragment shaders tend to perform better when transferred, seemingly.

How to not overwrite a models texture with the glsl fragment shader

jrs's picture

Hi All,

How do I keep glsl from overwriting the texture details that get loaded with a model? I've attached an example composition where I texture the teapot with its image port. This works fine outside a shader but as soon as I place it inside my model goes white.

Apart from having a search on the web and not being able to find it I came across this thread - https://kineme.net/Discussion/GeneralDiscussion/Fisheyeviewplugin

which at one stage talks about the same thing. Chris mentioned adding the following to the vertex shader:

gl_FrontColor = gl_Color;

And the following to the fragment shader

gl_FragColor = gl_Color;

but it doesn't work. I get the feeling this is something simple and easy but I just can't see where I'm going wrong

Cheers James

Kali (Composition by gtoledo3)

Author: gtoledo3
License: (Other — see description)
Date: 2012.06.20
Compatibility: 10.5, 10.6, 10.7
Categories:
Required plugins:
(none)

This uses the Kali fractal equation from fragmentarium, rejiggered into working in GLSL 120.

In order to get a milder look, back down on the color values. Licensed under GPL/LGPL.

(edit: .01, vert shader bugfix).