informatik sources

This commit is contained in:
Ulf Gebhardt 2013-12-19 19:32:06 +01:00
parent a1b2c502cc
commit 28ad08a62f
912 changed files with 172468 additions and 0 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,76 @@
#include "stringlist.h"
// element am Endy anfügen
//string gelesenes_element;
//...
//dyn_array.push_back( gelesenes_element );
//Und so kannst du abschliessend auf alle Elems zugreifen:
//for( vector<string>::iterator it=dyn_array.begin(); it!=dyn_array.end();++it)
//{
//coord& elem = *it;
// ...
//}
//n = str_array.size()
std::string* CStringList::getLine(int lineId)
{
if(countLines() > lineId) return &std::string("");
return &(lines[lineId]);
}
void CStringList::addLine(std::string *line)
{
lines.push_back(*(line));
}
bool CStringList::delLine(int id)
{
return true;//lines.erase(id);
}
int CStringList::insertLine(int pos, std::string *line)
{
//dummy
return 0;
}
bool CStringList::loadFromFile(std::string *file)
{
clear();
std::ifstream in(file->c_str()); // Open for reading
std::string s;
while(getline(in, s)) // Discards newline char
addLine(&s);
return true;
}
int CStringList::countLines()
{
return int(lines.size());
}
int CStringList::countChars()
{
int result = 0;
for(int i=0;i<=int(lines.size());i++)
{
result += (int)getLine(i)->length();
}
return result;
}
void CStringList::clear()
{
lines.clear();
}

View File

@ -0,0 +1,22 @@
#pragma once
#include <string>
#include <vector>
#include <fstream>
class CStringList
{
std::vector<std::string> lines;
public:
std::string* getLine(int lineId);
void addLine(std::string *line);
bool delLine(int id);
int insertLine(int pos, std::string *line);
bool loadFromFile(std::string *file);
int countLines();
int countChars();
void clear();
};

View File

@ -0,0 +1,13 @@
#include "typecasts.h"
#include <sstream>
std::string inttostr(int i)
{
std::string s;
std::stringstream sstr;
sstr << i;
sstr >> s;
return s;
}

View File

@ -0,0 +1,5 @@
#pragma once
#include <string>
std::string inttostr(int i);

Binary file not shown.

View File

@ -0,0 +1,315 @@
07:31:02: Creating resource group General
07:31:02: Creating resource group Internal
07:31:02: Creating resource group Autodetect
07:31:02: SceneManagerFactory for type 'DefaultSceneManager' registered.
07:31:02: Registering ResourceManager for type Material
07:31:02: Registering ResourceManager for type Mesh
07:31:02: Registering ResourceManager for type Skeleton
07:31:02: MovableObjectFactory for type 'ParticleSystem' registered.
07:31:02: OverlayElementFactory for type Panel registered.
07:31:02: OverlayElementFactory for type BorderPanel registered.
07:31:02: OverlayElementFactory for type TextArea registered.
07:31:02: Registering ResourceManager for type Font
07:31:02: ArchiveFactory for archive type FileSystem registered.
07:31:02: ArchiveFactory for archive type Zip registered.
07:31:02: FreeImage version: 3.9.2
07:31:02: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
07:31:02: Supported formats: bmp,ico,jpg,jif,jpeg,jpe,jng,koa,iff,lbm,mng,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,cut,xbm,xpm,gif,hdr,g3,sgi
07:31:02: DDS codec registering
07:31:02: Registering ResourceManager for type HighLevelGpuProgram
07:31:02: Registering ResourceManager for type Compositor
07:31:02: MovableObjectFactory for type 'Entity' registered.
07:31:02: MovableObjectFactory for type 'Light' registered.
07:31:02: MovableObjectFactory for type 'BillboardSet' registered.
07:31:02: MovableObjectFactory for type 'ManualObject' registered.
07:31:02: MovableObjectFactory for type 'BillboardChain' registered.
07:31:02: MovableObjectFactory for type 'RibbonTrail' registered.
07:31:02: Loading library Plugins\RenderSystem_Direct3D9
07:31:02: Installing plugin: D3D9 RenderSystem
07:31:02: D3D9 : Direct3D9 Rendering Subsystem created.
07:31:02: D3D9: Driver Detection Starts
07:31:02: D3D9: Driver Detection Ends
07:31:02: Plugin successfully installed
07:31:02: Loading library Plugins\RenderSystem_GL
07:31:02: Installing plugin: GL RenderSystem
07:31:02: OpenGL Rendering Subsystem created.
07:31:03: Plugin successfully installed
07:31:03: Loading library Plugins\Plugin_ParticleFX
07:31:03: Installing plugin: ParticleFX
07:31:03: Particle Emitter Type 'Point' registered
07:31:03: Particle Emitter Type 'Box' registered
07:31:03: Particle Emitter Type 'Ellipsoid' registered
07:31:03: Particle Emitter Type 'Cylinder' registered
07:31:03: Particle Emitter Type 'Ring' registered
07:31:03: Particle Emitter Type 'HollowEllipsoid' registered
07:31:03: Particle Affector Type 'LinearForce' registered
07:31:03: Particle Affector Type 'ColourFader' registered
07:31:03: Particle Affector Type 'ColourFader2' registered
07:31:03: Particle Affector Type 'ColourImage' registered
07:31:03: Particle Affector Type 'ColourInterpolator' registered
07:31:03: Particle Affector Type 'Scaler' registered
07:31:03: Particle Affector Type 'Rotator' registered
07:31:03: Particle Affector Type 'DirectionRandomiser' registered
07:31:03: Particle Affector Type 'DeflectorPlane' registered
07:31:03: Plugin successfully installed
07:31:03: Loading library Plugins\Plugin_BSPSceneManager
07:31:03: Installing plugin: BSP Scene Manager
07:31:03: Plugin successfully installed
07:31:03: Loading library Plugins\Plugin_OctreeSceneManager
07:31:03: Installing plugin: Octree & Terrain Scene Manager
07:31:03: Plugin successfully installed
07:31:03: Loading library Plugins\Plugin_CgProgramManager
07:31:03: Installing plugin: Cg Program Manager
07:31:03: Plugin successfully installed
07:31:03: *-*-* OGRE Initialising
07:31:03: *-*-* Version 1.4.4 (Eihort)
07:31:03: Added resource location 'c:\Dokumente und Einstellungen\Rylon\Desktop\source\Verkerhssimulation M&U\media' of type 'FileSystem' to resource group 'General'
07:31:03: Added resource location 'c:\Dokumente und Einstellungen\Rylon\Desktop\source\Verkerhssimulation M&U\media\fonts' of type 'FileSystem' to resource group 'General'
07:31:03: Added resource location 'c:\Dokumente und Einstellungen\Rylon\Desktop\source\Verkerhssimulation M&U\media\materials\programs' of type 'FileSystem' to resource group 'General'
07:31:03: Added resource location 'c:\Dokumente und Einstellungen\Rylon\Desktop\source\Verkerhssimulation M&U\media\materials\scripts' of type 'FileSystem' to resource group 'General'
07:31:03: Added resource location 'c:\Dokumente und Einstellungen\Rylon\Desktop\source\Verkerhssimulation M&U\media\materials\textures' of type 'FileSystem' to resource group 'General'
07:31:03: Added resource location 'c:\Dokumente und Einstellungen\Rylon\Desktop\source\Verkerhssimulation M&U\media\models' of type 'FileSystem' to resource group 'General'
07:31:03: Added resource location 'c:\Dokumente und Einstellungen\Rylon\Desktop\source\Verkerhssimulation M&U\media\overlays' of type 'FileSystem' to resource group 'General'
07:31:03: Added resource location 'c:\Dokumente und Einstellungen\Rylon\Desktop\source\Verkerhssimulation M&U\media\particle' of type 'FileSystem' to resource group 'General'
07:31:03: Added resource location 'c:\Dokumente und Einstellungen\Rylon\Desktop\source\Verkerhssimulation M&U\media\gui' of type 'FileSystem' to resource group 'General'
07:31:03: Added resource location 'c:\Dokumente und Einstellungen\Rylon\Desktop\source\Verkerhssimulation M&U\media\DeferredShadingMedia' of type 'FileSystem' to resource group 'General'
07:31:03: Added resource location 'c:\Dokumente und Einstellungen\Rylon\Desktop\source\Verkerhssimulation M&U\media\packs\cubemap.zip' of type 'Zip' to resource group 'General'
07:31:03: Added resource location 'c:\Dokumente und Einstellungen\Rylon\Desktop\source\Verkerhssimulation M&U\media\packs\cubemapsJS.zip' of type 'Zip' to resource group 'General'
07:31:03: Added resource location 'c:\Dokumente und Einstellungen\Rylon\Desktop\source\Verkerhssimulation M&U\media\packs\dragon.zip' of type 'Zip' to resource group 'General'
07:31:03: Added resource location 'c:\Dokumente und Einstellungen\Rylon\Desktop\source\Verkerhssimulation M&U\media\packs\fresneldemo.zip' of type 'Zip' to resource group 'General'
07:31:03: Added resource location 'c:\Dokumente und Einstellungen\Rylon\Desktop\source\Verkerhssimulation M&U\media\packs\ogretestmap.zip' of type 'Zip' to resource group 'General'
07:31:03: Added resource location 'c:\Dokumente und Einstellungen\Rylon\Desktop\source\Verkerhssimulation M&U\media\packs\skybox.zip' of type 'Zip' to resource group 'General'
07:31:03: Added resource location 'c:\Dokumente und Einstellungen\Rylon\Desktop\source\Verkerhssimulation M&U\media\packs\OgreCore.zip' of type 'Zip' to resource group 'General'
07:31:03: D3D9 : RenderSystem Option: Allow NVPerfHUD = Yes
07:31:03: D3D9 : RenderSystem Option: Anti aliasing = None
07:31:03: D3D9 : RenderSystem Option: Floating-point mode = Fastest
07:31:03: D3D9 : RenderSystem Option: Full Screen = No
07:31:03: D3D9 : RenderSystem Option: Rendering Device = NVIDIA GeForce Go 6800
07:31:03: D3D9 : RenderSystem Option: VSync = No
07:31:03: D3D9 : RenderSystem Option: Video Mode = 800 x 600 @ 32-bit colour
07:31:07: CPU Identifier & Features
07:31:07: -------------------------
07:31:07: * CPU ID: GenuineIntel: Intel(R) Pentium(R) M processor 2.00GHz
07:31:07: * SSE: yes
07:31:07: * SSE2: yes
07:31:07: * SSE3: no
07:31:07: * MMX: yes
07:31:07: * MMXEXT: yes
07:31:07: * 3DNOW: no
07:31:07: * 3DNOWEXT: no
07:31:07: * CMOV: yes
07:31:07: * TSC: yes
07:31:07: * FPU: yes
07:31:07: * PRO: no
07:31:07: * HT: no
07:31:07: -------------------------
07:31:07: D3D9 : Subsystem Initialising
07:31:07: D3D9RenderSystem::createRenderWindow "OGRE Render Window", 800x600 windowed miscParams: FSAA=0 FSAAQuality=0 colourDepth=32 useNVPerfHUD=true vsync=false
07:31:07: D3D9 : Created D3D9 Rendering Window 'OGRE Render Window' : 800x600, 32bpp
07:31:07: D3D9 : WARNING - disabling VSync in windowed mode can cause timing issues at lower frame rates, turn VSync on if you observe this problem.
07:31:07: Registering ResourceManager for type Texture
07:31:07: Registering ResourceManager for type GpuProgram
07:31:07: D3D9: Vertex texture format supported - PF_FLOAT32_RGB
07:31:07: D3D9: Vertex texture format supported - PF_FLOAT32_RGBA
07:31:07: D3D9: Vertex texture format supported - PF_FLOAT32_R
07:31:07: RenderSystem capabilities
07:31:07: -------------------------
07:31:07: * Hardware generation of mipmaps: yes
07:31:07: * Texture blending: yes
07:31:07: * Anisotropic texture filtering: yes
07:31:07: * Dot product texture operation: yes
07:31:07: * Cube mapping: yes
07:31:07: * Hardware stencil buffer: yes
07:31:07: - Stencil depth: 8
07:31:07: - Two sided stencil support: yes
07:31:07: - Wrap stencil values: yes
07:31:07: * Hardware vertex / index buffers: yes
07:31:07: * Vertex programs: yes
07:31:07: - Max vertex program version: vs_3_0
07:31:07: * Fragment programs: yes
07:31:07: - Max fragment program version: ps_3_0
07:31:07: * Texture Compression: yes
07:31:07: - DXT: yes
07:31:07: - VTC: no
07:31:07: * Scissor Rectangle: yes
07:31:07: * Hardware Occlusion Query: yes
07:31:07: * User clip planes: yes
07:31:07: * VET_UBYTE4 vertex element type: yes
07:31:07: * Infinite far plane projection: yes
07:31:07: * Hardware render-to-texture: yes
07:31:07: * Floating point textures: yes
07:31:07: * Non-power-of-two textures: yes
07:31:07: * Volume textures: yes
07:31:07: * Multiple Render Targets: 4
07:31:07: * Point Sprites: yes
07:31:07: * Extended point parameters: yes
07:31:07: * Max Point Size: 8192
07:31:07: * Vertex texture fetch: yes
07:31:07: - Max vertex textures: 4
07:31:07: - Vertex textures shared: no
07:31:07: ***************************************
07:31:07: *** D3D9 : Subsystem Initialised OK ***
07:31:07: ***************************************
07:31:07: ResourceBackgroundQueue - threading disabled
07:31:07: Particle Renderer Type 'billboard' registered
07:31:07: SceneManagerFactory for type 'OctreeSceneManager' registered.
07:31:07: SceneManagerFactory for type 'TerrainSceneManager' registered.
07:31:07: SceneManagerFactory for type 'BspSceneManager' registered.
07:31:07: Registering ResourceManager for type BspLevel
07:31:07: TerrainSceneManager: Registered a new PageSource for type Heightmap
07:31:07: Parsing scripts for resource group Autodetect
07:31:07: Finished parsing scripts for resource group Autodetect
07:31:07: Parsing scripts for resource group General
07:31:08: Parsing script Examples.program
07:31:08: Parsing script StdQuad_vp.program
07:31:08: Parsing script deferred.glsl.program
07:31:08: Parsing script deferred.hlsl.program
07:31:08: Parsing script deferred_post_debug.glsl.program
07:31:08: Parsing script deferred_post_debug.hlsl.program
07:31:08: Parsing script deferred_post_minilight.glsl.program
07:31:08: Parsing script deferred_post_minilight.hlsl.program
07:31:08: OGRE EXCEPTION(2:InvalidParametersException): Parameter called lightSpecularColor does not exist. in GpuProgramParameters::_findNamedConstantDefinition at ..\src\OgreGpuProgram.cpp (line 883)
07:31:08: Error at line 29 of deferred_post_minilight.hlsl.program: Invalid param_named_auto attribute - Parameter called lightSpecularColor does not exist.
07:31:08: Parsing script deferred_post_multipass.glsl.program
07:31:08: Parsing script deferred_post_multipass.hlsl.program
07:31:08: Parsing script deferred_post_onepass.glsl.program
07:31:08: Parsing script deferred_post_onepass.hlsl.program
07:31:08: Parsing script BlackAndWhite.material
07:31:08: Parsing script Bloom.material
07:31:08: Parsing script DepthShadowmap.material
07:31:08: Parsing script DOF.material
07:31:08: Parsing script Embossed.material
07:31:08: Parsing script Example-DynTex.material
07:31:08: Parsing script Example-Water.material
07:31:08: Parsing script Example.material
07:31:09: Parsing script Examples-Advanced.material
07:31:09: Parsing script facial.material
07:31:09: Parsing script Glass.material
07:31:09: Parsing script hdr.material
07:31:09: Parsing script HeatVision.material
07:31:09: Parsing script Hurt.material
07:31:09: Parsing script instancing.material
07:31:10: Parsing script Invert.material
07:31:10: Parsing script Laplace.material
07:31:10: Parsing script MotionBlur.material
07:31:10: Parsing script Ocean.material
07:31:10: Parsing script OffsetMapping.material
07:31:10: Parsing script Ogre.material
07:31:10: Parsing script OldMovie.material
07:31:10: Parsing script OldTV.material
07:31:10: Parsing script Posterize.material
07:31:10: Parsing script RZR-002.material
07:31:10: Parsing script SharpenEdges.material
07:31:10: Parsing script smoke.material
07:31:10: Parsing script Tiling.material
07:31:10: Parsing script VarianceShadowmap.material
07:31:10: Parsing script deferred.material
07:31:10: Parsing script deferreddemo.material
07:31:10: Parsing script deferred_post_debug.material
07:31:10: Parsing script deferred_post_minilight.material
07:31:10: Parsing script deferred_post_multipass.material
07:31:10: Parsing script deferred_post_onepass.material
07:31:10: Parsing script RomanBath.material
07:31:10: Parsing script OgreCore.material
07:31:10: Parsing script OgreProfiler.material
07:31:10: Parsing script Examples.compositor
07:31:10: Parsing script sample.fontdef
07:31:10: Parsing script Ogre.fontdef
07:31:10: Parsing script emitted_emitter.particle
07:31:10: Parsing script Example-Water.particle
07:31:10: Parsing script Example.particle
07:31:10: Parsing script smoke.particle
07:31:10: Parsing script Compositor.overlay
07:31:10: Texture: New_Ogre_Border_Center.png: Loading 1 faces(PF_A8R8G8B8,256x128x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x128x1.
07:31:10: Texture: New_Ogre_Border.png: Loading 1 faces(PF_A8R8G8B8,256x256x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x256x1.
07:31:10: Font BlueHighwayusing texture size 512x512
07:31:10: Info: Freetype returned null for character 127 in font BlueHighway
07:31:10: Info: Freetype returned null for character 128 in font BlueHighway
07:31:10: Info: Freetype returned null for character 129 in font BlueHighway
07:31:10: Info: Freetype returned null for character 130 in font BlueHighway
07:31:10: Info: Freetype returned null for character 131 in font BlueHighway
07:31:10: Info: Freetype returned null for character 132 in font BlueHighway
07:31:10: Info: Freetype returned null for character 133 in font BlueHighway
07:31:10: Info: Freetype returned null for character 134 in font BlueHighway
07:31:10: Info: Freetype returned null for character 135 in font BlueHighway
07:31:10: Info: Freetype returned null for character 136 in font BlueHighway
07:31:10: Info: Freetype returned null for character 137 in font BlueHighway
07:31:10: Info: Freetype returned null for character 138 in font BlueHighway
07:31:10: Info: Freetype returned null for character 139 in font BlueHighway
07:31:10: Info: Freetype returned null for character 140 in font BlueHighway
07:31:10: Info: Freetype returned null for character 141 in font BlueHighway
07:31:10: Info: Freetype returned null for character 142 in font BlueHighway
07:31:10: Info: Freetype returned null for character 143 in font BlueHighway
07:31:10: Info: Freetype returned null for character 144 in font BlueHighway
07:31:10: Info: Freetype returned null for character 145 in font BlueHighway
07:31:10: Info: Freetype returned null for character 146 in font BlueHighway
07:31:10: Info: Freetype returned null for character 147 in font BlueHighway
07:31:10: Info: Freetype returned null for character 148 in font BlueHighway
07:31:10: Info: Freetype returned null for character 149 in font BlueHighway
07:31:10: Info: Freetype returned null for character 150 in font BlueHighway
07:31:10: Info: Freetype returned null for character 151 in font BlueHighway
07:31:10: Info: Freetype returned null for character 152 in font BlueHighway
07:31:10: Info: Freetype returned null for character 153 in font BlueHighway
07:31:10: Info: Freetype returned null for character 154 in font BlueHighway
07:31:10: Info: Freetype returned null for character 155 in font BlueHighway
07:31:10: Info: Freetype returned null for character 156 in font BlueHighway
07:31:10: Info: Freetype returned null for character 157 in font BlueHighway
07:31:10: Info: Freetype returned null for character 158 in font BlueHighway
07:31:10: Info: Freetype returned null for character 159 in font BlueHighway
07:31:10: Info: Freetype returned null for character 160 in font BlueHighway
07:31:10: Texture: BlueHighwayTexture: Loading 1 faces(PF_BYTE_LA,512x512x1) with 0 generated mipmaps from Image. Internal format is PF_BYTE_LA,512x512x1.
07:31:10: Parsing script DP3.overlay
07:31:10: Parsing script Example-CubeMapping.overlay
07:31:10: Parsing script Example-DynTex.overlay
07:31:10: Parsing script Example-Water.overlay
07:31:10: Parsing script Shadows.overlay
07:31:10: Parsing script OgreDebugPanel.overlay
07:31:10: Texture: New_Ogre_Border_Break.png: Loading 1 faces(PF_A8R8G8B8,32x32x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,32x32x1.
07:31:10: Texture: ogretext.png: Loading 1 faces(PF_A8R8G8B8,256x128x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x128x1.
07:31:10: Parsing script OgreLoadingPanel.overlay
07:31:11: Finished parsing scripts for resource group General
07:31:11: Parsing scripts for resource group Internal
07:31:11: Finished parsing scripts for resource group Internal
07:31:11: Creating viewport on target 'OGRE Render Window', rendering from camera 'PlayerCam', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
07:31:11: Mesh: Loading ninja.mesh.
07:31:11: Skeleton: Loading ninja.skeleton
07:31:11: Texture: nskingr.jpg: Loading 1 faces(PF_R8G8B8,512x512x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1.
07:31:11: Texture: BumpyMetal.jpg: Loading 1 faces(PF_R8G8B8,512x512x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1.
07:31:11: TerrainSceneManager: Activated PageSource Heightmap
07:31:11: Texture: terrain_texture.jpg: Loading 1 faces(PF_R8G8B8,512x512x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1.
07:31:11: Texture: terrain_detail.jpg: Loading 1 faces(PF_R8G8B8,256x256x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,256x256x1.
07:31:11: Texture: clouds.jpg: Loading 1 faces(PF_R8G8B8,256x256x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,256x256x1.
07:31:11: *** Initializing OIS ***
07:31:11: Texture: spot_shadow_fade.png: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
07:31:13: Unregistering ResourceManager for type BspLevel
07:31:13: *-*-* OGRE Shutdown
07:31:13: Unregistering ResourceManager for type Compositor
07:31:13: Unregistering ResourceManager for type Font
07:31:13: Unregistering ResourceManager for type Skeleton
07:31:13: Unregistering ResourceManager for type Mesh
07:31:13: Unregistering ResourceManager for type HighLevelGpuProgram
07:31:13: Uninstalling plugin: Cg Program Manager
07:31:13: Plugin successfully uninstalled
07:31:13: Unloading library Plugins\Plugin_CgProgramManager
07:31:13: Uninstalling plugin: Octree & Terrain Scene Manager
07:31:13: Plugin successfully uninstalled
07:31:13: Unloading library Plugins\Plugin_OctreeSceneManager
07:31:13: Uninstalling plugin: BSP Scene Manager
07:31:13: Plugin successfully uninstalled
07:31:13: Unloading library Plugins\Plugin_BSPSceneManager
07:31:13: Uninstalling plugin: ParticleFX
07:31:13: Plugin successfully uninstalled
07:31:13: Unloading library Plugins\Plugin_ParticleFX
07:31:13: Uninstalling plugin: GL RenderSystem
07:31:13: *** Stopping Win32GL Subsystem ***
07:31:13: Plugin successfully uninstalled
07:31:13: Unloading library Plugins\RenderSystem_GL
07:31:13: Uninstalling plugin: D3D9 RenderSystem
07:31:13: Render Target 'OGRE Render Window' Average FPS: 397.602 Best FPS: 397.602 Worst FPS: 397.602
07:31:13: D3D9 : Shutting down cleanly.
07:31:13: Unregistering ResourceManager for type Texture
07:31:13: Unregistering ResourceManager for type GpuProgram
07:31:13: D3D9 : Direct3D9 Rendering Subsystem destroyed.
07:31:13: Plugin successfully uninstalled
07:31:13: Unloading library Plugins\RenderSystem_Direct3D9
07:31:13: Unregistering ResourceManager for type Material

Binary file not shown.

View File

@ -0,0 +1,14 @@
# Defines plugins to load
# Define plugin folder
PluginFolder=Plugins
# Define plugins
Plugin=RenderSystem_Direct3D9
Plugin=RenderSystem_GL
Plugin=Plugin_ParticleFX
Plugin=Plugin_BSPSceneManager
Plugin=Plugin_OctreeSceneManager
Plugin=Plugin_CgProgramManager

Binary file not shown.

View File

@ -0,0 +1,19 @@
Render System=Direct3D9 Rendering Subsystem
[Direct3D9 Rendering Subsystem]
Allow NVPerfHUD=Yes
Anti aliasing=None
Floating-point mode=Fastest
Full Screen=No
Rendering Device=NVIDIA GeForce Go 6800
VSync=No
Video Mode=800 x 600 @ 32-bit colour
[OpenGL Rendering Subsystem]
Colour Depth=32
Display Frequency=N/A
FSAA=0
Full Screen=No
RTT Preferred Mode=FBO
VSync=Yes
Video Mode=1024 x 768

View File

@ -0,0 +1,24 @@
# Resource locations to be added to the 'boostrap' path
# This also contains the minimum you need to use the Ogre example framework
# [Bootstrap]
# Zip=..\media\packs\OgreCore.zip
# Resource locations to be added to the default path
[General]
FileSystem=..\media
FileSystem=..\media\fonts
FileSystem=..\media\materials\programs
FileSystem=..\media\materials\scripts
FileSystem=..\media\materials\textures
FileSystem=..\media\models
FileSystem=..\media\overlays
FileSystem=..\media\particle
FileSystem=..\media\gui
FileSystem=..\media\DeferredShadingMedia
Zip=..\media\packs\cubemap.zip
Zip=..\media\packs\cubemapsJS.zip
Zip=..\media\packs\dragon.zip
Zip=..\media\packs\fresneldemo.zip
Zip=..\media\packs\ogretestmap.zip
Zip=..\media\packs\skybox.zip
Zip=..\media\packs\OgreCore.zip

View File

@ -0,0 +1,2 @@
Verkehrssimulation.exe
pause

View File

@ -0,0 +1,2 @@
-ncle Keine Fehlermeldungen bei unbekannten CMD-Line-CMDs
-ne Keine Fehlermeldungen

View File

@ -0,0 +1,4 @@
http://msdn2.microsoft.com/de-de/library/system.drawing.bitmap.getpixel(VS.80).aspx
http://www.c-plusplus.de/forum/viewtopic-var-p-is-944370.html
http://www.as-hu.de/heightmap/hm.php
http://www.gamedev.net/reference/articles/article2246.asp

View File

@ -0,0 +1,13 @@
[Scripts]
Scrips\terrain.ini
scripts\cars.ini
[Config]
//Verkehrsdichte: 1.0 ist Optimum = 1 Auto pro Feld mit Fahrbahn
trafficdensity=1.0
//Colors
//Alle Werte +/- 100
righthandtrafficcolor=1000
lefthandtrafficcolor=2000
notrafficcolor=3000

View File

@ -0,0 +1,3 @@
[Cars]
//Verschiedene Autos, die zur Verfügung stehen. Diese werden wiederholt auf die Straße gesetzt
Car=car001.model;maxacceleration;maxbrake;maxvelocity;numberplate;cartype;

View File

@ -0,0 +1,5 @@
[Terrain]
Terrain=scripts\Terrain\field001;posx;posy;posz;
[Models]
model=models\tree001.model;posx;posy;posz;strechfactorx;strechfactory;strechfactorz;rotate;

View File

@ -0,0 +1,4 @@
[Terrain]
heightmap=heightmaps\field001.bmp
texture=textures\field001.bmp
roadmap=roadmaps\field001.bmp

View File

@ -0,0 +1,18 @@
Copyright (c) W.J. van der Laan
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so, subject
to the following conditions:
The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -0,0 +1,54 @@
/******************************************************************************
Copyright (c) W.J. van der Laan
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so, subject
to the following conditions:
The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************************/
/** Deferred shading framework
// W.J. :wumpus: van der Laan 2005 //
Material shader: Single colour normal mapped
*/
#extension GL_ARB_draw_buffers : enable
varying vec3 normal;
varying vec3 tangent_;
varying vec3 binormal;
varying vec2 texCoord0;
varying float depth;
uniform sampler2D normTex;
uniform float specularity;
uniform vec3 colour;
void main()
{
// Frame for normal mapping
mat3 rotation = mat3(tangent_, binormal, normal);
vec3 texnormal = (vec3(texture2D(normTex, texCoord0))-0.5)*2.0;
gl_FragData[0].rgb = colour;
gl_FragData[0].a = specularity;
// rotation*texnormal is reversed for GL because matrices are stored transposed internally
// compared to HLSL
gl_FragData[1].xyz = normalize(rotation*texnormal); // Do normalisation here, saves an operation per light
gl_FragData[1].w = depth;
}

View File

@ -0,0 +1,52 @@
/******************************************************************************
Copyright (c) W.J. van der Laan
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so, subject
to the following conditions:
The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************************/
/** Deferred shading framework
// W.J. :wumpus: van der Laan 2005 //
Material shader: Textured normal mapped
*/
#extension GL_ARB_draw_buffers : enable
varying vec3 normal;
varying vec3 tangent_;
varying vec3 binormal;
varying vec2 texCoord0;
varying float depth;
uniform sampler2D tex0;
uniform sampler2D normTex;
uniform float specularity;
void main()
{
// Frame for normal mapping
mat3 rotation = mat3(tangent_, binormal, normal);
vec3 texnormal = (vec3(texture2D(normTex, texCoord0))-0.5)*2.0;
gl_FragData[0].rgb = vec3(texture2D(tex0, texCoord0));
gl_FragData[0].a = specularity;
// rotation*texnormal is reversed for GL because matrices are stored transposed internally
// compared to HLSL
gl_FragData[1].xyz = normalize(rotation*texnormal); // Do normalisation here, saves an operation per light
gl_FragData[1].w = depth;
}

View File

@ -0,0 +1,47 @@
/******************************************************************************
Copyright (c) W.J. van der Laan
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so, subject
to the following conditions:
The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************************/
/** Deferred shading framework
// W.J. :wumpus: van der Laan 2005 //
Material shader: Normal mapped
*/
varying vec3 normal;
varying vec3 tangent_;
varying vec3 binormal;
varying vec2 texCoord0;
varying float depth;
attribute vec3 tangent;
void main()
{
vec4 projPos = gl_ModelViewProjectionMatrix * gl_Vertex;
gl_Position = projPos;
depth = projPos.w;
texCoord0 = vec2(gl_MultiTexCoord0);
normal = vec3(gl_ModelViewMatrix*vec4(gl_Normal,0));
tangent_ = vec3(gl_ModelViewMatrix*vec4(tangent,0));
binormal = cross(normal, tangent_);
}

View File

@ -0,0 +1,42 @@
/******************************************************************************
Copyright (c) W.J. van der Laan
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so, subject
to the following conditions:
The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************************/
/** Deferred shading framework
// W.J. :wumpus: van der Laan 2005 //
Material shader: Single colour phong
*/
#extension GL_ARB_draw_buffers : enable
varying vec3 normal;
varying vec2 texCoord0;
varying float depth;
uniform float specularity;
uniform vec3 colour;
void main()
{
gl_FragData[0].rgb = colour;
gl_FragData[0].a = specularity;
gl_FragData[1].xyz = normalize(normal); // Do normalisation here, saves an operation per light
gl_FragData[1].w = depth;
}

View File

@ -0,0 +1,42 @@
/******************************************************************************
Copyright (c) W.J. van der Laan
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so, subject
to the following conditions:
The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************************/
/** Deferred shading framework
// W.J. :wumpus: van der Laan 2005 //
Material shader: Textured phongs
*/
#extension GL_ARB_draw_buffers : enable
varying vec3 normal;
varying vec2 texCoord0;
varying float depth;
uniform sampler2D Tex0;
uniform float specularity;
void main()
{
gl_FragData[0].rgb = vec3(texture2D(Tex0, texCoord0));
gl_FragData[0].a = specularity;
gl_FragData[1].xyz = normalize(normal); // Do normalisation here, saves an operation per light
gl_FragData[1].w = depth;
}

View File

@ -0,0 +1,40 @@
/******************************************************************************
Copyright (c) W.J. van der Laan
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so, subject
to the following conditions:
The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************************/
/** Deferred shading framework
// W.J. :wumpus: van der Laan 2005 //
Material shader: Phong material vertex shader
*/
varying vec3 normal;
varying vec2 texCoord0;
varying float depth;
void main()
{
vec4 projPos = gl_ModelViewProjectionMatrix * gl_Vertex;
gl_Position = projPos;
depth = projPos.w;
texCoord0 = vec2(gl_MultiTexCoord0);
normal = vec3(gl_ModelViewMatrix*vec4(gl_Normal,0));
}

View File

@ -0,0 +1,56 @@
/******************************************************************************
Copyright (c) W.J. van der Laan
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so, subject
to the following conditions:
The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************************/
/** Deferred shading framework
// W.J. :wumpus: van der Laan 2005 //
Material shader: Single colour normal mapped
*/
sampler Tex0: register(s0);
struct OUTPUT
{
float4 color0 : COLOR0; // Diffuse color + ?
float4 color1 : COLOR1; // Normal + depth
};
float3 colour;
float specularity;
OUTPUT main(
float3 normal: TEXCOORD0,
float4 texCoord0: TEXCOORD1,
float depth: TEXCOORD2,
float3 tangent: TEXCOORD3,
float3 binormal: TEXCOORD4
)
{
OUTPUT output;
// Frame for normal mapping
float3x3 rotation = float3x3(tangent, binormal, normal);
float3 texnormal = (tex2D(Tex0, texCoord0)-0.5)*2;
output.color0.rgb = colour;
output.color0.a = specularity;
output.color1.xyz = normalize(mul(texnormal,rotation)); // Do normalisation here, saves an operation per light
output.color1.w = depth;
return output;
}

View File

@ -0,0 +1,56 @@
/******************************************************************************
Copyright (c) W.J. van der Laan
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so, subject
to the following conditions:
The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************************/
/** Deferred shading framework
// W.J. :wumpus: van der Laan 2005 //
Material shader: Textured normal mapped
*/
sampler Tex0: register(s0);
sampler Tex1: register(s1);
struct OUTPUT
{
float4 color0 : COLOR0; // Diffuse color + ?
float4 color1 : COLOR1; // Normal + depth
};
float specularity;
OUTPUT main(
float3 normal: TEXCOORD0,
float4 texCoord0: TEXCOORD1,
float depth: TEXCOORD2,
float3 tangent: TEXCOORD3,
float3 binormal: TEXCOORD4
)
{
OUTPUT output;
// Frame for normal mapping
float3x3 rotation = float3x3(tangent, binormal, normal);
float3 texnormal = (tex2D(Tex1, texCoord0)-0.5)*2;
output.color0.rgb = tex2D(Tex0, texCoord0);
output.color0.a = specularity;
output.color1.xyz = normalize(mul(texnormal,rotation)); // Do normalisation here, saves an operation per light
output.color1.w = depth;
return output;
}

View File

@ -0,0 +1,61 @@
/******************************************************************************
Copyright (c) W.J. van der Laan
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so, subject
to the following conditions:
The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************************/
/** Deferred shading framework
// W.J. :wumpus: van der Laan 2005 //
Material shader: Normal mapped
*/
struct VS_OUTPUT {
float4 pos: POSITION;
float4 normal: TEXCOORD0;
float2 texCoord0: TEXCOORD1;
float depth: TEXCOORD2;
float3 tangent: TEXCOORD3;
float3 binormal: TEXCOORD4;
};
float4x4 worldViewProj;
float4x4 world;
float4x4 worldView;
VS_OUTPUT main(
float4 Pos: POSITION,
float3 normal: NORMAL,
float2 texCoord0: TEXCOORD0,
float3 tangent: TANGENT0
){
VS_OUTPUT Out;
Out.normal = mul(worldView, normal);
float4 projPos = mul(worldViewProj, Pos);
Out.tangent = mul(worldView, tangent);
Out.binormal = cross(Out.normal, Out.tangent);
Out.pos = projPos;
Out.texCoord0 = texCoord0;
Out.depth = projPos.w;
//Out.depth = projPos.z/projPos.w;
return Out;
}

View File

@ -0,0 +1,47 @@
/******************************************************************************
Copyright (c) W.J. van der Laan
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so, subject
to the following conditions:
The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************************/
/** Deferred shading framework
// W.J. :wumpus: van der Laan 2005 //
Material shader: Single colour phong
*/
struct OUTPUT
{
float4 color0 : COLOR0; // Diffuse color
float4 color1 : COLOR1; // Position
};
float3 colour;
float specularity;
OUTPUT main(
float4 normal: TEXCOORD0,
float4 texCoord0: TEXCOORD1,
float depth: TEXCOORD2
)
{
OUTPUT output;
output.color0.rgb = colour;
output.color0.a = specularity;
output.color1.xyz = normal;
output.color1.w = depth;
return output;
}

View File

@ -0,0 +1,48 @@
/******************************************************************************
Copyright (c) W.J. van der Laan
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so, subject
to the following conditions:
The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************************/
/** Deferred shading framework
// W.J. :wumpus: van der Laan 2005 //
Material shader: Textured phongs
*/
sampler Tex0: register(s0);
struct OUTPUT
{
float4 color0 : COLOR0; // Diffuse color
float4 color1 : COLOR1; // Position
};
float specularity;
OUTPUT main(
float4 normal: TEXCOORD0,
float4 texCoord0: TEXCOORD1,
float depth: TEXCOORD2
)
{
OUTPUT output;
output.color0.rgb = tex2D(Tex0, texCoord0);
output.color0.a = specularity;
output.color1.xyz = normalize(normal); // Do normalisation here, saves an operation per light
output.color1.w = depth;
return output;
}

View File

@ -0,0 +1,54 @@
/******************************************************************************
Copyright (c) W.J. van der Laan
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so, subject
to the following conditions:
The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************************/
/** Deferred shading framework
// W.J. :wumpus: van der Laan 2005 //
Material shader: Phong material vertex shader
*/
struct VS_OUTPUT {
float4 pos: POSITION;
float4 normal: TEXCOORD0;
float2 texCoord0: TEXCOORD1;
float1 depth: TEXCOORD2;
};
float4x4 worldViewProj;
float4x4 world;
float4x4 worldView;
VS_OUTPUT main(
float4 Pos: POSITION,
float3 Normal: NORMAL,
float2 texCoord0: TEXCOORD0
){
VS_OUTPUT Out;
Out.normal = mul(worldView, Normal);
float4 projPos = mul(worldViewProj, Pos);
Out.pos = projPos;
Out.texCoord0 = texCoord0;
Out.depth = projPos.w;
//Out.depth = projPos.z/projPos.w;
return Out;
}

View File

@ -0,0 +1,56 @@
/******************************************************************************
Copyright (c) W.J. van der Laan
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so, subject
to the following conditions:
The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************************/
/** Deferred shading framework
// W.J. :wumpus: van der Laan 2005 //
Post shader: Multipass, ambient (base) pass
*/
uniform sampler2D tex0;
uniform sampler2D tex1;
varying vec2 texCoord;
varying vec3 projCoord;
uniform mat4 proj;
uniform vec3 ambientColor;
void main()
{
vec4 a0 = texture2D(tex0, texCoord); // Attribute 0: Diffuse color+shininess
vec4 a1 = texture2D(tex1, texCoord); // Attribute 1: Normal+depth
// Clip fragment if depth is too far, so the skybox can be rendered on the background
if(a1.w==0.0)
discard;
// Attributes
vec3 colour = a0.rgb;
float alpha = a0.a; // Specularity
float distance = a1.w; // Distance from viewer -- is zero if no lighting wanted
// Calculate ambient colour of fragment
gl_FragColor = vec4( ambientColor*colour ,0);
// Calculate depth of fragment; GL requires a 2.0* here as the range is [-1, 1]
// Also, see again how matrix is transposed ([3][2] instead of [2][3])
gl_FragDepth = projCoord.z*proj[2][2] + proj[3][2]/(2.0*distance);
}

View File

@ -0,0 +1,96 @@
/******************************************************************************
Copyright (c) W.J. van der Laan
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so, subject
to the following conditions:
The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************************/
/** Deferred shading framework
// W.J. :wumpus: van der Laan 2005 //
Post shader: Multipass, one light
*/
uniform sampler2D tex0;
uniform sampler2D tex1;
varying vec2 texCoord;
varying vec3 projCoord;
// Attributes of light
uniform vec4 lightPos0;
uniform vec3 lightDiffuseColor0;
uniform vec3 lightSpecularColor0;
// Global parameters for lights
struct LightGlobal
{
vec3 position;
vec3 normal;
vec3 viewDir;
};
// Current state of light
struct LightAccum
{
vec3 light_diffuse;
vec3 light_specular;
};
// Do lighting calculations for one light
void processLight(
inout LightAccum accum,
LightGlobal global,
vec4 lightPos,
vec3 lightDiffuseColor,
vec3 lightSpecularColor)
{
vec3 lightVec = vec3(lightPos) - global.position;
vec3 lightDir = normalize(lightVec);
accum.light_diffuse += max(0.0,dot(lightDir, global.normal)) * lightDiffuseColor;
vec3 h = normalize(global.viewDir + lightDir);
accum.light_specular += pow(dot(global.normal, h),32.0) * lightSpecularColor;
}
void main()
{
vec4 a0 = texture2D(tex0, texCoord); // Attribute 0: Diffuse color+shininess
vec4 a1 = texture2D(tex1, texCoord); // Attribute 1: Normal+depth
// Attributes
vec3 colour = a0.rgb;
float alpha = a0.a; // Specularity
float distance = a1.w; // Distance from viewer -- is zero if no lighting wanted
LightGlobal global;
global.normal = a1.xyz;
global.position = projCoord*distance;
// Apply light
LightAccum accum;
accum.light_diffuse = vec3(0,0,0);
accum.light_specular = vec3(0,0,0);
global.viewDir = -normalize(global.position);
processLight(accum, global, lightPos0, lightDiffuseColor0, lightSpecularColor0);
// Calcalate total lighting for this fragment
vec3 total_light_contrib;
total_light_contrib = accum.light_diffuse+alpha*accum.light_specular;
// Calculate colour of fragment
gl_FragColor = vec4( total_light_contrib*colour ,0);
}

View File

@ -0,0 +1,85 @@
/******************************************************************************
Copyright (c) W.J. van der Laan
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so, subject
to the following conditions:
The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************************/
/** Deferred shading framework
// W.J. :wumpus: van der Laan 2005 //
Post shader: Light geometry material
*/
uniform sampler2D tex0;
uniform sampler2D tex1;
varying vec2 texCoord;
varying vec3 projCoord;
// World view matrix to get object position in view space
uniform mat4 worldView;
// Attributes of light
uniform vec3 lightDiffuseColor;
uniform vec3 lightSpecularColor;
uniform vec3 lightFalloff;
void main()
{
vec4 a0 = texture2D(tex0, texCoord); // Attribute 0: Diffuse color+shininess
vec4 a1 = texture2D(tex1, texCoord); // Attribute 1: Normal+depth
// Attributes
vec3 colour = a0.rgb;
float alpha = a0.a; // Specularity
float distance = a1.w; // Distance from viewer (w)
vec3 normal = a1.xyz;
// Calculate position of texel in view space
vec3 position = projCoord*distance;
// Extract position in view space from worldView matrix
//vec3 lightPos = vec3(worldView[0][3],worldView[1][3],worldView[2][3]);
vec3 lightPos = vec3(worldView[3][0],worldView[3][1],worldView[3][2]);
// Calculate light direction and distance
vec3 lightVec = lightPos - position;
float len_sq = dot(lightVec, lightVec);
float len = sqrt(len_sq);
vec3 lightDir = lightVec/len;
/// Calculate attenuation
float attenuation = dot(lightFalloff, vec3(1, len, len_sq));
/// Calculate diffuse colour
vec3 light_diffuse = max(0.0,dot(lightDir, normal)) * lightDiffuseColor;
/// Calculate specular component
vec3 viewDir = -normalize(position);
vec3 h = normalize(viewDir + lightDir);
vec3 light_specular = pow(dot(normal, h),32.0) * lightSpecularColor;
// Calcalate total lighting for this fragment
vec3 total_light_contrib;
total_light_contrib = light_diffuse;
// Uncomment next line if specular desired
//total_light_contrib += alpha * light_specular;
gl_FragColor = vec4(total_light_contrib*colour/attenuation, 0);
//gl_FragColor = vec4(1.0/attenuation, 0.0,0.0,0.0);
//gl_FragColor = vec4(a1.xyz, 0.0);
}

View File

@ -0,0 +1,61 @@
/******************************************************************************
Copyright (c) W.J. van der Laan
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so, subject
to the following conditions:
The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************************/
/** Deferred shading framework
// W.J. :wumpus: van der Laan 2005 //
Post shader: Light geometry material
*/
varying vec2 texCoord;
varying vec3 projCoord;
uniform float vpWidth;
uniform float vpHeight;
uniform mat4 invProj;
void main()
{
vec4 projPos = gl_ModelViewProjectionMatrix * gl_Vertex;
projPos = projPos/projPos.w;
// projPos is now in nonhomogeneous 2d space -- this makes sure no perspective interpolation is
// done that could mess with our concept.
//gl_Position = projPos;
vec2 texSize = vec2(vpWidth, vpHeight);
vec2 tcTemp = vec2(projPos[0], projPos[1])/2.0+0.5;
tcTemp = (floor(tcTemp * texSize)+0.5)/texSize;
//float3 position = mul(invProj, float4(projCoord, 0, 1))*distance;
// Acquire view space position via inverse projection transformation
// Optimisation for perspective, symmetric view frustrums
// These interpolate over the frustrum plane for w=1
projCoord = vec3(projPos[0], projPos[1], 1)*vec3(
invProj[0][0], // X vector component from X
invProj[1][1], // Y vector component from Y
invProj[3][2] // Z vector component from W
);
//projCoord = vec3(invProj*vec4(projPos[0], projPos[1], 0, 1));
// Texture coordinate magic, this compensates for jitter
texCoord = vec2(tcTemp[0], 1.0-tcTemp[1]);
gl_Position = vec4((tcTemp-0.5)*2.0, 0.0, 1.0);
}

View File

@ -0,0 +1,39 @@
/******************************************************************************
Copyright (c) W.J. van der Laan
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so, subject
to the following conditions:
The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************************/
/** Deferred shading framework
// W.J. :wumpus: van der Laan 2005 //
Post shader: Debug, show colour channel
*/
uniform sampler2D tex0;
uniform sampler2D tex1;
varying vec2 texCoord;
varying vec3 projCoord;
void main()
{
vec4 a0 = texture2D(tex0, texCoord); // Attribute 0: Diffuse color+shininess
vec4 a1 = texture2D(tex1, texCoord); // Attribute 1: Normal+depth
gl_FragColor=vec4(a0.xyz, 0);
}

View File

@ -0,0 +1,39 @@
/******************************************************************************
Copyright (c) W.J. van der Laan
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so, subject
to the following conditions:
The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************************/
/** Deferred shading framework
// W.J. :wumpus: van der Laan 2005 //
Post shader: Debug, show depth and specularity channel
*/
uniform sampler2D tex0;
uniform sampler2D tex1;
varying vec2 texCoord;
varying vec3 projCoord;
void main()
{
vec4 a0 = texture2D(tex0, texCoord); // Attribute 0: Diffuse color+shininess
vec4 a1 = texture2D(tex1, texCoord); // Attribute 1: Normal+depth
gl_FragColor=vec4(a0.w, 0, a1.w/1000.0, 0);
}

View File

@ -0,0 +1,39 @@
/******************************************************************************
Copyright (c) W.J. van der Laan
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so, subject
to the following conditions:
The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************************/
/** Deferred shading framework
// W.J. :wumpus: van der Laan 2005 //
Post shader: Debug, show normal channel
*/
uniform sampler2D tex0;
uniform sampler2D tex1;
varying vec2 texCoord;
varying vec3 projCoord;
void main()
{
vec4 a0 = texture2D(tex0, texCoord); // Attribute 0: Diffuse color+shininess
vec4 a1 = texture2D(tex1, texCoord); // Attribute 1: Normal+depth
gl_FragColor=vec4((a1.xyz+vec3(1))*0.5,0);
}

View File

@ -0,0 +1,111 @@
/******************************************************************************
Copyright (c) W.J. van der Laan
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so, subject
to the following conditions:
The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************************/
/** Deferred shading framework
// W.J. :wumpus: van der Laan 2005 //
Post shader: Single pass
*/
uniform sampler2D tex0;
uniform sampler2D tex1;
varying vec2 texCoord;
varying vec3 projCoord;
uniform mat4 proj;
uniform vec3 ambientColor;
// Attributes of light 0
uniform vec4 lightPos0;
uniform vec3 lightDiffuseColor0;
uniform vec3 lightSpecularColor0;
// Attributes of light 1
uniform vec4 lightPos1;
uniform vec3 lightDiffuseColor1;
uniform vec3 lightSpecularColor1;
// Global parameters for lights
struct LightGlobal
{
vec3 position;
vec3 normal;
vec3 viewDir;
};
// Current state of light
struct LightAccum
{
vec3 light_diffuse;
vec3 light_specular;
};
// Do lighting calculations for one light
void processLight(
inout LightAccum accum,
LightGlobal global,
vec4 lightPos,
vec3 lightDiffuseColor,
vec3 lightSpecularColor)
{
vec3 lightVec = vec3(lightPos) - global.position;
vec3 lightDir = normalize(lightVec);
accum.light_diffuse += max(0.0,dot(lightDir, global.normal)) * lightDiffuseColor;
vec3 h = normalize(global.viewDir + lightDir);
accum.light_specular += pow(dot(global.normal, h),32.0) * lightSpecularColor;
}
void main()
{
vec4 a0 = texture2D(tex0, texCoord); // Attribute 0: Diffuse color+shininess
vec4 a1 = texture2D(tex1, texCoord); // Attribute 1: Normal+depth
// Clip fragment if depth is too far, so the skybox can be rendered on the background
if(a1.w==0.0)
discard;
// Attributes
vec3 colour = a0.rgb;
float alpha = a0.a; // Specularity
float distance = a1.w; // Distance from viewer -- is zero if no lighting wanted
LightGlobal global;
global.normal = a1.xyz;
global.position = projCoord*distance;
// Apply light
LightAccum accum;
accum.light_diffuse = vec3(0,0,0);
accum.light_specular = vec3(0,0,0);
global.viewDir = -normalize(global.position);
processLight(accum, global, lightPos0, lightDiffuseColor0, lightSpecularColor0);
processLight(accum, global, lightPos1, lightDiffuseColor1, lightSpecularColor1);
// Calcalate total lighting for this fragment
vec3 total_light_contrib;
total_light_contrib = ambientColor+accum.light_diffuse+alpha*accum.light_specular;
// Calculate colour of fragment
gl_FragColor = vec4( total_light_contrib*colour ,0);
// Calculate depth of fragment; GL requires a 2.0* here as the range is [-1, 1]
gl_FragDepth = projCoord.z*proj[2][2] + proj[3][2]/(2.0*distance);
}

View File

@ -0,0 +1,42 @@
/******************************************************************************
Copyright (c) W.J. van der Laan
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so, subject
to the following conditions:
The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************************/
/** Deferred shading framework
// W.J. :wumpus: van der Laan 2005 //
Post shader: Generic fullscreen quad
*/
varying vec2 texCoord;
varying vec3 projCoord;
uniform mat4 invProj;
void main()
{
vec2 inPos = sign(gl_Vertex.xy);
gl_Position = vec4(inPos.xy, 0.0, 1.0);
texCoord = (vec2(inPos.x, -inPos.y) + 1.0)/2.0;
// Projection coordinates
// Inverted projection matrix
// These interpolate over the frustrum plane for w=1
projCoord = vec3(invProj*vec4(inPos.x, inPos.y, 0, 1));
}

View File

@ -0,0 +1,55 @@
/******************************************************************************
Copyright (c) W.J. van der Laan
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so, subject
to the following conditions:
The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************************/
/** Deferred shading framework
// W.J. :wumpus: van der Laan 2005 //
Post shader: Multipass, ambient (base) pass
*/
sampler Tex0: register(s0);
sampler Tex1: register(s1);
// Ambient and depth pass
float4 ambientColor;
float4x4 proj;
struct POUTPUT
{
float4 colour: COLOR;
float depth: DEPTH;
};
POUTPUT main(float2 texCoord: TEXCOORD0, float3 projCoord: TEXCOORD1)
{
float4 a0 = tex2D(Tex0, texCoord); // Attribute 0: Diffuse color+shininess
float4 a1 = tex2D(Tex1, texCoord); // Attribute 1: Normal+depth
// Clip fragment if depth is too close, so the skybox can be rendered on the background
clip(a1.w-0.001);
// Attributes
POUTPUT o;
float3 colour = a0.rgb;
o.colour = float4( ambientColor*colour ,0);
o.depth = projCoord.z*proj[2][2] + proj[2][3]/a1.w;
return o;
}

View File

@ -0,0 +1,101 @@
/******************************************************************************
Copyright (c) W.J. van der Laan
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so, subject
to the following conditions:
The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************************/
/** Deferred shading framework
// W.J. :wumpus: van der Laan 2005 //
Post shader: Multipass, one light
*/
sampler Tex0: register(s0);
sampler Tex1: register(s1);
// Attributes of light 0
float4 lightPos0;
float4 lightDiffuseColor0;
float4 lightSpecularColor0;
// Global parameters for lights
struct LightGlobal
{
float3 position;
float3 normal;
float3 viewDir;
};
// Current state of light
struct LightAccum
{
float3 light_diffuse;
float3 light_specular;
};
// Do lighting calculations for one light
void processLight(
inout LightAccum accum,
LightGlobal global,
float4 lightPos,
float4 lightDiffuseColor,
float4 lightSpecularColor)
{
float3 lightVec = lightPos - global.position;
float3 lightDir = normalize(lightVec);
accum.light_diffuse += max(0,dot(lightDir, global.normal)) * lightDiffuseColor;
float3 h = normalize(global.viewDir + lightDir);
accum.light_specular += pow(dot(global.normal, h),32) * lightSpecularColor;
}
float4 main(float2 texCoord: TEXCOORD0, float3 projCoord: TEXCOORD1) : COLOR
{
float4 a0 = tex2D(Tex0, texCoord); // Attribute 0: Diffuse color+shininess
float4 a1 = tex2D(Tex1, texCoord); // Attribute 1: Normal+depth
LightGlobal global;
// Clip fragment if depth is too close, so the skybox can be rendered on the background
//clip(a1.w-0.001);
// Attributes
float3 colour = a0.rgb;
float alpha = a0.a; // Specularity
float distance = a1.w; // Distance from viewer
//global.normal = normalize(a1.xyz);
global.normal = a1.xyz;
// Acquire view space position via inverse projection transformation
//global.position = mul(invProj, float4(projCoord, 0, 1))*distance;
global.position = projCoord*distance;
// Apply light
LightAccum accum;
accum.light_diffuse = float3(0,0,0);
accum.light_specular = float3(0,0,0);
global.viewDir = -normalize(global.position);
processLight(accum, global, lightPos0, lightDiffuseColor0, lightSpecularColor0);
// Calcalate total lighting for this fragment
float3 total_light_contrib;
total_light_contrib = accum.light_diffuse+alpha*accum.light_specular;
return float4( total_light_contrib*colour ,0);
//return float4(accum.light_diffuse,0);
//return float4(global.position/1000.0,0);
}

View File

@ -0,0 +1,89 @@
/******************************************************************************
Copyright (c) W.J. van der Laan
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so, subject
to the following conditions:
The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************************/
/** Deferred shading framework
// W.J. :wumpus: van der Laan 2005 //
Post shader: Light geometry material
*/
sampler Tex0: register(s0);
sampler Tex1: register(s1);
float4x4 worldView;
// Attributes of light
float4 lightDiffuseColor;
float4 lightSpecularColor;
float4 lightFalloff;
float4 main(float2 texCoord: TEXCOORD0, float3 projCoord: TEXCOORD1) : COLOR
{
float4 a0 = tex2D(Tex0, texCoord); // Attribute 0: Diffuse color+shininess
float4 a1 = tex2D(Tex1, texCoord); // Attribute 1: Normal+depth
// Attributes
float3 colour = a0.rgb;
float alpha = a0.a; // Specularity
float distance = a1.w; // Distance from viewer (w)
float3 normal = a1.xyz;
// Calculate position of texel in view space
float3 position = projCoord*distance;
// Extract position in view space from worldView matrix
float3 lightPos = float3(worldView[0][3],worldView[1][3],worldView[2][3]);
// Calculate light direction and distance
float3 lightVec = lightPos - position;
float len_sq = dot(lightVec, lightVec);
float len = sqrt(len_sq);
float3 lightDir = lightVec/len;
/// Calculate attenuation
float attenuation = dot(lightFalloff, float3(1, len, len_sq));
/// Calculate diffuse colour
float3 light_diffuse = max(0,dot(lightDir, normal)) * lightDiffuseColor;
/// Calculate specular component
float3 viewDir = -normalize(position);
float3 h = normalize(viewDir + lightDir);
float3 light_specular = pow(dot(normal, h),32) * lightSpecularColor;
// Calcalate total lighting for this fragment
float3 total_light_contrib;
total_light_contrib = light_diffuse;
// Uncomment next line if specular desired
//total_light_contrib += alpha * light_specular;
return float4(total_light_contrib*colour/attenuation, 0);
}
// Debugging only
//return lightDiffuseColor;
//return lightDiffuseColor/attenuation;
//return float4(abs(position-position2),0);
//return length(lightPos-position)/1000.0;
//return float4(abs(lightPos-lightPos2),0);
//return float4(lightPos-position,0);
//return float4(-global.position/1000.0f,0);
//return float4(global.position/1000.0,0);
///return float4(lightPos[0], lightPos[1], -lightPos[2], 0)/1000.0f;
//return lightDiffuseColor*a0.xyzw/2;

View File

@ -0,0 +1,69 @@
/******************************************************************************
Copyright (c) W.J. van der Laan
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so, subject
to the following conditions:
The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************************/
/** Deferred shading framework
// W.J. :wumpus: van der Laan 2005 //
Post shader: Light geometry material
*/
struct VS_OUTPUT {
float4 pos: POSITION;
float2 texCoord: TEXCOORD0;
float3 projCoord: TEXCOORD1;
};
uniform float vpWidth, vpHeight;
uniform float4x4 worldViewProj;
uniform float4x4 invProj;
VS_OUTPUT main(
float4 Pos: POSITION
){
VS_OUTPUT Out;
float4 projPos = mul(worldViewProj, Pos);
projPos = projPos/projPos.w;
//projPos[2] = 0;
// projPos is now in nonhomogeneous 2d space -- this makes sure no perspective interpolation is
// done that could mess with our concept.
Out.pos = projPos;
//float3 position = mul(invProj, float4(projCoord, 0, 1))*distance;
// Acquire view space position via inverse projection transformation
// Optimisation for perspective, symmetric view frustrums
// These interpolate over the frustrum plane for w=1
Out.projCoord = float3(projPos[0], projPos[1], 1)*float3(
invProj[0][0], // X vector component from X
invProj[1][1], // Y vector component from Y
invProj[2][3] // Z vector component from W
);
// Texture coordinate magic, this compensates for jitter
float2 texCoord = float2(projPos[0]/2+0.5, -projPos[1]/2+0.5);
float2 texSize = float2(vpWidth, vpHeight);
texCoord = floor(texCoord * texSize)/texSize;
Out.texCoord = texCoord;
return Out;
}

View File

@ -0,0 +1,36 @@
/******************************************************************************
Copyright (c) W.J. van der Laan
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so, subject
to the following conditions:
The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************************/
/** Deferred shading framework
// W.J. :wumpus: van der Laan 2005 //
Post shader: Debug, show colour channel
*/
sampler Tex0: register(s0);
sampler Tex1: register(s1);
float4 main(float2 texCoord: TEXCOORD0, float2 projCoord: TEXCOORD1) : COLOR
{
float4 a0 = tex2D(Tex0, texCoord); // Attribute 0: Diffuse color+shininess
float4 a1 = tex2D(Tex1, texCoord); // Attribute 1: Normal+depth
return float4(a0.xyz, 0);
}

View File

@ -0,0 +1,36 @@
/******************************************************************************
Copyright (c) W.J. van der Laan
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so, subject
to the following conditions:
The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************************/
/** Deferred shading framework
// W.J. :wumpus: van der Laan 2005 //
Post shader: Debug, show depth and specularity channel
*/
sampler Tex0: register(s0);
sampler Tex1: register(s1);
float4 main(float2 texCoord: TEXCOORD0, float2 projCoord: TEXCOORD1) : COLOR
{
float4 a0 = tex2D(Tex0, texCoord); // Attribute 0: Diffuse color+shininess
float4 a1 = tex2D(Tex1, texCoord); // Attribute 1: Normal+depth
return float4(a0.w, 0, a1.w/1000.0, 0);
}

View File

@ -0,0 +1,38 @@
/******************************************************************************
Copyright (c) W.J. van der Laan
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so, subject
to the following conditions:
The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************************/
/** Deferred shading framework
// W.J. :wumpus: van der Laan 2005 //
Post shader: Debug, show normal channel
*/
sampler Tex0: register(s0);
sampler Tex1: register(s1);
float4 main(float2 texCoord: TEXCOORD0, float2 projCoord: TEXCOORD1) : COLOR
{
float4 a0 = tex2D(Tex0, texCoord); // Attribute 0: Diffuse color+shininess
float4 a1 = tex2D(Tex1, texCoord); // Attribute 1: Normal+depth
return float4((a1.xyz+1)*0.5,0);
//float d=dot(a1.xyz,float3(0,0,1))*2.0+0.5;
//return float4(1,0,0,0)*d+float4(0,0,1,0)*(1-d);
}

View File

@ -0,0 +1,132 @@
/******************************************************************************
Copyright (c) W.J. van der Laan
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so, subject
to the following conditions:
The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************************/
/** Deferred shading framework
// W.J. :wumpus: van der Laan 2005 //
Post shader: Single pass
*/
sampler Tex0: register(s0);
sampler Tex1: register(s1);
float4x4 proj;
float4 ambientColor;
// Attributes of light 0
float4 lightPos0;
float4 lightDiffuseColor0;
float4 lightSpecularColor0;
// Attributes of light 1
float4 lightPos1;
float4 lightDiffuseColor1;
float4 lightSpecularColor1;
// Global parameters for lights
struct LightGlobal
{
float3 position;
float3 normal;
float3 viewDir;
};
// Current state of light
struct LightAccum
{
float3 light_diffuse;
float3 light_specular;
};
// Do lighting calculations for one light
void processLight(
inout LightAccum accum,
LightGlobal global,
float4 lightPos,
float4 lightDiffuseColor,
float4 lightSpecularColor)
{
float3 lightVec = lightPos - global.position;
float3 lightDir = normalize(lightVec);
accum.light_diffuse += max(0,dot(lightDir, global.normal)) * lightDiffuseColor;
float3 h = normalize(global.viewDir + lightDir);
accum.light_specular += pow(dot(global.normal, h),32) * lightSpecularColor;
}
struct POUTPUT
{
float4 colour: COLOR;
float depth: DEPTH;
};
POUTPUT main(float2 texCoord: TEXCOORD0, float3 projCoord: TEXCOORD1)
{
POUTPUT o;
float4 a0 = tex2D(Tex0, texCoord); // Attribute 0: Diffuse color+shininess
float4 a1 = tex2D(Tex1, texCoord); // Attribute 1: Normal+depth
LightGlobal global;
// Clip fragment if depth is too far, so the skybox can be rendered on the background
clip(a1.w-0.001);
// Attributes
float3 colour = a0.rgb;
float alpha = a0.a; // Specularity
float distance = a1.w; // Distance from viewer -- is zero if no lighting wanted
//global.normal = normalize(a1.xyz); // normalizing done already
global.normal = a1.xyz;
// Acquire view space position via inverse projection transformation
//global.position = mul(invProj, float4(projCoord, 0, 1))*distance;
// Acquire view space position via inverse projection transformation
//float4 tpos;
//tpos = float4(projCoord, distance, 1.0);
//tpos = mul(invProj, tpos);
//tpos = tpos / tpos.w;
//global.position = tpos;
//global.position = float3(
// invProj[0][0], // X vector component from X
// invProj[1][1], // Y vector component from Y
// invProj[2][3] // Z vector component from W
//)*projCoord*distance;
global.position = projCoord*distance;
// Apply light
LightAccum accum;
accum.light_diffuse = float3(0,0,0);
accum.light_specular = float3(0,0,0);
global.viewDir = -normalize(global.position);
processLight(accum, global, lightPos0, lightDiffuseColor0, lightSpecularColor0);
processLight(accum, global, lightPos1, lightDiffuseColor1, lightSpecularColor1);
// Calcalate total lighting for this fragment
float3 total_light_contrib;
total_light_contrib = ambientColor+accum.light_diffuse+alpha*accum.light_specular;
o.colour = float4( total_light_contrib*colour ,0);
// Depth buffer value
// Transfering depth makes it possible to render particle effects and other transparent
// things unaffected by light in the postprocessing phase.
o.depth = projCoord.z*proj[2][2] + proj[2][3]/distance;
return o;
}

View File

@ -0,0 +1,59 @@
/******************************************************************************
Copyright (c) W.J. van der Laan
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so, subject
to the following conditions:
The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************************/
/** Deferred shading framework
// W.J. :wumpus: van der Laan 2005 //
Post shader: Generic fullscreen quad
*/
struct VS_OUTPUT {
float4 Pos: POSITION;
float2 texCoord: TEXCOORD0;
float3 projCoord: TEXCOORD1;
};
float4x4 invProj;
VS_OUTPUT main(float4 Pos: POSITION){
VS_OUTPUT Out;
// Clean up inaccuracies
Pos.xy = sign(Pos.xy);
Out.Pos = float4(Pos.xy, 0, 1);
// Image-space
Out.texCoord.x = 0.5 * (1 + Pos.x);
Out.texCoord.y = 0.5 * (1 - Pos.y);
// Projection coordinates
// Inverted projection matrix
// These interpolate over the frustrum plane for w=1
Out.projCoord = float3(Pos.x, Pos.y, 1) *
float3(
invProj[0][0], // X vector component from X
invProj[1][1], // Y vector component from Y
invProj[2][3] // Z vector component from W
);
return Out;
}

View File

@ -0,0 +1,50 @@
// Materials for rendering to the fat buffer
// Plain phong
vertex_program DeferredShading/material/glsl/vs glsl
{
source DeferredShading/material/glsl/vs.glsl
}
fragment_program DeferredShading/material/glsl/ps glsl
{
source DeferredShading/material/glsl/ps.glsl
default_params
{
param_named specularity float 0.0
}
}
fragment_program DeferredShading/material/glsl/notex_ps glsl
{
source DeferredShading/material/glsl/notex_ps.glsl
default_params
{
param_named specularity float 0.0
param_named colour float3 0.7 0.7 0.7
}
}
// Normal mapping
vertex_program DeferredShading/material/glsl/nm_vs glsl
{
source DeferredShading/material/glsl/nm_vs.glsl
}
fragment_program DeferredShading/material/glsl/nm_ps glsl
{
source DeferredShading/material/glsl/nm_ps.glsl
default_params
{
param_named specularity float 0.0
param_named tex0 int 0
param_named normTex int 1
}
}
fragment_program DeferredShading/material/glsl/nm_notex_ps glsl
{
source DeferredShading/material/glsl/nm_notex_ps.glsl
default_params
{
param_named colour float3 0.7 0.7 0.7
param_named specularity float 0.0
param_named normTex int 0
}
}

View File

@ -0,0 +1,70 @@
// Materials for rendering to the fat buffer
// Plain phong
vertex_program DeferredShading/material/hlsl/vs hlsl
{
source DeferredShading/material/hlsl/vs.hlsl
target vs_1_1
entry_point main
default_params
{
param_named_auto worldView worldview_matrix
param_named_auto worldViewProj worldviewproj_matrix
}
}
fragment_program DeferredShading/material/hlsl/ps hlsl
{
source DeferredShading/material/hlsl/ps.hlsl
target ps_2_0
entry_point main
default_params
{
param_named specularity float 0.0
}
}
fragment_program DeferredShading/material/hlsl/notex_ps hlsl
{
source DeferredShading/material/hlsl/notex_ps.hlsl
target ps_2_0
entry_point main
default_params
{
param_named specularity float 0.0
}
}
// Normal mapping
vertex_program DeferredShading/material/hlsl/nm_vs hlsl
{
source DeferredShading/material/hlsl/nm_vs.hlsl
target vs_1_1
entry_point main
default_params
{
param_named_auto worldView worldview_matrix
param_named_auto worldViewProj worldviewproj_matrix
}
}
fragment_program DeferredShading/material/hlsl/nm_ps hlsl
{
source DeferredShading/material/hlsl/nm_ps.hlsl
target ps_2_0
entry_point main
default_params
{
param_named specularity float 0.0
}
}
fragment_program DeferredShading/material/hlsl/nm_notex_ps hlsl
{
source DeferredShading/material/hlsl/nm_notex_ps.hlsl
target ps_2_0
entry_point main
default_params
{
param_named colour float3 0.7 0.7 0.7
param_named specularity float 0.0
}
}

View File

@ -0,0 +1,152 @@
// Materials for rendering to the fat buffer
// Textured Phong shading material
material DeferredShading/Material/TexturedPhong
{
technique hlsl
{
pass main
{
vertex_program_ref DeferredShading/material/hlsl/vs
{
}
fragment_program_ref DeferredShading/material/hlsl/ps
{
}
texture_unit
{
}
}
}
technique glsl
{
pass main
{
vertex_program_ref DeferredShading/material/glsl/vs
{
}
fragment_program_ref DeferredShading/material/glsl/ps
{
}
texture_unit
{
}
}
}
}
// Untextured Phong shading material
material DeferredShading/Material/UntexturedPhong
{
technique hlsl
{
pass main
{
vertex_program_ref DeferredShading/material/hlsl/vs
{
}
fragment_program_ref DeferredShading/material/hlsl/notex_ps
{
}
}
}
technique glsl
{
pass main
{
vertex_program_ref DeferredShading/material/glsl/vs
{
}
fragment_program_ref DeferredShading/material/glsl/notex_ps
{
}
}
}
}
// Textured normal mapped material
material DeferredShading/Material/TexturedNormalMapped
{
technique hlsl
{
pass main
{
vertex_program_ref DeferredShading/material/hlsl/nm_vs
{
}
fragment_program_ref DeferredShading/material/hlsl/nm_ps
{
}
texture_unit
{
}
texture_unit
{
tex_coord_set 1
}
}
}
technique glsl
{
pass main
{
vertex_program_ref DeferredShading/material/glsl/nm_vs
{
}
fragment_program_ref DeferredShading/material/glsl/nm_ps
{
}
texture_unit
{
}
texture_unit
{
tex_coord_set 1
}
}
}
}
// Untextured normal mapped material
material DeferredShading/Material/UntexturedNormalMapped
{
technique hlsl
{
pass main
{
vertex_program_ref DeferredShading/material/hlsl/nm_vs
{
}
fragment_program_ref DeferredShading/material/hlsl/nm_notex_ps
{
}
texture_unit
{
}
}
}
technique glsl
{
pass main
{
vertex_program_ref DeferredShading/material/glsl/nm_vs
{
}
fragment_program_ref DeferredShading/material/glsl/nm_notex_ps
{
}
texture_unit
{
tex_coord_set 0
}
texture_unit
{
tex_coord_set 1
}
}
}
}

View File

@ -0,0 +1,27 @@
fragment_program DeferredShading/post/glsl/ShowNormal_ps glsl
{
source DeferredShading/post/glsl/ShowNormal_ps.glsl
default_params
{
param_named tex0 int 0
param_named tex1 int 1
}
}
fragment_program DeferredShading/post/glsl/ShowDS_ps glsl
{
source DeferredShading/post/glsl/ShowDS_ps.glsl
default_params
{
param_named tex0 int 0
param_named tex1 int 1
}
}
fragment_program DeferredShading/post/glsl/ShowColour_ps glsl
{
source DeferredShading/post/glsl/ShowColour_ps.glsl
default_params
{
param_named tex0 int 0
param_named tex1 int 1
}
}

View File

@ -0,0 +1,18 @@
fragment_program DeferredShading/post/hlsl/ShowNormal_ps hlsl
{
source DeferredShading/post/hlsl/ShowNormal_ps.hlsl
target ps_2_0
entry_point main
}
fragment_program DeferredShading/post/hlsl/ShowDS_ps hlsl
{
source DeferredShading/post/hlsl/ShowDS_ps.hlsl
target ps_2_0
entry_point main
}
fragment_program DeferredShading/post/hlsl/ShowColour_ps hlsl
{
source DeferredShading/post/hlsl/ShowColour_ps.hlsl
target ps_2_0
entry_point main
}

View File

@ -0,0 +1,172 @@
material DeferredShading/Post/ShowNormal
{
technique
{
pass
{
cull_hardware none
cull_software none
depth_func always_pass
fragment_program_ref DeferredShading/post/hlsl/ShowNormal_ps
{
}
vertex_program_ref DeferredShading/post/hlsl/vs
{
}
texture_unit
{
tex_address_mode clamp
filtering none
}
texture_unit
{
tex_coord_set 1
tex_address_mode clamp
filtering none
}
}
}
technique
{
pass
{
cull_hardware none
cull_software none
depth_func always_pass
fragment_program_ref DeferredShading/post/glsl/ShowNormal_ps
{
}
vertex_program_ref DeferredShading/post/glsl/vs
{
}
texture_unit
{
tex_address_mode clamp
filtering none
}
texture_unit
{
tex_coord_set 1
tex_address_mode clamp
filtering none
}
}
}
}
material DeferredShading/Post/ShowDS
{
technique
{
pass
{
cull_hardware none
cull_software none
depth_func always_pass
fragment_program_ref DeferredShading/post/hlsl/ShowDS_ps
{
}
vertex_program_ref DeferredShading/post/hlsl/vs
{
}
texture_unit
{
tex_address_mode clamp
filtering none
}
texture_unit
{
tex_coord_set 1
tex_address_mode clamp
filtering none
}
}
}
technique
{
pass
{
cull_hardware none
cull_software none
depth_func always_pass
fragment_program_ref DeferredShading/post/glsl/ShowDS_ps
{
}
vertex_program_ref DeferredShading/post/glsl/vs
{
}
texture_unit
{
tex_address_mode clamp
filtering none
}
texture_unit
{
tex_coord_set 1
tex_address_mode clamp
filtering none
}
}
}
}
material DeferredShading/Post/ShowColour
{
technique
{
pass
{
cull_hardware none
cull_software none
depth_func always_pass
fragment_program_ref DeferredShading/post/hlsl/ShowColour_ps
{
}
vertex_program_ref DeferredShading/post/hlsl/vs
{
}
texture_unit
{
tex_address_mode clamp
filtering none
}
texture_unit
{
tex_coord_set 1
tex_address_mode clamp
filtering none
}
}
}
technique
{
pass
{
cull_hardware none
cull_software none
depth_func always_pass
fragment_program_ref DeferredShading/post/glsl/ShowColour_ps
{
}
vertex_program_ref DeferredShading/post/glsl/vs
{
}
texture_unit
{
tex_address_mode clamp
filtering none
}
texture_unit
{
tex_coord_set 1
tex_address_mode clamp
filtering none
}
}
}
}

View File

@ -0,0 +1,26 @@
// Auxilary lights
vertex_program DeferredShading/post/glsl/LightMaterial_vs glsl
{
source DeferredShading/post/glsl/LightMaterial_vs.glsl
default_params
{
param_named_auto invProj inverse_projection_matrix
param_named_auto vpWidth viewport_width
param_named_auto vpHeight viewport_height
}
}
fragment_program DeferredShading/post/glsl/LightMaterial_ps glsl
{
source DeferredShading/post/glsl/LightMaterial_ps.glsl
default_params
{
param_named_auto worldView worldview_matrix
param_named_auto lightDiffuseColor custom 1
param_named_auto lightSpecularColor custom 2
param_named_auto lightFalloff custom 3
param_named tex0 int 0
param_named tex1 int 1
}
}

View File

@ -0,0 +1,29 @@
// Auxilary lights
vertex_program DeferredShading/post/hlsl/LightMaterial_vs hlsl
{
source DeferredShading/post/hlsl/LightMaterial_vs.hlsl
target vs_1_1
entry_point main
default_params
{
param_named_auto worldViewProj worldviewproj_matrix
param_named_auto invProj inverse_projection_matrix
param_named_auto vpWidth viewport_width
param_named_auto vpHeight viewport_height
}
}
fragment_program DeferredShading/post/hlsl/LightMaterial_ps hlsl
{
source DeferredShading/post/hlsl/LightMaterial_ps.hlsl
target ps_2_0
entry_point main
default_params
{
param_named_auto worldView worldview_matrix
param_named_auto lightDiffuseColor custom 1
param_named_auto lightSpecularColor custom 2
param_named_auto lightFalloff custom 3
}
}

View File

@ -0,0 +1,56 @@
// Auxilary lights
/// Reference material [geometry]
material DeferredShading/LightMaterial
{
technique
{
pass
{
// Don't disable depth test, because the light doesn't have to be rendered
// if the bounding geometry is obscured.
scene_blend add
depth_write off
depth_check on
lighting off
texture_unit
{
tex_address_mode clamp
filtering none
}
texture_unit
{
tex_address_mode clamp
filtering none
}
}
}
}
/// Reference material [quad]
material DeferredShading/LightMaterialQuad
{
technique
{
pass
{
scene_blend add
depth_write off
depth_check off
lighting off
texture_unit
{
tex_address_mode clamp
filtering none
}
texture_unit
{
tex_address_mode clamp
filtering none
}
}
}
}

View File

@ -0,0 +1,26 @@
// Post processors
fragment_program DeferredShading/post/glsl/Ambient_ps glsl
{
source DeferredShading/post/glsl/Ambient_ps.glsl
default_params
{
param_named_auto ambientColor ambient_light_colour 0
param_named_auto proj projection_matrix
param_named tex0 int 0
param_named tex1 int 1
}
}
fragment_program DeferredShading/post/glsl/GlobalLight_ps glsl
{
source DeferredShading/post/glsl/GlobalLight_ps.glsl
default_params
{
param_named_auto lightPos0 light_position_view_space 0
param_named_auto lightDiffuseColor0 light_diffuse_colour 0
param_named_auto lightSpecularColor0 light_specular_colour 0
param_named tex0 int 0
param_named tex1 int 1
}
}

View File

@ -0,0 +1,28 @@
// Post processors
fragment_program DeferredShading/post/hlsl/Ambient_ps hlsl
{
source DeferredShading/post/hlsl/Ambient_ps.hlsl
target ps_2_0
entry_point main
default_params
{
param_named_auto ambientColor ambient_light_colour 0
param_named_auto proj projection_matrix
}
}
fragment_program DeferredShading/post/hlsl/GlobalLight_ps hlsl
{
source DeferredShading/post/hlsl/GlobalLight_ps.hlsl
target ps_2_0
entry_point main
default_params
{
//param_named_auto invProj inverse_projection_matrix
param_named_auto lightPos0 light_position_view_space 0
param_named_auto lightDiffuseColor0 light_diffuse_colour 0
param_named_auto lightSpecularColor0 light_specular_colour 0
}
}

View File

@ -0,0 +1,118 @@
// Post processors
material DeferredShading/Post/Multi
{
technique
{
pass
{
// Ambient and depth write pass
cull_hardware none
cull_software none
//depth_check off
depth_write on
fragment_program_ref DeferredShading/post/hlsl/Ambient_ps
{
}
vertex_program_ref DeferredShading/post/hlsl/vs
{
}
texture_unit
{
tex_address_mode clamp
filtering none
}
texture_unit
{
tex_coord_set 1
tex_address_mode clamp
filtering none
}
}
pass
{
scene_blend add
cull_hardware none
cull_software none
iteration once_per_light
depth_write off
//depth_check off
fragment_program_ref DeferredShading/post/hlsl/GlobalLight_ps
{
}
vertex_program_ref DeferredShading/post/hlsl/vs
{
}
texture_unit
{
tex_address_mode clamp
filtering none
}
texture_unit
{
tex_coord_set 1
tex_address_mode clamp
filtering none
}
}
}
technique
{
pass
{
// Ambient and depth write pass
cull_hardware none
cull_software none
//depth_check off
depth_write on
fragment_program_ref DeferredShading/post/glsl/Ambient_ps
{
}
vertex_program_ref DeferredShading/post/glsl/vs
{
}
texture_unit
{
tex_address_mode clamp
filtering none
}
texture_unit
{
tex_coord_set 1
tex_address_mode clamp
filtering none
}
}
pass
{
scene_blend add
cull_hardware none
cull_software none
iteration once_per_light
depth_write off
depth_check off
fragment_program_ref DeferredShading/post/glsl/GlobalLight_ps
{
}
vertex_program_ref DeferredShading/post/glsl/vs
{
}
texture_unit
{
tex_address_mode clamp
filtering none
}
texture_unit
{
tex_coord_set 1
tex_address_mode clamp
filtering none
}
}
}
}

View File

@ -0,0 +1,27 @@
// Post processors
vertex_program DeferredShading/post/glsl/vs glsl
{
source DeferredShading/post/glsl/vs.glsl
default_params
{
param_named_auto invProj inverse_projection_matrix
}
}
fragment_program DeferredShading/post/glsl/SinglePass_ps glsl
{
source DeferredShading/post/glsl/SinglePass_ps.glsl
default_params
{
param_named_auto proj projection_matrix
param_named_auto ambientColor ambient_light_colour 0
param_named_auto lightPos0 light_position_view_space 0
param_named_auto lightDiffuseColor0 light_diffuse_colour 0
param_named_auto lightSpecularColor0 light_specular_colour 0
param_named_auto lightPos1 light_position_view_space 1
param_named_auto lightDiffuseColor1 light_diffuse_colour 1
param_named_auto lightSpecularColor1 light_specular_colour 1
param_named tex0 int 0
param_named tex1 int 1
}
}

View File

@ -0,0 +1,29 @@
// Post processors
vertex_program DeferredShading/post/hlsl/vs hlsl
{
source DeferredShading/post/hlsl/vs.hlsl
target vs_1_1
entry_point main
default_params
{
param_named_auto invProj inverse_projection_matrix
}
}
fragment_program DeferredShading/post/hlsl/SinglePass_ps hlsl
{
source DeferredShading/post/hlsl/SinglePass_ps.hlsl
target ps_2_0
entry_point main
default_params
{
param_named_auto proj projection_matrix
param_named_auto ambientColor ambient_light_colour 0
param_named_auto lightPos0 light_position_view_space 0
param_named_auto lightDiffuseColor0 light_diffuse_colour 0
param_named_auto lightSpecularColor0 light_specular_colour 0
param_named_auto lightPos1 light_position_view_space 1
param_named_auto lightDiffuseColor1 light_diffuse_colour 1
param_named_auto lightSpecularColor1 light_specular_colour 1
}
}

View File

@ -0,0 +1,65 @@
// Post processors
material DeferredShading/Post/Single
{
technique
{
pass
{
cull_hardware none
cull_software none
depth_func always_pass
depth_write on
// Doesn't work for some reason
//depth_check off
fragment_program_ref DeferredShading/post/hlsl/SinglePass_ps
{
}
vertex_program_ref DeferredShading/post/hlsl/vs
{
}
texture_unit
{
tex_address_mode clamp
filtering none
}
texture_unit
{
tex_coord_set 1
tex_address_mode clamp
filtering none
}
}
}
technique
{
pass
{
cull_hardware none
cull_software none
depth_func always_pass
depth_write on
// Doesn't work for some reason
//depth_check off
fragment_program_ref DeferredShading/post/glsl/SinglePass_ps
{
}
vertex_program_ref DeferredShading/post/glsl/vs
{
}
texture_unit
{
tex_address_mode clamp
filtering none
}
texture_unit
{
tex_coord_set 1
tex_address_mode clamp
filtering none
}
}
}
}

View File

@ -0,0 +1,228 @@
// Materials for deferred shading test
// Sky box
material Test13/SkyBox
{
technique
{
pass
{
depth_write off
lighting off
texture_unit
{
cubic_texture evening.jpg separateUV
tex_address_mode clamp
}
}
}
}
// Ground plane
material Test13/Ground: DeferredShading/Material/TexturedPhong
{
technique hlsl
{
pass main
{
texture_unit
{
texture grass_1024.jpg
}
}
}
technique glsl
{
pass main
{
texture_unit
{
texture grass_1024.jpg
}
}
}
}
// Rock wall texture [bumpmapped]
material Test13/RockWall: DeferredShading/Material/TexturedNormalMapped
{
technique hlsl
{
pass main
{
texture_unit
{
texture rockwall.tga
}
texture_unit
{
texture rockwall_NH.tga
}
}
}
technique glsl
{
pass main
{
texture_unit
{
texture rockwall.tga
}
texture_unit
{
texture rockwall_NH.tga
}
}
}
}
// Athena texture [bumpmapped, untextured]
material Test13/DeferredAthena: DeferredShading/Material/UntexturedNormalMapped
{
technique hlsl
{
pass main
{
texture_unit
{
texture atheneNormalMap.png
}
fragment_program_ref
{
param_named specularity float 0.5
}
}
}
technique glsl
{
pass main
{
texture_unit
{
texture atheneNormalMap.png
}
fragment_program_ref
{
param_named specularity float 0.5
}
}
}
}
/// Ogre parts
material Test13/DeferredOgre/Skin: DeferredShading/Material/TexturedPhong
{
technique hlsl
{
pass main
{
cull_hardware none
texture_unit
{
texture GreenSkin.jpg
tex_address_mode mirror
}
}
}
technique glsl
{
pass main
{
cull_hardware none
texture_unit
{
texture GreenSkin.jpg
tex_address_mode mirror
}
}
}
}
material Test13/DeferredOgre/EarRing: DeferredShading/Material/UntexturedPhong
{
technique hlsl
{
pass main
{
fragment_program_ref
{
param_named specularity float 1.5
param_named colour float3 0.5 0.5 0
}
}
}
technique glsl
{
pass main
{
fragment_program_ref
{
param_named specularity float 1.5
param_named colour float3 0.5 0.5 0
}
}
}
}
material Test13/DeferredOgre/Tusks: DeferredShading/Material/TexturedPhong
{
technique hlsl
{
pass main
{
fragment_program_ref
{
param_named specularity float 0.5
}
texture_unit
{
texture dirt01.jpg
}
}
}
technique glsl
{
pass main
{
fragment_program_ref
{
param_named specularity float 0.5
}
texture_unit
{
texture dirt01.jpg
}
}
}
}
material Test13/DeferredOgre/Eyes: DeferredShading/Material/TexturedPhong
{
technique hlsl
{
pass main
{
fragment_program_ref
{
param_named specularity float 1.0
}
texture_unit
{
texture WeirdEye.png
}
}
}
technique glsl
{
pass main
{
fragment_program_ref
{
param_named specularity float 1.0
}
texture_unit
{
texture WeirdEye.png
}
}
}
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,11 @@
StarWars
{
// Now this one I agree with ;)
// A Star Wars font :)
type truetype
source solo5.ttf
size 16
resolution 96
}

View File

@ -0,0 +1,182 @@
<?xml version="1.0" ?>
<GUILayout>
<Window Type="DefaultGUISheet" Name="root">
<Window Type="DefaultGUISheet" Name="debug_overlay">
<Property Name="AlwaysOnTop" Value="True" />
<Property Name="Disabled" Value="True" />
<Window Type="TaharezLook/StaticText" Name="Panel 1">
<Property Name="UnifiedPosition" Value="{{0,0},{0.83,0}}" />
<Property Name="UnifiedSize" Value="{{0.23,0},{0.17,0}}" />
<Property Name="TopLeftFrameImage" Value="set:OgreGuiImagery image:BoxTopLeft" />
<Property Name="TopRightFrameImage" Value="set:OgreGuiImagery image:BoxTopRight" />
<Property Name="BottomLeftFrameImage" Value="set:OgreGuiImagery image:BoxBottomLeft" />
<Property Name="BottomRightFrameImage" Value="set:OgreGuiImagery image:BoxBottomRight" />
<Property Name="LeftFrameImage" Value="set:OgreGuiImagery image:BoxLeft" />
<Property Name="TopFrameImage" Value="set:OgreGuiImagery image:BoxTop" />
<Property Name="RightFrameImage" Value="set:OgreGuiImagery image:BoxRight" />
<Property Name="BottomFrameImage" Value="set:OgreGuiImagery image:BoxBottom" />
<Property Name="BackgroundImage" Value="set:OgreGuiImagery image:BoxBack" />
<Property Name="Alpha" Value="0.9" />
<Property Name="InheritsAlpha" Value="False" />
<Window Type="TaharezLook/StaticText" Name="OPCurrentFPS">
<Property Name="FrameEnabled" Value="False" />
<Property Name="BackgroundEnabled" Value="False" />
<Property Name="Font" Value="BlueHighway-10" />
<Property Name="UnifiedPosition" Value="{{0.075,0},{0.12,0}}" />
<Property Name="UnifiedSize" Value="{{0.85,0},{0.25,0}}" />
<Property Name="TextColours" Value="tl:FF4FF06F tr:FF4FF06F bl:FF4FF06F br:FF4FF06F" />
<Property Name="HorzFormatting" Value="HorzCentred" />
<Property Name="Text" Value="Current FPS: " />
</Window>
<Window Type="TaharezLook/StaticImage" Name="OPBar1">
<Property Name="FrameEnabled" Value="False" />
<Property Name="BackgroundEnabled" Value="False" />
<Property Name="UnifiedPosition" Value="{{0.2,0},{0.27,0}}" />
<Property Name="UnifiedSize" Value="{{0.6,0},{0.025,0}}" />
<Property Name="Image" Value="set:OgreGuiImagery image:Bar" />
</Window>
<Window Type="TaharezLook/StaticText" Name="OPAverageFPS">
<Property Name="FrameEnabled" Value="False" />
<Property Name="BackgroundEnabled" Value="False" />
<Property Name="Font" Value="BlueHighway-10" />
<Property Name="UnifiedPosition" Value="{{0.075,0},{0.32,0}}" />
<Property Name="UnifiedSize" Value="{{1.0,0},{0.25,0}}" />
<Property Name="TextColours" Value="tl:FFFFF5F0 tr:FFFFF5F0 bl:FFFFF510 br:FFFFF5F0" />
<Property Name="Text" Value="Average FPS: " />
</Window>
<Window Type="TaharezLook/StaticText" Name="OPWorstFPS">
<Property Name="FrameEnabled" Value="False" />
<Property Name="BackgroundEnabled" Value="False" />
<Property Name="Font" Value="BlueHighway-10" />
<Property Name="UnifiedPosition" Value="{{0.075,0},{0.45,0}}" />
<Property Name="UnifiedSize" Value="{{1.0,0},{0.25,0}}" />
<Property Name="TextColours" Value="tl:FFFFF5F0 tr:FFFFF5F0 bl:FFFFF510 br:FFFFF5F0" />
<Property Name="Text" Value="Worst FPS: " />
</Window>
<Window Type="TaharezLook/StaticText" Name="OPBestFPS">
<Property Name="FrameEnabled" Value="False" />
<Property Name="BackgroundEnabled" Value="False" />
<Property Name="Font" Value="BlueHighway-10" />
<Property Name="UnifiedPosition" Value="{{0.075,0},{0.58,0}}" />
<Property Name="UnifiedSize" Value="{{1.0,0},{0.25,0}}" />
<Property Name="TextColours" Value="tl:FFFFF5F0 tr:FFFFF5F0 bl:FFFFF510 br:FFFFF5F0" />
<Property Name="Text" Value="Best FPS: " />
</Window>
<Window Type="TaharezLook/StaticText" Name="OPTriCount">
<Property Name="FrameEnabled" Value="False" />
<Property Name="BackgroundEnabled" Value="False" />
<Property Name="Font" Value="BlueHighway-10" />
<Property Name="UnifiedPosition" Value="{{0.075,0},{0.71,0}}" />
<Property Name="UnifiedSize" Value="{{1.0,0},{0.25,0}}" />
<Property Name="TextColours" Value="tl:FFFFF5F0 tr:FFFFF5F0 bl:FFFFF510 br:FFFFF5F0" />
<Property Name="Text" Value="Triangle Count: " />
</Window>
</Window>
<Window Type="TaharezLook/StaticText" Name="OPDebugMsg">
<Property Name="FrameEnabled" Value="False" />
<Property Name="BackgroundEnabled" Value="False" />
<Property Name="Font" Value="BlueHighway-10" />
<Property Name="UnifiedPosition" Value="{{0.25,0},{0.93,0}}" />
<Property Name="UnifiedSize" Value="{{0.65,0},{0.07,0}}" />
<Property Name="TextColours" Value="tl:A0FFFFFF tr:A0FFFFFF bl:A0FFFFFF br:A0FFFFFF" />
<Property Name="InheritsAlpha" Value="False" />
<Property Name="VertFormatting" Value="VertCentred" />
<Property Name="HorzFormatting" Value="WordWrapCentred" />
</Window>
<Window Type="TaharezLook/StaticImage" Name="OgreLogo">
<Property Name="FrameEnabled" Value="False" />
<Property Name="BackgroundEnabled" Value="False" />
<Property Name="UnifiedPosition" Value="{{0.9,0},{0.95,0}}" />
<Property Name="UnifiedSize" Value="{{0.1,0},{0.05,0}}" />
<Property Name="Image" Value="set:OgreGuiImagery image:OgreLogo" />
<Property Name="Alpha" Value="0.75" />
<Property Name="InheritsAlpha" Value="False" />
</Window>
<Window Type="TaharezLook/StaticImage" Name="CeguiLogo">
<Property Name="FrameEnabled" Value="False" />
<Property Name="BackgroundEnabled" Value="False" />
<Property Name="UnifiedPosition" Value="{{0.9125,0},{0.9115,0}}" />
<Property Name="UnifiedSize" Value="{{0.075,0},{0.0385,0}}" />
<Property Name="Image" Value="set:OgreGuiImagery image:CeguiLogo" />
<Property Name="Alpha" Value="0.75" />
<Property Name="InheritsAlpha" Value="False" />
</Window>
</Window>
<Window Type="DefaultGUISheet" Name="CompositorDemo">
<Property Name="UnifiedMaxSize" Value="{{1,0},{2,0}}" />
<Property Name="UnifiedSize" Value="{{1,0},{2,0}}" />
<Window Type="TaharezLook/StaticText" Name="HelpTxt">
<Property Name="UnifiedPosition" Value="{{0.6,0},{0.8,0}}" />
<Property Name="UnifiedMinSize" Value="{{0.5,0},{0.3,0}}" />
<Property Name="UnifiedSize" Value="{{0.5,0},{0.3,0}}" />
<Property Name="Text" Value="Use the Combo boxes to select a shader and a model" />
<Property Name="InheritsAlpha" Value="False" />
</Window>
<Window Type="TaharezLook/FrameWindow" Name="CompositorSelectorWin">
<Property Name="UnifiedPosition" Value="{{0,0},{0,0}}" />
<Property Name="UnifiedMinSize" Value="{{0.16,0},{0.22,0}}" />
<Property Name="UnifiedMaxSize" Value="{{0.16,0},{0.75,0}}" />
<Property Name="UnifiedSize" Value="{{0.16,0},{0.3,0}}" />
<Property Name="Text" Value="Compositors" />
<Property Name="Alpha" Value="0.75" />
<Property Name="CloseButtonEnabled" Value="False" />
<Window Type="TaharezLook/Button" Name="ExitDemoBtn">
<Property Name="VerticalAlignment" Value="Bottom" />
<Property Name="HorizontalAlignment" Value="Centre" />
<Property Name="UnifiedPosition" Value="{{0,0},{0,0}}" />
<Property Name="UnifiedMaxSize" Value="{{0.12,0},{0.03,0}}" />
<Property Name="UnifiedMinSize" Value="{{0.12,0},{0.03,0}}" />
<Property Name="UnifiedSize" Value="{{0.33,0},{0.03,0}}" />
<Property Name="Text" Value="Exit Demo" />
<Property Name="InheritsAlpha" Value="False" />
</Window>
</Window>
<Window Type="TaharezLook/FrameWindow" Name="DebugRTTs">
<Property Name="RollUpState" Value="True" />
<Property Name="UnifiedPosition" Value="{{0.70,0},{0,0}}" />
<Property Name="UnifiedMinSize" Value="{{0.3,0},{0.3,0}}" />
<Property Name="UnifiedMaxSize" Value="{{0.3,0},{0.3,0}}" />
<Property Name="UnifiedSize" Value="{{0.3,0},{0.3,0}}" />
<Property Name="Text" Value="Debug RTTs" />
<Property Name="Alpha" Value="0.75" />
<Property Name="CloseButtonEnabled" Value="False" />
<Window Type="TaharezLook/Listbox" Name="DebugRTTListbox">
<Property Name="UnifiedPosition" Value="{{0.02,0},{0.1,0}}" />
<Property Name="UnifiedMinSize" Value="{{0.1,0},{0.25,0}}" />
<Property Name="UnifiedMaxSize" Value="{{0.1,0},{0.25,0}}" />
<Property Name="UnifiedSize" Value="{{0.1,0},{0.25,0}}" />
</Window>
<Window Type="TaharezLook/StaticImage" Name="DebugRTTImage">
<Property Name="UnifiedPosition" Value="{{0.36,0},{0.1,0}}" />
<Property Name="UnifiedMinSize" Value="{{0.2,0},{0.25,0}}" />
<Property Name="UnifiedMaxSize" Value="{{0.2,0},{0.25,0}}" />
<Property Name="UnifiedSize" Value="{{0.2,0},{0.25,0}}" />
</Window>
</Window>
</Window>
</Window>
</GUILayout>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" ?>
<CEGUIConfig
Scheme="TaharezLookSkin.scheme"
Layout="CompositorDemo.layout"
DefaultFont="BlueHighway-12"
/>

View File

@ -0,0 +1,201 @@
<?xml version="1.0" encoding="UTF-8"?>
<GUILayout >
<Window Type="DefaultWindow" Name="root" >
<Property Name="InheritsAlpha" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
<Window Type="DefaultWindow" Name="debug_overlay" >
<Property Name="Disabled" Value="True" />
<Property Name="AlwaysOnTop" Value="True" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
<Window Type="TaharezLook/StaticText" Name="Panel 1" >
<Property Name="Alpha" Value="0.9" />
<Property Name="InheritsAlpha" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0,0},{0.83,0},{0.23,0},{1,0}}" />
<Window Type="TaharezLook/StaticText" Name="OPCurrentFPS" >
<Property Name="Font" Value="BlueHighway-10" />
<Property Name="Text" Value="Current FPS: " />
<Property Name="TextColours" Value="tl:FF4FF06F tr:FF4FF06F bl:FF4FF06F br:FF4FF06F" />
<Property Name="FrameEnabled" Value="False" />
<Property Name="HorzFormatting" Value="HorzCentred" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.075,0},{0.12,0},{0.925,0},{0.37,0}}" />
<Property Name="BackgroundEnabled" Value="False" />
</Window>
<Window Type="TaharezLook/StaticImage" Name="OPBar1" >
<Property Name="FrameEnabled" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.2,0},{0.27,0},{0.8,0},{0.295,0}}" />
<Property Name="BackgroundEnabled" Value="False" />
</Window>
<Window Type="TaharezLook/StaticText" Name="OPAverageFPS" >
<Property Name="Font" Value="BlueHighway-10" />
<Property Name="Text" Value="Average FPS: " />
<Property Name="TextColours" Value="tl:FFFFF5F0 tr:FFFFF5F0 bl:FFFFF510 br:FFFFF5F0" />
<Property Name="FrameEnabled" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.075,0},{0.32,0},{1.075,0},{0.57,0}}" />
<Property Name="BackgroundEnabled" Value="False" />
</Window>
<Window Type="TaharezLook/StaticText" Name="OPWorstFPS" >
<Property Name="Font" Value="BlueHighway-10" />
<Property Name="Text" Value="Worst FPS: " />
<Property Name="TextColours" Value="tl:FFFFF5F0 tr:FFFFF5F0 bl:FFFFF510 br:FFFFF5F0" />
<Property Name="FrameEnabled" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.075,0},{0.45,0},{1.075,0},{0.7,0}}" />
<Property Name="BackgroundEnabled" Value="False" />
</Window>
<Window Type="TaharezLook/StaticText" Name="OPBestFPS" >
<Property Name="Font" Value="BlueHighway-10" />
<Property Name="Text" Value="Best FPS: " />
<Property Name="TextColours" Value="tl:FFFFF5F0 tr:FFFFF5F0 bl:FFFFF510 br:FFFFF5F0" />
<Property Name="FrameEnabled" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.075,0},{0.58,0},{1.075,0},{0.83,0}}" />
<Property Name="BackgroundEnabled" Value="False" />
</Window>
<Window Type="TaharezLook/StaticText" Name="OPTriCount" >
<Property Name="Font" Value="BlueHighway-10" />
<Property Name="Text" Value="Triangle Count: " />
<Property Name="TextColours" Value="tl:FFFFF5F0 tr:FFFFF5F0 bl:FFFFF510 br:FFFFF5F0" />
<Property Name="FrameEnabled" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.075,0},{0.71,0},{1.075,0},{0.96,0}}" />
<Property Name="BackgroundEnabled" Value="False" />
</Window>
</Window>
<Window Type="TaharezLook/StaticText" Name="OPDebugMsg" >
<Property Name="Font" Value="BlueHighway-10" />
<Property Name="TextColours" Value="tl:A0FFFFFF tr:A0FFFFFF bl:A0FFFFFF br:A0FFFFFF" />
<Property Name="FrameEnabled" Value="False" />
<Property Name="InheritsAlpha" Value="False" />
<Property Name="HorzFormatting" Value="WordWrapCentred" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.93,0},{0.9,0},{1,0}}" />
<Property Name="BackgroundEnabled" Value="False" />
</Window>
<Window Type="TaharezLook/StaticImage" Name="OgreLogo" >
<Property Name="Alpha" Value="0.75" />
<Property Name="FrameEnabled" Value="False" />
<Property Name="InheritsAlpha" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.9,0},{0.95,0},{1,0},{1,0}}" />
<Property Name="BackgroundEnabled" Value="False" />
</Window>
<Window Type="TaharezLook/StaticImage" Name="CeguiLogo" >
<Property Name="Alpha" Value="0.75" />
<Property Name="FrameEnabled" Value="False" />
<Property Name="InheritsAlpha" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.9125,0},{0.9115,0},{0.9875,0},{0.95,0}}" />
<Property Name="BackgroundEnabled" Value="False" />
</Window>
</Window>
<Window Type="DefaultWindow" Name="InstancingDemo" >
<Property Name="Font" Value="BlueHighway-8" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
<Window Type="TaharezLook/FrameWindow" Name="CompositorSelectorWin" >
<Property Name="Text" Value="Techniques" />
<Property Name="Alpha" Value="0.75" />
<Property Name="TitlebarFont" Value="BlueHighway-12" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="TitlebarEnabled" Value="True" />
<Property Name="UnifiedAreaRect" Value="{{-0.00292969,0},{0.00381679,1.25081e-037},{0.331094,0},{0.464121,1.25081e-037}}" />
<Property Name="CloseButtonEnabled" Value="False" />
<Window Type="TaharezLook/RadioButton" Name="tInstancing" >
<Property Name="Font" Value="BlueHighway-12" />
<Property Name="Text" Value="Instancing" />
<Property Name="Selected" Value="True" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.055847,0},{0.10764,0},{0.973986,0},{0.187074,0}}" />
</Window>
<Window Type="TaharezLook/RadioButton" Name="tIndependantEntities" >
<Property Name="ID" Value="1" />
<Property Name="Font" Value="BlueHighway-12" />
<Property Name="Text" Value="Independent Entities" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.055847,0},{0.172136,0},{0.962291,0},{0.265333,0}}" />
</Window>
<Window Type="TaharezLook/Checkbox" Name="Shadows" >
<Property Name="Font" Value="BlueHighway-12" />
<Property Name="Text" Value="Shadows on/off" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.475788,0},{1.05,0},{0.579744,0}}" />
</Window>
<Window Type="TaharezLook/StaticText" Name="Object Count Text" >
<Property Name="Font" Value="BlueHighway-12" />
<Property Name="Text" Value="Object Count:" />
<Property Name="FrameEnabled" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.0880073,0},{0.263737,0},{0.382815,0},{0.369793,0}}" />
<Property Name="BackgroundEnabled" Value="False" />
</Window>
<Window Type="TaharezLook/StaticText" Name="Object Count Number" >
<Property Name="Font" Value="BlueHighway-12" />
<Property Name="Text" Value="160" />
<Property Name="FrameEnabled" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.388902,0},{0.277557,0},{0.631087,0},{0.364265,0}}" />
<Property Name="BackgroundEnabled" Value="False" />
</Window>
<Window Type="TaharezLook/HorizontalScrollbar" Name="Object Count" >
<Property Name="PageSize" Value="0" />
<Property Name="StepSize" Value="1" />
<Property Name="OverlapSize" Value="0" />
<Property Name="DocumentSize" Value="1" />
<Property Name="InheritsAlpha" Value="False" />
<Property Name="ScrollPosition" Value="0" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.39,0},{0.95,0},{0.441213,0}}" />
</Window>
<Window Type="TaharezLook/StaticText" Name="Time Burner Text" >
<Property Name="Font" Value="BlueHighway-12" />
<Property Name="Text" Value="CPU occupation:" />
<Property Name="FrameEnabled" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.59802,0},{0.427339,0},{0.680451,0}}" />
<Property Name="BackgroundEnabled" Value="False" />
</Window>
<Window Type="TaharezLook/StaticText" Name="Time Burner Value" >
<Property Name="Font" Value="BlueHighway-12" />
<Property Name="Text" Value="0 ms" />
<Property Name="FrameEnabled" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.415811,0},{0.599679,0},{0.640395,0},{0.686178,0}}" />
<Property Name="BackgroundEnabled" Value="False" />
</Window>
<Window Type="TaharezLook/HorizontalScrollbar" Name="Time Burner" >
<Property Name="Font" Value="BlueHighway-12" />
<Property Name="PageSize" Value="0" />
<Property Name="StepSize" Value="1" />
<Property Name="OverlapSize" Value="0" />
<Property Name="DocumentSize" Value="1" />
<Property Name="InheritsAlpha" Value="False" />
<Property Name="ScrollPosition" Value="0" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.687236,0},{0.95,0},{0.74726,0}}" />
</Window>
<Window Type="TaharezLook/Checkbox" Name="PostEffect" >
<Property Name="Font" Value="BlueHighway-12" />
<Property Name="Text" Value="Post Effect On/Off" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.0470764,0},{0.765568,0},{0.892124,0},{0.82884,0}}" />
</Window>
<Window Type="TaharezLook/Button" Name="ExitDemoBtn" >
<Property Name="Font" Value="BlueHighway-12" />
<Property Name="Text" Value="Exit Demo" />
<Property Name="InheritsAlpha" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{-0.0526254,0},{-0.063219,0},{0.277375,0},{-4.06504e-005,0}}" />
<Property Name="VerticalAlignment" Value="Bottom" />
<Property Name="HorizontalAlignment" Value="Centre" />
</Window>
</Window>
</Window>
</Window>
</GUILayout>

View File

@ -0,0 +1,391 @@
<?xml version="1.0" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xsd:element name="Falagard" type="falagardSpecificationType" />
<xsd:complexType name="falagardSpecificationType">
<xsd:sequence>
<xsd:element name="WidgetLook" type="widgetLookType" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="widgetLookType">
<xsd:sequence>
<xsd:element name="PropertyDefinition" type="propertyDefinitionType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="PropertyLinkDefinition" type="propertyLinkDefinitionType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="Property" type="propertyType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="NamedArea" type="namedAreaType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="Child" type="widgetComponentType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="ImagerySection" type="imagerySectionType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="StateImagery" type="stateType" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
<xsd:complexType name="propertyDefinitionType">
<xsd:attribute name="type" type="propertyTypeEnum" use="optional" default="Generic" />
<xsd:attribute name="name" type="xsd:string" use="required" />
<xsd:attribute name="initialValue" type="xsd:string" use="optional" default="" />
<xsd:attribute name="layoutOnWrite" type="xsd:boolean" use="optional" default="false" />
<xsd:attribute name="redrawOnWrite" type="xsd:boolean" use="optional" default="false" />
</xsd:complexType>
<xsd:complexType name="propertyLinkDefinitionType">
<xsd:attribute name="type" type="propertyTypeEnum" use="optional" default="Generic" />
<xsd:attribute name="name" type="xsd:string" use="required" />
<xsd:attribute name="widget" type="xsd:string" use="required" />
<xsd:attribute name="targetProperty" type="xsd:string" use="optional" default="" />
<xsd:attribute name="initialValue" type="xsd:string" use="optional" default="" />
<xsd:attribute name="layoutOnWrite" type="xsd:boolean" use="optional" default="false" />
<xsd:attribute name="redrawOnWrite" type="xsd:boolean" use="optional" default="false" />
</xsd:complexType>
<xsd:complexType name="namedAreaType">
<xsd:sequence>
<xsd:element name="Area" type="componentAreaType" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
<xsd:complexType name="stateType">
<xsd:sequence>
<xsd:element name="Layer" type="layerType" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
<xsd:attribute name="clipped" type="xsd:boolean" use="optional" default="true" />
</xsd:complexType>
<xsd:complexType name="layerType">
<xsd:sequence>
<xsd:element name="Section" type="sectionSpecType" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="priority" type="xsd:integer" use="optional" default="0" />
</xsd:complexType>
<xsd:complexType name="sectionSpecType">
<xsd:choice minOccurs="0" maxOccurs="1">
<xsd:element name="Colour" type="colourType" />
<xsd:element name="Colours" type="colourRectType" />
<xsd:element name="ColourProperty" type="settingByPropertyType" />
<xsd:element name="ColourRectProperty" type="settingByPropertyType" />
</xsd:choice>
<xsd:attribute name="look" type="xsd:string" use="optional" default="" />
<xsd:attribute name="section" type="xsd:string" use="required" />
<xsd:attribute name="controlProperty" type="xsd:string" use="optional" default="" />
</xsd:complexType>
<xsd:complexType name="imagerySectionType">
<xsd:sequence>
<xsd:choice minOccurs="0" maxOccurs="1">
<xsd:element name="Colour" type="colourType" />
<xsd:element name="Colours" type="colourRectType" />
<xsd:element name="ColourProperty" type="settingByPropertyType" />
<xsd:element name="ColourRectProperty" type="settingByPropertyType" />
</xsd:choice>
<xsd:element name="FrameComponent" type="frameComponentType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="ImageryComponent" type="imageryComponentType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="TextComponent" type="textComponentType" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
<xsd:complexType name="frameComponentType">
<xsd:sequence>
<xsd:element name="Area" type="componentAreaType" />
<xsd:element name="Image" type="frameImageType" minOccurs="0" maxOccurs="9" />
<xsd:choice minOccurs="0" maxOccurs="1">
<xsd:element name="Colour" type="colourType" />
<xsd:element name="Colours" type="colourRectType" />
<xsd:element name="ColourProperty" type="settingByPropertyType" />
<xsd:element name="ColourRectProperty" type="settingByPropertyType" />
</xsd:choice>
<xsd:choice minOccurs="0" maxOccurs="1">
<xsd:element name="VertFormat" type="vertFormatType" />
<xsd:element name="VertFormatProperty" type="settingByPropertyType" />
</xsd:choice>
<xsd:choice minOccurs="0" maxOccurs="1">
<xsd:element name="HorzFormat" type="horzFormatType" />
<xsd:element name="HorzFormatProperty" type="settingByPropertyType" />
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="textComponentType">
<xsd:sequence>
<xsd:element name="Area" type="componentAreaType" />
<xsd:element name="Text" type="textStringType" minOccurs="0" maxOccurs="1" />
<xsd:element name="TextProperty" type="textPropertyType" minOccurs="0" maxOccurs="1" />
<xsd:element name="FontProperty" type="fontPropertyType" minOccurs="0" maxOccurs="1" />
<xsd:choice minOccurs="0" maxOccurs="1">
<xsd:element name="Colour" type="colourType" />
<xsd:element name="Colours" type="colourRectType" />
<xsd:element name="ColourProperty" type="settingByPropertyType" />
<xsd:element name="ColourRectProperty" type="settingByPropertyType" />
</xsd:choice>
<xsd:choice minOccurs="0" maxOccurs="1">
<xsd:element name="VertFormat" type="vertTextFormatType" />
<xsd:element name="VertFormatProperty" type="settingByPropertyType" />
</xsd:choice>
<xsd:choice minOccurs="0" maxOccurs="1">
<xsd:element name="HorzFormat" type="horzTextFormatType" />
<xsd:element name="HorzFormatProperty" type="settingByPropertyType" />
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="imageryComponentType">
<xsd:sequence>
<xsd:element name="Area" type="componentAreaType" />
<xsd:choice>
<xsd:element name="Image" type="imageType" />
<xsd:element name="ImageProperty" type="settingByPropertyType" />
</xsd:choice>
<xsd:choice minOccurs="0" maxOccurs="1">
<xsd:element name="Colour" type="colourType" />
<xsd:element name="Colours" type="colourRectType" />
<xsd:element name="ColourProperty" type="settingByPropertyType" />
<xsd:element name="ColourRectProperty" type="settingByPropertyType" />
</xsd:choice>
<xsd:choice minOccurs="0" maxOccurs="1">
<xsd:element name="VertFormat" type="vertFormatType" />
<xsd:element name="VertFormatProperty" type="settingByPropertyType" />
</xsd:choice>
<xsd:choice minOccurs="0" maxOccurs="1">
<xsd:element name="HorzFormat" type="horzFormatType" />
<xsd:element name="HorzFormatProperty" type="settingByPropertyType" />
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="widgetComponentType">
<xsd:sequence>
<xsd:element name="Area" type="componentAreaType" />
<xsd:element name="VertAlignment" type="vertAlignmentType" minOccurs="0" maxOccurs="1" />
<xsd:element name="HorzAlignment" type="horzAlignmentType" minOccurs="0" maxOccurs="1" />
<xsd:element name="Property" type="propertyType" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="type" type="xsd:string" use="required" />
<xsd:attribute name="nameSuffix" type="xsd:string" use="required" />
<xsd:attribute name="renderer" type="xsd:string" use="optional" default="" />
<xsd:attribute name="look" type="xsd:string" use="optional" default="" />
</xsd:complexType>
<xsd:complexType name="horzFormatType">
<xsd:attribute name="type" type="horzFormatEnum" use="required" />
</xsd:complexType>
<xsd:complexType name="vertFormatType">
<xsd:attribute name="type" type="vertFormatEnum" use="required" />
</xsd:complexType>
<xsd:complexType name="horzTextFormatType">
<xsd:attribute name="type" type="horzTextFormatEnum" use="required" />
</xsd:complexType>
<xsd:complexType name="vertTextFormatType">
<xsd:attribute name="type" type="vertTextFormatEnum" use="required" />
</xsd:complexType>
<xsd:complexType name="horzAlignmentType">
<xsd:attribute name="type" type="horzAlignmentEnum" use="required" />
</xsd:complexType>
<xsd:complexType name="vertAlignmentType">
<xsd:attribute name="type" type="vertAlignmentEnum" use="required" />
</xsd:complexType>
<xsd:complexType name="propertyType">
<xsd:attribute name="name" type="xsd:string" use="required" />
<xsd:attribute name="value" type="xsd:string" use="required" />
</xsd:complexType>
<xsd:complexType name="imageType">
<xsd:attribute name="imageset" type="xsd:string" use="required" />
<xsd:attribute name="image" type="xsd:string" use="required" />
</xsd:complexType>
<xsd:complexType name="frameImageType">
<xsd:attribute name="type" type="frameImageComponentEnum" use="required" />
<xsd:attribute name="imageset" type="xsd:string" use="required" />
<xsd:attribute name="image" type="xsd:string" use="required" />
</xsd:complexType>
<xsd:complexType name="componentAreaType">
<xsd:choice>
<xsd:sequence>
<xsd:element name="Dim" type="dimensionType" minOccurs="4" maxOccurs="4" />
</xsd:sequence>
<xsd:element name="AreaProperty" type="settingByPropertyType" />
</xsd:choice>
</xsd:complexType>
<xsd:complexType name="dimensionType">
<xsd:choice>
<xsd:element name="UnifiedDim" type="unifiedDimType" />
<xsd:element name="AbsoluteDim" type="absoluteDimType" />
<xsd:element name="ImageDim" type="imageDimType" />
<xsd:element name="WidgetDim" type="widgetDimType" />
<xsd:element name="FontDim" type="fontDimType" />
<xsd:element name="PropertyDim" type="propertyDimType" />
</xsd:choice>
<xsd:attribute name="type" type="dimensionTypeEnum" use="required" />
</xsd:complexType>
<xsd:complexType name="fontDimType">
<xsd:sequence>
<xsd:element name="DimOperator" type="dimensionOperatorType" minOccurs="0" maxOccurs="1" />
</xsd:sequence>
<xsd:attribute name="widget" type="xsd:string" use="optional" default="" />
<xsd:attribute name="font" type="xsd:string" use="optional" default="" />
<xsd:attribute name="string" type="xsd:string" use="optional" default="" />
<xsd:attribute name="type" type="fontMetricTypeEnum" use="required" />
<xsd:attribute name="padding" type="xsd:decimal" use="optional" default="0" />
</xsd:complexType>
<xsd:complexType name="propertyDimType">
<xsd:sequence>
<xsd:element name="DimOperator" type="dimensionOperatorType" minOccurs="0" maxOccurs="1" />
</xsd:sequence>
<xsd:attribute name="widget" type="xsd:string" use="optional" default="" />
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
<xsd:complexType name="unifiedDimType">
<xsd:sequence>
<xsd:element name="DimOperator" type="dimensionOperatorType" minOccurs="0" maxOccurs="1" />
</xsd:sequence>
<xsd:attribute name="scale" type="xsd:decimal" use="optional" default="0" />
<xsd:attribute name="offset" type="xsd:integer" use="optional" default="0" />
<xsd:attribute name="type" type="dimensionTypeEnum" use="required" />
</xsd:complexType>
<xsd:complexType name="absoluteDimType">
<xsd:sequence>
<xsd:element name="DimOperator" type="dimensionOperatorType" minOccurs="0" maxOccurs="1" />
</xsd:sequence>
<xsd:attribute name="value" type="xsd:decimal" use="optional" default="0" />
</xsd:complexType>
<xsd:complexType name="imageDimType">
<xsd:sequence>
<xsd:element name="DimOperator" type="dimensionOperatorType" minOccurs="0" maxOccurs="1" />
</xsd:sequence>
<xsd:attribute name="imageset" type="xsd:string" use="required" />
<xsd:attribute name="image" type="xsd:string" use="required" />
<xsd:attribute name="dimension" type="dimensionTypeEnum" use="required" />
</xsd:complexType>
<xsd:complexType name="widgetDimType">
<xsd:sequence>
<xsd:element name="DimOperator" type="dimensionOperatorType" minOccurs="0" maxOccurs="1" />
</xsd:sequence>
<xsd:attribute name="widget" type="xsd:string" use="optional" default="" />
<xsd:attribute name="dimension" type="dimensionTypeEnum" use="required" />
</xsd:complexType>
<xsd:complexType name="settingByPropertyType">
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
<xsd:complexType name="colourRectType">
<xsd:attribute name="topLeft" type="colourValType" use="required" />
<xsd:attribute name="topRight" type="colourValType" use="required" />
<xsd:attribute name="bottomLeft" type="colourValType" use="required" />
<xsd:attribute name="bottomRight" type="colourValType" use="required" />
</xsd:complexType>
<xsd:complexType name="colourType">
<xsd:attribute name="colour" type="colourValType" use="required" />
</xsd:complexType>
<xsd:simpleType name="colourValType">
<xsd:restriction base="xsd:string">
<xsd:pattern value="[a-fA-F0-9]{8}" />
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="textStringType">
<xsd:attribute name="string" type="xsd:string" use="optional" default="" />
<xsd:attribute name="font" type="xsd:string" use="optional" default="" />
</xsd:complexType>
<xsd:complexType name="textPropertyType">
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
<xsd:complexType name="fontPropertyType">
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
<xsd:complexType name="dimensionOperatorType">
<xsd:choice>
<xsd:element name="UnifiedDim" type="unifiedDimType" />
<xsd:element name="AbsoluteDim" type="absoluteDimType" />
<xsd:element name="ImageDim" type="imageDimType" />
<xsd:element name="WidgetDim" type="widgetDimType" />
<xsd:element name="FontDim" type="fontDimType" />
<xsd:element name="PropertyDim" type="propertyDimType" />
</xsd:choice>
<xsd:attribute name="op" type="dimensionOperatorEnum" use="required" />
</xsd:complexType>
<xsd:simpleType name="dimensionTypeEnum">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="LeftEdge" />
<xsd:enumeration value="TopEdge" />
<xsd:enumeration value="RightEdge" />
<xsd:enumeration value="BottomEdge" />
<xsd:enumeration value="XPosition" />
<xsd:enumeration value="YPosition" />
<xsd:enumeration value="Width" />
<xsd:enumeration value="Height" />
<xsd:enumeration value="XOffset" />
<xsd:enumeration value="YOffset" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="vertFormatEnum">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="TopAligned" />
<xsd:enumeration value="CentreAligned" />
<xsd:enumeration value="BottomAligned" />
<xsd:enumeration value="Stretched" />
<xsd:enumeration value="Tiled" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="horzFormatEnum">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="LeftAligned" />
<xsd:enumeration value="CentreAligned" />
<xsd:enumeration value="RightAligned" />
<xsd:enumeration value="Stretched" />
<xsd:enumeration value="Tiled" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="vertAlignmentEnum">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="TopAligned" />
<xsd:enumeration value="CentreAligned" />
<xsd:enumeration value="BottomAligned" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="horzAlignmentEnum">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="LeftAligned" />
<xsd:enumeration value="CentreAligned" />
<xsd:enumeration value="RightAligned" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="horzTextFormatEnum">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="LeftAligned" />
<xsd:enumeration value="RightAligned" />
<xsd:enumeration value="CentreAligned" />
<xsd:enumeration value="Justified" />
<xsd:enumeration value="WordWrapLeftAligned" />
<xsd:enumeration value="WordWrapRightAligned" />
<xsd:enumeration value="WordWrapCentreAligned" />
<xsd:enumeration value="WordWrapJustified" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="vertTextFormatEnum">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="TopAligned" />
<xsd:enumeration value="BottomAligned" />
<xsd:enumeration value="CentreAligned" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="propertyTypeEnum">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Generic" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="fontMetricTypeEnum">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="LineSpacing" />
<xsd:enumeration value="Baseline" />
<xsd:enumeration value="HorzExtent" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="dimensionOperatorEnum">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Noop" />
<xsd:enumeration value="Add" />
<xsd:enumeration value="Subtract" />
<xsd:enumeration value="Multiply" />
<xsd:enumeration value="Divide" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="frameImageComponentEnum">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Background" />
<xsd:enumeration value="TopLeftCorner" />
<xsd:enumeration value="TopRightCorner" />
<xsd:enumeration value="BottomLeftCorner" />
<xsd:enumeration value="BottomRightCorner" />
<xsd:enumeration value="LeftEdge" />
<xsd:enumeration value="RightEdge" />
<xsd:enumeration value="TopEdge" />
<xsd:enumeration value="BottomEdge" />
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>

View File

@ -0,0 +1,34 @@
<?xml version="1.0" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xsd:element name="Font" type="FontType" />
<xsd:complexType name="FontType">
<xsd:sequence>
<xsd:element name="Mapping" type="MapType" maxOccurs="unbounded" minOccurs="0" />
</xsd:sequence>
<xsd:attributeGroup ref="FontAttrs" />
</xsd:complexType>
<xsd:complexType name="MapType">
<xsd:attribute name="Codepoint" type="xsd:nonNegativeInteger" use="required" />
<xsd:attribute name="Image" type="xsd:string" use="required" />
<xsd:attribute name="HorzAdvance" type="xsd:integer" use="optional" default="-1" />
</xsd:complexType>
<xsd:attributeGroup name="FontAttrs">
<xsd:attribute name="Name" type="xsd:string" use="required" />
<xsd:attribute name="Filename" type="xsd:string" use="required" />
<xsd:attribute name="ResourceGroup" type="xsd:string" use="optional" default="" />
<xsd:attribute name="Type" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="FreeType" />
<xsd:enumeration value="Pixmap" />
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
<xsd:attribute name="Size" type="xsd:nonNegativeInteger" use="optional" default="12" />
<xsd:attribute name="NativeHorzRes" type="xsd:nonNegativeInteger" use="optional" default="640" />
<xsd:attribute name="NativeVertRes" type="xsd:nonNegativeInteger" use="optional" default="480" />
<xsd:attribute name="AutoScaled" type="xsd:boolean" use="optional" default="false" />
<xsd:attribute name="AntiAlias" type="xsd:boolean" use="optional" default="true" />
</xsd:attributeGroup>
</xsd:schema>

View File

@ -0,0 +1,63 @@
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xsd:element name="GUILayout" type="GUILayoutType"/>
<xsd:complexType name="GUILayoutType">
<xsd:sequence>
<xsd:element name="Window" type="WindowType" />
</xsd:sequence>
<xsd:attribute name="Parent" type="xsd:string" use="optional" default=""/>
</xsd:complexType>
<xsd:complexType name="WindowType">
<xsd:sequence>
<xsd:element name="LayoutImport" type="LayoutImportType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="Event" type="EventType" minOccurs="0" maxOccurs="unbounded" />
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="Window" type="WindowType" />
<xsd:element name="AutoWindow" type="AutoWindowType" />
</xsd:choice>
<xsd:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="Type" type="xsd:string" use="required"/>
<xsd:attribute name="Name" type="xsd:string" use="optional" default="" />
</xsd:complexType>
<xsd:complexType name="AutoWindowType">
<xsd:sequence>
<xsd:element name="LayoutImport" type="LayoutImportType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="Event" type="EventType" minOccurs="0" maxOccurs="unbounded" />
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="Window" type="WindowType" />
<xsd:element name="AutoWindow" type="AutoWindowType" />
</xsd:choice>
<xsd:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="NameSuffix" type="xsd:string" use="required"/>
</xsd:complexType>
<xsd:complexType name="PropertyType">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="Name" type="xsd:string" use="required"/>
<xsd:attribute name="Value" type="xsd:string" use="optional"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="LayoutImportType">
<xsd:attribute name="Filename" type="xsd:string" use="required"/>
<xsd:attribute name="Prefix" type="xsd:string" use="optional" default="" />
<xsd:attribute name="ResourceGroup" type="xsd:string" use="optional" default="" />
</xsd:complexType>
<xsd:complexType name="EventType">
<xsd:attribute name="Name" type="xsd:string" use="required"/>
<xsd:attribute name="Function" type="xsd:string" use="required"/>
</xsd:complexType>
</xsd:schema>

View File

@ -0,0 +1,54 @@
<?xml version="1.0" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xsd:element name="GUIScheme" type="SchemeType" />
<xsd:complexType name="SchemeType">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="Imageset" type="NamedDataType" />
<xsd:element name="ImagesetFromImage" type="NamedDataType" />
<xsd:element name="Font" type="NamedDataType" />
<xsd:element name="LookNFeel" type="FileDataType" />
<xsd:element name="WindowSet" type="WindowSetType" />
<xsd:element name="WindowRendererSet" type="WindowRendererSetType" />
<xsd:element name="WindowAlias" type="WindowAliasType" />
<xsd:element name="FalagardMapping" type="FalagardMapType" />
</xsd:choice>
<xsd:attribute name="Name" type="xsd:string" use="required" />
</xsd:complexType>
<xsd:complexType name="WindowSetType">
<xsd:sequence>
<xsd:element name="WindowFactory" type="WindowFactoryType" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="Filename" type="xsd:string" use="required" />
</xsd:complexType>
<xsd:complexType name="WindowRendererSetType">
<xsd:sequence>
<xsd:element name="WindowRendererFactory" type="WindowRendererFactoryType" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="Filename" type="xsd:string" use="required" />
</xsd:complexType>
<xsd:complexType name="FileDataType">
<xsd:attribute name="Filename" type="xsd:string" use="required" />
<xsd:attribute name="ResourceGroup" type="xsd:string" use="optional" default="" />
</xsd:complexType>
<xsd:complexType name="NamedDataType">
<xsd:attribute name="Name" type="xsd:string" use="required" />
<xsd:attribute name="Filename" type="xsd:string" use="required" />
<xsd:attribute name="ResourceGroup" type="xsd:string" use="optional" default="" />
</xsd:complexType>
<xsd:complexType name="WindowFactoryType">
<xsd:attribute name="Name" type="xsd:string" use="required" />
</xsd:complexType>
<xsd:complexType name="WindowRendererFactoryType">
<xsd:attribute name="Name" type="xsd:string" use="required" />
</xsd:complexType>
<xsd:complexType name="WindowAliasType">
<xsd:attribute name="Alias" type="xsd:string" use="required" />
<xsd:attribute name="Target" type="xsd:string" use="required" />
</xsd:complexType>
<xsd:complexType name="FalagardMapType">
<xsd:attribute name="WindowType" type="xsd:string" use="required" />
<xsd:attribute name="TargetType" type="xsd:string" use="required" />
<xsd:attribute name="Renderer" type="xsd:string" use="required" />
<xsd:attribute name="LookNFeel" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:schema>

View File

@ -0,0 +1,28 @@
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xsd:element name="Imageset" type="ImagesetType"/>
<xsd:complexType name="ImagesetType">
<xsd:sequence>
<xsd:element name="Image" type="ImageType" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="Imagefile" type="xsd:string" use="required"/>
<xsd:attribute name="ResourceGroup" type="xsd:string" use="optional" default="" />
<xsd:attribute name="Name" type="xsd:string" use="required"/>
<xsd:attribute name="NativeHorzRes" type="xsd:nonNegativeInteger" use="optional" default="640" />
<xsd:attribute name="NativeVertRes" type="xsd:nonNegativeInteger" use="optional" default="480" />
<xsd:attribute name="AutoScaled" type="xsd:boolean" use="optional" default="false" />
</xsd:complexType>
<xsd:complexType name="ImageType">
<xsd:attribute name="Name" type="xsd:string" use="required"/>
<xsd:attribute name="XPos" type="xsd:nonNegativeInteger" use="required"/>
<xsd:attribute name="YPos" type="xsd:nonNegativeInteger" use="required"/>
<xsd:attribute name="Width" type="xsd:nonNegativeInteger" use="required"/>
<xsd:attribute name="Height" type="xsd:nonNegativeInteger" use="required"/>
<xsd:attribute name="XOffset" type="xsd:integer" use="optional" default="0"/>
<xsd:attribute name="YOffset" type="xsd:integer" use="optional" default="0"/>
</xsd:complexType>
</xsd:schema>

View File

@ -0,0 +1,214 @@
<?xml version="1.0" encoding="UTF-8"?>
<GUILayout >
<Window Type="DefaultWindow" Name="root" >
<Property Name="InheritsAlpha" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
<Window Type="DefaultWindow" Name="debug_overlay" >
<Property Name="Disabled" Value="True" />
<Property Name="AlwaysOnTop" Value="True" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
<Window Type="TaharezLook/StaticText" Name="Panel 1" >
<Property Name="Alpha" Value="0.9" />
<Property Name="InheritsAlpha" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0,0},{0.83,0},{0.23,0},{1,0}}" />
<Window Type="TaharezLook/StaticText" Name="OPCurrentFPS" >
<Property Name="Font" Value="BlueHighway-10" />
<Property Name="Text" Value="Current FPS: " />
<Property Name="TextColours" Value="tl:FF4FF06F tr:FF4FF06F bl:FF4FF06F br:FF4FF06F" />
<Property Name="FrameEnabled" Value="False" />
<Property Name="HorzFormatting" Value="HorzCentred" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.075,0},{0.12,0},{0.925,0},{0.37,0}}" />
<Property Name="BackgroundEnabled" Value="False" />
</Window>
<Window Type="TaharezLook/StaticImage" Name="OPBar1" >
<Property Name="FrameEnabled" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.2,0},{0.27,0},{0.8,0},{0.295,0}}" />
<Property Name="BackgroundEnabled" Value="False" />
</Window>
<Window Type="TaharezLook/StaticText" Name="OPAverageFPS" >
<Property Name="Font" Value="BlueHighway-10" />
<Property Name="Text" Value="Average FPS: " />
<Property Name="TextColours" Value="tl:FFFFF5F0 tr:FFFFF5F0 bl:FFFFF510 br:FFFFF5F0" />
<Property Name="FrameEnabled" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.075,0},{0.32,0},{1.075,0},{0.57,0}}" />
<Property Name="BackgroundEnabled" Value="False" />
</Window>
<Window Type="TaharezLook/StaticText" Name="OPWorstFPS" >
<Property Name="Font" Value="BlueHighway-10" />
<Property Name="Text" Value="Worst FPS: " />
<Property Name="TextColours" Value="tl:FFFFF5F0 tr:FFFFF5F0 bl:FFFFF510 br:FFFFF5F0" />
<Property Name="FrameEnabled" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.075,0},{0.45,0},{1.075,0},{0.7,0}}" />
<Property Name="BackgroundEnabled" Value="False" />
</Window>
<Window Type="TaharezLook/StaticText" Name="OPBestFPS" >
<Property Name="Font" Value="BlueHighway-10" />
<Property Name="Text" Value="Best FPS: " />
<Property Name="TextColours" Value="tl:FFFFF5F0 tr:FFFFF5F0 bl:FFFFF510 br:FFFFF5F0" />
<Property Name="FrameEnabled" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.075,0},{0.58,0},{1.075,0},{0.83,0}}" />
<Property Name="BackgroundEnabled" Value="False" />
</Window>
<Window Type="TaharezLook/StaticText" Name="OPTriCount" >
<Property Name="Font" Value="BlueHighway-10" />
<Property Name="Text" Value="Triangle Count: " />
<Property Name="TextColours" Value="tl:FFFFF5F0 tr:FFFFF5F0 bl:FFFFF510 br:FFFFF5F0" />
<Property Name="FrameEnabled" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.075,0},{0.71,0},{1.075,0},{0.96,0}}" />
<Property Name="BackgroundEnabled" Value="False" />
</Window>
</Window>
<Window Type="TaharezLook/StaticText" Name="OPDebugMsg" >
<Property Name="Font" Value="BlueHighway-10" />
<Property Name="TextColours" Value="tl:A0FFFFFF tr:A0FFFFFF bl:A0FFFFFF br:A0FFFFFF" />
<Property Name="FrameEnabled" Value="False" />
<Property Name="InheritsAlpha" Value="False" />
<Property Name="HorzFormatting" Value="WordWrapCentred" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.93,0},{0.9,0},{1,0}}" />
<Property Name="BackgroundEnabled" Value="False" />
</Window>
<Window Type="TaharezLook/StaticImage" Name="OgreLogo" >
<Property Name="Alpha" Value="0.75" />
<Property Name="FrameEnabled" Value="False" />
<Property Name="InheritsAlpha" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.9,0},{0.95,0},{1,0},{1,0}}" />
<Property Name="BackgroundEnabled" Value="False" />
</Window>
<Window Type="TaharezLook/StaticImage" Name="CeguiLogo" >
<Property Name="Alpha" Value="0.75" />
<Property Name="FrameEnabled" Value="False" />
<Property Name="InheritsAlpha" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.9125,0},{0.9115,0},{0.9875,0},{0.95,0}}" />
<Property Name="BackgroundEnabled" Value="False" />
</Window>
</Window>
<Window Type="DefaultWindow" Name="InstancingDemo" >
<Property Name="Font" Value="BlueHighway-12" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{2,0}}" />
<Window Type="TaharezLook/FrameWindow" Name="CompositorSelectorWin" >
<Property Name="Font" Value="BlueHighway-12" />
<Property Name="Text" Value="Techniques" />
<Property Name="Alpha" Value="0.75" />
<Property Name="TitlebarFont" Value="BlueHighway-12" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="TitlebarEnabled" Value="True" />
<Property Name="UnifiedAreaRect" Value="{{0,0},{0.00508906,0},{0.237344,0},{0.487022,0}}" />
<Property Name="CloseButtonEnabled" Value="False" />
<Window Type="TaharezLook/RadioButton" Name="tInstancing" >
<Property Name="Font" Value="BlueHighway-12" />
<Property Name="Text" Value="Instancing" />
<Property Name="Selected" Value="True" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.0592397,0},{1.05,0},{0.140919,0}}" />
</Window>
<Window Type="TaharezLook/RadioButton" Name="tStaticGeometry" >
<Property Name="ID" Value="1" />
<Property Name="Font" Value="BlueHighway-12" />
<Property Name="Text" Value="Static Geometry" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.118479,0},{1.05,0},{0.198839,0}}" />
</Window>
<Window Type="TaharezLook/RadioButton" Name="tIndependantEntities" >
<Property Name="ID" Value="2" />
<Property Name="Font" Value="BlueHighway-12" />
<Property Name="Text" Value="Independant Entities" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.180359,0},{1.05,0},{0.260718,0}}" />
</Window>
<Window Type="TaharezLook/Checkbox" Name="Shadows" >
<Property Name="Font" Value="BlueHighway-12" />
<Property Name="Text" Value="Shadows on/off" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.458078,0},{1.05,0},{0.545613,0}}" />
</Window>
<Window Type="TaharezLook/StaticText" Name="Object Count Text" >
<Property Name="Font" Value="BlueHighway-12" />
<Property Name="Text" Value="Object Count:" />
<Property Name="FrameEnabled" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.0458855,0},{0.242239,0},{0.480053,0},{0.324677,0}}" />
<Property Name="BackgroundEnabled" Value="False" />
</Window>
<Window Type="TaharezLook/StaticText" Name="Object Count Number" >
<Property Name="Font" Value="BlueHighway-12" />
<Property Name="Text" Value="160" />
<Property Name="FrameEnabled" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.475313,0},{0.245588,0},{0.679954,0},{0.327894,0}}" />
<Property Name="BackgroundEnabled" Value="False" />
</Window>
<Window Type="TaharezLook/Combobox" Name="Objects" >
<Property Name="Font" Value="BlueHighway-12" />
<Property Name="Text" Value="Choose an object" />
<Property Name="ReadOnly" Value="True" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.0541145,0},{0.561555,0},{0.954114,0},{0.821555,0}}" />
<Property Name="MaxEditTextLength" Value="1073741823" />
</Window>
<Window Type="TaharezLook/HorizontalScrollbar" Name="Object Count" >
<Property Name="PageSize" Value="0" />
<Property Name="StepSize" Value="1" />
<Property Name="OverlapSize" Value="0" />
<Property Name="DocumentSize" Value="1" />
<Property Name="ScrollPosition" Value="0" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.06,0},{0.33,0},{0.96,0},{0.382246,0}}" />
</Window>
<Window Type="TaharezLook/StaticText" Name="Time Burner Text" >
<Property Name="Font" Value="BlueHighway-12" />
<Property Name="Text" Value="CPU occupation:" />
<Property Name="FrameEnabled" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.0664582,0},{0.650819,0},{0.571251,0},{0.750819,0}}" />
<Property Name="BackgroundEnabled" Value="False" />
</Window>
<Window Type="TaharezLook/StaticText" Name="Time Burner Value" >
<Property Name="Font" Value="BlueHighway-12" />
<Property Name="Text" Value="0 ms" />
<Property Name="FrameEnabled" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.616458,0},{0.650819,0},{0.905365,0},{0.750819,0}}" />
<Property Name="BackgroundEnabled" Value="False" />
</Window>
<Window Type="TaharezLook/HorizontalScrollbar" Name="Time Burner" >
<Property Name="PageSize" Value="0" />
<Property Name="StepSize" Value="1" />
<Property Name="OverlapSize" Value="0" />
<Property Name="DocumentSize" Value="1" />
<Property Name="ScrollPosition" Value="0" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.75,0},{0.962344,0},{0.804855,0}}" />
</Window>
<Window Type="TaharezLook/Checkbox" Name="PostEffect" >
<Property Name="Font" Value="BlueHighway-12" />
<Property Name="Text" Value="Post Effect On/Off" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.813539,0},{0.918334,0},{0.895712,0}}" />
</Window>
<Window Type="TaharezLook/Button" Name="ExitDemoBtn" >
<Property Name="Font" Value="BlueHighway-12" />
<Property Name="Text" Value="Exit Demo" />
<Property Name="InheritsAlpha" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{-0.0325521,0},{-0.0135575,0},{0.48346,0},{0.0739895,0}}" />
<Property Name="VerticalAlignment" Value="Bottom" />
<Property Name="HorizontalAlignment" Value="Centre" />
</Window>
</Window>
</Window>
</Window>
</GUILayout>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" ?>
<CEGUIConfig
Scheme="TaharezLookSkin.scheme"
Layout="OceanDemoLayout.xml"
DefaultFont="BlueHighway-12"
/>

Some files were not shown because too many files have changed in this diff Show More