Soft Shadows (w/o EA) Demo (99% done, released)
- nullsquared
- Old One
- Posts: 3245
- Joined: Tue Apr 24, 2007 8:23 pm
- Location: NY, NY, USA
- x 11
- danharibo
- Minaton
- Posts: 997
- Joined: Sat Feb 25, 2006 8:14 pm
- Location: Wales, United Kingdom
- Contact:
- sinbad
- OGRE Retired Team Member

- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 67
- Contact:
Re: Soft Shadows
nullsquared wrote:I'll be 15 in August.
I'd like to work this technique into Demo_Shadows in some way if that doesn't offend you too much
Which reminds me, what were your results like with alternative ShadowCameraSetups & VSM? I see them mentioned in the code but I haven't had time to experiement yet.
- KungFooMasta
- OGRE Contributor

- Posts: 2087
- Joined: Thu Mar 03, 2005 7:11 am
- Location: WA, USA
- x 16
- Contact:
Good work on the demo, and grats on the badge! OGL version runs on my work laptop, using NVIDIA Quadro NVS 140M. When setting the ini file to use D3D the app fails to start because d3dx9_30.dll was not found.
I haven't read through all the code in depth, but from a glance it looks well structured, and has a lot of commenting. Nice!
I haven't read through all the code in depth, but from a glance it looks well structured, and has a lot of commenting. Nice!
Creator of QuickGUI!
- nullsquared
- Old One
- Posts: 3245
- Joined: Tue Apr 24, 2007 8:23 pm
- Location: NY, NY, USA
- x 11
Re: Soft Shadows
sinbad wrote:nullsquared wrote:I'll be 15 in August.I only just picked up on this. You my friend, have one hell of a future.
Sure, I wouldn't mind a more well-done demoI'd like to work this technique into Demo_Shadows in some way if that doesn't offend you too muchNot sure exactly when, and it would be nice to re-do the demo anyway with a better scene - the existing one was designed to not look too bad in cases where there was no self-shadowing while still being able to test self-shadowing, I think it's probably time to move to an entirely self-shadowing demo and leading with this technique, dropping the old depth/shadowmapping or perhaps just relegating it to another option. We could detect ATI/GL or older cards to avoid starting up with something that blows up.
I didn't test them too extensively. The LiSPM setup didn't really improve the quality, and it had some really odd artifacts at the cases where the occluder was near the receiver. The focused shadow camera didn't really have any effect at allWhich reminds me, what were your results like with alternative ShadowCameraSetups & VSM? I see them mentioned in the code but I haven't had time to experiement yet.
@ KungFooMasta: Yeah, my X850XT failed with a missing DX dll as well. Not 100% sure what causes it. But then, in cases where DX fails, there's always OGL
@ Sinbad: Also, not sure if you remember, but I was the same guy who had all the extremely odd issues with shadow mapping:
http://www.ogre3d.org/phpBB2/viewtopic. ... ow+mapping
http://www.ogre3d.org/phpBB2/viewtopic. ... ow+mapping
Note that if you don't set the shadow count, then the size, then the shadow type (in that order), you get the really odd bug where adding a light to the scene causes incorrect resolution shadow maps (though inverse_texture_size reports the "correct" size, which messes up blurring). Or, at least I do
-
mr. iknoweverything
- Halfling
- Posts: 72
- Joined: Thu Jul 12, 2007 5:39 pm
- Location: berlin
Re: Soft Shadows
it's official. im jealous.nullsquared wrote: I'll be 15 in August.
you know, just to keep my self-esteem, you didn't grow up in surroundings that kind of promoted that skillset, like a geeky father or mother, did you?
- nullsquared
- Old One
- Posts: 3245
- Joined: Tue Apr 24, 2007 8:23 pm
- Location: NY, NY, USA
- x 11
Re: Soft Shadows
No.mr. iknoweverything wrote:it's official. im jealous.nullsquared wrote: I'll be 15 in August.
you know, just to keep my self-esteem, you didn't grow up in surroundings that kind of promoted that skillset, like a geeky father or mother, did you?
Did you try the demo? (Ok, now if you haven't tried the demo to report how it ran, you don't get to post in the thread
-
mr. iknoweverything
- Halfling
- Posts: 72
- Joined: Thu Jul 12, 2007 5:39 pm
- Location: berlin
- nullsquared
- Old One
- Posts: 3245
- Joined: Tue Apr 24, 2007 8:23 pm
- Location: NY, NY, USA
- x 11
Sounds good, considering my X850XT got 6FPSmr. iknoweverything wrote:getting something like whoppin 8 fps on my xpress200. Apart from the expected framerate it runs flawlessly on standard settings.
Mind you i dont feel like trying more settings on my aged notebook
fantastico.
- pjcast
- OGRE Retired Team Member

- Posts: 2543
- Joined: Fri Oct 24, 2003 2:53 am
- Location: San Diego, Ca
- x 2
- Contact:
ATI Mobility Fire GL T2/T2E
At 1600x1200 full screen, get 10 FPS.
At 1024x768 full screen, get 25 FPS
Probably would perform better with D3D. But, get same error as above posters. Looks like your D3D Renderer was built with a very new version of DX SDK? I really prefer sticking with 2004 SDK for building the renderer, as it has most wide support for Dx9 systems.
At 1600x1200 full screen, get 10 FPS.
At 1024x768 full screen, get 25 FPS
Probably would perform better with D3D. But, get same error as above posters. Looks like your D3D Renderer was built with a very new version of DX SDK? I really prefer sticking with 2004 SDK for building the renderer, as it has most wide support for Dx9 systems.
Have a question about Input? Video? WGE? Come on over... http://www.wreckedgames.com/forum/
- nullsquared
- Old One
- Posts: 3245
- Joined: Tue Apr 24, 2007 8:23 pm
- Location: NY, NY, USA
- x 11
Wow, doesn't sound too bad for 3x3 VSM on a mobility FireGL.pjcast wrote:ATI Mobility Fire GL T2/T2E
At 1600x1200 full screen, get 10 FPS.
At 1024x768 full screen, get 25 FPS
Probably would perform better with D3D. But, get same error as above posters. Looks like your D3D Renderer was built with a very new version of DX SDK? I really prefer sticking with 2004 SDK for building the renderer, as it has most wide support for Dx9 systems.
As for the D3D stuff... I just used the 1.46 Ogre Code::Blocks SDK
- novaumas
- Greenskin
- Posts: 107
- Joined: Mon Jan 21, 2008 9:44 am
- Location: Barcelona
- x 4
- Contact:
- Praetor
- OGRE Retired Team Member

- Posts: 3335
- Joined: Tue Jun 21, 2005 8:26 pm
- Location: Rochester, New York, US
- x 3
- Contact:
x1900XT here. Ran in both OGL and D3D. Got about 177 FPS with up to 4 lights at 1024x768 (windowed). So I decided to turn on a little FSAA and still got 93. Anyway, the shadows themselves look really nice. I can't wait to play around with them in some other environments. Thank you very much for doing this. You deserve that badge.
I'll try it out on my laptop (7900M i believe) tomorrow.
I'll try it out on my laptop (7900M i believe) tomorrow.
- mehdix
- Halfling
- Posts: 78
- Joined: Fri Jun 22, 2007 3:59 pm
Hi
Great work Null, thanks.
I've tested it on a pretty old card: ATI Mobility Radon 9700 - using a driver that hasn't been updated for about 3 years!
Direct3D:

the problem is:
OpenGL: No light! I think it's a driver bug as its driver is not updated. anyhow:

Btw Ogre demos run fine and without any problem - using both D3D & OGL renderes.
Cheers.
Great work Null, thanks.
I've tested it on a pretty old card: ATI Mobility Radon 9700 - using a driver that hasn't been updated for about 3 years!
Direct3D:

the problem is:
Here is the log:Unable to compile Cg program blur_ps: CG ERROR : The compile returned an error.
(0) : error C6001: Temporary register limit of 12 exceeded; 49 registers needed to compile program
Code: Select all
10:51:10: Creating resource group General
10:51:10: Creating resource group Internal
10:51:10: Creating resource group Autodetect
10:51:10: SceneManagerFactory for type 'DefaultSceneManager' registered.
10:51:10: Registering ResourceManager for type Material
10:51:10: Registering ResourceManager for type Mesh
10:51:10: Registering ResourceManager for type Skeleton
10:51:10: MovableObjectFactory for type 'ParticleSystem' registered.
10:51:10: OverlayElementFactory for type Panel registered.
10:51:10: OverlayElementFactory for type BorderPanel registered.
10:51:10: OverlayElementFactory for type TextArea registered.
10:51:10: Registering ResourceManager for type Font
10:51:10: ArchiveFactory for archive type FileSystem registered.
10:51:10: ArchiveFactory for archive type Zip registered.
10:51:10: FreeImage version: 3.9.3
10:51:10: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
10:51:10: 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
10:51:10: DDS codec registering
10:51:10: Registering ResourceManager for type HighLevelGpuProgram
10:51:10: Registering ResourceManager for type Compositor
10:51:10: MovableObjectFactory for type 'Entity' registered.
10:51:10: MovableObjectFactory for type 'Light' registered.
10:51:10: MovableObjectFactory for type 'BillboardSet' registered.
10:51:10: MovableObjectFactory for type 'ManualObject' registered.
10:51:10: MovableObjectFactory for type 'BillboardChain' registered.
10:51:10: MovableObjectFactory for type 'RibbonTrail' registered.
10:51:10: *-*-* OGRE Initialising
10:51:10: *-*-* Version 1.4.6 (Eihort)
10:51:10: Loading library RenderSystem_Direct3D9
10:51:10: Installing plugin: D3D9 RenderSystem
10:51:10: D3D9 : Direct3D9 Rendering Subsystem created.
10:51:10: D3D9: Driver Detection Starts
10:51:10: D3D9: Driver Detection Ends
10:51:10: Plugin successfully installed
10:51:10: Loading library Plugin_CgProgramManager
10:51:10: Installing plugin: Cg Program Manager
10:51:10: Plugin successfully installed
10:51:10: CPU Identifier & Features
10:51:10: -------------------------
10:51:10: * CPU ID: GenuineIntel: Intel(R) Pentium(R) M processor 1.80GHz
10:51:10: * SSE: yes
10:51:10: * SSE2: yes
10:51:10: * SSE3: no
10:51:10: * MMX: yes
10:51:10: * MMXEXT: yes
10:51:10: * 3DNOW: no
10:51:10: * 3DNOWEXT: no
10:51:10: * CMOV: yes
10:51:10: * TSC: yes
10:51:10: * FPU: yes
10:51:10: * PRO: no
10:51:10: * HT: no
10:51:10: -------------------------
10:51:10: D3D9 : Subsystem Initialising
10:51:10: ***************************************
10:51:10: *** D3D9 : Subsystem Initialised OK ***
10:51:10: ***************************************
10:51:10: D3D9RenderSystem::createRenderWindow "Ogre Soft Shadowing", 800x600 windowed miscParams: FSAA=0 vsync=false
10:51:10: D3D9 : Created D3D9 Rendering Window 'Ogre Soft Shadowing' : 800x600, 32bpp
10:51:10: D3D9 : WARNING - disabling VSync in windowed mode can cause timing issues at lower frame rates, turn VSync on if you observe this problem.
10:51:10: Registering ResourceManager for type Texture
10:51:10: Registering ResourceManager for type GpuProgram
10:51:10: RenderSystem capabilities
10:51:10: -------------------------
10:51:10: * Hardware generation of mipmaps: yes
10:51:10: * Texture blending: yes
10:51:10: * Anisotropic texture filtering: yes
10:51:10: * Dot product texture operation: yes
10:51:10: * Cube mapping: yes
10:51:10: * Hardware stencil buffer: yes
10:51:10: - Stencil depth: 8
10:51:10: - Two sided stencil support: yes
10:51:10: - Wrap stencil values: yes
10:51:10: * Hardware vertex / index buffers: yes
10:51:10: * Vertex programs: yes
10:51:10: - Max vertex program version: vs_2_0
10:51:10: * Fragment programs: yes
10:51:10: - Max fragment program version: ps_2_0
10:51:10: * Texture Compression: yes
10:51:10: - DXT: yes
10:51:10: - VTC: no
10:51:10: * Scissor Rectangle: yes
10:51:10: * Hardware Occlusion Query: yes
10:51:10: * User clip planes: yes
10:51:10: * VET_UBYTE4 vertex element type: yes
10:51:10: * Infinite far plane projection: yes
10:51:10: * Hardware render-to-texture: yes
10:51:10: * Floating point textures: yes
10:51:10: * Non-power-of-two textures: yes (limited)
10:51:10: * Volume textures: yes
10:51:10: * Multiple Render Targets: 4
10:51:10: * Point Sprites: yes
10:51:10: * Extended point parameters: yes
10:51:10: * Max Point Size: 256
10:51:10: * Vertex texture fetch: no
10:51:10: ResourceBackgroundQueue - threading disabled
10:51:10: Particle Renderer Type 'billboard' registered
10:51:10: Creating viewport on target 'Ogre Soft Shadowing', rendering from camera 'Mgr::cam', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
10:51:10: Creating resource group Media
10:51:10: Added resource location '../../data' of type 'FileSystem' to resource group 'Media'
10:51:10: Initialising resource group Media
10:51:10: Parsing scripts for resource group Media
10:51:10: Parsing script 00ambient.material
10:51:10: Parsing script 00diffuse.material
10:51:10: Parsing script blur.material
10:51:10: OGRE EXCEPTION(7:InternalErrorException): Unable to compile Cg program blur_ps: CG ERROR : The compile returned an error.
(0) : error C6001: Temporary register limit of 12 exceeded; 49 registers needed to compile program
in CgProgram::loadFromSource at D:\Ogre_CVS\ogrenew\PlugIns\CgProgramManager\src\OgreCgProgramManagerDll.cpp (line 66)
10:51:10: High-level program blur_ps encountered an error during loading and is thus not supported.
OGRE EXCEPTION(7:InternalErrorException): Unable to compile Cg program blur_ps: CG ERROR : The compile returned an error.
(0) : error C6001: Temporary register limit of 12 exceeded; 49 registers needed to compile program
in CgProgram::loadFromSource at D:\Ogre_CVS\ogrenew\PlugIns\CgProgramManager\src\OgreCgProgramManagerDll.cpp (line 66)
10:51:10: Parsing script metal.material
10:51:10: Parsing script ogre.material
10:51:10: Parsing script robot.material
10:51:10: Parsing script shadow_caster.material
10:51:10: Parsing script white.material
10:51:10: Parsing script blur.compositor
10:51:10: Finished parsing scripts for resource group Media
10:51:11: WARNING: Texture instance 'Ogre/ShadowTexture0' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
10:51:11: WARNING: Texture instance 'Ogre/ShadowTexture1' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
10:51:11: WARNING: Texture instance 'Ogre/ShadowTexture2' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
10:51:11: WARNING: Texture instance 'Ogre/ShadowTexture3' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
10:51:11: Creating viewport on target 'rtt/2977568', rendering from camera 'Ogre/ShadowTexture0Cam', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
10:51:11: Creating viewport on target 'rtt/2942304', rendering from camera 'Ogre/ShadowTexture1Cam', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
10:51:11: Creating viewport on target 'rtt/2943136', rendering from camera 'Ogre/ShadowTexture2Cam', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
10:51:11: Creating viewport on target 'rtt/2943488', rendering from camera 'Ogre/ShadowTexture3Cam', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
10:51:11: WARNING: material metal has no supportable Techniques and will be blank. Explanation:
Pass 1: Fragment program diffuse_ps cannot be used - not supported.
10:51:11: Mesh: Loading level.mesh.
10:51:11: Can't assign material 01 - Default to SubEntity of level because this Material does not exist. Have you forgotten to define it in a .material script?
10:51:11: WARNING: material ogre has no supportable Techniques and will be blank. Explanation:
Pass 1: Fragment program diffuse_ps cannot be used - not supported.
10:51:11: Texture: spot_shadow_fade.png: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
10:57:20: *-*-* OGRE Shutdown
10:57:20: Render Target 'rtt/2977568' Average FPS: 78.8239 Best FPS: 287.425 Worst FPS: 0.906755
10:57:20: Render Target 'rtt/2942304' Average FPS: 78.8239 Best FPS: 179.283 Worst FPS: 0.0458295
10:57:20: Render Target 'rtt/2943136' Average FPS: 78.8239 Best FPS: 128.231 Worst FPS: 0.0366838
10:57:20: Render Target 'rtt/2943488' Average FPS: 78.8239 Best FPS: 107.463 Worst FPS: 0.0299061
10:57:20: Unregistering ResourceManager for type Compositor
10:57:20: Unregistering ResourceManager for type Font
10:57:20: Unregistering ResourceManager for type Skeleton
10:57:20: Unregistering ResourceManager for type Mesh
10:57:20: Unregistering ResourceManager for type HighLevelGpuProgram
10:57:20: Uninstalling plugin: Cg Program Manager
10:57:20: Plugin successfully uninstalled
10:57:20: Unloading library Plugin_CgProgramManager
10:57:20: Uninstalling plugin: D3D9 RenderSystem
10:57:20: Render Target 'Ogre Soft Shadowing' Average FPS: 78.8239 Best FPS: 273.726 Worst FPS: 0.906755
10:57:20: D3D9 : Shutting down cleanly.
10:57:20: Unregistering ResourceManager for type Texture
10:57:20: Unregistering ResourceManager for type GpuProgram
10:57:20: D3D9 : Direct3D9 Rendering Subsystem destroyed.
10:57:20: Plugin successfully uninstalled
10:57:20: Unloading library RenderSystem_Direct3D9
10:57:20: Unregistering ResourceManager for type Material

Code: Select all
11:17:15: Creating resource group General
11:17:15: Creating resource group Internal
11:17:15: Creating resource group Autodetect
11:17:15: SceneManagerFactory for type 'DefaultSceneManager' registered.
11:17:15: Registering ResourceManager for type Material
11:17:15: Registering ResourceManager for type Mesh
11:17:15: Registering ResourceManager for type Skeleton
11:17:15: MovableObjectFactory for type 'ParticleSystem' registered.
11:17:15: OverlayElementFactory for type Panel registered.
11:17:15: OverlayElementFactory for type BorderPanel registered.
11:17:15: OverlayElementFactory for type TextArea registered.
11:17:15: Registering ResourceManager for type Font
11:17:15: ArchiveFactory for archive type FileSystem registered.
11:17:15: ArchiveFactory for archive type Zip registered.
11:17:15: FreeImage version: 3.9.3
11:17:15: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
11:17:15: 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
11:17:15: DDS codec registering
11:17:15: Registering ResourceManager for type HighLevelGpuProgram
11:17:15: Registering ResourceManager for type Compositor
11:17:15: MovableObjectFactory for type 'Entity' registered.
11:17:15: MovableObjectFactory for type 'Light' registered.
11:17:15: MovableObjectFactory for type 'BillboardSet' registered.
11:17:15: MovableObjectFactory for type 'ManualObject' registered.
11:17:15: MovableObjectFactory for type 'BillboardChain' registered.
11:17:15: MovableObjectFactory for type 'RibbonTrail' registered.
11:17:15: *-*-* OGRE Initialising
11:17:15: *-*-* Version 1.4.6 (Eihort)
11:17:15: Loading library RenderSystem_GL
11:17:15: Installing plugin: GL RenderSystem
11:17:15: OpenGL Rendering Subsystem created.
11:17:17: Plugin successfully installed
11:17:17: Loading library Plugin_CgProgramManager
11:17:17: Installing plugin: Cg Program Manager
11:17:17: Plugin successfully installed
11:17:17: CPU Identifier & Features
11:17:17: -------------------------
11:17:17: * CPU ID: GenuineIntel: Intel(R) Pentium(R) M processor 1.80GHz
11:17:17: * SSE: yes
11:17:17: * SSE2: yes
11:17:17: * SSE3: no
11:17:17: * MMX: yes
11:17:17: * MMXEXT: yes
11:17:17: * 3DNOW: no
11:17:17: * 3DNOWEXT: no
11:17:17: * CMOV: yes
11:17:17: * TSC: yes
11:17:17: * FPU: yes
11:17:17: * PRO: no
11:17:17: * HT: no
11:17:17: -------------------------
11:17:17: *** Starting Win32GL Subsystem ***
11:17:17: GLRenderSystem::createRenderWindow "Ogre Soft Shadowing", 800x600 windowed miscParams: FSAA=0 vsync=false
11:17:17: Created Win32Window 'Ogre Soft Shadowing' : 800x600, 32bpp
11:17:17: GL_VERSION = 1.5.4454 WinXP Release
11:17:17: GL_VENDOR = ATI Technologies Inc.
11:17:17: GL_RENDERER = MOBILITY RADEON 9700 x86/SSE2
11:17:17: GL_EXTENSIONS = GL_ARB_multitexture GL_EXT_texture_env_add GL_EXT_compiled_vertex_array GL_S3_s3tc GL_ARB_depth_texture GL_ARB_fragment_program GL_ARB_fragment_program_shadow GL_ARB_fragment_shader GL_ARB_multisample GL_ARB_occlusion_query GL_ARB_point_parameters GL_ARB_shader_objects GL_ARB_shading_language_100 GL_ARB_shadow GL_ARB_shadow_ambient GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_mirrored_repeat GL_ARB_transpose_matrix GL_ARB_vertex_blend GL_ARB_vertex_buffer_object GL_ARB_vertex_program GL_ARB_vertex_shader GL_ARB_window_pos GL_ATI_draw_buffers GL_ATI_element_array GL_ATI_envmap_bumpmap GL_ATI_fragment_shader GL_ATI_map_object_buffer GL_ATI_separate_stencil GL_ATI_texture_env_combine3 GL_ATI_texture_float GL_ATI_texture_mirror_once GL_ATI_vertex_array_object GL_ATI_vertex_attrib_array_object GL_ATI_vertex_streams GL_ATIX_texture_env_combine3 GL_ATIX_texture_env_route GL_ATIX_vertex_shader_output_point_size GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_func_separate GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_clip_volume_hint GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_multi_draw_arrays GL_EXT_packed_pixels GL_EXT_point_parameters GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_specular_color GL_EXT_shadow_funcs GL_EXT_stencil_wrap GL_EXT_texgen_reflection GL_EXT_texture3D GL_EXT_texture_compression_s3tc GL_EXT_texture_cube_map GL_EXT_texture_edge_clamp GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_EXT_texture_filter_anisotropic GL_EXT_texture_lod_bias GL_EXT_texture_mirror_clamp GL_EXT_texture_object GL_EXT_texture_rectangle GL_EXT_vertex_array GL_EXT_vertex_shader GL_HP_occlusion_test GL_NV_texgen_reflection GL_NV_blend_square GL_NV_occlusion_query GL_ARB_point_sprite GL_SGI_color_matrix GL_SGIS_texture_edge_clamp GL_SGIS_texture_border_clamp GL_SGIS_texture_lod GL_SGIS_generate_mipmap GL_SGIS_multitexture GL_SUN_multi_draw_arrays GL_WIN_swap_hint WGL_EXT_extensions_string WGL_EXT_swap_control
11:17:17: Supported WGL extensions: WGL_ARB_extensions_string WGL_ARB_make_current_read WGL_ARB_multisample WGL_ARB_pbuffer WGL_ARB_pixel_format WGL_ARB_render_texture WGL_ATI_pixel_format_float WGL_EXT_extensions_string WGL_EXT_swap_control
11:17:17: ***************************
11:17:17: *** GL Renderer Started ***
11:17:17: ***************************
11:17:17: Registering ResourceManager for type GpuProgram
11:17:17: GLSL support detected
11:17:17: GL: Using PBuffers for rendering to textures
11:17:17: RenderSystem capabilities
11:17:17: -------------------------
11:17:17: * Hardware generation of mipmaps: yes
11:17:17: * Texture blending: yes
11:17:17: * Anisotropic texture filtering: yes
11:17:17: * Dot product texture operation: yes
11:17:17: * Cube mapping: yes
11:17:17: * Hardware stencil buffer: yes
11:17:17: - Stencil depth: 8
11:17:17: - Two sided stencil support: no
11:17:17: - Wrap stencil values: yes
11:17:17: * Hardware vertex / index buffers: yes
11:17:17: * Vertex programs: yes
11:17:17: - Max vertex program version: arbvp1
11:17:17: * Fragment programs: yes
11:17:17: - Max fragment program version: arbfp1
11:17:17: * Texture Compression: yes
11:17:17: - DXT: yes
11:17:17: - VTC: no
11:17:17: * Scissor Rectangle: yes
11:17:17: * Hardware Occlusion Query: yes
11:17:17: * User clip planes: yes
11:17:17: * VET_UBYTE4 vertex element type: yes
11:17:17: * Infinite far plane projection: yes
11:17:17: * Hardware render-to-texture: yes
11:17:17: * Floating point textures: yes
11:17:17: * Non-power-of-two textures: no
11:17:17: * Volume textures: yes
11:17:17: * Multiple Render Targets: 1
11:17:17: * Point Sprites: yes
11:17:17: * Extended point parameters: yes
11:17:17: * Max Point Size: 64
11:17:17: * Vertex texture fetch: no
11:17:17: Registering ResourceManager for type Texture
11:17:17: ResourceBackgroundQueue - threading disabled
11:17:17: Particle Renderer Type 'billboard' registered
11:17:17: Creating viewport on target 'Ogre Soft Shadowing', rendering from camera 'Mgr::cam', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
11:17:17: Creating resource group Media
11:17:17: Added resource location '../../data' of type 'FileSystem' to resource group 'Media'
11:17:17: Initialising resource group Media
11:17:17: Parsing scripts for resource group Media
11:17:17: Parsing script 00ambient.material
11:17:17: Parsing script 00diffuse.material
11:17:17: Parsing script blur.material
11:17:17: Parsing script metal.material
11:17:17: Parsing script ogre.material
11:17:17: Parsing script robot.material
11:17:17: Parsing script shadow_caster.material
11:17:17: Parsing script white.material
11:17:17: Parsing script blur.compositor
11:17:17: Finished parsing scripts for resource group Media
11:17:17: Win32PBuffer::Creating PBuffer of format bits=16 float=true
11:17:17: Win32PBuffer::PBuffer -- Chosen pixel format rgba=16,16,16,16 depth=24 stencil=8
11:17:17: Win32RenderTexture::PBuffer created -- Real dimensions 512x512
11:17:17: WARNING: Texture instance 'Ogre/ShadowTexture0' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
11:17:17: WARNING: Texture instance 'Ogre/ShadowTexture1' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
11:17:17: WARNING: Texture instance 'Ogre/ShadowTexture2' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
11:17:17: WARNING: Texture instance 'Ogre/ShadowTexture3' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
11:17:17: Creating viewport on target 'rtt/Ogre/ShadowTexture0/10654072', rendering from camera 'Ogre/ShadowTexture0Cam', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
11:17:17: Creating viewport on target 'rtt/Ogre/ShadowTexture1/4061272', rendering from camera 'Ogre/ShadowTexture1Cam', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
11:17:17: Creating viewport on target 'rtt/Ogre/ShadowTexture2/4060488', rendering from camera 'Ogre/ShadowTexture2Cam', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
11:17:17: Creating viewport on target 'rtt/Ogre/ShadowTexture3/10652272', rendering from camera 'Ogre/ShadowTexture3Cam', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
11:17:17: Texture: RustedMetal.jpg: Loading 1 faces(PF_R8G8B8,512x512x1) with 9 hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1.
11:17:17: Mesh: Loading level.mesh.
11:17:17: Can't assign material 01 - Default to SubEntity of level because this Material does not exist. Have you forgotten to define it in a .material script?
11:17:17: Texture: GreenSkin.jpg: Loading 1 faces(PF_R8G8B8,256x256x1) with 8 hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,256x256x1.
11:17:17: Texture: spot_shadow_fade.png: Loading 1 faces(PF_R8G8B8,128x128x1) with 7 hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
11:17:29: *-*-* OGRE Shutdown
11:17:29: Render Target 'rtt/Ogre/ShadowTexture0/10654072' Average FPS: 178.465 Best FPS: 248.751 Worst FPS: 135.189
11:17:29: Render Target 'rtt/Ogre/ShadowTexture1/4061272' Average FPS: 0 Best FPS: 0 Worst FPS: 999
11:17:29: Render Target 'rtt/Ogre/ShadowTexture2/4060488' Average FPS: 0 Best FPS: 0 Worst FPS: 999
11:17:29: Render Target 'rtt/Ogre/ShadowTexture3/10652272' Average FPS: 0 Best FPS: 0 Worst FPS: 999
11:17:29: Unregistering ResourceManager for type Compositor
11:17:29: Unregistering ResourceManager for type Font
11:17:29: Unregistering ResourceManager for type Skeleton
11:17:29: Unregistering ResourceManager for type Mesh
11:17:29: Unregistering ResourceManager for type HighLevelGpuProgram
11:17:29: Uninstalling plugin: Cg Program Manager
11:17:29: Plugin successfully uninstalled
11:17:29: Unloading library Plugin_CgProgramManager
11:17:29: Uninstalling plugin: GL RenderSystem
11:17:29: Render Target 'Ogre Soft Shadowing' Average FPS: 177.481 Best FPS: 245.283 Worst FPS: 103.689
11:17:29: Unregistering ResourceManager for type GpuProgram
11:17:29: *** Stopping Win32GL Subsystem ***
11:17:29: Unregistering ResourceManager for type Texture
11:17:29: Plugin successfully uninstalled
11:17:29: Unloading library RenderSystem_GL
11:17:29: Unregistering ResourceManager for type Material
Cheers.
-
jjp
- Silver Sponsor

- Posts: 597
- Joined: Sun Jan 07, 2007 11:55 pm
- Location: Cologne, Germany
- Contact:
-
CABAListic
- OGRE Retired Team Member

- Posts: 2903
- Joined: Thu Jan 18, 2007 2:48 pm
- x 58
- Contact:
Very nicely done, runs here on a Geforce 6600GT quite ok'ish. I didn't get the exact framerate, because out of a habit I just pressed Alt+F4 to quit the app (which it didn't, it only closed the window. Took me some time later on that the Ogre process was still running and causing problems for another game
You might want to add a window event handler
), but it didn't feel laggy.
I'll have to see if I can integrate this with my own project, although I fear that your shadow camera adjustment won't quite work for us. Then again, the Ogre shadow camera setups don't really, either.
By the way, some time ago, when I was investigating shadows, I stumbled upon another method for softening shadows which was inspired by VSM, but is inherently simpler. It still allows blurring the shadow texture to give smooth shadows at the edges, but the calculation is a lot simpler so that in closed scenes you might actually get away with 8bit textures, and you'll probably not see some of VSM's artifacts in border cases. The disadvantage is that it does not soften self shadowing, so is really only useful if you don't do self-shadows. But it might still be a nice fallback for machines which can't deal with VSM. I can post the details later (have to find them first) if that interests anyone.
I'll have to see if I can integrate this with my own project, although I fear that your shadow camera adjustment won't quite work for us. Then again, the Ogre shadow camera setups don't really, either.
By the way, some time ago, when I was investigating shadows, I stumbled upon another method for softening shadows which was inspired by VSM, but is inherently simpler. It still allows blurring the shadow texture to give smooth shadows at the edges, but the calculation is a lot simpler so that in closed scenes you might actually get away with 8bit textures, and you'll probably not see some of VSM's artifacts in border cases. The disadvantage is that it does not soften self shadowing, so is really only useful if you don't do self-shadows. But it might still be a nice fallback for machines which can't deal with VSM. I can post the details later (have to find them first) if that interests anyone.
- IFASS
- Gnome
- Posts: 387
- Joined: Tue Jan 04, 2005 12:07 pm
- Location: Netherlands
That seems nice indeed, please post it if you can find it. :)CABAListic wrote: By the way, some time ago, when I was investigating shadows, I stumbled upon another method for softening shadows which was inspired by VSM, but is inherently simpler. It still allows blurring the shadow texture to give smooth shadows at the edges, but the calculation is a lot simpler so that in closed scenes you might actually get away with 8bit textures, and you'll probably not see some of VSM's artifacts in border cases. The disadvantage is that it does not soften self shadowing, so is really only useful if you don't do self-shadows. But it might still be a nice fallback for machines which can't deal with VSM. I can post the details later (have to find them first) if that interests anyone.

- nullsquared
- Old One
- Posts: 3245
- Joined: Tue Apr 24, 2007 8:23 pm
- Location: NY, NY, USA
- x 11
Well D3D vertex lighting screams the fact that the shader didn't get used:mehdix wrote:[gigantic logs]
It's probably because I used ps_2_x for the pixel shader, and your card only supports vanilla ps_2_0. In data/00diffuse.material, find the shader declaration, and after profiles, try replacing ps_2_x with ps_2_0. It probably won't compile under vanilla ps_2_0 due to the low instructions limit (and there's a 3x3 blur filter in the shader itself), but I don't remember trying it, so you might as well.10:51:11: WARNING: material ogre has no supportable Techniques and will be blank. Explanation:
Pass 1: Fragment program diffuse_ps cannot be used - not supported.
As for GL, no idea why that happened. Seems like the shader compiled, yet is missing all of the dynamic lighting
Sorry, though, I can't really make it run on such cards :S . My X850XT, which was considered "the king of next gen" when the 9000 cards were common, barely runs the stuff right at 6FPS
@ CABAListic: You can get away in simple scenes with no self shadowing by blurring a white/black texture (white is viewport background, black is any objects), and projecting that onto receiving geometry... though what you're talking about seems different. As for alt-f4, I thought I had a windowClosed catcher in there:
Code: Select all
// this tells us if the window closed (or alt-f4, for example)
void windowClosed(Ogre::RenderWindow *window) {
// stop running. we don't compare any windows
// since we only make 1 window anyways
running = false;
}
- SiENcE
- Goblin
- Posts: 231
- Joined: Thu May 11, 2006 3:07 pm
- Location: Berlin
- Contact:
@All having problems with Direct3D. You should really update your DirectX 9.0c !! If an application doesn't find a d3dx9_30.dll or newer (d3dx9_33.dll) it tells you that your directx runtime is too old.
I build the MingW SDK with the Microsoft DirectX SDK (August 2006) build. So it's using the d3dx9_30.dll . You still can only download this specific dll and put it into the Demo directory.
DirectX End-User Runtimes (November 2007):
http://www.microsoft.com/downloads/deta ... laylang=de
I build the MingW SDK with the Microsoft DirectX SDK (August 2006) build. So it's using the d3dx9_30.dll . You still can only download this specific dll and put it into the Demo directory.
DirectX End-User Runtimes (November 2007):
http://www.microsoft.com/downloads/deta ... laylang=de
- CoreDumped
- Gremlin
- Posts: 177
- Joined: Sun Aug 05, 2007 3:55 pm
- x 14
-
CABAListic
- OGRE Retired Team Member

- Posts: 2903
- Joined: Thu Jan 18, 2007 2:48 pm
- x 58
- Contact:
That's right (in fact that's part of the technique I'm refering to), but you're losing the depth information and may therefore have backprojection of shadows and such things. This only works if your shadow receiver is always behind (seen from the light) any potential shadow caster.nullsquared wrote:@ CABAListic: You can get away in simple scenes with no self shadowing by blurring a white/black texture (white is viewport background, black is any objects), and projecting that onto receiving geometry...
Anyway, I didn't succeed to find the paper I got it from, if I remember correctly, its title was "Simple soft shadows", but that didn't show up on Google. I'll keep looking and post the link, but in the meantime, the technique works like this:
You need a 2-channel shadow texture. In the first channel you store the depth from the light like with occasional shadow mapping, and in the second channel you store exactly that white/black image, except in the paper they do it reverse (i. e. they assume that the shadow texture defaults to black and store a 1 in the second channel for every caster. Naturally you can do it the other way, just need to remember to adjust the formula later). Then you blur both channels of the texture (might want to use a box filter instead of gaussian, since this is supposed to be a fallback for not-so-good hardware), and in your receiver shader, you extract the actual depth from the shadow map via this code:
Code: Select all
float4 shadow = tex2D(shadowTex, shadowUV);
float depth = (shadow.x-1) / shadow.y + 1;
Though, if you ask me, actually you could just NOT blur the first channel (only the second one) and save the calculation above, that should work equally well, I think.

