例子程序

From KlayGE
Revision as of 04:01, 27 June 2013 by Gongminmin (Talk | contribs)

Jump to: navigation, search

注意

如果要在没有安装Microsoft Visual C++ 2010的机器上运行二进制版本的例子,需要事先安装Microsoft Visual C++ 2010 Redistributable Package。

  • x86版本可以从[1]下载。
  • x64版本可以从[2]下载。

在第一次执行之前,建议先运行引擎提供的KGEConfig来完成配置。

Atmospheric Scattering

Atmospheric Scattering

基于物理的大气散射,可以模拟各种密度和各种吸收率的大气状况。

难度

技术点

  1. 大气散射

需求

  • Geforce 6600以上或Radeon 9500以上。

渲染引擎支持

  • D3D11/OpenGL。

Cascaded Shadow Map

Cascaded Shadow Map

两种高质量的大范围阴影渲染。

难度

技术点

  1. PSSM
  2. SDSM

需求

  • Geforce 6600以上或Radeon 9500以上。

渲染引擎支持

  • D3D11/OpenGL。

Caustics Map

Caustics Map

实时焦散生成。

难度

技术点

  1. Caustics
  2. 双面折射
  3. 全方向的shadow map

需求

  • Geforce 6600以上或Radeon 9500以上。

渲染引擎支持

  • D3D11/OpenGL。

Deferred Rendering

Deferred Rendering

Deferred rendering渲染框架。

难度

技术点

  1. Deferred Rendering
  2. GI
  3. SSVO
  4. FXAA
  5. 任意光源
  6. Soft shadow
  7. 文件打包系统

需求

  • Geforce 6600以上或Radeon 9500以上。

渲染引擎支持

  • D3D11/OpenGL/OpenGLES2。

Detailed surface

Detailed Surface

多种带细节的表面渲染技术。

难度 容易

技术点

  1. Bump mapping
  2. Parallax mapping
  3. Parallax occlusion mapping
  4. Displacement mapping
  5. Normal map压缩 (KlayGE 3.4.0之后)

需求

  • Geforce FX以上或Radeon 9500以上。

渲染引擎支持

  • D3D11/OpenGL/OpenGLES。

Global Illumination

Global Illumination

基于Splatting Indirect Illumination的实时全局光照。

难度

技术点

  1. Realtime GI
  2. Deferred Rendering
  3. Soft shadow

需求

  • Geforce 6以上或Radeon HD2400以上。

渲染引擎支持

  • D3D11/OpenGL/OpenGLES2。

GPU Particle System

GPU Particle System

基于GPU的粒子系统。

难度

技术点

  1. 粒子系统
  2. GPU多遍计算
  3. Vertex texture fetch
  4. Deferred particle

需求

  • Geforce 6以上或Radeon HD2400以上。

渲染引擎支持

  • D3D11/OpenGL。

JudaTex Viewer

Juda Texture Viewer

Juda texture查看器。

难度

技术点

  1. Juda texture
  2. 鼠标交互

需求

  • Geforce FX以上或Radeon 9500以上。

渲染引擎支持

  • D3D11/OpenGL/OpenGLES2。

Model viewer

Model Viewer

一个MeshML模型查看器,支持Skinned mesh、Normal map和PN Triangles。

难度

技术点

  1. GPU骨骼动画
  2. 模型格式的读取
  3. Normal map的渲染
  4. PN Triangles算法
  5. D3D11 hardware tessellation
  6. Instanced tessellation
  7. Hull Shader/Domain Shader

需求

  • Geforce FX以上或Radeon 9500以上。

渲染引擎支持

  • D3D11/OpenGL/OpenGLES2。

Motion Blur and Depth of Field

Mition Blur and Depth of Field

运动模糊景深post process。可以调节焦平面和焦距范围。并演示了引擎中的instancing实现。在硬件支持instancing的时候会自动切换到硬件实现,否则使用CPU解开instance数据。

难度

技术点

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

需求

  • Geforce 6600以上或Radeon 9500以上。

渲染引擎支持

  • D3D11/OpenGL/OpenGLES2。

Ocean

Ocean

演示水面的渲染。水面的运动通过在GPU上实时地做FFT来模拟。核心来自于NVIDIA的Demo。

难度

技术点

  1. 水面渲染
  2. Compute shader
  3. GPU上的FFT
  4. 反射贴图
  5. 镜头眩光
  6. 文件打包系统

需求

  • Geforce 6以上或Radeon HD2400以上。实时编辑需要Geforce 8以上或Radeon HD4以上。

渲染引擎支持

  • D3D11/OpenGL/OpenGLES2。

Order Independent Transparency

OIT

多种顺序无关的透明物体渲染。

难度

技术点

  1. Depth peeling
  2. Per-pixel linked lists
  3. Adaptive transparency

需求

  • Geforce 6600以上或Radeon 9500以上。

渲染引擎支持

  • D3D11/OpenGL/OpenGLES。

Particle Editor

Particle Editor

粒子系统编辑器

难度

技术点

  1. 粒子系统
  2. 复杂的UI
  3. Soft particle
  4. Geometry shader

需求

  • Geforce FX以上或Radeon 9500以上。推荐使用Geforce 6以上。

渲染引擎支持

  • D3D11/OpenGL/OpenGLES2。

Post Processing

Post Processing

演示后处理的能力。支持的特效有:

  • Ascii Arts,把渲染的图像拟合成ascii字符的表示。
  • 卡通渲染。使用两遍的方法,第一遍得出几何位置,第二遍进行光照和勾边。
  • Tiling,砖块的效果。
  • HDR。
  • Night Vision,模拟夜视仪看到的效果。
  • Old Fashion,老照片效果。

难度

技术点

  1. post process
  2. 用GPU进行ascii匹配
  3. Cartoon post process
  4. 深度和法线间断点的查找

需求

  • Geforce 6600以上或Radeon 9500以上。

渲染引擎支持

  • D3D11/OpenGL。

Scene Player

Scene Player

场景播放器,可以执行预定义的动态场景。

难度

技术点

  1. Python脚本
  2. 延迟渲染

需求

  • Geforce 6600以上或Radeon 9500以上。

渲染引擎支持

  • D3D11/OpenGL/OpenGLES。

Reflection

Reflection

屏幕空间实时反射。

难度

技术点

  1. 双方向SSR

需求

  • Geforce 6600以上或Radeon 9500以上。

渲染引擎支持

  • D3D11/OpenGL/OpenGLES。

Shadow cube map

Shadow cube map

把传统的shadow map扩展到cube map上,模拟了全方向的点光源和光源的投射。另一个改进是加入了Variance shadow map

难度

技术点

  • 全方向的shadow map
  • VSM
  • 纹理投射

需求

  • Geforce FX 5600以上或Radeon 9500以上。推荐使用Geforce 6以上。

渲染引擎支持

  • D3D11/OpenGL/OpenGLES。

Shadow cube map

Shadow cube map

把传统的shadow map扩展到cube map上,模拟了全方向的点光源和光源的投射。另一个改进是加入了Variance shadow map

难度

技术点

  • 全方向的shadow map
  • VSM
  • 纹理投射

需求

  • Geforce FX 5600以上或Radeon 9500以上。推荐使用Geforce 6以上。

渲染引擎支持

  • D3D11/OpenGL/OpenGLES2。

Sub-surface

Sub-surface

次表面散射的实时渲染。

难度

技术点

  1. 次表面散射
  2. Bump map

需求

  • Geforce FX 5600以上或Radeon 9500以上。推荐使用Geforce 6以上。

渲染引擎支持

  • D3D11/OpenGL/OpenGLES2。

Text

Text

演示了基于signed distance field的字体显示方法

难度 容易

技术点

  1. Font

需求

  • Geforce FX以上或Radeon 9500以上。

渲染引擎支持

  • D3D11/OpenGL/OpenGLES2。

Video texture

Video Texture

演示了Show engine,解码后的视频作为纹理贴到3D物体上。其中用到的视频来自开源电影Big Buck Bunny

难度 容易

技术点

  1. DirectShow解码到纹理

需求

  • Geforce 4 Ti以上或Radeon 9200以上。

渲染引擎支持

  • D3D11/OpenGL/OpenGLES2。

已知问题

  • 在D3D11中无法全屏。