In each release of our SDK you will find numerous code samples, complete with carefully commented source code, whitepapers, and videos to help you take advantage of the latest technology from NVIDIA.
This code is released free of charge for use in derivative works, whether academic, commercial, or personal (Full License).
Cg 2.0 Toolkit is required to compile some code samples. Please obtain the Cg 2.0 Toolkit from the full OpenGL SDK 10 installer.
|
Instanced Tessellation 
This example shows how to use bindable uniform buffers and draw instanced in order to render tessellated curved surfaces. The vertices and the indices are stored in buffer objects and bound to the shader. Patches are drawn by rendering a single tessellated quad multiple times, using instancing to do this in a single call and the instance id to index the index buffer. Indices are stored as integers using the integer support in gpu shader4.
This is idea is based on the Generic Mesh Refinement On GPU paper. |
|
 |
 |

Whitepaper
Download
|
|
|
Compress YCoCg-DXT 
This example demonstrates how a pixel shader can be used to compress a dynamically rendered color map into a texture, using both the DXT1 and YCoCg-DXT5 texture formats.
This example accompanies the Real-Time YCoCg-DXT Compression Whitepaper
|
|
 |
 |

Whitepaper
Download
|
|
|
Compress Normal-DXT 
This example demonstrates how a pixel shader can be used to compress a dynamically rendered normal map into a texture, using both the DXT5 and LATC texture formats.
This example accompanies the Real-Time Normal Map DXT Compression Whitepaper |
|
 |
 |

Whitepaper
Download
|
|
|
Froggy Demo AA 
Showing how the Froggy demo (and also Adriane demo) is doing AA.
This sample allows you to add an additional pass for supersampling AA and kernel filtering.
It also allows you to
- test CSAA mode.
- see how to use FBO. |
|
 |
 |

Whitepaper
Download
|
|
|
Simple Glow 
Glow effect using separate filter and FBO.
Simple sample on how to create a post-processing effect without changing too much of the main rendering code of you application.
|
|
 |
 |

Whitepaper
Download
|
|
|
Simple Depth Float 
Simple Depth Float demonstrates the use of a floating point depth buffer. The sample demonstrates the differences in depth fighting between different depth buffer precisions, and it demonstrates inverting the depth values to enhance precision further when using a floating point depth buffer. |
|
 |
 |

Whitepaper
Download
|
|
|
Dual Depth Peeling 
This sample demonstrates how to implement depth peeling on GeForce 8 using the new 32-bit depth texture format, as well as an optimization called dual depth peeling which peels from the front and from the back simultaneously. |
|
 |
 |

Whitepaper
Download
|
|
|
Multisample Coverage 
This sample demonstartes the use WGL_NV_multisample_coverage. It shows how to enable CSAA in an application window without rendering to a framebuffer object. |
|
 |
 |

Whitepaper
Download
|
|
|
Simple Texture Buffer Object 
Simple Texture Buffer Object demonstrates how a texture buffer object can be used as a source for additional array data for a shader. In this sample, the arrays are used in place of regular vertex arrays to allow more comlicated indexing than OpenGL allows. |
|
 |
 |

Whitepaper
Download
|
|
|
Cascaded Shadow Maps 
This sample illustrates cascaded shadow mapping with the use of texture arrays in OpenGL with GLSL. |
|
 |
 |

Whitepaper
Download
|
|
|
Christmas Tree 
Chistmas Tree demonstrates using new fourth generation shader capabilities to render a visually complex Christmas Tree. The sample uses deferred shading into a high dynamic range framebuffer object to handle the complex lighting environment |
|
 |
 |

Whitepaper
Download
|
|
|
Render to 3D Texture 
This sample demonstrates the use of framebuffer objects to render to a 3D texture. It does a simple wave simulation on the 3D texture, and displays it by ray marching |
|
 |
 |

Whitepaper
Download
|
|
|
Transform Feedback Fractal 
Transform Feedback Fractal shows an advanced use of the transform feedback and the geometry shader, by iteratively feeding the data through the transformation stages, adding more detail each time. |
|
 |
 |

Whitepaper
Download
|
|
|
Simple Texture Array 
Simple texture array demonstrates the use of the GL_EXT_texture_array extension. |
|
 |
 |

Whitepaper
Download
|
|
|
Simple Geometry Program 
Simple Geometry Program demonstrates the use of the assembly level GL_NV_gpu_program4 shading extension, focusing on geometry shaders. |
|
 |
 |

Whitepaper
Download
|
|
|
Simple Framebuffer Object 
Simple Framebuffer Object demonstrates the use of GL_EXT_framebuffer_object, GL_EXT_framebuffer_blit, GL_EXT_framebuffer_multisample, GL_NV_framebuffer_multisample_coverage, and several format extensions. This sample shows how a program can search for support format combinations to find something that suites its needs. |
|
 |
 |

Whitepaper
Download
|
|
|
HDR 
HDR demonstrates the use of new image formats for use in high-dynamic range rendering. |
|
 |
 |

Video
Whitepaper
Download
|
|
|
Cg Isosurf 
Cg Isosurf demonstrates the use of the geometry shader to tessellate an isosurface using marching tetrahedrons. The shaders includes tessellate metaballs, a texture volume, and a procedural vollume. |
|
 |
 |

Whitepaper
Download
|
|
|
Cg Geometry Program 
Cg Geometry Program demonstrates the use of Cg 2.0 in loading and using geometry programs with OpenGL. The sample includes programs for silhouette determination, curve tessellation, and fin extrusion |
|
 |
 |

Whitepaper
Download
|
|