Closed GoogleCodeExporter closed 9 years ago
i find is the graphics card problem!
at first ,i test on ati card ,it is bad,
i test on NVDIA ,NOW IS OK!
Original comment by fl...@yahoo.cn
on 16 Nov 2010 at 9:16
Thanks for flagging the issue.
I will have a look at the issues this afternoon. It might be possible to ease
circumvent some of these problems with ATI cards.
The declaration of gl_ModelViewProjectionMatrix as a uniform in the vertex
shader certainly does seem like it shouldn't be there.
Regards,
Kim.
Original comment by kcb...@googlemail.com
on 16 Nov 2010 at 10:32
I have the same issues on MacOSX on both ATI and NVIDIA cards. It would be
great if those issues could be fixed.
Going through the list of issues we have:
In "osgOcean_ocean_surface.vert"
- It looks like the line "uniform mat4 gl_ModelViewProjectionMatrix;" should be
removed
In "osgOcean_ocean_surface.frag"
- The implicit cast error can easily be fixed by replacing line (in :
const vec4 oneOverColorExtinction = vec4(1.0/22.5, 1.0/375.0, 1.0/1500, 1.0/5.0);
with
const vec4 oneOverColorExtinction = vec4(1.0/22.5, 1.0/375.0, 1.0/1500.0, 1.0/5.0);
- In the following line, it complains about the dimension (float to vec
conversion).
vec2 fade_xy = pow(abs(gl_FragCoord.xy / (osgOcean_ViewportDimensions.xy * 0.5) - 1.0), 10.0);
I'm not sure if this is a bug in the shader or OpenGL implementation.
Below are the exact error messages on MacOSX (same messages on both Nvidia and
ATI cards):
VERTEX glCompileShader "ocean_surface_vertex_shader" FAILED
VERTEX Shader "ocean_surface_vertex_shader" infolog:
ERROR: 0:50: 'gl_' : reserved built-in name
FRAGMENT glCompileShader "ocean_surface_fragment_shader" FAILED
FRAGMENT Shader "ocean_surface_fragment_shader" infolog:
ERROR: 0:60: '/' : wrong operand types no operation '/' exists that takes a
left-hand operand of type 'const float' and a right operand of type 'const int'
(or there is no acceptable conversion)
ERROR: 0:214: 'pow' : no matching overloaded function found
ERROR: 0:214: '=' : cannot convert from 'const float' to '2-component vector
of float'
glLinkProgram "ocean_surface" FAILED
Program "ocean_surface" infolog:
ERROR: One or more attached shaders not successfully compiled
Original comment by jcmon...@gmail.com
on 25 Dec 2010 at 10:40
Hi,
I've made the changes you've suggested here. Thanks for pointing them out.
I've split the fade_xy calculation into two variables fadeX,fadeY so it
shouldn't cause any more errors. None the less I think that's a OGL
implementation issue with your card and not a bug in the shader as it doesn't
cause issues at my end.
If you could test the fade_xy issue on your card and report back I would be
grateful.
Cheers.
Kim.
Original comment by kcb...@googlemail.com
on 2 Jan 2011 at 8:06
Hi Kim,
Thanks for applying the changes. I did a fresh checkout to test.
Ocean surface fragment shader compiles fine on my machine now (cast and fade
issue fixed).
I haven't seen any changes on the vertex shader for the
"gl_ModelViewProjectionMatrix" issue. Did you forget to commit the files?
Cheers,
Jean-Claude
Original comment by jcmon...@gmail.com
on 3 Jan 2011 at 2:50
Hi Jean-Claude,
Well spotted. Have committed that now.
Thanks.
Kim.
Original comment by kcb...@googlemail.com
on 3 Jan 2011 at 4:29
Original issue reported on code.google.com by
fl...@yahoo.cn
on 16 Nov 2010 at 8:36