OpenGL Renderer bug 2 in 1
-
- Posts: 34
- Joined: Thu Sep 15, 2005 12:27 pm
- Location: Stuttgart, Germany
OpenGL Renderer bug 2 in 1
I am running a small test program derived from example 10.
All I do is loading a sphere from a 3ds file. This sphere should then be rendered using a v2 vertex-pixel-shader combo. Unfortunately I had to face really strongly diverging results using the OpenGL renderer.
Running my code on a laptop with a NVIDIA Quadro FX1400 GO (shader support v3), OpenGL 2.1.1. I got the following result.
The rendering is basically correct, however you might notice the terrible triangulation.
The following result is taken from my desktop machine with a NVIDIA GeForce 8600GTS (shader v4 support), OpenGL 2.1.1.
You might notice the good tesselation and the basically correct rendering
of the shader (dayside, terminator, night-side) however textures are missing. This stays the same if rendering with EMT_SOLID, until I add a light source an enable Lighting(which souldn't be necessary for shader lighting).
Finally an image from Rendermonkey where I test my shaders and which shows how the shader shoudl actually work:
I wnat to mention that all screens (except the rendermonkey one) are taken with exactly the same code with Irrlicht 1.3.1. A switch to Irr.1.4b didn't improve the situation.
I assume this to be a bug in OpenGL. However I can't explain the differences in tesselation of the 3s (I wonder why there is tesselation, shouldn't it be displayed as specified in the file).
Hope some one can help and this post is not just vanishing in the forum like with so many posts I did before.
Thoran
All I do is loading a sphere from a 3ds file. This sphere should then be rendered using a v2 vertex-pixel-shader combo. Unfortunately I had to face really strongly diverging results using the OpenGL renderer.
Running my code on a laptop with a NVIDIA Quadro FX1400 GO (shader support v3), OpenGL 2.1.1. I got the following result.
The rendering is basically correct, however you might notice the terrible triangulation.
The following result is taken from my desktop machine with a NVIDIA GeForce 8600GTS (shader v4 support), OpenGL 2.1.1.
You might notice the good tesselation and the basically correct rendering
of the shader (dayside, terminator, night-side) however textures are missing. This stays the same if rendering with EMT_SOLID, until I add a light source an enable Lighting(which souldn't be necessary for shader lighting).
Finally an image from Rendermonkey where I test my shaders and which shows how the shader shoudl actually work:
I wnat to mention that all screens (except the rendermonkey one) are taken with exactly the same code with Irrlicht 1.3.1. A switch to Irr.1.4b didn't improve the situation.
I assume this to be a bug in OpenGL. However I can't explain the differences in tesselation of the 3s (I wonder why there is tesselation, shouldn't it be displayed as specified in the file).
Hope some one can help and this post is not just vanishing in the forum like with so many posts I did before.
Thoran
It would probably be helpful if you could also post your example code, the 3ds and maybe also the texture somewhere.
Also it might help to know if you did run it on Linux or Windows and if you got other results with DirectX.
I don't know what is causing this. But I could run the test on my system if it where available to compare the results. You think of it probably only as trivial files, but I could not produce a sphere in 3ds format without finding some tool for that first, learning to use it, etc. And then even same formats often look different when exported from different tools (even if they shouldn't).
Also it might help to know if you did run it on Linux or Windows and if you got other results with DirectX.
I don't know what is causing this. But I could run the test on my system if it where available to compare the results. You think of it probably only as trivial files, but I could not produce a sphere in 3ds format without finding some tool for that first, learning to use it, etc. And then even same formats often look different when exported from different tools (even if they shouldn't).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
-
- Posts: 34
- Joined: Thu Sep 15, 2005 12:27 pm
- Location: Stuttgart, Germany
I put up the code on my webspace.
The 3ds and textures are included. If you place it in examples of your Irrlicht dir it should compile out of the box.( replaces evt. existing 10.Shaders example).
I only run the code on Windows XP.
Your help would be greatly appreciated.
Thoran
The 3ds and textures are included. If you place it in examples of your Irrlicht dir it should compile out of the box.( replaces evt. existing 10.Shaders example).
I only run the code on Windows XP.
Your help would be greatly appreciated.
Thoran
On my tests on OpenGL/Linux I only got whitescreens. I will try to test it on windows when I find some time.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
-
- Posts: 34
- Joined: Thu Sep 15, 2005 12:27 pm
- Location: Stuttgart, Germany
This is most likely due to a wrong media directory.CuteAlien wrote:On my tests on OpenGL/Linux I only got whitescreens. I will try to test it on windows when I find some time.
Edit:
Sorry, realized it too late that the following sentence is crap:
"When all is white it means that the bounding sphere is not loaded."
It should read:
When allis white it means that the skysphere texture is not loaded.
/Edit
Btw. The selection when prompted should be c, y, b for each of the 3 queries.
Thoran
Last edited by Silbermünze on Tue Nov 06, 2007 10:04 am, edited 1 time in total.
Don't use 3ds, the smoothing normals are not loaded. Use obj. I am not sure about the other error however. Are there any error messages in the console whilst running the app?
PS: Does your shader require tangents?
PS: Does your shader require tangents?
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
-
- Posts: 34
- Joined: Thu Sep 15, 2005 12:27 pm
- Location: Stuttgart, Germany
No I don't use tangents just normals.BlindSide wrote:Don't use 3ds, the smoothing normals are not loaded. Use obj. I am not sure about the other error however. Are there any error messages in the console whilst running the app?
PS: Does your shader require tangents?
If it has to do with smoothing normals, why are there different results on different hardware? Shouldn't it look the same on all machines?
Thoran
-
- Posts: 34
- Joined: Thu Sep 15, 2005 12:27 pm
- Location: Stuttgart, Germany
I want to mention that the uploaded code, currently doesn't use the shader, due to the follwoing code in line 494:
if you remove th " & 0" it should again use the shaders and not the EMT_SOLID anymore.
Sorry for the inconvenience.
In the meanwhile I have disabled loading of the textures for testing and I recognized the sphere being rendered completely black when the getTexture() methods are commented out. If I disable setting of the PixelShader constants for the texture samplers, the shade of the white is changing, while the sphere still stays visible. So at least the textures seem to have an influence in one way or another.
Thoran
Code: Select all
if (vsFileName && psFileName && 0)
{
Sorry for the inconvenience.
In the meanwhile I have disabled loading of the textures for testing and I recognized the sphere being rendered completely black when the getTexture() methods are commented out. If I disable setting of the PixelShader constants for the texture samplers, the shade of the white is changing, while the sphere still stays visible. So at least the textures seem to have an influence in one way or another.
Thoran