That's the problem, there is no OpenGL extension for this.Just wonder which GL extension used for this type of rendering in AMD , or higher version of OpenGL may provide in Nvidia driver?
I am not sure if you care about the technical details, but in case you or anyone else is interested:
There is this rule in the specification when using multiple render targets/attachments.
(OpenGL 4.5 spec, page 310)OpenGL specification said:If the attachment sizes are not all identical, the results of rendering are defined only within the largest area that can fit in all of the attachments. This area is defined as the intersection of rectangles having a lower left of (0;0) and an upper right of (width;height) for each attachment.
What this means is that if you use a colorbuffer of size 1920x1080 and a depthbuffer of size 1000x1000 then any pixel drawn outside the smaller 1000x1000 rectangle will be discarded. However, AMD goes against the specification and allows to render pixels outside the smaller attachments. That's pretty much what happens in NSMBU/NSLU, where the coin is drawn outside the depthbuffer rectangle.
I actually emailed NVIDIA about this and from what I understand there are no plans to turn it into an extension, but there are workarounds (like rendering everything multiple times, once for each attachment individually or using tricks to simulate a larger depth buffer). All of the workarounds have major disadvantages, mostly reduced performance and being incredibly annoying to implement.
tl;dr; Rendering the coins in NSMBU is hard on NVIDIA/Intel.
Last edited by Exzap,