Strange effect when using EDT_OPENGL Render

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
phillip
Posts: 14
Joined: Thu Nov 05, 2009 9:04 pm

Strange effect when using EDT_OPENGL Render

Post by phillip »

I seem to have an issue with my rendering when using EDT_OPENGL Render my water textured object blends in with my land object and the water edge show up jagged. Dicrect X 8 and 9 does not have this issues when Rendering. Has anyone in the community had this issues before? What was done to resolve it? Thank you in advance.

Dev Machine specs
Irrlicht Engine version 1.8.5
Using renderer: OpenGL 4.6.0
Intel(R) HD Graphics 520: Intel
OpenGL driver version is 1.2 or better.
GLSL version: 4.6

Image
CuteAlien
Admin
Posts: 9679
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Strange effect when using EDT_OPENGL Render

Post by CuteAlien »

Looks a bit here like it's not using the depth-buffer (zBuffer) per pixel (maybe decides per polygon?).

Could also be depth-buffer lacking precision for some reason. Like super small value for near-plane. So you get into z-buffer fighting, aka several polygons having the same depth-value in the z-buffer, so the result is kinda random. Thought that usually looks a bit different (grid shining through in the front looks more like z-fighting).

And I see that's it's an Intel GPU. Their OpenGL drivers can be bad. Been a few years since I had one for testing myself, but back then they were basically a complete mess. And I just recently read from someone else that their drivers still haven't really improved and you still can forget about OpenGL with Intel. Their Direct3D drivers are usually better. So it could be that.

Maybe more ideas if I see code. Thought bad Intel drivers is my first guess when I see Intel GPU. If you can find someone with another GPU try to run your app there.
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
phillip
Posts: 14
Joined: Thu Nov 05, 2009 9:04 pm

Re: Strange effect when using EDT_OPENGL Render

Post by phillip »

@CuteAlien Thank you for the quick response. I think it could be the intel OPENGL drivers also. On my system there is also an NVidia GPU. But irrlicht seems to always take the Intel GPU as its primary I'm not sure if I can choose which GPU to use via.

Code: Select all

device = createDevice(irr::video::EDT_OPENGL,dimension2d<u32>(1024,768),32,false,false,false,0);
. I have not seen an example of it being done in the examples/tutorials either. Thank you anyway I'll keep at it and see if I figure it out.
CuteAlien
Admin
Posts: 9679
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Strange effect when using EDT_OPENGL Render

Post by CuteAlien »

Yeah, forcing from code is a bit strange (I think there are ways to set it as user per application somehow, but don't ask me how...). But it's possible, at least on Windows, by adding the following code:

Code: Select all

#if defined(_WIN32)
// Tell AMD and Nvidia drivers to use the most powerful GPU instead of a lower-performance (such as integrated) GPU 
// Trick found here: https://gist.github.com/statico/6809850727c708f08458
// Note: Those lines may cause your project to create .exp and .lib files additional to .exe files.
extern "C" {
	// http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf
	__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;

	// http://developer.amd.com/community/blog/2015/10/02/amd-enduro-system-for-developers/
	__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
}
#endif
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
Post Reply