PDA

View Full Version : Help with shader (in iq's 1k framework)



nakedman
08-26-2012, 12:52 PM
Hi,


I downloaded iq's isystem package (link: http://iquilezles.org/www/material/isystem1k4k/isystem1k4k.htm ) today and started playing around with the i1k_OGLShader. Getting it to work was surprisingly easy, but then I tried putting something different into the shader.h. I found a fun effect on glsl.heroku.com and tried it out. I think I have tried a lot now, but I just can't it to work. Can anyone spot what is wrong with the following paste of the the shader:


http://ideone.com/Rlyy9


It is taken from this effect: http://glsl.heroku.com/e#3684.0 .


I tried running the code from a normal OpenGL context based on glfw and OpenGL 3.3 shader and it worked just fine. I just can't put the finger on what I did wrong in the iq framework. The code can also be seen here https://github.com/madsravn/1k_demo. The output I am getting is just a screen with a color, like the shader isn't doing any work.


Can anyone point out what (one or many) mistakes I have made?