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

gtoledo3's picture
Re: GLSL : Graphic card bug ? QC bug ? Bad code ?

Using texture from the video patch now seems to require use of a core image patch in between to set the texture attributes correctly. I've had some succes using samplerRect2D with the video patch, and no CI in between, but that's not always reasonable.

benoitlahoz's picture
Re: GLSL : Graphic card bug ? QC bug ? Bad code ?

Well, my image is out of an RII :-/ I tried, with your advice, to crop to destination/reference with no result...

pixelnoizz's picture
Re: GLSL : Graphic card bug ? QC bug ? Bad code ?

Dear Ben,

this is an amazing artifact!!!

benoitlahoz's picture
Re: GLSL : Graphic card bug ? QC bug ? Bad code ?

Ha ha ! Feel free to use it ;-)

vade's picture
Re: GLSL : Graphic card bug ? QC bug ? Bad code ?

Ensure your sampler is texture2DRect, not texture2D, and that you dont use anything with mip chains, etc, as surfaces from video devices are vended as GL_TEXTURE_RECTANGLE and do not support mip maps.

Going to Core Image before does a render to texture pass, allowing a GL_TEXTURE_2D to be pulled from the CIImage, which previously was not possible.