Skip to content

cnsuhao/build_all

 
 

Repository files navigation

build_all folder

build_all folder is an optional folder that allows you to build all the samples that you have cloned

  • CMakeLists.txt: the cmake file that will walk through samples to include them in the project
  • README.md: this file

List of available samples

When build_all folder is used for cmake and if you downloaded all the available repositories, you should see the following samples in the IDE of your choice:

gl cadscene render techniques

sample screenshot

github repository

This sample implements several scene rendering techniques, that target mostly static data such as often found in CAD or DCC applications. In this context static means that the vertex and index buffers for the scene's objects hardly change. It is still fine to edit the geometry of a few objects of the scene, but foremost the matrix and material values would be modified across frames. Imagine making edits to the wheel topology of a car, or positioning an engine, that means the rest of the assembly is not modified. The principle OpenGL mechanisms hat are used here are described in the presentation slides of SIGGRAPH 2014. It is highly recommended to go through the slides first.

The sample makes use of multiple OpenGL 4 core features, such as ARB_multi_draw_indirect, but also showcases OpenGL 3 style rendering techniques.

There is also several techniques built around the NV_command_list extension. Please refer to gl commandlist basic for an introduction on NV_command_list.

Note: This is just a sample to illustrates several techniques and possibilities how to approach rendering, its purpose is not to provide production level, highly optimized implementations.

gl commandlist basic

sample screenshot

github repository

In this sample the NV_command_list extension is used to render a basic scene (variant of gl_simple_pipeline sample) and texturing is performed via ARB_bindless_texture.

NVIDIA commandlist extension over bk3d models

Example

github repository

This sample shows how to use NVIDIA command-list extension over basic CAD scenes, using a pre-baked binary format (bk3d) for various models coming from CAD applications.

This sample shows how to use command-buffers 64 bits addresses as a way to put many of them in a single API call (using glDrawCommandsStatesAddressNV).

This samples shows also a nice way to combine MSAA with super-sampling for very clean rendering (see NVFBOBox).

gl dynamic lod

sample screenshot

github repository

With the addition of indirect rendering (ARB_draw_indirect and ARB_multi_draw_indirect) OpenGL got an efficient mechanism that allows the GPU to create or modify its own work without stalling the pipeline. As CPU and GPU are best used when working asynchronously, avoiding readbacks to CPU to drive decision making is beneficial.

In this sample we use ARB_draw_indirect and ARB_shader_atomic_counters to build three distinct render lists for drawing particles as spheres, each using a different shader and representing a different level of detail (LOD): Draw as point; Draw as instanced low resolution mesh; Draw as instanced adaptive tessellated mesh

gl_cuda_interop_pingpong_st

sample screenshot

github repository

This is a small sample that demonstrates the most efficient way to use the CUDA-OpenGL interop API in a single-threaded manner.

This example computes with CUDA a temperature scalar field that gets updated every frame. The visual result is a a 256 x 256 x 256 uniform grid. It is rendered in OpenGL with a basic ray-marching fragment shader.

The CUDA compute part is a simple heat propogator. Since at every time step our result depends on the result of the previous frame, we pingpong the 3D texture resource handles back and forth every frame.

gl occlusion culling

raster

github repository

This sample implements a batched occlusion culling system, which is not based on individual occlusion queries anymore, but uses shaders to cull many boxes at once. The principle algorithms are also illustrated towards the end of the presentation slides of GTC 2014 and SIGGRAPH 2014

It leverages the ARB_multi_draw_indirect (MDI) extension to implement latency-free occlusion culling. The MDI technique works well with a simplified scene setup where all geometry is stored in one big VBO/IBO pairing and no shader changes are done in between.

The slides mention that this approach could be extended to use NV_bindless_multi_draw_indirect to render drawcalls using different VBO/IBOs in one go. With the upcoming NV_command_list however an even better approach is possible, which is also implemented in the sample and allows more flexible state changes. Please refer to gl commandlist basic for an introduction on NV_command_list.

gl_optix_composite

sample screenshot

github repository

The OpenGL + OptiX Compositing sample demonstrates how to mix interactive OpenGL rendering with OptiX overlay compositing. This particular example demonstrates 8x sub-sampled, raytraced hard shadows which are composited with an OpenGL wireframe model. The shadows are computed by OptiX, and the results are placed into an OpenGL texture which represents a screen-space shadow mask. During the final OpenGL rendering past, the shadow mask texture is evaluated to give the fractional shadow factor.

While this sample demonstrates hard shadow compositing, the technique is not limited to shadows, and may be used for reflections, refractions, and other effects generated by GPU OptiX raytracing.

gl_path_rendering_CMYK

Example

github repository

This sample shows how to use NVIDIA path rendering extension.

It also exposes it through FBO (Frame-buffer-objects) and shows how to work on CMYK-Alpha format.

gl_simple_FBO

Example

github repository

This sample shows a very simple implementation of OpenGL Frame-buffer object (FBO)

gl ssao

sample screenshot

github repository

This sample implements screen space ambient occlusion (SSAO) using horizon-based ambient occlusion (HBAO). You can find some details about HBAO here. It provides two alternative implementations the original hbao as well as an enhanced version that is more efficient in improved leveraging of the hardware's texture sampling cache, using de-interleaved texturing.

    Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved.

    Redistribution and use in source and binary forms, with or without
    modification, are permitted provided that the following conditions
    are met:
     * Redistributions of source code must retain the above copyright
       notice, this list of conditions and the following disclaimer.
     * Neither the name of NVIDIA CORPORATION nor the names of its
       contributors may be used to endorse or promote products derived
       from this software without specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
    EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
    CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
    OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

About

repository containing cmake file to gather all the cloned samples and create one project (solution) with all

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CMake 42.0%
  • Shell 29.9%
  • Batchfile 28.1%