Samples

From KlayGE
Revision as of 11:37, 23 December 2010 by Gongminmin (Talk | contribs)

Jump to: navigation, search

Note If you want to run samples on a PC without Microsoft Visual C++ 2010 installed, you need to install Microsoft Visual C++ 2010 Redistributable Package first.

  • Vcredist x86 can be downloaded from [1].
  • Vcredist x64 can be downloaded from [2].

Before running these samples for the first time, it's recommended to run KConfig, which is provided by KlayGE, to complete the configuration first.

Deferred Rendering

Deferred Rendering

Deferred rendering rendering framework.

Techniques

  1. Deferred Lighting
  2. SSAO
  3. Adaptive Anti-alias
  4. Arbitrary light source
  5. Soft shadow
  6. Packing System

Requirements

  • Geforce 6600+ or Radeon 9500+.

Rendering plugin supported

  • D3D11/OpenGL.

Depth peeling

File:Depthpeeling.jpg
Depth Peeling

Order independent transparency rendering.

Techniques

  1. Depth peeling
  2. MRT
  3. UI

Requirements

  • Geforce 6600+ or Radeon 9500+.

Rendering plugin supported

  • D3D11/OpenGL.

Distance mapping

Distancemapping

Distance mapping from chapter 8 of GPU Gems 2. In pixel shader, precomputed distance field is used to do local sphere ray tracing. The extension here is the silhouette can be presented well.

Techniques

  1. Distance mapping
  2. Silhouette detection
  3. Normal map compression (since 3.4.0)

Requirements

  • Geforce FX+ or Radeon 9500+. Geforce 6+ recommanded.

Rendering plugin supported

  • D3D11/OpenGL.

Fractal

Fractal

Calculate fractal on GPUs.

Techniques

  1. Ping-pong buffers

Requirements

  • Geforce FX+ or Radeon 9500+. Geforce 6+ recommanded.

Rendering plugin supported

  • D3D11/OpenGL/OpenGLES2.

GPU Particle System

GPU Particle System

GPU-based particle system.

Techniques

  1. Particle system
  2. Multi-pass rendering
  3. Vertex texture fetch
  4. Deferred particle

Requirements

  • Geforce 6+ or Radeon HD2400+.

Rendering plugin supported D3D11/OpenGL.

JudaTex Viewer

Juda Texture Viewer

Juda Texture viewer.

Techniques

  1. Juda Texture
  2. Mouse Interaction

Requirements

  • Geforce FX+ or Radeon 9500+.

Rendering plugin supported

  • D3D11/OpenGL.

Model viewer

Model Viewer

A MeshML model viewer, which support skinned mesh and normal map. The model is from http://www.cgrealm.cn.

Techniques

  1. GPU skinning
  2. MeshML reading
  3. Normal map rendering
  4. UI

Requirements

  • Geforce FX+ or Radeon 9500+.

Rendering plugin supported

  • D3D11/OpenGL/OpenGLES2.

Motion Blur and Depth of Field

Mition Blur and Depth of Field

Motion blur and depth of field post process. Focus plane and focus range can be adjusted. This sample also demonstrate the instancing technique. It switchs to hardware instancing if the hardware supports it, or else instance data are expanded on CPUs.

Techniques

  1. Motion Blur
  2. Depth of field
  3. Summed-Area Table
  4. Software/hardware instancing
  5. Script engine
  6. UI

Requirements

  • Geforce 6600+ or Radeon 9500+.

Rendering plugin supported

  • D3D11/OpenGL.

Ocean

Ocean

Demonstrate the water rendering. Water movement is simulated by GPU real-time FFT operation. The kernel is from NVIDIA's demo.

Techniques

  1. Water rendering
  2. Compute shader
  3. FFT on GPUs
  4. Reflection mapping
  5. Fog
  6. Lens flare
  7. Packing System

Requirements

  • Geforce 6xxx+ or Radeon HD2xxx+. Realtime editing requires Geforce 8xxx+ or Radeon HD4xxx+.

Rendering plugin supported

  • D3D11/OpenGL.

Parallax

Parallax mapping, extend from normal map.

Techniques

  1. Parallax mapping
  2. Normal map compression (since KlayGE 3.4.0)

Requirements

  • Geforce FX+ or Radeon 9500+.

Rendering plugin supported

  • D3D11/OpenGL/OpenGLES2.

Known issues

  • The texture is not right in OpenGL plugin on ATI's card.

Particle Editor

Particle Editor

Particle system editor.

Techniques

  1. Particle system
  2. Complex UI
  3. Soft particle
  4. Geometry shader

Requirements

  • Geforce FX+ or Radeon 9500+. Geforce 6+ recommanded.

Rendering plugin supported

  • D3D11/OpenGL.

PNTriangles

Implement Curved PN Triangles algorithm by D3D11's tessellator. Low-poly model is tessellated to high-poly model at runtime.

Techniques

  1. PN Triangles algorithm
  2. Tessellation
  3. Hull Shader/Domain Shader

Requirements

  • Geforce GTX 4xx+ or RadeonHD 5xxx+.

Rendering plugin supported

  • D3D11/OpenGL/OpenGLES2.

PostProcessing

Post Processing

Demonstrate the post processing, including:

  • Ascii Arts, fitting the image to ascii characters.
  • Cartoon rendering with two pass rendering. The first pass renders geometry, the second pass calculates lighting and edge.
  • Tiling.
  • HDR.
  • Night Vision.
  • Old Fashion, looks like old picture.

Techniques

  1. Post process
  2. Ascii fitting on GPUs
  3. Cartoon post process
  4. Depth and normal discontinuous detection
  5. MRT

Requirements

  • Geforce 6600+ or Radeon 9500+.

Rendering plugin supported

  • D3D11/OpenGL.

ProceduralTex

Procedural Texture

Various procedural texture generation by perlin noise on GPUs.

Techniques

  1. Perlin noise
  2. Procedural texture

Requirements

  • Geforce FX+ or Radeon 9500+.

Rendering plugin supported

  • D3D11/OpenGL/OpenGLES2.

Refract

Refract

Refraction rendering. Fresnel and dispersion are supported.

Techniques

  1. Reflection, refraction and fresnel
  2. Dispersion
  3. HDR rendering
  4. Tone mapping
  5. HDR texture compression
  6. Dual face refraction

Requirements

  • Geforce FX+ or Radeon 9500. Geforce 6+ recommanded.

Rendering plugin supported

  • D3D11/OpenGL.

Shadow cube map

Shadow cube map

Expand the traditional shadow map to cube map. Simulate the omnidirectional point light and texture projection. The other improvement is the usage of Variance Shadow Map.

Techniques

  1. Omnidirectional shadow map
  2. VSM
  3. Texture projection

Requirements

  • Geforce FX 5600+ or Radeon 9500+. Geforce 6+ recommanded.

Rendering plugin supported

  • D3D11/OpenGL.

Sub-surface

Sub-surface

Real-time rendering of sub-surface scattering.

Techniques

  1. Sub-surface scattering
  2. Bump map

Requirements

  • Geforce FX 5600+ or Radeon 9500+. Geforce 6+ recommanded.

Rendering plugin supported

  • D3D11/OpenGL.

Text

Text

Demonstrate signed distance field based font system.

Techniques

  1. Font

Requirements

  • Geforce FX+ or Radeon 9500+.

Rendering plugin supported

  • D3D11/OpenGL/OpenGLES2.

Vertex displacement

Vertex displacement

Calculate position and normal displacement in vertex shader.

Techniques

  1. Vertex displacement
  2. Directly compute normal by derivative function.

Requirements

  • Geforce 4 Ti+ or Radeon 9200+.

Rendering plugin supported

  • D3D11/OpenGL/OpenGLES2.

Video texture

Video Texture

Demostrate show engine. Decoded video can be mapped to 3D objects as texture. The video is from a open source movie Big Buck Bunny.

Techniques

  1. DirectShow decode to texture

Requirements

  • Geforce 4 Ti+ or Radeon 9200+.

Rendering plugin supported

  • D3D11/OpenGL/OpenGLES2.

Known issues

  • Can't switch to full screen in D3D11.