SLI Zone
NVIDIA.com Developer Home

Last Updated: 10 / 14 / 2008

Real-Time Rendering Effects and Techniques

Real-time Rendering at NVIDIA

Advanced Realtime Rendering Effects and Techniques. This collection of documents cover some of NVIDIA's innovative research into the limits of present-day graphics API's - and beyond.

To the Edge of the API | And Beyond

To the Edge of the API

Samples from NVIDIA Graphics SDK 10.5:
Clipmaps (Whitepaper)
Clipmaps are a feature (first implemented on SGI workstations) that allow mapping extremely high resolution textures to terrains. The original SGI implementation required highly specialized, custom hardware. The advanced features of the NVIDIA® GeForce® 8800 now permit the same algorithm using consumer hardware.
HDR Rendering (Video)
Demonstrates HDR rendering on the GeForce 8800 and DirectX10. The GeForce 8800 supports new features to facilitate next-gen HDR. There are new texture and render target formats, such as R11G11B10F, which has the same memory requirements as standard 32-bit RGBA. The sample also demonstrates anti-aliasing combined with HDR, including high-quality 16x Coverage Sample Anti-Aliasing.
Soft Particles (Whitepaper)
Particle sprites in games commonly produce artifacts – unnaturally sharp edges – where they intersect the rest of the scene. This sample shows two ways to fade out flat sprites against a 3D scene, softening the artificial edges. Two solutions are implemented: one uses the ability of DirectX10 to read the depth buffer as a texture; the other uses a more conventional second render target to store depth values. - one other rendering Z in a 2nd render target.
GPU Blend Shapes (Whitepaper)
This paper presents two methods for computing Blend Shapes on the GPU. The technique produces hybrid, blended meshes by combining a large number of input meshes. GPU generations prior to GeForce 8800 had to use the vertex attributes to send additional data for blend shapes. Because of the limited amount of available attributes, few simultaneous blend shapes meshes were possible. The GeForce 8800 permits a large number of input meshes, with no fixed limit.
Metaballs (Video)
This sample demonstrates efficient use of DX10 geometry shader to perform isosurface tessellation
Instanced Tesselation (Whitepaper)
This OpenGL 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.
Simple Depth Float (Whitepaper)
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.
Dual Depth Peeling (Whitepaper)
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.
Render to 3D Texture (Whitepaper)
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
Transform Feedback Fractal (Whitepaper)
"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.
Simple Geometry Program (Whitepaper)
Simple Geometry Program demonstrates the use of the assembly level GL_NV_gpu_program4 shading extension, focusing on geometry shaders.
Cg Isosurf (Whitepaper)
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 volume.
Cg Geometry Program (Whitepaper)
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
Samples from NVIDIA Graphics SDK 9.52:
Coverage-Sampled Antialiasing (CSAA) Tutorial (Whitepaper)
This sample demonstrates how to enable Coverage-Sampled Antialiasing (CSAA) on GeForce 8 series GPUs in DX9.
Antialiasing with Transparency (Whitepaper)
This sample demonstrates the GeForce 7 Series per-primitive super-sample and multi-sample modes for antialiasing primitives with transparent fragments. The problem with using alphatest to virtually simulate geometry is a hard edge that is produced where the test occurs. The conventional solution for dealing with this problem is to use alpha blending. Using a GeForce 7 Series GPU, you can enable super-sampling or multi-sampling per-primitive, yielding much higher image quality along the alpha tested edges.
SLI Best Practices (Whitepaper)
This code sample demonstrates the proper way to detect SLI-configured systems, as well as how to achieve maximum performance benefit from SLI.
Post Procesing Effects with Anti-Aliasing
This example demonstrates how to combine post-processing effects with multisample antialiasing in OpenGL. Current texture hardware is not capable of reading directly from a multisampled buffer, so it is not possible to use render-to-texture in this case. Instead, we render to the back buffer, and then use glCopyTexImage to copy from the back buffer to a texture. The copy performs the necessary downsampling automatically. This example also shows how to use the Transparency Antialiasing mode of the ARB multisample extension to provide higher quality, order independent transparency for geometry such as trees. This mode converts the alpha value of the pixel into a 16-level (dithered) coverage mask, which is logically ANDed with the raster-generated coverage mask.
DXSAS Sample Implementation 0.8 (User Guide)
This running code sample demonstrates how to implement a DirectX Semantics and Annotations (DXSAS) ScriptExecute parser in an engine. Full support for the standard annotations and semantics is provided. The user interface lets you apply multiple scene and model effects simultaneously, so the you can see hundreds of different effect combinations. All effect files were developed using FX Composer.
Instancing (Whitepaper)
This sample uses Microsoft's Direct3D9 Instancing Group to render thousands of meshes on the screen with only a handful of draw calls. This significantly reduces the CPU overhead of submitting many separate draw calls and is a great technique for rendering trees, rocks, grass, RTS units and other groups of similar (but necessarily identical) objects.
Pseudo Instancing in OpenGL (Whitepaper)
This sample demonstrates a technique for speeding up the rendering of instanced geometry with GLSL.
Query Sample (User Guide)
Shows how to check for availability and use of the various query types supported in DirectX9. This sample queries for and displays results for queries of type: event, occlusion, timestamp, timestamp frequency, timestamp disjoint, and if running with the debug runtime, resource and vertex stats.
Simple Vertex Texture (Video)
This simple example demonstrates the use of the NV_vertex_program3 extension to perform texture look-ups in a vertex program. It uses this feature to perform simple displacement mapping. The example also shows how to implement bilinear filtering of vertex texture fetches.
Medical Image Reconstruction (Whitepaper)
Fast Fourier Transforms (FFT) are used to reconstruct images from medical scans. This sample presents an implementation of FFTs on the GPU. This implementation automatically balances the load between the vertex processor, the rasterizer, and the fragment processor; it also uses several other novel techniques to obtain high performance on the Quadro NV4x family of GPUs. This technique is described in GPU Gems 2: Programming Techniques for High-Performance Graphics and General-Purpose Computation.
Motion Blur as a 2D Post-Processing Effect (GDC 2003 Presentation)
This example demonstrates motion blur as a 2D post process. The algorithm was described at GDC 2003 in the "Stupid OpenGL Shader Tricks" presentation. The advantage of this method over an accumulation buffer is that you only need to render the scene once, but it does have artifacts.
Occlusion Query - OpenGL
This sample illustrates occlusion query using a simple sphere and a plane.
Occlusion Qery - DirectX (Whitepaper)
This sample shows usage of occlusion queries to cull out complex objects and save bandwidth to the card. Occlusion queries report how many pixels a set of draw calls actually wrote to.
GPU Particles (Whitepaper by Lutz Latta)
This sample implements a large-scale particle system entirely on the GPU. The positions and velocities of each particle are stored in floating point textures. Fragment programs are used to update the velocities and positions of the particles by rendering to texture each time step. The particles also collide against a sphere object, and a terrain heightfield which is stored in a texture. If available, the multiple draw buffers extension (MRT) is used to update the position and velocities in a single pass. The particles are rendered as point sprites. The position texture is converted into a vertex array for rendering the particles using the vertex buffer and pixel buffer object extensions (VBO and PBO). On the GeForce 6800, this method can render a million particles at about 20 frames per second. This example is inspired by Lutz Latta's talk from GDC 2004, "Building a Million Particle System".
Clip Planes (Whitepaper)
This entrys shows various ways to clip a scene. It demonstrates user clip planes as well as a technique to shear the near clip plane to implement a single custom user clip plane(useful for water planes)
Depth Peeling 2
This entry is a port of the original Depth Peeling ("layerz") sdk sample, but it is much simpler, because it uses fragment programs instead of complicated texture shaders.
External Triangles
This entry illustrates the strange things that happen when you use homogeneous vertex positions. It has views that help you see how a single triangle looks in screen space, world space, and 2D homogeneous space.
Raytraced Refraction
This eyeball shader presents a method for adding high-quality details to small objects using a single-bounce ray traced pass. In this example, the polygonal surface is sampled and a refraction vector is calculated. This vector is then intersected with a plane that is defined as being perpendicular to the object's X axis. The intersection point is calculated and used as texture indices for a painted Iris.
The sample permits varying the index of refraction, the depth and density of the lens. Note that the choice of geometry is arbitrary -- this entry is a sphere, but any polygonal model can be used.
Fog Comparison
This effect demonstrates the GL_NV_fog_distance extension, and compares the use of radial-distance-based fog to standard depth-based fog. Standard fog computes fog values using just the eye-space Z distance of each vertex. This extension computes fog based on the actual Euclidian distance of the vertex from the viewpoint, resulting in more realistic fog. Use the 'f' key to cycle the fog mode from GL_LINEAR to GL_EXP and GL_EXP2. The difference between radial distance fog and depth fog is most evident in linear mode.
Oblique Frustum Clipping
This entry illustrates Oblique Frustum Clipping. This technique is superior to using a user clip when rendering planar reflections, such as a floor or water surface. Oblique Frustum Clipping shears the near clip plane of the projection matrix to match the water or floor surface, thus making it unnecessary to use a separate clip plane. This saves much performance on cards without native user clip plane support, such as GeForce4 and lower, and some performance on cards with native user clip planes, such as GeForceFX and higher.
Order Independant Transparency 2
This entry is a port of the original "oit" (order-independent transparency) entry, but it is much simpler, because it uses fragment programs instead of complicated texture shaders.
Thinfilm
This sample shows a thin film interference effect. Specular and diffuse lighting are computed per-vertex in a GLSL vertex shader, along with a view depth parameter, which is computed using the view vector, surface normal, and the depth of the thin film on the surface of the object. The view depth is then perturbed in an ad-hoc manner per-fragment by the underlying decal texture, and is then used to lookup into a 1D texture containing the precomputed destructive interference for red / green / blue wavelengths given a particular view depth. This interference value is then used to modulate the specular lighting component of the standard lighting equation.
Cull Fragment Simple
This sample illustrates using the cull fragment texture shader. Automatic object space texture coordinate generation is used to provide texture coordinates representing relative distance to clipping planes. Based upon distance to the two planes, a fragment is rejected or accepted for further processing. This is similar to an alpha test but instead of using alpha, the (s,t,r,q) texture coordinates determine if a fragment should be eliminated from further processing. The texture shader program used is very simple.
Cull Fragement Complex
This sample illustrates using the cull fragment texture shader in conjunction with a vertex program to perform complex cull fragment operations. In this example a vertex program is used to compute custom texture coordinates representing distance from a point (or minimum distance from a set of points). These texture coordinates are then used to reject or accept a fragment during rasterization. The vertex program is also used to compute a simple diffuse lighting term.
Depth of Field (Whitepaper)
This entry shows render to texture, blurring an image by repeated filter-blitting on the GPU, and generating a depth-of-field effect.
Volume Intersect
This entry illustrates one way compute conservative shadow bounds for improved stenciled shadow volume performance. It computes a 3D screen space rectangle that can be used to scissor and depth_bounds_test away updates to pixels that the light will not affect.
MeshMender Simple Example (User Guide)
A simple example for NVMeshMender. NVMeshMender is a source code library that prepares a model for per-pixel lighting by generating a tangent basis (tangent, binormal, normal). It uses smoothing groups to properly handle normal map texture mirroring and cylindrical wrapping by splitting vertices that can not, or should not, be smoothed together. It also gives great control over what vectors can be smoothed together through user-specified crease angles.
From NVISION08:

...And Beyond

From NVISION08:

Want to Learn More? NVIDIA Documentation Home Page




nvidiadeveloper Twitterfeed
Popular References
Free Books Online