Re: Help with shaders
Posted by
Sven Gothel on
Mar 13, 2012; 7:34pm
URL: https://forum.jogamp.org/Help-with-shaders-tp3737063p3823298.html
On 03/13/2012 03:54 PM, cznlzq [via jogamp] wrote:
>
>
> Hi,
>
> Could some one help on this?
>
> I'm trying to run the example Martin provided
> (
http://www.jzy3d.org/misc/depthpeeling/org.jogl.demos.dualdepthpeeling.zip,
> a cleanly packed eclipse project)
>
> However, when I run it, it has some errors as following
>
> ===================================================
> init
>
> loading shaders...
>
> dual_peeling_peel_fragment.glsl
> compile status: 0
> log length: 237
> Fragment shader failed to compile with the following errors:
> ERROR: 0:12: error(#12) Unexpected qualifier.
> ERROR: 0:12: error(#132) Syntax error: 'DepthBlenderTex' parse error
> ERROR: error(#273) 2 compilation errors. No code generated
> ====================================================
>
> I s there any settings I'm missing?
>
> Thank you.
However you debug your code, the above GLSL compiler error message just says
that your GLSL source has an error on line 0, column 12 ..
Should be easy to fix.
+++
I merged a 'dualdepthpeeling' demo to jogl-demos:
<
http://jogamp.org/git/?p=jogl-demos.git;a=commit;h=697d631bc0333b92689972ff3e621e3549fb6c80>
Then I JOGL'fyied it, ie. using our ShaderCode/Utils:
<
http://jogamp.org/git/?p=jogl-demos.git;a=blob;f=src/demos/dualDepthPeeling/DualDepthPeeling.java;hb=HEAD#l431>
If using ShaderCode class, you can set the Java system property 'jogl.debug.GLSLCode'
which will dump the shader code w/ proper line numbers.
~Sven