PDA

View Full Version : Surfaces are seperated in NVidia graphics



rakeshmalik91
09-08-2013, 05:41 AM
All surfaces a seperated in NVidia graphics when using a shader, which uses only shadowmap and normalmap. But the whole thing runs great on IntelHD.
Can anyone help what can be the reason. The whole code is too big to attach, but pls mention if any part can help

rakeshmalik91
09-08-2013, 06:56 AM
Removing following code solved it:

glEnable(GL_POLYGON_SMOOTH);
glHint(GL_POLYGON_SMOOTH_HINT, GL_NICEST);

GClements
09-08-2013, 07:54 AM
Removing following code solved it:

glEnable(GL_POLYGON_SMOOTH);
glHint(GL_POLYGON_SMOOTH_HINT, GL_NICEST);

Polygon smoothing requires that the framebuffer has an alpha channel and that primitives are rendered from front to back with depth tests disabled and the correct blending function used. As such, it's rarely useful. The modern alternative is multi-sampling, which doesn't require primitives to be depth-sorted; however, it does increase memory consumption and bandwidth.