osg(osg中文社区)-osgEarth-osgViewer-基于OpenGL-开源三维渲染引擎-图形引擎-虚拟仿真工具-osg教程-osg仿真

osgShadow

当前位置:首页 > 关于osg > 使用指南 > 用户指南

osgShadow例子演示了OSG实现的阴影技术的例子,有些阴影技术还未完善。

VOLUMETRIC SHADOWING

未完全实现。

SHADOW MAPPING

标准的基于深度的阴影。

SOFT SHADOW MAPS

需要Shader Model 3.0及其以上支持。

PARALLEL SPLIT SHADOW MAPS

当前正在开发。

PROGRAM ARGUMENTS

argument

description

-h or --help

Display this information.

--positionalLight

Use a positional light.

--directionalLight

Use a direction light.

--noUpdate

Disable the updating the of light source.

--base

Add a base geometry to test shadows.

--sv

Select ShadowVolume implementation.

--ssm

Select SoftShadowMap implementation.

--sm

Select ShadowMap implementation.

--pssm

Select ParallelSplitShadowMap implementation.

--mapcount

ParallelSplitShadowMap texture count.

--mapres

ParallelSplitShadowMap texture resolution.

--debug-color

ParallelSplitShadowMap display debugging color (only the first 3 maps are color r=0,g=1,b=2.")

--minNearSplit

ParallelSplitShadowMap shadow map near offset.

--maxFarDist

ParallelSplitShadowMap max far distance to shadow.

--moveVCamFactor

ParallelSplitShadowMap move the virtual frustum behind the real camera, (also back ground object can cast shadow).

--NVidea

ParallelSplitShadowMap set default PolygonOffset for NVidea.

--PolyOffset-Factor

ParallelSplitShadowMap set PolygonOffset factor.

--PolyOffset-Unit"

ParallelSplitShadowMap set PolygonOffset unit.

--CullFaceFront

ParallelSplitShadowMap add a cull face: front.

-1

Use test model one.

-2

Use test model two.

-3

Use test model three.

--two-sided

Use two-sided stencil extension for shadow volumes.

--two-pass

Use two-pass stencil for shadow volumes.

快捷键

key

description

1

Select trackballmanipulator

2

Select flightmanipulator

3

Select drivemanipulator

4

Select terrainmanipulator

5

Select animationpathmanipulator

s

Cycle through statistics modes

w

Cycle through solid, wire and point modes

l

Toggle lighting

t

Toggle textures