Johannes Brunen
2014-05-30 10:31:20 UTC
Hello,
after sync with the current OpenSG 2 master trunk
(51f04ac30d8481dcb2eb1ddb318bff97450d1956) I have rendering problems
(AMD Radeon HD 5700 series) with shaders.
I have uploaded a zip file to
http://wikisend.com/download/565136/Error.zip
which contains some png images, the CMakeCache.txt file and some log
files created during my test.
Basically, I have used the following relevant CMake options for my VC
9Sp1 Win64 setup:
OSG_ENABLE_MULTISHADER_VARCHUNK:BOOL=ON
OSG_ENABLE_NEW_GEOHANDLER:BOOL=ON
OSG_ENABLE_OGL2_SHADERFUNCTIONS:BOOL=ON
OSG_ENABLE_OGL3_PROTOS:BOOL=OFF
OSG_ENABLE_OGL4_PROTOS:BOOL=OFF
OSG_ENABLE_OGLES_PROTOS:BOOL=OFF
OSG_ENABLE_OGL_COREONLY:BOOL=OFF
OSG_ENABLE_OGL_ES2:BOOL=OFF
OSG_ENABLE_OGL_ES2_SIMGL3:BOOL=OFF
OSG_ENABLE_OGL_VERTEXATTRIB_FUNCS:BOOL=ON
Ok, now I try to describe my problem. I will refer to the png images.
For what follows I use one directional light source.
11_NoShader.png
==============
I start my application with disabled shader support and create some
geometry (sphere and cylinder)
12_Shader.png
============
I enable the usage of shaders. I have applied a simple phong shader with
removed ambient light. All is correct here.
13_Shader.png
============
Now, I create new additional geometry the same way as I did before. The
shading is completely lost. However, I tested that the shader is still
working properly.
14_NoShader.png
==============
Now, I disable the shader usage. See that the increase of brightness due
to the additional ambient contribution. But, the lastly added geometry
still does not render correctly!
15_NoShader.png
==============
Creation of new geometry work now as expected. Rendering of first and
third geometry is correct. Second geometry is incorrect.
16_Shader.png
============
Shader activated again, first and third geometry correct, third geometry
incorrect.
17_Shader.png
============
New geometry, which renders incorrect.
Etc...
In order to get a little more information, I did modify my phong shader
so that the diffuse contribution is equal to the normal direction. I.e.
I used
Diffuse = (n + vec3(1,1,1)) * 0.5; // += Kd * n_dot_l;
The result of this can be seen in the second group of images:
21_NoShader.png
==============
Start of app with disabled shader support and create some geom.
22_Shader.png
============
Activated shader usage. The geom coloring of the normals in eye space.
23_Shader.png
============
New geometry created. All normals are identical.
I do not have any idea what is going wrong here and really need some
help.
Alternatively, I tried to compile the OpenSG code with
OSG_ENABLE_NEW_GEOHANDLER:BOOL=OFF
OSG_ENABLE_OGL_VERTEXATTRIB_FUNCS:BOOL=OFF
but this resulted in other (unsolved problems) as I have reported in
http://sourceforge.net/p/opensg/mailman/message/32363721/
Beside, this message does not show up in the
www.mail-archive.com/opensg-users
Maybe, this is the reason I got no response from the community.
Any help is very much appreciated here. I need to solve these two
problems.
Best,
Johannes
after sync with the current OpenSG 2 master trunk
(51f04ac30d8481dcb2eb1ddb318bff97450d1956) I have rendering problems
(AMD Radeon HD 5700 series) with shaders.
I have uploaded a zip file to
http://wikisend.com/download/565136/Error.zip
which contains some png images, the CMakeCache.txt file and some log
files created during my test.
Basically, I have used the following relevant CMake options for my VC
9Sp1 Win64 setup:
OSG_ENABLE_MULTISHADER_VARCHUNK:BOOL=ON
OSG_ENABLE_NEW_GEOHANDLER:BOOL=ON
OSG_ENABLE_OGL2_SHADERFUNCTIONS:BOOL=ON
OSG_ENABLE_OGL3_PROTOS:BOOL=OFF
OSG_ENABLE_OGL4_PROTOS:BOOL=OFF
OSG_ENABLE_OGLES_PROTOS:BOOL=OFF
OSG_ENABLE_OGL_COREONLY:BOOL=OFF
OSG_ENABLE_OGL_ES2:BOOL=OFF
OSG_ENABLE_OGL_ES2_SIMGL3:BOOL=OFF
OSG_ENABLE_OGL_VERTEXATTRIB_FUNCS:BOOL=ON
Ok, now I try to describe my problem. I will refer to the png images.
For what follows I use one directional light source.
11_NoShader.png
==============
I start my application with disabled shader support and create some
geometry (sphere and cylinder)
12_Shader.png
============
I enable the usage of shaders. I have applied a simple phong shader with
removed ambient light. All is correct here.
13_Shader.png
============
Now, I create new additional geometry the same way as I did before. The
shading is completely lost. However, I tested that the shader is still
working properly.
14_NoShader.png
==============
Now, I disable the shader usage. See that the increase of brightness due
to the additional ambient contribution. But, the lastly added geometry
still does not render correctly!
15_NoShader.png
==============
Creation of new geometry work now as expected. Rendering of first and
third geometry is correct. Second geometry is incorrect.
16_Shader.png
============
Shader activated again, first and third geometry correct, third geometry
incorrect.
17_Shader.png
============
New geometry, which renders incorrect.
Etc...
In order to get a little more information, I did modify my phong shader
so that the diffuse contribution is equal to the normal direction. I.e.
I used
Diffuse = (n + vec3(1,1,1)) * 0.5; // += Kd * n_dot_l;
The result of this can be seen in the second group of images:
21_NoShader.png
==============
Start of app with disabled shader support and create some geom.
22_Shader.png
============
Activated shader usage. The geom coloring of the normals in eye space.
23_Shader.png
============
New geometry created. All normals are identical.
I do not have any idea what is going wrong here and really need some
help.
Alternatively, I tried to compile the OpenSG code with
OSG_ENABLE_NEW_GEOHANDLER:BOOL=OFF
OSG_ENABLE_OGL_VERTEXATTRIB_FUNCS:BOOL=OFF
but this resulted in other (unsolved problems) as I have reported in
http://sourceforge.net/p/opensg/mailman/message/32363721/
Beside, this message does not show up in the
www.mail-archive.com/opensg-users
Maybe, this is the reason I got no response from the community.
Any help is very much appreciated here. I need to solve these two
problems.
Best,
Johannes