Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_env.bat
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_env.bat	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_env.bat	(revision 2453)
@@ -0,0 +1,33 @@
+@echo off
+
+rem Define the location of the Shark 3D SDK:
+set S3D_SDKDIR=..\shark3d
+
+rem Define the location of the project:
+set S3D_PRJDIR=%cd%
+
+rem Configurations:
+if "%S3D_TOOLCFG%" == "" set S3D_TOOLCFG=release
+if "%S3D_RUNCFG%" == "" set S3D_RUNCFG=release
+
+rem Determine S3D_HOSTADDR. You may also set this variable directly.
+set S3D_HOSTADDR=127.0.0.1
+rem set TOOLDIR=%S3D_SDKDIR%\bin\win32_vc7x1\%S3D_TOOLCFG%
+rem set HOSTADDRCMD=%TOOLDIR%\shark3d_tool_hostaddr.exe 
+rem set HOSTADDRCMD=%HOSTADDRCMD% -select 0
+rem set HOSTADDRCMD=%HOSTADDRCMD% -quiet 1
+rem set HOSTADDRCMD=%HOSTADDRCMD% -expect 1 
+rem set HOSTADDRCMD=%HOSTADDRCMD% -privateonly 1
+rem for /F "usebackq" %%s in (`%HOSTADDRCMD%`) do set S3D_HOSTADDR=%%s
+
+echo Setting: S3D_SDKDIR=%S3D_SDKDIR%
+echo Setting: S3D_PRJDIR=%S3D_PRJDIR%
+echo Setting: S3D_TOOLCFG=%S3D_TOOLCFG%
+echo Setting: S3D_RUNCFG=%S3D_RUNCFG%
+echo Setting: S3D_HOSTADDR=%S3D_HOSTADDR%
+
+set PATH=%S3D_SDKDIR%\external\win32\msvcrt7x1;%PATH%
+set PATH=%S3D_SDKDIR%\external\cg\bin;%PATH%
+set PATH=%S3D_SDKDIR%\external\wxwidgets\win32_vc7x1;%PATH%
+set PATH=%S3D_SDKDIR%\bin\win32_vc7x1\%S3D_RUNCFG%;%PATH%
+set PATH=%S3D_PRJDIR%\bin\win32_vc7x1\%S3D_RUNCFG%;%PATH%
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/res_targets.cfg
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/res_targets.cfg	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/res_targets.cfg	(revision 2453)
@@ -0,0 +1,156 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// This file configures a Shark3D project and is used by several tools.
+//
+// File syntax: Snake File Format, see documentation for details.
+// Each field has a name and none, one or more values of type integer,
+// float, string or chunk.
+//   //         = Comment until end of line.
+//   /* xxx */  = Long comment
+//   { xxx }    = Chunk containing fields again.
+//   &          = Concat strings (to split strings over more than one line).
+//
+// File content: See comments below and source code of the player.
+// - Keybord mapping see near the end of this file.
+// - The startup resource of the project is defined in the entry "startup".
+
+///////////////////////////////////////////////////////////////////////////////
+
+res
+{   
+    src_dir "src/res/"
+    bin_dir "bin/res/"
+    info_prefix "res:"
+    // Exclude pathes containing a "$" character.
+    include_pat "!*$*&!*.$$$&!*.svn&!*.svn/*"
+
+    targets
+    {
+        src_suffix ".s3d_actor"
+        bin_suffix ".s3d_actor_run"
+        can_copy 1
+    }
+    {
+        src_suffix ".pa"
+        bin_suffix ".par"
+        can_copy 1
+    }
+    {
+        src_suffix ".s3d_shader"
+        bin_suffix ".s3d_shader_run"
+        can_copy 1
+    }
+    {
+        src_suffix ".s3d_shaderprog"
+        bin_suffix ".s3d_shaderprog_run"
+        can_copy 1
+    }
+    {
+        src_suffix ".s3d_inst"
+        bin_suffix ".s3d_inst_run"
+        can_copy 1
+    }
+    {
+        src_suffix ".s3d_model"
+        bin_suffix ".s3d_model_run"
+        can_copy 0
+    }
+    {
+        src_suffix ".s3d_pospath"
+        bin_suffix ".s3d_pospath_run"
+        can_copy 1
+    }
+    {
+        src_suffix ".s3d_shadercode"
+        bin_suffix ".s3d_shadercode_run"
+        can_copy 1
+    }
+    {
+        src_suffix ".s3d_boneanim"
+        bin_suffix ".s3d_boneanim_run"
+        can_copy 0
+    }
+    {
+        src_suffix ".s3d_bonemotion"
+        bin_suffix ".s3d_bonemotion_run"
+        can_copy 0
+    }
+    {
+        src_suffix ".s3d_pvs"
+        bin_suffix ".s3d_pvs_run"
+        can_copy 0
+    }
+    {
+        src_suffix ".s3d_perch"
+        bin_suffix ".s3d_perch_run"
+        can_copy 0
+    }
+    /*
+    {
+        src_suffix ".java"
+        bin_suffix ".class"
+        can_copy 0
+    }
+    */
+    {
+        src_suffix ".tga"
+        bin_suffix ".tga"
+        can_copy 1
+    }
+    {
+        src_suffix ".bmp"
+        bin_suffix ".bmp"
+        can_copy 1
+    }
+    {
+        src_suffix ".png"
+        bin_suffix ".png"
+        can_copy 1
+    }
+    {
+        src_suffix ".jpg"
+        bin_suffix ".jpg"
+        can_copy 1
+    }
+    {
+        src_suffix ".tif"
+        bin_suffix ".tif"
+        can_copy 1
+    }
+    {
+        src_suffix ".dds"
+        bin_suffix ".dds"
+        can_copy 1
+    }
+    {
+        src_suffix ".avi"
+        bin_suffix ".avi"
+        can_copy 1
+    }
+    {
+        src_suffix ".wav"
+        bin_suffix ".wav"
+        can_copy 1
+    }
+    {
+        src_suffix ".vag"
+        bin_suffix ".vag"
+        can_copy 1
+    }
+    {
+        src_suffix ".ttf"
+        bin_suffix ".ttf"
+        can_copy 1
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_activex_install.bat
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_activex_install.bat	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_activex_install.bat	(revision 2453)
@@ -0,0 +1,7 @@
+setlocal
+call win32_env.bat
+
+set PATH=%S3D_SDKDIR%\external\win32\msvcrt7x1;%PATH%
+
+cd %S3D_SDKDIR%\src\app\actxinstall
+call install.bat %S3D_RUNCFG%
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_max_exp.cfg
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_max_exp.cfg	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_max_exp.cfg	(revision 2453)
@@ -0,0 +1,46 @@
+modules
+{
+    name "drv_stdres"
+    path "shark3d_drv_stdres.dll"
+}
+
+resmgr 
+{
+    ident "drv_stdres.resmgr_dispatch"
+    param 
+    {
+        env "env"
+        log_enabled 0
+        entry_array
+        {
+            prefix ""
+            ident "drv_stdres.resmgr_file"
+            param
+            {
+                env "env"
+                // Prefix added to the resource name for infos and errors:
+                name_prefix ""
+                // Location to load the files from:
+                ref_dir "[homedir]"
+                // Convertor for the ref_dir, for replacing placeholders.
+                ref_dir_conv "path_conv"
+                // Don't allow resource names to start with ".." or "/":
+                allow_any_path 0
+                // Case sensitive file name on Win32 platform.
+                // Should be enabled to avoid problems
+                // with non-Win32 platforms, packfiles or DRU.
+                non_strict_path 1
+                resinfo_uses_path 1
+                // Cache size not too large to avoid stuttering:
+                file_cache_size 4096
+                // Log all file accesses:
+                log_enabled 1
+            }
+        }
+    }
+}
+
+res_targets_cfg "res_targets.cfg"
+
+need_inst_kindpat "render|structure|structurehint"
+structure_kind "structure"
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_max_player.cfg
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_max_player.cfg	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_max_player.cfg	(revision 2453)
@@ -0,0 +1,15 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+view_cfg "win32_run.cfg"
+
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_maya_exp.cfg
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_maya_exp.cfg	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_maya_exp.cfg	(revision 2453)
@@ -0,0 +1,46 @@
+modules
+{
+    name "drv_stdres"
+    path "shark3d_drv_stdres.dll"
+}
+
+resmgr 
+{
+    ident "drv_stdres.resmgr_dispatch"
+    param 
+    {
+        env "env"
+        log_enabled 0
+        entry_array
+        {
+            prefix ""
+            ident "drv_stdres.resmgr_file"
+            param
+            {
+                env "env"
+                // Prefix added to the resource name for infos and errors:
+                name_prefix ""
+                // Location to load the files from:
+                ref_dir "[homedir]"
+                // Convertor for the ref_dir, for replacing placeholders.
+                ref_dir_conv "path_conv"
+                // Don't allow resource names to start with ".." or "/":
+                allow_any_path 0
+                // Case sensitive file name on Win32 platform.
+                // Should be enabled to avoid problems
+                // with non-Win32 platforms, packfiles or DRU.
+                non_strict_path 1
+                resinfo_uses_path 1
+                // Cache size not too large to avoid stuttering:
+                file_cache_size 4096
+                // Log all file accesses:
+                log_enabled 1
+            }
+        }
+    }
+}
+
+res_targets_cfg "res_targets.cfg"
+
+need_inst_kindpat "render|structure|structurehint"
+structure_kind "structure"
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_run.cfg
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_run.cfg	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_run.cfg	(revision 2453)
@@ -0,0 +1,1394 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// This file configures the Shark 3D runtime engine.
+//
+// File syntax: Snake File Format, see documentation for details.
+// Each field has a name and none, one or more values of type integer,
+// float, string or chunk.
+//   //         = Comment until end of line.
+//   /* xxx */  = Long comment
+//   { xxx }    = Chunk containing fields again.
+//   &          = Concat strings (to split strings over more than one line).
+//
+// File content: See comments below and source code of the player.
+// - Keybord mapping see near the end of this file.
+// - The startup resource of the project is defined in the entry "startup".
+
+///////////////////////////////////////////////////////////////////////////////
+// Configuration parameters:
+
+// Avoid storing information 
+// needed for reporting notes and error messages.
+// Especially avoid storing info strings.
+// This is useful to save memory on consoles.
+// Warning! This makes error messages basically useless!
+// Only set this parameter to 1 for final builds(!) on consoles(!).
+bare 0
+
+// Automatically save configuration changes back into this file.
+// Warning! Enabling destroys all formating and deletes all comments.
+save 0
+
+///////////////////////////////////////////////////////////////////////////////
+// Logging parameters:
+
+// Print into standard out:
+stdout 1
+stderr 1
+
+// Flush after writing a line to stdandard out:
+stdout_line_flush 1
+stderr_line_flush 1
+
+// File name and format the main message handler logs into.
+// In the file path, the character "$" is replaced by the current time stamp.
+// Use the "$" character if you want a separate log file per run.
+logfile_format "utf8"
+logfile_path "log_main.log"
+
+// If the log file is larger than the size limit, rename the previous log file
+// into the old log file name and start a new log file.
+// This mechanism can be used to avoid an unlimited growing log file.
+// The previous old log file is deleted.
+// The the file path, the character "$" is replaced by the current time stamp.
+logfile_size_limit 20000000
+logfile_old_path "log_main_old.log"
+
+// If enabled, flush the log stream after every line.
+// This option may help to analyse crashes.
+// Warning! This slows down the engine noticeable!
+// Should be enabled only temporarily for debuggung purposes!
+logfile_line_flush 0
+
+// If enabled, send main logging also to the debugger interface.
+// Warning! This costs performance even if no debugger is connected!
+debugout 1
+
+// If enabled, open a message box for errors.
+error_msg_box 0
+
+// If enabled, open a message box on fatal errors.
+fatal_error_msg_box 1
+
+// Format for file positions:
+textstream_pos_templ ""
+
+// If enabled, in case of an error immediately abort the application.
+instant_abort_after_error 0
+
+// If enabled, after an error abort the application at a suitable time.
+opportune_abort_after_error 0
+
+// File name to log debugging output to.
+//syslog_path "log_dbg.log"
+
+// File name to redirect stdout/stderr to.
+//redirect_stdout_path "log_out.log"
+//redirect_stderr_path "log_err.log"
+
+///////////////////////////////////////////////////////////////////////////////
+// Time parameters:
+
+// Maximal time step of each iteration.
+max_deltatime 0.2
+
+// Delta time used for every frame independent of the real time.
+//exact_deltatime 0.0
+
+// Time in seconds which the program sleeps each frame.
+// This can be used for example to avoid that a dedicated server
+// takes all system power.
+sleeptime 0.0
+
+// Minimal frame time in seconds.
+// If the frame (including the sleep time) would be less,
+// the process sleeps for the rest of this time.
+min_frmtime 0.0
+
+///////////////////////////////////////////////////////////////////////////////
+// Application specific parameters:
+
+app
+{
+    max
+    {
+        unused_time_limit 2.0
+        unused_sleep_time 0.2
+    }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// Modules:
+
+// List of DLLs containing components to be loaded by the player.
+//
+// Each DLL factory is registered under the specified name.
+// For example, if "shark3d_kit_base.dll" is registerd 
+// under the name "kit_base", an actor ident "kit_base.group" means 
+// to search the component class "group" in the DLL "shark3d_kit_base.dll".
+//
+// Meaning of additional parameters:
+// If 'load_immediately' is set to 0, the DLL is loaded at the time 
+// when a component of the module is requested for the first time.
+// If 'load_immediately' is set to 1, the DLL is loaded at the beginning.
+// If 'continue_if_loading_failed' is set to 0, then the engine aborts 
+// with an fatal error if the DLL couldn't be loaded.
+// If 'continue_if_loading_failed' is set to 1, then the engine continues 
+// even if the DLL couldn't be loaded.
+modules
+// Driver modules:
+{
+    name "drv_winctx"
+    path "shark3d_drv_winctx.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "drv_gfxselect"
+    path "shark3d_drv_gfxselect.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "drv_gfxverify"
+    path "shark3d_drv_gfxverify.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "drv_gfxtargetrect"
+    path "shark3d_drv_gfxtargetrect.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "drv_gfxprotect"
+    path "shark3d_drv_gfxprotect.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "drv_opengl"
+    path "shark3d_drv_opengl.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "drv_openal"
+    path "shark3d_drv_openal.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "drv_d3d9"
+    path "shark3d_drv_d3d9.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "drv_dsnd"
+    path "shark3d_drv_dsnd.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "drv_wav"
+    path "shark3d_drv_wav.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "drv_stdinput"
+    path "shark3d_drv_stdinput.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "drv_wininput"
+    path "shark3d_drv_wininput.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "drv_dinput"
+    path "shark3d_drv_dinput.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "drv_netcompr"
+    path "shark3d_drv_netcompr.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "drv_tcp"
+    path "shark3d_drv_tcp.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "drv_udp"
+    path "shark3d_drv_udp.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "drv_commsgeval"
+    path "shark3d_drv_commsgeval.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "drv_stdres"
+    path "shark3d_drv_stdres.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "drv_packres"
+    path "shark3d_drv_packres.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "drv_comres"
+    path "shark3d_drv_comres.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "drv_stdbitmap"
+    path "shark3d_drv_stdbitmap.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "drv_plibbitmap"
+    path "shark3d_drv_plibbitmap.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "drv_dshowvid"
+    path "shark3d_drv_dshowvid.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "drv_univprog_std"
+    path "shark3d_drv_univprog_std.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+// Engine foundation modules:
+{
+    name "eng_base"
+    path "shark3d_eng_base.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "eng_pos_std"
+    path "shark3d_eng_pos_std.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "eng_shader_std"
+    path "shark3d_eng_shader_std.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "eng_shader_special"
+    path "shark3d_eng_shader_special.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "eng_shader_shvol"
+    path "shark3d_eng_shader_shvol.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "eng_model_std"
+    path "shark3d_eng_model_std.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "eng_model_special"
+    path "shark3d_eng_model_special.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "eng_geo_std"
+    path "shark3d_eng_geo_std.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "eng_visib_pvs"
+    path "shark3d_eng_visib_pvs.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "eng_phys_std"
+    path "shark3d_eng_phys_std.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "eng_sensor_std"
+    path "shark3d_eng_sensor_std.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "eng_font_std"
+    path "shark3d_eng_font_std.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "eng_tex_std"
+    path "shark3d_eng_tex_std.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "eng_wave_std"
+    path "shark3d_eng_wave_std.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+// Framework modules:
+{
+    name "kit_base"
+    path "shark3d_kit_base.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "kit_io"
+    path "shark3d_kit_io.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "kit_engbase"
+    path "shark3d_kit_engbase.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "kit_engobj"
+    path "shark3d_kit_engobj.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "kit_special"
+    path "shark3d_kit_special.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "kit_com"
+    path "shark3d_kit_com.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "kit_snk"
+    path "shark3d_kit_snk.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "kit_perch"
+    path "shark3d_kit_perch.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+}
+{
+    name "gtp_shader"
+    path "bin/win32_vc7x1/debug/shark3d_gtp_shader.dll"
+}
+
+// Java module:
+{
+    name "kit_java"
+    path "shark3d_kit_java.dll"
+    load_immediately 0
+    continue_if_loading_failed 0
+    param
+    {
+        // Disable Java, create only dummy script actors.
+        disabled 0
+
+        // Invoke JVM with debug option
+        // (needs tools.jar from JDK in classpath)
+        debug 0
+
+        // Enable just-in-time compiler.
+        jit_enabled 0
+
+        // Run in sandbox:
+        sandbox 0
+
+        // Path for finding class files:
+        classpathes
+            // Java-module Java-classes when using the SDK player exe:
+            "[appdir]..\\..\\..\\bin\\java"
+            // Java-module Java-classes when using an other exe (e.g. Max)
+            "[appdir]shark3d\\bin\\java"
+            // Project-specific resources:
+            "bin\\res"
+
+        // Java library loading information:
+        libname ""
+        registry_key "Software\\JavaSoft\\Java Runtime Environment\\1.4"
+        registry_val "RuntimeLib"
+        bootclasspath ""
+    }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// Log into TCP server:
+
+msgeval_ident "drv_commsgeval.msgeval"
+msgeval_param
+{
+    env "env"
+    addrport_conv "addr_conv"
+    addrport "[comaddrport]"
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// Resource manager:
+
+resmgr_ident "drv_stdres.resmgr_dispatch"
+resmgr_param
+{
+    env "env"
+    log_enabled 0
+    entry_array
+    {
+        prefix ""
+        ident "drv_stdres.resmgr_select"
+        param
+        {
+            env "env"
+            // Select a resource manager:
+            // "normal" -> Reading from file and using DRU.
+            // "packfile" -> Reading from a packfile.
+            select "normal"
+            
+            entry_array
+            {
+                // Default: File resource manager.
+                name "normal"
+                ident "drv_comres.resmgr"
+                param
+                {
+                    env "env"
+                    addrport_conv "addr_conv"
+                    addrport "[comaddrport]"
+                    ignore_socket_errors 1
+                    com_buf_size 0
+                    request_timeout 0.0
+                    request_waitsleep 0.0
+                    child_ident "drv_stdres.resmgr_file"
+                    child_param
+                    {
+                        env "env"
+                        // Prefix added to the resource name for 
+                        // infos and errors:
+                        name_prefix "res:"
+                        // Location to load the files from:
+                        ref_dir "[homedir]bin/res/"
+                        // Convertor for the ref_dir, for replacing 
+                        // placeholders.
+                        ref_dir_conv "path_conv"
+                        // Don't allow resource names to start 
+                        // with ".." or "/":
+                        allow_any_path 0
+                        // Case sensitive file name on Win32 platform.
+                        // Should be enabled to avoid problems
+                        // with non-Win32 platforms, packfiles or DRU.
+                        non_strict_path 0
+                        // Cache size not too large to avoid stuttering:
+                        file_cache_size 4096
+                        // Log all file accesses:
+                        log_enabled 1
+                    }
+                }
+            }
+            {
+                name "packfile"
+                ident "drv_packres.resmgr_pack"
+                param
+                {
+                    env "env"
+                    child_ident "drv_stdres.resmgr_file"
+                    child_param
+                    {
+                        env "env"
+                        name_prefix ""
+                        ref_dir ""
+                        ref_dir_conv ""
+                        allow_any_path 0
+                        non_strict_path 0
+                        file_cache_size 4096
+                        log_enabled 1
+                    }
+                    entry_array
+                    {
+                        prefix ""
+                        pack_res "packfile.s3d_pack"
+                        name_prefix "res:"
+                    }
+                    journal_file_path "packfile.s3d_packjournal"
+                    journal_file_format "utf8"
+                    index_cache_size 4096
+                    res_cache_size 4096
+                }
+            }
+        }
+    }
+    {
+        // Prefix "file:": Open as file.
+        prefix "file:"
+        ident "drv_stdres.resmgr_file"
+        param
+        {
+            env "env"
+            ref_dir ""
+            ref_dir_conv "path_conv"
+            allow_any_path 1
+            non_strict_path 0
+            file_cache_size 4096
+            log_enabled 1
+        }
+    }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// Startup resource:
+
+// Name of the startup resource.
+// This resources describes the first actor created by the player.
+startup "main/actor/main.s3d_actor_run"
+
+///////////////////////////////////////////////////////////////////////////////
+// Application configuration:
+
+// The parameters of the following chunk are evaluated by the application.
+//
+// All these parameter can be also changed by the application.
+// However, depending on the parameter it may have only effect
+// after restarting the application.
+// Other parameters may take effect by re-initializing a part 
+// of the runtime system. For example, the "reload_io" command 
+// re-initializes input, graphics, and sound.
+//
+cfg
+{
+    // Network engine.
+    network
+    {
+        // Enable/disable networking.
+        enabled 1
+
+        // Component type.
+        ident "drv_netcompr.neteng"
+        param
+        {
+            env "env"
+            
+            // Log runtime network statistic in message handler:
+            log_enabled 0
+
+            // Compression level (0 for disabling)
+            compr_level 9
+
+            // Child driver TCP:
+            child_ident "drv_tcp.neteng"
+            child_param
+            {
+                env "env"
+                
+                // Send buffer ring size.
+                buffer_size 65536
+
+                // Log runtime network statistic in message handler:
+                log_enabled 0
+
+                // Enable/disable Nagle algorithm.
+                no_delay 0
+
+                // When connecting, try "connect_retry_count" times
+                // with a pause of "connect_retry_delay" seconds 
+                // between each try.
+                //connect_retry_count 10
+                //connect_retry_delay 1.0
+            }
+
+            // Child driver UDP:
+            /*
+            child_ident "drv_udp.neteng"
+            child_param
+            {
+                // Maximal packet size. Larger data blocks are divided.
+                // Smaller packet sizes may give smoother transfer rates.
+                max_msg_size 256
+
+                // Timeout after which a alive ping is send if no data arrives.
+                alive_period 1.0
+
+                // Timeout after which an fatal error is generated.
+                timeout 30.0
+            }
+            */
+        }
+    }
+
+    // Server configuration.
+    server
+    {
+        // Enable/disable the server.
+        // Disable the server if you connect to a extern server.
+        enabled 1
+
+        // Port number the server is listening on.
+        // If empty, no client can connect via network.
+        addr "0.0.0.0:33300"
+    }
+
+    // Client configuration.
+    client
+    {
+        // Enable/disable the client.
+        // Disable it for a dedicated server.
+        enabled 1
+        
+        // Format: "<host>:<port>"
+        // If empty, the client is connected to a local server.
+        addr ""
+        //addr "127.0.0.1:33300"
+        //addr "192.168.0.1:33300"
+
+        // Define a extra rotation on client side,
+        // for example for cave applications.
+        extratransf
+        {
+            axis_x 0.0
+            axis_y 0.0
+            axis_z 1.0
+            degree 0.0
+            offset_x 0.0
+            offset_y 0.0
+            offset_z 0.0
+        }
+    }
+
+    // Bitmap file format drivers:
+    bitmapparser
+    {
+        ident "drv_stdbitmap.bitmapparser_dispatch"
+        param
+        {
+            env "env"
+            entry_array
+            {
+                ident "drv_stdbitmap.bitmapparser_std"
+                param
+                {
+                }
+            }
+            {
+                ident "drv_plibbitmap.bitmapparser_plib"
+                param
+                {
+                }
+            }
+        }
+    }
+    
+    // Video format drivers:
+    videoparser
+    {
+        ident "drv_dshowvid.videoparser"
+        param
+        {
+            env "env"
+            // Prefix for loading videos:
+            prefix "file://bin/res/"
+            // During two rendering frames, or if a video is not visible, 
+            // then wait this time in seconds before decompressing 
+            // the next frame.
+            wait_continue 1.0
+        }
+    }
+
+    // Sound file format drivers:
+    waveparser
+    {
+        ident "drv_wav.waveparser"
+        param
+        {
+        }
+    }
+
+    // IO context configuration.
+    // The context is the link between gfx-output, input and sound.
+    //
+    // These parameters may be also changed by the application,
+    // and then take effect by a "reload_io" command, 
+    // see the keyboard configuration below.
+    context
+    {
+        // Component type. Empty string creates default component of DLL.
+        ident "drv_winctx.ctx"
+        param
+        {
+            env "env"
+            caption "Shark 3D"
+            // Window is always on the top:
+            topmost 0
+            // If set to one, the given size is not the client area size, 
+            // but the total window size.
+            size_is_window_size 0
+            // Disable ALT-TAB and ALT-RETURN in fullsceen mode.
+            fullscreen_disable_hotkeys 1
+            // File name pattern for screenshots. 
+            // Screenshots can be triggered by the command "store_screenshot".
+            // See the key bindings below.
+            // Note that alternatively you can also use the standard 
+            // windows screenshot mechanism:
+            // Alt-PrintScreen copies a screenshot into the clipboard.
+            screenshot_filepat "shot####.bmp"
+            // Store a screenshot each frame:
+            auto_screenshot 0
+            // Sleep time in seconds each frame if the window is deactive:
+            //deactive_sleep_time 0.0
+            deactive_sleep_time 0.05
+        }
+    }
+
+    // Graphics engine configuration.
+    //
+    // These parameters may be also changed by the application,
+    // and then take effect by a "reload_io" command, 
+    // see the keyboard configuration below.
+    gfxeng
+    {
+        // 3D driver DLL. If empty, use internal factory.
+        // Select one of the following drivers:
+        // Auto detection:
+        ident "drv_gfxselect.gfxmgr"
+        param
+        {
+            env "env" 
+            
+            // Driver selection:
+            // "d3d9" -> Direct3D9
+            // "opengl" -> OpenGL.
+            // Note: For OpenGL you have to compile the resources differently,
+            // see the notes in "utility/buildres/tool_prep_win32.cfg".
+            // Note: OpenGL support of v5 is not stable and not finished yet.
+            select "d3d9"
+            //select "opengl"
+            
+            entry_array
+            {
+                name "d3d9"
+                ident "drv_d3d9.gfxmgr"
+                param
+                {
+                    env "env" 
+                    univprog_suppl "envcompsuppl"
+                    univprog_given_array
+                    {
+                        item "env"
+                        given_ident "env"
+                    }
+                    default_outparam
+                    {
+                        // Log all Direct3D calls. Very slow.
+                        log_dx_calls 0
+                        // Use software reference driver.
+                        ref_driver 0
+                        tripple_buffering 0
+                        force_sw_vertexbuf 0
+                        force_hw_vertexbuf 0
+                        prefer_idxbuf32 0
+                        pure_device 1
+                        // Don't preserve FPU state. May help improve 
+                        // performance, but may cause fp precision problems.
+                        disable_fpu_preserve 0
+                        // Binary logarithm of the minimal texture width.
+                        // 5 -> 32 to avoid problems with NVidia drivers:
+                        min_lb_tex_width 5
+                        // Binary logarithm of the minimal texture height.
+                        // 5 -> 32 to avoid problems with NVidia drivers:
+                        min_lb_tex_height 5
+                        // Binary logarithm of the minimal volume texture 
+                        // extension.
+                        min_lb_vol_tex_ext 5
+                        // Don't use dynamic VB, only static VB and UP.
+                        no_dynamic_vertexbuf 0
+                        // If enabled dummy blend weights and indices are put
+                        // into same vertexbuffer as other vertex data.
+                        // If disabled a small 16 byte application global 
+                        // vertexbuffer will be used for dummy data.
+                        no_dummybone_vertexbuf 1
+                        // Use DrawIndexedPrimitiveUP() for dynamic VBs 
+                        // instead of DrawIndexedPrimitive()
+                        use_draw_indexed_primitive_up 1
+                        // If non-zero, flush cmdbuffer every idxcnt 
+                        idx_flush_cnt 0
+                        // If hw does not support this vertex shader version, 
+                        // use sw:
+                        req_vert_shad_ver "0x0"
+                        // Use faked fullscreen mode:
+                        faked_fullscreen 0
+                        // If true d3d shader debug is possible for asm and 
+                        // hlsl shaders pure_device needs to be 0 and 
+                        // force_sw_vertexbuf needs to be 1 for pixelshader 
+                        // debugging enable ref_driver
+                        shader_debug 0
+                        // Report creation and destruction information
+                        report_batch 1
+                        report_buf 1
+                        report_tex 1
+                        report_prog 1
+                        // compress textures that are greater than
+                        // 'min_texcompress_width' and 'min_texcompress_height'
+                        // 0 = dont override compression flag
+                        min_texcompress_width 0
+                        min_texcompress_height 0
+                        // use at most 'max_miplevels' for textures
+                        // 0 = automatic mip level count
+                        max_miplevels 0
+                        // <= 1: disable anisotropic texture filtering
+                        max_anisotropy 4
+                        // disable special nvidia depth texture
+                        nvdepthtex_enabled 0
+                        // Preload d3d textures, vertex and indexbuffers
+                        preload_resources 0
+                        // if enabled, vertprog declaration will be checked 
+                        // against vertexbuffer declaration each frame.
+                        // Useful while shaderprog development.
+                        validate_prog_buf 1
+                        gamma_2x2_enabled 0
+                        srgb_tex_enabled 0
+                        srgb_write_enabled 0
+                        // Multisampling:
+                        // 0 := Auto select.
+                        // 1 := Disable multisampling
+                        // n := Selects multisample
+                        multisample 1
+                        // Enable info output for D3D PIX
+                        pix_enabled 0
+                    }
+                }
+                enum_param
+                {
+                }
+            }
+            {
+                name "opengl"
+                ident "drv_opengl.gfxmgr"
+                param
+                {
+                    env "env" 
+                    univprog_suppl "envcompsuppl"
+                    univprog_given_array
+                    {
+                        item "env"
+                        given_ident "env"
+                    }
+                    default_outparam
+                    {
+                        // Disable OpenGL extensions by the combination of the
+                        // lower-case renderer string and lower-case extension 
+                        // name:
+                        // "<lower-case-renderer>@<lower-case-extension>"
+                        forbid_pat ""
+                                //& "|*geforce*@gl_arb_vertex_buffer_object"
+                                & "|*@gl_ext_compiled_vertex_array"
+                                & "|*radeon 9000*@gl_arb_vertex_buffer_object"
+                                & "|*radeon 9000*@//display_list"
+                        // <= 1: disable anisotropic texture filtering
+                        max_anisotropy 4
+                    }
+                }
+                enum_param
+                {
+                }
+            }
+        }
+        enum_param
+        {
+        }
+        enum_enabled 1     // Write fullscreen modes into log.
+    }
+    
+    // Graphics output configuration.
+    //
+    // These parameters may be also changed by the application,
+    // and then take effect by a "reload_io" command, 
+    // see the keyboard configuration below.
+    gfxout
+    {
+        // Select a display device. Empty string for default device.
+        // Different gfx backends support different device strings.
+        // In case of Direct3D, "0", "1", "2" selects a Direct3D adapter.
+        // See the log file for a list of devices and fullscreen modi.
+        // This may include for example the Nvidia PerfHUD adapter.
+        device ""
+
+        // Window position, use -1 for default window position
+        left 0
+        top 0
+        // Resolution and color depth:
+        width 640
+        height 480
+        //width 1024
+        //height 768
+        depth 32
+        frequency 0
+        gamma 1.0 1.0 1.0 
+        fullscreen 0
+        nostencil 0             // Don't allocate a stencil buffer.
+        nobatch 0               // Don't use batch objects (e.g. display lists)
+
+        // Other graphics parameter:
+        reportinfo 0            // Report driver allocations (textures etc.).
+        quality 0               // Prefer rendering quality instead of speed.
+        software 0              // Use software emulation.
+        singlebuffer 0          // Don't use double-buffering.
+        synch 0                 // Wait for vertical refresh.
+        noextensions 0          // Don't use API extensions (e.g. OpenGL ext.)
+        abort_if_no_gfxout 1    // Fatal error if initialization failed.
+    }
+
+    // 3D projection information:
+    //
+    // These parameters may be also changed by the application,
+    // and then take effect by a "reload_io" command, 
+    // see the keyboard configuration below.
+    proj_world
+    {
+        // Define the opening angles.
+        open_x 1.0      // Slope of the left and right clipping plane.
+        open_y 0.75     // Slope of the top and bottom clipping plane.
+        //open_x 1.119     // Slope of the left and right clipping plane.
+        //open_y 0.629     // Slope of the top and bottom clipping plane.
+        center_x 0.0
+        center_y 0.0
+    }
+    proj_display
+    {
+        // Define the opening angles.
+        open_x 1.0      // Size of the left and right clipping plane.
+        open_y 0.75     // Size of the top and bottom clipping plane.
+        //open_x 1.119     // Slope of the left and right clipping plane.
+        //open_y 0.629     // Slope of the top and bottom clipping plane.
+        center_x 0.0
+        center_y 0.0
+    }
+
+    // Stereo rendering parameters:
+    eyedist
+    {
+        world 0.1       // World eye disteance for stereo rendering.
+        display 0.1     // Display eye distance for stereo rendering.
+    }
+
+    // 3D gfxport configuration:
+    gfxport
+    {
+        // Other gfxport parameters:
+        cull_pix 10.0           // Minimal object screen size for culling
+        mesh_pix 5.0            // Minimal geometry screen presision
+        visib_mesh_pix 5.0      // Geom. scr. prec. for glow visib. test
+        
+        // Debugging parameters:
+        texaux_inspect_scale_x 0.0
+        texaux_inspect_scale_y 0.0
+        //texaux_inspect_scale_x 0.05 // Debug output of rendertargets
+        //texaux_inspect_scale_y 0.05
+    }
+
+    // Other view options:
+    //
+    // These parameters may be also changed by the application,
+    // and then take effect by a "reload_io" command, 
+    // see the keyboard configuration below.
+    view
+    {
+        // Shader system: If the batches are static, 
+        // don't evaluate the mesh data every frame anymore.
+        economise 1
+        // Shader system: If the mesh data is not needed anymore,
+        // reduce the model:
+        reduce 1
+    }
+
+    // Sound configuration.
+    //
+    // These parameters may be also changed by the application,
+    // and then take effect by a "reload_io" command, 
+    // see the keyboard configuration below.
+    snd
+    {
+        // Enable/disable sound.
+        enabled 1
+
+        // Component type. Empty string creates default component of DLL.
+        ident "drv_dsnd.sndeng"
+        param
+        {
+            ctx "ctx"
+            
+            // Ignore all DirectSound errors.
+            ignore_ds_errors 0
+
+            // As default, all mono wave files are played as 3d sound,
+            // and all stereo wave files are played conventionally.
+            no3d_always 0
+            no3d_pan_scale 1.0
+            no3d_back_down 0.0
+
+            // Sound device:
+            device_index 0
+
+            // DirectSound Cooperative Level.
+            //coop_level "exclusive"
+            //coop_level "normal"
+            coop_level "priority"   // Needed to set the primary buffer format
+            //coop_level "writeprimary"
+
+            // Sound buffer len used for each sound source.
+            buffer_len 2.0
+
+            // Pre-load seconds for each wave file.
+            preload_sec 0.0
+
+            // Maximal change of the volume of each sound source per frame.
+            // Setting this parameter to an non-zero value
+            // may help avoiding cracking.
+            // For example, a value of 0.1 means that a sound source is not
+            // stopped immediately, but fade down during a period
+            // of maximal 10 frames.
+            max_volume_change_per_frame 0.1
+
+            // Requested format for the primary buffer:
+            // If a value is null, the current value is kept.
+            primary_bits_per_sample 16
+            primary_channels 2
+            primary_samples_per_sec 44100
+
+            // Requested format for wave files since some formats give
+            // a ugly performance on some sound cards.
+            // If a value is 0, a wave file may have any value,
+            // but the sound cards must convert on the fly.
+            wave_bits_per_sample 16
+            wave_channels 1
+            wave_samples_per_sec 44100
+
+            // Number of sound buffers to reserve at initialization:
+            wave_buffer_reserve 4
+
+        }
+        /*
+        ident "drv_openal.sndeng"
+        param
+        {
+            // Ignore all DirectSound errors.
+            ignore_errors 0
+
+            // As default, all mono wave files are played as 3d sound,
+            // and all stereo wave files are played conventionally.
+            no3d_always 0
+            no3d_pan_scale 1.0
+            no3d_back_down 0.0
+
+            // Sound buffer len used for each sound source.
+            buffer_size 88200
+
+            // Pre-load seconds for each wave file.
+            preload_sec 0.0
+
+            // Maximal change of the volume of each sound source per frame.
+            // Setting this parameter to an non-zero value
+            // may help avoiding cracking.
+            // For example, a value of 0.1 means that a sound source is not
+            // stopped immediately, but fade down during a period of 10 frames.
+            max_volume_change_per_frame 0.1
+
+            // Requested format for wave files since some formats give
+            // a ugly performance on some sound cards.
+            wave_bits_per_sample 16
+            wave_channels 1
+            wave_samples_per_sec 44100
+            // Number of sound buffers to reserve at initialization:
+            wave_buffer_reserve 4
+        }
+        */
+    }
+    
+    // List of feature strings.
+    // These strings can be tested for example by shaders,
+    // to select between different shader variants:
+    feature_set "dummy1" "dummy2"
+
+    // Actor logging switches.
+    // Note that other components like drivers may have further switches.
+    log
+    {
+        evtmgr 1            // Log events of event queues.
+        stat 0              // Log the statistical information of each frame.
+    }
+
+    // Statistical information display configuration.
+    insp
+    {
+        // Info paint offset and character size:
+        paint
+        {
+            offs_x_pix 0.0
+            offs_y_pix 0.0
+            char_size_x_pix 0.0
+            char_size_y_pix 0.0
+        }
+
+        // Enable particular statistical information items:
+        general 0           // General information (including engine version).
+        frmtime 0           // Frametime.
+        mem 0               // Memory
+        gfxport 0           // Gfxport rendering statistics.
+        gfxbase 0           // Graphics basic information.
+        gfxstat 0           // Graphics driver statistics.
+        cursor 0            // Cursor statistics
+        msg 0               // Show messages.
+
+        // File to log the frametime into.
+        frmtime_logfile ""
+        //frmtime_logfile "log_frametime.log"
+        // Maximal number of message lines:
+        msg_limit 8
+        // Also include non-errors:
+        msg_alsoinfo 0
+    }
+
+    // Input configuration:
+    input
+    {
+        // Player control smooth time for movements and rotating.
+        // May be for example useful when creating demo videos.
+        smooth_move 0.0
+        smooth_rot 0.0
+        // Position device dead zone.
+        deadzone 0.0
+
+        // Drivers:
+        mgr
+        // Select these entries for using DirectInput:
+        {
+            inputmgr_ident "drv_stdinput.inputmgr_multi"
+            inputmgr_param
+            {
+                env "env"
+                ctx "ctx"
+                entry_array
+                // DirectInput:
+                {
+                    ctx_pattern "application"
+                    ident "drv_dinput.inputmgr"
+                    param
+                    {
+                        env "env"
+                        ctx "ctx"
+                        
+                        handle_keyboard 1
+                        handle_mouse 0
+                        handle_ctrl 1   // For example joysticks
+                        
+                        ignore_di_errors 0
+                        attached_only 0
+                        // Work around for DirectInput bug:
+                        // If the keyboard is not polled for this number 
+                        // of seconds, assume the keyboard to be reset.
+                        reset_time_limit 1.0
+                        // If not zero, joystick devices are polled within 
+                        // a thread every thread_period seconds.
+                        thread_period 0.1
+                    }
+                }
+                // Select these entries for using the Windows message queue:
+                {
+                    ctx_pattern "application"
+                    ident "drv_wininput.inputmgr"
+                    param
+                    {
+                        env "env"
+                        ctx "ctx"
+                        
+                        handle_keyboard 0
+                        handle_mouse 1
+                        
+                        catch_mouse 0   // Can be toggled by the "c" key.
+                    }
+                }
+                // Used for ActiveX controls and Max player:
+                {
+                    ctx_pattern "activex|maxplayer"
+                    ident "drv_wininput.inputmgr"
+                    param
+                    {
+                        env "env"
+                        ctx "ctx"
+                        catch_mouse 0   // Can be toggled by the "c" key.
+                    }
+                }
+            }
+        }
+
+        // Input mapping configuration.
+        // Format: <kind> <device> <event> <command>
+        // <kind>: Kind of device:
+        //   trigger: A key generating events when being pressed.
+        //   button: A key generating events when being pressed and released.
+        //   motion: A device generating relative motions, e.g. mouse.
+        //   position: A device having an absolute position, e.g. joystick.
+        // <device>: Device name. May contain wild cards like "*".
+        // <event>: Event name.
+        // <command>: Command sent to the engine.
+        mapping
+        {
+            // Syntax: mode device event command
+            
+            trigger "Keyboard" "0" "goto_level0"
+            trigger "Keyboard" "1" "goto_level1"
+            trigger "Keyboard" "2" "goto_level2"
+            trigger "Keyboard" "3" "goto_level3"
+            trigger "Keyboard" "4" "goto_level4"
+            trigger "Keyboard" "5" "goto_level5"
+            trigger "Keyboard" "6" "goto_level6"
+            trigger "Keyboard" "7" "goto_level7"
+            trigger "Keyboard" "8" "goto_level8"
+            trigger "Keyboard" "9" "goto_level9"
+
+            trigger "Keyboard" "F1" "goto_level10"
+            trigger "Keyboard" "F2" "goto_level11"
+            trigger "Keyboard" "F3" "goto_level12"
+            trigger "Keyboard" "F4" "goto_level13"
+            trigger "Keyboard" "F5" "goto_level14"
+            trigger "Keyboard" "F6" "goto_level15"
+            trigger "Keyboard" "F7" "goto_level16"
+            trigger "Keyboard" "F8" "goto_level17"
+            trigger "Keyboard" "F9" "goto_level18"
+            trigger "Keyboard" "F10" "goto_level19"
+            trigger "Keyboard" "F11" "goto_level20"
+            trigger "Keyboard" "F12" "goto_level21"
+
+            trigger "Keyboard" "A" ""
+            trigger "Keyboard" "B" "toggle_showgfxbound"
+            trigger "Keyboard" "C" "toggle_catch_mouse"
+            trigger "Keyboard" "D" "toggle_showphyscontact"
+            trigger "Keyboard" "E" "reset_msg"
+            trigger "Keyboard" "F" "toggle_frmtime"
+            trigger "Keyboard" "G" "god"
+            trigger "Keyboard" "H" "toggle_showphysgeo"
+            trigger "Keyboard" "I" "store_screenshot"
+            trigger "Keyboard" "J" "toggle_stat"
+            trigger "Keyboard" "K" "reset_stat"
+            trigger "Keyboard" "L" "load_file_default"
+            trigger "Keyboard" "M" "toggle_showgfxmesh"
+            trigger "Keyboard" "N" "toggle_showgfxocclmesh"
+            trigger "Keyboard" "O" "reload_io"
+            trigger "Keyboard" "P" "toggle_showsensorgeo"
+            trigger "Keyboard" "Q" "toggle_showsensorbound"
+            trigger "Keyboard" "R" "refresh_all_res"
+            trigger "Keyboard" "S" "store_file_default"
+            trigger "Keyboard" "T" "toggle_showphysbound"
+            trigger "Keyboard" "U" "toggle_shownoise"
+            trigger "Keyboard" "V" "toggle_showgfxocclwire"
+            trigger "Keyboard" "W" "toggle_showgfxwire"
+            trigger "Keyboard" "X" "" // Should be empty. Used by tutorials.
+            trigger "Keyboard" "Y" "toggle_fullscreen"
+            trigger "Keyboard" "Z" "special"
+
+            trigger "Keyboard" "Escape" "quit"
+            trigger "Keyboard" "Space" ""
+            trigger "Keyboard" "Return" ""
+
+            button "Keyboard" "Up" "switch_vel_pos_y"
+            button "Keyboard" "Down" "switch_vel_neg_y"
+            button "Keyboard" "Left" "switch_vel_neg_x"
+            button "Keyboard" "Right" "switch_vel_pos_x"
+            button "Keyboard" "Page Up" "switch_spin_pos_x"
+            button "Keyboard" "Page Down" "switch_spin_neg_x"
+
+            trigger "Mouse" "Left Button" ""
+            trigger "Mouse" "Right Button" ""
+            motion "Mouse" "X Axis" "apply_rot_pos_z"
+            motion "Mouse" "Y Axis" "apply_rot_pos_x"
+            motion "Mouse" "X Axis" "move_cursor_x"
+            motion "Mouse" "Y Axis" "move_cursor_y"
+            position "Mouse" "X Axis" "set_cursor_x"
+            position "Mouse" "Y Axis" "set_cursor_y"
+
+            position "*joystick*" "X Axis" "assign_spin_pos_z"
+            position "*joystick*" "Y Axis" "assign_vel_pos_y"
+            trigger "*joystick*" "Button 0" ""
+            trigger "*joystick*" "Button 1" ""
+        }
+    }
+
+    mediaplay
+    {
+        prefix "bin/res/"
+    }
+
+    // Configuration of communication channels to external applications.
+    cas
+    {
+        // Enable cas shell:
+        enabled 1
+
+        // TCP port of the CAS (component access shell) terminal.
+        addrport "0.0.0.0:33301"
+
+        // Echo input of the CAS terminal.
+        // Should be set to 1 when using a TELNET client.
+        echo 1
+
+        // Emulate the telnet protocol.
+        // Should be set to 1 when using a TELNET client.
+        // If set to 0, the raw lines are sent.
+        telnet 1
+    }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// End of file.
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_res_maketarget.bat
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_res_maketarget.bat	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_res_maketarget.bat	(revision 2453)
@@ -0,0 +1,12 @@
+@echo off
+setlocal
+call win32_env.bat
+
+echo Using target %1
+
+set PARAM=-f "%S3D_SDKDIR%\utility\buildres\project_win32.s3d_scons" %1
+scons %PARAM%
+if not errorlevel 1 goto ok
+echo shark3d_error
+exit /B 1
+:ok
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/res_make.cfg
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/res_make.cfg	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/res_make.cfg	(revision 2453)
@@ -0,0 +1,8 @@
+make_param
+{
+    quiettools 0
+    bare 0
+    binary3d 1
+    binarysnk 0
+    optimize 1
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_res_clear.bat
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_res_clear.bat	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_res_clear.bat	(revision 2453)
@@ -0,0 +1,6 @@
+setlocal
+call win32_env.bat
+
+"%S3D_SDKDIR%\external\win32\cygwin\rm.exe" -f -r tmp/res/*
+"%S3D_SDKDIR%\external\win32\cygwin\rm.exe" -f -r bin/res/*
+
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_opticsutil.cpp
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_opticsutil.cpp	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_opticsutil.cpp	(revision 2453)
@@ -0,0 +1,262 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+//@cpp
+
+#include "gtp_shader_opticsutil.h"
+#include "../../../util/math/util_geo_types.h"
+
+///////////////////////////////////////////////////////////////////////////////
+
+bool gtp_ShaderOpticsUtil::CalcViewNormalDist(
+        s3d_CUtilVec3f &ViewNormal, float &ViewDist, 
+        s3d_CUtilTranslQuatf_cr ViewTransf)
+{
+    if(ViewTransf.m_Quat == 0)
+        return false;
+
+    // Clip plane is local z-plane.
+    s3d_CUtilVec3f LocalNormal = s3d_CUtilVec3f(0, 0, 1);
+
+    // Clip plane in view coordinates. Plane equation is:
+    // Point * ViewNormal + ViewDist = 0.
+    s3d_CUtilMat3x3f TransfMat = ViewTransf.m_Quat.GetMat();
+    ViewNormal = (TransfMat * LocalNormal).GetNormalized();
+    ViewDist = - ViewNormal * ViewTransf.m_Transl;
+
+    // Front side visible?:
+    return ViewDist > 0;
+}
+
+bool gtp_ShaderOpticsUtil::CalcChildCamFull(
+        s3d_CEngGfxCam &ChildCam, 
+        void *Exclude,
+        int MaxRecursion, float Coeff, float Precision,
+        bool UseCompactFrustum, s3d_CEngShaderScope *Scope, 
+        s3d_CUtilTranslQuatf_cr ViewTransf,
+        s3d_CUtilVec3f_cr ViewNormal, float ViewDist)
+{
+    s3d_CEngGfxPortion *Portion = Scope->m_Portion;
+
+    // Check recursion level:
+    if(Portion->m_Cam.m_Recursion >= MaxRecursion)
+        return false;
+
+    s3d_CUtilTranslQuatf RecTransf = Portion->m_Cam.m_Transf;
+    bool RecReverse = Portion->m_Cam.m_Reverse;
+
+    s3d_CUtilMat4x4f RecProj = Portion->m_Cam.m_Proj;
+
+    s3d_CUtilVec4f RecClipPlane;
+    RecClipPlane.m_x = - ViewNormal.m_x;
+    RecClipPlane.m_y = - ViewNormal.m_y;
+    RecClipPlane.m_z = - ViewNormal.m_z;
+    RecClipPlane.m_w = - ViewDist;
+
+    if(Coeff != 0 && Coeff != 1)
+    {
+        // Calculate extra transformation in view coordinates:
+
+        float Change = Coeff - 1;
+        // (Assuming that normal vector is normalized:)
+        // NewPoint 
+        // = Point + Point-To-Plane-Distance * (ViewNormal * Change)
+        // = Point + (Point * ViewNormal + ViewDist) * (ViewNormal * Change)
+        // = (I + ViewNormal (x) ViewNormal * Change) * Point
+        //   + ViewNormal * (ViewDist * Change)
+        // =: ExtraMat * Point + ExtraTransl 
+        s3d_CUtilMat3x3f ExtraMat(s3d_CUtilMat3x3f(1) 
+                + s3d_CUtilMat3x3f::ByTensorProd(
+                        ViewNormal, ViewNormal * Change));
+        s3d_CUtilVec3f ExtraTransl(ViewNormal * (ViewDist * Change));
+
+        // PartQuat maps the view z into the reflected view z:
+        s3d_CUtilVec3f BeforeDirZ(0, 0, 1);
+        s3d_CUtilVec3f AppliedDirZ = ExtraMat.GetColZ().GetNormalized();
+        s3d_CUtilVec3f DirY(0, 1, 0);
+        s3d_CUtilQuatf PartQuat = s3d_CUtilQuatf::ByPathAlso(
+                        AppliedDirZ, BeforeDirZ, DirY, DirY);
+        // (ExtraTransl, ExtraMat) 
+        // := (0, RestMat) x (PartTransl, PartQuat)
+        // = (RestMat * PartTransl, RestMat * PartQuat)
+        s3d_CUtilMat3x3f RestMat = ExtraMat * PartQuat.GetInvMat();
+        s3d_CUtilVec3f PartTransl = RestMat.GetInv() * ExtraTransl;
+        s3d_CUtilTranslQuatf PartTransf(PartTransl, PartQuat);
+
+        // Apply:
+        RecTransf = RecTransf.ConcatInv(PartTransf);
+        RecProj = s3d_CUtilGeof::ConcatMapTranslMat3(RecProj, 0, RestMat);
+        RecClipPlane = RecClipPlane 
+            * s3d_CUtilGeof::GetMapOfInvTransf3(PartTransf);
+        if(Coeff < 0)
+        {
+            RecClipPlane = - RecClipPlane;
+            RecReverse = !RecReverse;
+        }
+    }
+
+    if(UseCompactFrustum)
+    {
+        // Use the near clipping plane as mirror clipping plane.
+        //
+        // Clipping plane condition:
+        // -> (NewProj * P).z >= - (NewProj * P).w
+        // -> (NewProj.z? + NewProj.w?) * P >= 0
+        // Only modify Proj.z?
+        // -> (NewProj.z? + Proj.w?) * P >= 0
+        //
+        // Plane:
+        // -> Plane * P >= 0
+        // -> NewProj.z? + NewProj.w? = Plane * Fac
+        // -> NewProj.z? = Plane * Fac - Proj.w?
+        //
+        // Choose far clipping plane to include FarPoint
+        // (typically choose plane dir infinity):
+        // NewProj * FarPoint = ~ (0, 0, 1, 1)
+        // -> NewProj.z? * FarPoint = NewProj.w? * FarPoint
+        // -> [Plane * Fac - Proj.w?] * FarPoint = Proj.w? * FarPoint
+        // -> Fac = (Proj.w? * FarPoint * 2) / (Plane * FarPoint)
+        //
+        // Choose FarPoint at infinity in that way
+        // that the complete old frustum is included.
+        // For this, select one frustum vertex at infinity
+        // depending on the plane slope signs.
+
+        s3d_CUtilVec4f FarPoint(
+                s3d_SysSign(RecClipPlane.m_x), 
+                s3d_SysSign(RecClipPlane.m_y), 
+                1, 
+                0);
+
+        s3d_CUtilVec4f RecProjRowW = RecProj.GetRowW();
+        float PlaneFac = ((RecProjRowW * FarPoint) * 2) 
+                        / (RecClipPlane * FarPoint);
+        RecProj.SetRowZ(RecClipPlane * PlaneFac - RecProjRowW);
+        RecClipPlane = 0;
+    }
+    
+    s3d_CUtilVec3f WorldTransl
+        = Portion->m_Cam.m_Transf.ApplyToPoint(ViewTransf.m_Transl);
+
+    // New camera structure:
+    ChildCam = Portion->m_Cam;
+    ChildCam.m_Exclude = Exclude;
+    ChildCam.m_Recursion = Portion->m_Cam.m_Recursion + 1;
+    ChildCam.m_VisibPoint = WorldTransl;
+    ChildCam.m_Transf = RecTransf;
+    ChildCam.m_Proj = RecProj;
+    ChildCam.m_Reverse = RecReverse;
+
+    if(Precision > 0)
+    {
+        ChildCam.m_CullPix *= Precision;
+        ChildCam.m_MeshPix *= Precision;
+        ChildCam.m_VisibMeshPix *= Precision;
+    }
+
+    return true;
+}
+
+bool gtp_ShaderOpticsUtil::CalcChildRange(
+        s3d_CUtilVec3f &SubNeg, s3d_CUtilVec3f &SubPos,
+        s3d_CUtilTranslQuatf_cr ViewTransf,
+        s3d_CUtilVec3f_cr BoundCen, s3d_CUtilVec3f_cr BoundExt,
+        s3d_CEngShaderScope *Scope)
+{
+    s3d_CEngGfxPortion *Portion = Scope->m_Portion;
+
+    // Calculate bounding rectangle in screen coordinates:
+    s3d_CUtilMat3x3f TransfMat = ViewTransf.m_Quat.GetMat();
+    s3d_CUtilVec3f ViewBoundCen = ViewTransf.m_Transl + TransfMat * BoundCen;
+    s3d_CUtilMat3x3f ViewBoundExt = TransfMat.ColGetScaled(BoundExt);
+
+    s3d_CUtilMat4x4f TotalBoundMap = 
+            s3d_CUtilGeof::ConcatMapTranslMat3(
+                    Portion->m_Cam.m_Proj, ViewBoundCen, ViewBoundExt);
+    s3d_CUtilVec3f MapMin, MapMax;
+    s3d_CUtilGeof::CalcRangeMapMinusPlusOne3(
+                        MapMin, MapMax, -1, +1, TotalBoundMap);
+    MapMin.m_z = -1; // Keep near plane to avoid problems with linked cam.
+    MapMax.m_z = 1; // Look to infinity.
+    if(MapMin.IsAnyCompGe(MapMax))
+        return false;
+
+    // Calculate new rendering target rectangle:
+    SubNeg = (MapMin + s3d_CUtilVec3f(1)) * 0.5f;
+    SubPos = (MapMax + s3d_CUtilVec3f(1)) * 0.5f;
+
+    return true;
+}
+
+void gtp_ShaderOpticsUtil::SnapChildRange(
+        s3d_CUtilVec3f &SubNeg, s3d_CUtilVec3f &SubPos,
+        int SnapWidth, int SnapHeight)
+{
+    S3D_SYS_ASSERT(SnapWidth > 0 && SnapHeight > 0);
+    float RcpSnapWidth = 1.0f / SnapWidth;
+    float RcpSnapHeight = 1.0f / SnapHeight;
+    SubNeg.m_x = s3d_SysRoundFloor(SubNeg.m_x * SnapWidth) * RcpSnapWidth;
+    SubPos.m_x = s3d_SysRoundCeil(SubPos.m_x * SnapWidth) * RcpSnapWidth;
+    SubNeg.m_y = s3d_SysRoundFloor(SubNeg.m_y * SnapHeight) * RcpSnapHeight;
+    SubPos.m_y = s3d_SysRoundCeil(SubPos.m_y * SnapHeight) * RcpSnapHeight;
+}
+
+void gtp_ShaderOpticsUtil::ApplyRangeToChildCam(
+        s3d_CEngGfxCam &ChildCam, s3d_CUtilMat4x4f &BaseProj,
+        s3d_CUtilVec3f_cr SubNeg, s3d_CUtilVec3f_cr SubPos)
+{
+    s3d_CUtilVec3f SubDelta = SubPos - SubNeg;
+    s3d_CUtilVec3f SubSum = SubPos + SubNeg;
+
+    // Calculate new target matrix:
+    s3d_CUtilVec2f SubNegXY(SubNeg.m_x, SubNeg.m_y);
+    s3d_CUtilVec2f SubDeltaXY(SubDelta.m_x, SubDelta.m_y);
+    ChildCam.m_ViewPane.m_Transl
+            = ChildCam.m_ViewPane.m_Transl 
+            + SubNegXY.CompMul(ChildCam.m_ViewPane.m_Scale);
+    ChildCam.m_ViewPane.m_Scale
+            = SubDeltaXY.CompMul(ChildCam.m_ViewPane.m_Scale);
+    float ViewDepthDelta = ChildCam.m_ViewDepthEnd - ChildCam.m_ViewDepthStart;
+    ChildCam.m_ViewDepthStart 
+            = ChildCam.m_ViewDepthStart + ViewDepthDelta * SubNeg.m_z;
+
+    // Calculate new projection matrix:
+    s3d_CUtilVec3f ScrScal = s3d_CUtilVec3f(1).CompDiv(SubDelta);
+    s3d_CUtilVec3f ScrOffs = (s3d_CUtilVec3f(1) - SubSum).CompMul(ScrScal);
+    s3d_CUtilMat4x4f ExtraProj = 1;
+    ExtraProj.m_xx = ScrScal.m_x;
+    ExtraProj.m_yy = ScrScal.m_y;
+    ExtraProj.m_zz = ScrScal.m_z;
+    ExtraProj.m_xw = ScrOffs.m_x;
+    ExtraProj.m_yw = ScrOffs.m_y;
+    ExtraProj.m_zw = ScrOffs.m_z;
+    ChildCam.m_Proj = ExtraProj * ChildCam.m_Proj;
+    BaseProj = ExtraProj * BaseProj;
+}
+
+int gtp_ShaderOpticsUtil::RoundToPowerOfTwoDown(int x)
+{
+    x |= (x >> 16);
+    x |= (x >> 8);
+    x |= (x >> 4);
+    x |= (x >> 2);
+    x |= (x >> 1);
+    return x & ~(x >> 1);
+}
+
+int gtp_ShaderOpticsUtil::RoundToPowerOfTwoUp(int x)
+{
+    return RoundToPowerOfTwoDown((x << 1) - 1);
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_causticcube.h
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_causticcube.h	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_causticcube.h	(revision 2453)
@@ -0,0 +1,284 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+//@cpp
+
+#ifndef GTP_SHADER_CAUSTICCUBE_H
+#define GTP_SHADER_CAUSTICCUBE_H
+
+#include "../../interf/eng_gfxvar.h"
+#include "../../interf/eng_shader.h"
+#include "../../interf/eng_shaderenv.h"
+#include "../../util/eng_util_shaderdest.h"
+#include "../../util/eng_util_shaderexec.h"
+#include "../../../comp/core/comp_setup.h"
+#include "../../../comp/util/comp_util_uniquebase.h"
+#include "../../../util/mempool/util_mempool_array_types.h"
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct gtp_Shader_CausticCubeDestGfx
+{
+    s3d_CDrvVarSlot m_FromVarSlot;
+    s3d_CDrvVarSlot m_ToVarSlot;
+    int m_TexProp;
+};
+
+typedef s3d_CUtilArray<gtp_Shader_CausticCubeDestGfx>
+        gtp_Shader_CausticCubeDestGfxArray;
+
+typedef const gtp_Shader_CausticCubeDestGfxArray &
+        gtp_Shader_CausticCubeDestGfxArray_cr;
+
+///////////////////////////////////////////////////////////////////////////////
+
+class gtp_Shader_CausticCubeGfx;
+
+//@
+typedef s3d_CUtilKeyEntry<s3d_CEngGfxCtxPtr, gtp_Shader_CausticCubeGfx*>
+        gtp_Shader_CausticCubeGfxEntry;
+
+//@
+typedef s3d_CUtilTree<gtp_Shader_CausticCubeGfxEntry>
+        gtp_Shader_CausticCubeGfxTree;
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct gtp_Shader_CausticCubeData: s3d_CUtilPtrBase
+{
+    s3d_CUtilStr m_Info;
+    s3d_CUtilAtomArray m_MethodArray;
+    s3d_CUtilStr m_RankInfo;
+    int m_Rank;
+    int m_IterStart;
+    int m_IterEnd;
+    int m_IterStep;
+    float m_IterWidthScale;
+    float m_IterHeightScale;
+    int m_DestProp;
+    float m_WidthScale;
+    float m_HeightScale;
+    s3d_CUtilStr m_TaskInfoVarInfo;
+    s3d_CUtilAtomPtr m_TaskInfoVarAtom;
+    s3d_CUtilStr m_SrcVarInfo;
+    s3d_CUtilAtomArray m_SrcVarAtomArray;
+    s3d_CEngUtilShaderDest m_Dest;
+    s3d_CUtilStr m_ProgInfo;
+    s3d_CUtilStr m_ProgIdent;
+    s3d_CUtilStr m_ProgParamInfo;
+    s3d_CUtilAtomPairArray m_ProgParamMapArray;
+
+	int m_UpdateInterval;
+	int m_StartFrame;
+	bool m_UpdateAllFace;
+	bool m_UsePoints;
+	int m_PhotonCount;
+};
+
+typedef s3d_CUtilPtr<gtp_Shader_CausticCubeData>
+        gtp_Shader_CausticCubeDataPtr;
+
+///////////////////////////////////////////////////////////////////////////////
+
+//@
+class gtp_Shader_CausticCube
+    : public s3d_CEngShader,
+    public s3d_CCompUtilUniqueBase,
+    public s3d_CCompSetup
+{
+public:
+    S3D_UTIL_RTTI_TABLE_DECLARE
+
+    //@
+    gtp_Shader_CausticCube();
+
+    //@
+    void SetupInit(
+            s3d_CUtilMsgHandler *MsgHandler, s3d_CUtilStr_cr Info,
+            s3d_CCompSuppl *FetchSuppl, s3d_CUtilSnkChunk *Param);
+
+    //@
+    void SetupDone();
+
+    //@
+    s3d_CUtilStr GetInfo();
+
+    //@
+    void RegisterNotif(s3d_CUtilNotifRecip *Recip);
+
+    //@
+    s3d_CEngShaderGfxPtr FindShaderGfx(
+            s3d_CUtilNotifGather *NotifGather, s3d_CEngGfxCtx *GfxCtx);
+
+private:
+    s3d_CEngShaderEnvPtr m_ShaderEnv;
+    gtp_Shader_CausticCubeGfxTree m_ShaderGfxTree;
+    gtp_Shader_CausticCubeDataPtr m_Data;
+
+    friend class gtp_Shader_CausticCubeGfx;
+    friend class gtp_Shader_CausticCubeInst;
+};
+
+//@
+typedef s3d_CUtilPtr<gtp_Shader_CausticCube>
+        gtp_Shader_CausticCubePtr;
+
+///////////////////////////////////////////////////////////////////////////////
+
+//@
+class gtp_Shader_CausticCubeGfx: public s3d_CEngShaderGfx
+{
+public:
+    //@
+    gtp_Shader_CausticCubeGfx(
+            s3d_CEngShaderEnv *ShaderEnv, 
+            s3d_CUtilNotifGather *NotifGather,
+            s3d_CEngGfxCtx *GfxCtx, 
+            gtp_Shader_CausticCubeData *Data);
+
+    //@
+    gtp_Shader_CausticCubeGfxTree::CNode *GetNode();
+
+    //@
+    void RegisterNotif(s3d_CUtilNotifRecip *Recip);
+
+    //@
+    void ExtractGfx();
+
+    //@
+    bool IsValid();
+
+    //@
+    void LinkCollect(s3d_CUtilAtomSet &VarAtomSet);
+
+    //@
+    void LinkAppoint(s3d_CDrvVarDecl *VarDecl);
+
+    //@
+    s3d_CEngShaderInstPtr CreateShaderInst(
+            s3d_CEngShaderHead *Head);
+
+private:
+    gtp_Shader_CausticCubeGfxTree::CNode m_Node;
+    s3d_CEngShaderEnvPtr m_ShaderEnv;
+    gtp_Shader_CausticCubeDataPtr m_Data;
+
+    // ShaderGfx-Data Variables:
+    s3d_CEngGfxProgPtr m_GfxProg;
+    s3d_CDrvVarSlotArray m_SrcVarSlotArray;
+    s3d_CEngUtilShaderDestGfx m_FilterDestGfx;
+    s3d_CDrvVarSlotInit m_TaskInfoVarSlot;
+    s3d_CDrvVarDeclPtr m_ProgParamDecl;
+
+    friend class gtp_Shader_CausticCubeInst;
+};
+
+//@
+typedef s3d_CUtilPtr<gtp_Shader_CausticCubeGfx> 
+        gtp_Shader_CausticCubeGfxPtr;
+
+///////////////////////////////////////////////////////////////////////////////
+
+//@
+
+class gtp_Shader_CausticCubeInst
+    : public s3d_CEngShaderInst,
+    public s3d_CEngShaderExec
+{
+public:
+    //@
+    gtp_Shader_CausticCubeInst(
+            s3d_CEngShaderEnv *ShaderEnv,
+            s3d_CEngGfxCtx *GfxCtx,
+            gtp_Shader_CausticCubeGfx *ShaderGfx,
+            s3d_CEngGfxProg *GfxProg);
+
+    //@
+    void RegisterNotif(s3d_CUtilNotifRecip *Recip);
+
+    //@
+    void SetShaderCtx(s3d_CEngShaderCtx *ShaderCtx);
+
+    //@
+    void SetGfxState(s3d_CEngGfxState *GfxState);
+
+    //@
+    void SetPos(s3d_CEngPos *Pos);
+
+    //@
+    void SetModel(s3d_CEngModel *Model);
+
+    //@
+    void ArrangeCollect(
+            s3d_CUtilMemPool *MemPool,
+            s3d_CEngShaderScopeArray &ScopeArray);
+
+    //@
+    void ArrangeInit(
+            s3d_CUtilMemPool *MemPool,
+            s3d_CEngShaderScopeArray_cr ScopeArray);
+
+    //@
+    void ArrangePerform(
+            s3d_CUtilMemPool *MemPool,
+            s3d_CEngShaderScopeArray_cr ScopeArray);
+
+    //@
+    void ArrangeFeedback(
+            s3d_CUtilMemPool *MemPool,
+            s3d_CEngShaderScopeArray_cr ScopeArray);
+
+    //@
+    void ArrangeGather(
+            s3d_CEngShaderExecArray &ExecArray);
+
+    //@
+    void ShaderExecPerform(
+            s3d_CEngShaderScope *Scope, 
+            s3d_CUtilAtom *Method,
+            s3d_CEngGfxTaskArray &TaskArray);
+
+    //@
+    void *GfxElemJobExec(
+            s3d_CEngShaderScope *Scope,
+            void *GfxMark);
+
+private:
+    int m_FrameCount;
+    int m_CurrentFace;	
+   
+	s3d_CEngShaderEnvPtr m_ShaderEnv;
+    s3d_CEngGfxCtxPtr m_GfxCtx;
+    gtp_Shader_CausticCubeGfxPtr m_ShaderGfx;
+    s3d_CEngGfxProgPtr m_GfxProg;
+
+    void Iteration(
+            s3d_CEngShaderScope *Scope, int Iter,
+            int DestProp, float WantWidth, float WantHeight);
+
+	
+    void FetchSrcArray(
+            s3d_CUtilMemPool *MemPool, s3d_CEngShaderScope *Scope, 
+            const s3d_CSysChar *Info,
+            s3d_CEngGfxVarTexChanArray &FilterSrcTexArray,
+            s3d_CDrvVarSlotArray &SrcVarSlotArray);
+
+    void CalcSrcTexSize(
+            s3d_CUtilMemPool *MemPool, s3d_CEngShaderScope *Scope,
+            s3d_CDrvGfxEng *GfxEng, int &Width, int &Height,
+            s3d_CEngGfxVarTexChanArray &FilterSrcTexArray);
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_opticsutil.h
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_opticsutil.h	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_opticsutil.h	(revision 2453)
@@ -0,0 +1,56 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+//@cpp
+
+#ifndef S3D_ENG_SPECIALSHADER_OPTICS_UTIL_H
+#define S3D_ENG_SPECIALSHADER_OPTICS_UTIL_H
+
+#include "../../interf/eng_gfxstruct.h"
+#include "../../interf/eng_shader.h"
+
+///////////////////////////////////////////////////////////////////////////////
+
+//@
+class gtp_ShaderOpticsUtil
+{
+public:
+    static bool CalcViewNormalDist(
+            s3d_CUtilVec3f &ViewNormal, float &ViewDist,
+            s3d_CUtilTranslQuatf_cr ViewTransf);
+    static bool CalcChildCamFull(
+            s3d_CEngGfxCam &ChildCam, 
+            void *Exclude,
+            int MaxRecursion, float Coeff, float Precision,
+            bool UseCompactFrustum, s3d_CEngShaderScope *Scope,
+            s3d_CUtilTranslQuatf_cr ViewTransf,
+            s3d_CUtilVec3f_cr ViewNormal, float ViewDist);
+    static bool CalcChildRange(
+            s3d_CUtilVec3f &SubNeg, s3d_CUtilVec3f &SubPos,
+            s3d_CUtilTranslQuatf_cr ViewTransf,
+            s3d_CUtilVec3f_cr BoundCen, s3d_CUtilVec3f_cr BoundExt,
+            s3d_CEngShaderScope *Scope);
+    static void SnapChildRange(
+            s3d_CUtilVec3f &SubNeg, s3d_CUtilVec3f &SubPos,
+            int SnapWidth, int SnapHeight);
+    static void ApplyRangeToChildCam(
+            s3d_CEngGfxCam &ChildCam, s3d_CUtilMat4x4f &BaseProj,
+            s3d_CUtilVec3f_cr SubNeg, s3d_CUtilVec3f_cr SubPos);
+
+    static int RoundToPowerOfTwoDown(int x);
+    static int RoundToPowerOfTwoUp(int x);
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_cubetexfilter.cpp
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_cubetexfilter.cpp	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_cubetexfilter.cpp	(revision 2453)
@@ -0,0 +1,762 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+//@cpp
+
+#include "gtp_shader_cubetexfilter.h"
+#include "../../interf/eng_gfxvar.h"
+#include "../../util/eng_util_gfxutil.h"
+#include "../../util/eng_util_gfxparamutil.h"
+#include "../../util/eng_util_shaderutil.h"
+#include "../../util/eng_util_shaderitemjob.h"
+#include "../../../drv/interf/drv_vartypes.h"
+#include "../../../drv/util/drv_util_varutil.h"
+#include "../../../drv/util/drv_util_gfxutil.h"
+#include "../../../drv/util/drv_util_paintprim.h"
+#include "../../../util/snk/util_snk_extractutil.h"
+
+///////////////////////////////////////////////////////////////////////////////
+/*@{ 
+
+@declare{shadercomp.class}{eng_shader_special.filter}{}
+
+This component performs some iterative texture filtering.
+@p
+
+The component takes none, one or multiple source textures as input,
+see @sident{comp}{eng_shader_special.filter.src_array}.
+Then it passes them to a shaderprogram,
+see @sident{comp}{eng_shader_special.filter.shaderprog_ident}.
+Then it writes the result to none, one or multiple @em{destination} textures,
+see @sident{comp}{eng_shader_special.filter.dest_array}.
+@p
+
+If the destination textures have already been allocated 
+they are used "as is", but only if they all have the same size.
+Otherwise temporary textures will fetched.
+Their size is the maximum of the source textures scaled by
+@sident{comp}{eng_shader_special.filter.width_scale} and
+@sident{comp}{eng_shader_special.filter.height_scale}.
+If necessary the destination texture size is @em{snapped}
+to a value acceptable to the graphics card.
+@p
+
+@}*/
+///////////////////////////////////////////////////////////////////////////////
+
+S3D_UTIL_RTTI_TABLE_DEFINE_BEGIN(gtp_Shader_CubeTexFilter)
+S3D_UTIL_RTTI_TABLE_DEFINE_BASE(s3d_CEngShader)
+S3D_UTIL_RTTI_TABLE_DEFINE_BASE(s3d_CCompUtilUniqueBase)
+S3D_UTIL_RTTI_TABLE_DEFINE_BASE(s3d_CCompSetup)
+S3D_UTIL_RTTI_TABLE_DEFINE_END
+
+gtp_Shader_CubeTexFilter::gtp_Shader_CubeTexFilter()
+{
+}
+
+void gtp_Shader_CubeTexFilter::SetupInit(
+        s3d_CUtilMsgHandler *MsgHandler, s3d_CUtilStr_cr Info,
+        s3d_CCompSuppl *FetchSuppl, s3d_CUtilSnkChunk *Param)
+{
+    m_Data = S3D_SYS_NEW gtp_Shader_CubeTexFilterData;
+
+    s3d_CUtilSnkExtract SnkExtract;
+    SnkExtract.Assign(MsgHandler, Param);
+    m_Data->m_Info = SnkExtract.GetInfo();
+    
+    /*@{ @declare{shadercomp.param}{eng_shader_special.filter.env}{$ [str]}
+        See @ident{comp}{eng_shader_std.group.env}.
+    @}*/
+    s3d_CUtilStr EnvIdent, EnvInfo;
+    SnkExtract.ExtractStr(EnvInfo, EnvIdent, "env", true);
+
+    m_ShaderEnv = s3d_CompSupplObjT<s3d_CEngShaderEnv>(
+            MsgHandler, EnvInfo, FetchSuppl, 
+            EnvIdent, S3D_GENERAL_INTEROP_INTERF);
+    if(!m_ShaderEnv)
+        return;
+
+    /*@{ @declare{shadercomp.param}
+            {eng_shader_special.filter.methods}{$ [str] .. [str]}
+        See @ref{prog_man.shader.methods}.
+    @}*/
+    s3d_CUtilSnkExtractUtil::ExtractAtomSortedArray(
+            m_Data->m_MethodArray, m_ShaderEnv->m_AtomMgr, 
+            SnkExtract, "methods", true);
+
+    /*@{ @declare{shadercomp.param}
+            {eng_shader_special.filter.rank}{$ [str]}
+       Rank of the shader in the rendering sequence.
+    @}*/
+    SnkExtract.ExtractInt(m_Data->m_RankInfo, m_Data->m_Rank, "rank", true);
+    
+    /*@{ @declare{shadercomp.param}
+            {eng_shader_special.filter.iter_start}{$ [int]}
+        Iteration start value.
+    @}*/
+    m_Data->m_IterStart = SnkExtract.ExtractInt("iter_start", true);
+
+    /*@{ @declare{shadercomp.param}
+            {eng_shader_special.filter.iter_end}{$ [int]}
+        Iteration end value.
+    @}*/
+    m_Data->m_IterEnd = SnkExtract.ExtractInt("iter_end", true);
+
+    /*@{ @declare{shadercomp.param}
+            {eng_shader_special.filter.iter_step}{$ [int]}
+        Iteration step.
+        If the step is positive, then the step is added to the start value 
+        until the value is larger than the end.
+        If the step is negative, then the step is added to the start value
+        until the value is smaller than the end.
+        If the step is zero, the iteration is only executed once
+        for the start value.
+    @}*/
+    m_Data->m_IterStep = SnkExtract.ExtractInt("iter_step", true);
+
+    /*@{ @declare{shadercomp.param}
+            {eng_shader_special.filter.iter_width_scale}{$ [float]}
+        Scale the image by this scale each iteration.
+        The last iteration 
+    @}*/
+    m_Data->m_IterWidthScale = SnkExtract.ExtractFloat(
+            "iter_width_scale", false);
+    if(m_Data->m_IterWidthScale <= 0)
+        m_Data->m_IterWidthScale = 1;
+
+    /*@{ @declare{shadercomp.param}
+            {eng_shader_special.filter.iter_height_scale}{$ [float]}
+        Scale the image by this scale each iteration.
+        The last iteration 
+    @}*/
+    m_Data->m_IterHeightScale 
+            = SnkExtract.ExtractFloat("iter_height_scale", false);
+    if(m_Data->m_IterHeightScale <= 0)
+        m_Data->m_IterHeightScale = 1;
+
+    m_Data->m_DestProp = 0;
+
+    /*@{ @declare{shadercomp.param}
+            {eng_shader_special.filter.destprop_antialias}{$ [bool]}
+        Render the filtering with antialiasing.
+    @}*/
+    if(SnkExtract.ExtractBool("destprop_antialias", true))
+        m_Data->m_DestProp |= s3d_CDrvGfxEng::DestProp_Antialias;
+
+    /*@{ @declare{shadercomp.param}
+            {eng_shader_special.filter.width_scale}{$ [float]}
+       Requested final horizontal scaling factor.
+    @}*/
+    m_Data->m_WidthScale = SnkExtract.ExtractFloat("width_scale", false);
+    if(m_Data->m_WidthScale <= 0)
+        m_Data->m_WidthScale = 1;
+
+    /*@{ @declare{shadercomp.param}
+            {eng_shader_special.filter.height_scale}{$ [float]}
+       Requested final vertical scaling factor.
+    @}*/
+    m_Data->m_HeightScale = SnkExtract.ExtractFloat("height_scale", false);
+    if(m_Data->m_HeightScale <= 0)
+        m_Data->m_HeightScale = 1;
+
+    /*@{ @declare{shadercomp.param}
+            {eng_shader_special.filter.passinfo_var}{$ [str]}
+       This variable is a name for the float4-vector
+       containing information about the iteration.
+       The first component of the vector contains the current iteration number,
+       The second the total number of iterations.
+       The remaining components are unused.
+    @}*/
+    s3d_CUtilSnkExtractUtil::ExtractAtom(
+            m_Data->m_TaskInfoVarInfo, m_Data->m_TaskInfoVarAtom,
+            m_ShaderEnv->m_AtomMgr, SnkExtract, "passinfo_var", true);
+
+    /*@{ @declare{shadercomp.param}
+            {eng_shader_special.filter.shaderprog_ident}{$ [str]}
+       Shader program used for the smoothing iterations.
+    @}*/
+    SnkExtract.ExtractStr(
+            m_Data->m_ProgInfo, m_Data->m_ProgIdent, 
+            "shaderprog_ident", true);
+
+    /*@{ @declare{shadercomp.param}
+            {eng_shader_special.filter.shaderprog_param_array}
+            {$ [chunk] .. [chunk]}
+       Defines which variables are passed to the shader program.
+       See @ident{comp}{<shaderprog.map_prog_array>} for details.
+    @}*/
+    s3d_CUtilSnkChunkArray ProgParamChunkArray;
+    SnkExtract.ExtractChunkArray(
+            m_Data->m_ProgParamInfo, ProgParamChunkArray, 
+            "shaderprog_param_array", true);
+    
+    /*@{ @declare{shadercomp.param}
+            {eng_shader_special.filter.src_array}{$ [str]..[str]}
+    @}*/
+    s3d_CUtilSnkExtractUtil::ExtractAtomArray(
+            m_Data->m_SrcVarInfo, m_Data->m_SrcVarAtomArray,
+            m_ShaderEnv->m_AtomMgr, SnkExtract, "src_array", true);
+    
+    /*@{ @declare{shadercomp.param}
+            {eng_shader_special.filter.dest_array}{$ [chunk]..[chunk]}
+        See @ident{comp}{<dest_array>}.
+    @}*/
+    s3d_CUtilSnkChunkArray DestChunkArray;
+    SnkExtract.ExtractChunkArray(DestChunkArray, "dest_array", true);
+
+	m_Data->m_UpdateInterval = SnkExtract.ExtractInt("update_interval", true, 1);
+	m_Data->m_StartFrame = SnkExtract.ExtractInt("start_frame", true, 0);
+    m_Data->m_UpdateAllFace = SnkExtract.ExtractBool("update_all_face", true, true);
+	
+    SnkExtract.CheckForUnknown();
+
+    int ExtraTexProp = 0;
+    int ExtraSampMode = 0;
+    m_Data->m_Dest.Init(m_ShaderEnv, ExtraTexProp, 
+            ExtraSampMode, DestChunkArray);
+
+    s3d_CEngUtilGfxParamUtil::EvalMapProg(
+            MsgHandler, m_Data->m_ProgParamInfo, 
+            m_ShaderEnv->m_AtomMgr, ProgParamChunkArray,
+            m_Data->m_ProgParamMapArray);
+}
+
+void gtp_Shader_CubeTexFilter::SetupDone()
+{
+}
+
+s3d_CUtilStr gtp_Shader_CubeTexFilter::GetInfo()
+{
+    return m_Data->m_Info;
+}
+
+void gtp_Shader_CubeTexFilter::RegisterNotif(s3d_CUtilNotifRecip *Recip)
+{
+}
+
+s3d_CEngShaderGfxPtr gtp_Shader_CubeTexFilter::FindShaderGfx(
+        s3d_CUtilNotifGather *NotifGather, s3d_CEngGfxCtx *GfxCtx)
+{
+    if(!m_ShaderEnv)
+        return 0;
+
+    gtp_Shader_CubeTexFilterGfxPtr ShaderGfx;
+    gtp_Shader_CubeTexFilterGfxTree::CNode *Pos
+            = s3d_UtilTreeSortedGetStart(m_ShaderGfxTree, GfxCtx);
+    if(s3d_UtilTreeIsEqualAt(Pos, GfxCtx))
+        ShaderGfx = Pos->m_Data.m_Val;
+    else
+    {
+        ShaderGfx = S3D_SYS_NEW gtp_Shader_CubeTexFilterGfx(
+                m_ShaderEnv, NotifGather, GfxCtx, m_Data);
+        gtp_Shader_CubeTexFilterGfxTree::CNode *Node
+                = ShaderGfx->GetNode();
+        m_ShaderGfxTree.InsertBefore(Pos, Node);
+    }
+    return ShaderGfx.Get();
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+gtp_Shader_CubeTexFilterGfx::gtp_Shader_CubeTexFilterGfx(
+        s3d_CEngShaderEnv *ShaderEnv, s3d_CUtilNotifGather *NotifGather,
+        s3d_CEngGfxCtx *GfxCtx, 
+        gtp_Shader_CubeTexFilterData *Data)
+{
+    m_Node.m_Data.m_Key = GfxCtx;
+    m_Node.m_Data.m_Val = this;
+    m_ShaderEnv = ShaderEnv;
+    m_Data = Data;
+
+    m_FilterDestGfx.Init(ShaderEnv, GfxCtx);
+
+    s3d_CEngGfxProgMgr *GfxProgMgr = ShaderEnv->m_GfxProgMgr;
+    if(GfxProgMgr)
+        m_GfxProg = GfxProgMgr->CreateGfxProg(
+                Data->m_ProgInfo, GfxCtx, NotifGather, 
+                Data->m_ProgIdent);
+}
+
+gtp_Shader_CubeTexFilterGfxTree::CNode 
+        *gtp_Shader_CubeTexFilterGfx::GetNode()
+{
+    return &m_Node;
+}
+
+void gtp_Shader_CubeTexFilterGfx::RegisterNotif(
+        s3d_CUtilNotifRecip *Recip)
+{
+}
+
+void gtp_Shader_CubeTexFilterGfx::ExtractGfx()
+{
+    m_Node.Extract();
+}
+
+bool gtp_Shader_CubeTexFilterGfx::IsValid()
+{
+    if(m_GfxProg && !m_GfxProg->IsValid())
+        return false;
+    return true;
+}
+
+void gtp_Shader_CubeTexFilterGfx::LinkCollect(
+        s3d_CUtilAtomSet &VarAtomSet)
+{
+    s3d_CDrvUtilVarUtil::LinkCollect(
+            VarAtomSet, m_Data->m_TaskInfoVarAtom);
+    s3d_CDrvUtilVarUtil::LinkCollectArray(
+            VarAtomSet, m_Data->m_SrcVarAtomArray);
+
+    m_FilterDestGfx.LinkCollect(VarAtomSet, m_Data->m_Dest);
+
+    s3d_CDrvUtilVarUtil::LinkCollectExport(
+            VarAtomSet, m_Data->m_ProgParamMapArray);
+}
+
+void gtp_Shader_CubeTexFilterGfx::LinkAppoint(
+        s3d_CDrvVarDecl *VarDecl)
+{
+    s3d_CDrvUtilVarUtil::LinkAppoint(
+            m_TaskInfoVarSlot.m_Val, 
+            VarDecl, m_Data->m_TaskInfoVarAtom);
+    s3d_CDrvUtilVarUtil::LinkAppointArray(
+            m_SrcVarSlotArray, 
+            VarDecl, m_Data->m_SrcVarAtomArray);
+    
+    m_FilterDestGfx.LinkAppoint(VarDecl, m_Data->m_Dest);
+
+    s3d_CDrvUtilVarUtil::LinkAppointExport(
+            m_ShaderEnv->m_MsgHandler, m_Data->m_ProgParamInfo,
+            m_ProgParamDecl, VarDecl,
+            m_Data->m_ProgParamMapArray);
+}
+
+s3d_CEngShaderInstPtr gtp_Shader_CubeTexFilterGfx::CreateShaderInst(
+        s3d_CEngShaderHead *Head)
+{
+    s3d_CEngGfxCtx *GfxCtx = m_Node.m_Data.m_Key;
+    return S3D_SYS_NEW gtp_Shader_CubeTexFilterInst(
+            m_ShaderEnv, GfxCtx, this, m_GfxProg);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+gtp_Shader_CubeTexFilterInst::gtp_Shader_CubeTexFilterInst(
+        s3d_CEngShaderEnv *ShaderEnv,
+        s3d_CEngGfxCtx *GfxCtx,
+        gtp_Shader_CubeTexFilterGfx *ShaderGfx,
+        s3d_CEngGfxProg *GfxProg)
+{
+    m_FrameCount = 0;
+	m_ShaderEnv = ShaderEnv;
+    m_GfxCtx = GfxCtx;
+    m_ShaderGfx = ShaderGfx;
+    m_GfxProg = GfxProg;
+}
+
+void gtp_Shader_CubeTexFilterInst::RegisterNotif(
+        s3d_CUtilNotifRecip *Recip)
+{
+}
+
+void gtp_Shader_CubeTexFilterInst::SetShaderCtx(
+        s3d_CEngShaderCtx *ShaderCtx)
+{
+}
+
+void gtp_Shader_CubeTexFilterInst::SetGfxState(
+        s3d_CEngGfxState *GfxState)
+{
+}
+
+void gtp_Shader_CubeTexFilterInst::SetPos(s3d_CEngPos *Pos)
+{
+}
+
+void gtp_Shader_CubeTexFilterInst::SetModel(s3d_CEngModel *Model)
+{
+}
+
+void gtp_Shader_CubeTexFilterInst::ArrangeCollect(
+        s3d_CUtilMemPool *MemPool, 
+        s3d_CEngShaderScopeArray &ScopeArray)
+{
+}
+
+void gtp_Shader_CubeTexFilterInst::ArrangeInit(
+        s3d_CUtilMemPool *MemPool, 
+        s3d_CEngShaderScopeArray_cr ScopeArray)
+{
+}
+
+void gtp_Shader_CubeTexFilterInst::ArrangePerform(
+        s3d_CUtilMemPool *MemPool, 
+        s3d_CEngShaderScopeArray_cr ScopeArray)
+{
+}
+
+void gtp_Shader_CubeTexFilterInst::ArrangeFeedback(
+        s3d_CUtilMemPool *MemPool, 
+        s3d_CEngShaderScopeArray_cr ScopeArray)
+{
+}
+
+void gtp_Shader_CubeTexFilterInst::ArrangeGather(
+        s3d_CEngShaderExecArray &ExecArray)
+{
+    gtp_Shader_CubeTexFilterData *Data = m_ShaderGfx->m_Data;
+
+    s3d_CEngUtilShaderUtil::ArrangeGather(
+            ExecArray, Data->m_MethodArray, this);
+}
+
+void gtp_Shader_CubeTexFilterInst::ShaderExecPerform(
+        s3d_CEngShaderScope *Scope, 
+        s3d_CUtilAtom *Method,
+        s3d_CEngGfxTaskArray &TaskArray)
+{
+    gtp_Shader_CubeTexFilterData *Data = m_ShaderGfx->m_Data;
+
+	bool doRender = true;
+	if(Data->m_UpdateInterval > 1)
+	{
+		if(m_FrameCount == Data->m_UpdateInterval)
+			m_FrameCount = 0;
+		m_FrameCount++;
+		if(!(m_FrameCount % Data->m_UpdateInterval == 1))	
+			doRender = false;
+	}
+	if(Data->m_UpdateInterval < 0)
+		doRender = false;
+	if(Data->m_UpdateInterval == 0)
+	{
+		Data->m_UpdateInterval = -1;
+	    Data->m_UpdateAllFace = true;
+	}
+
+    int Rank = Data->m_Rank;
+    if(Rank == 0)
+        return;
+	
+	if(doRender)
+	{
+		s3d_CEngGfxElemJob *GfxElemJob = new(m_ShaderEnv->m_MemPool) 
+				s3d_CEngUtilShaderItemJob<gtp_Shader_CubeTexFilterInst>(
+				Scope, 0,
+				this, &gtp_Shader_CubeTexFilterInst::GfxElemJobExec);
+
+		s3d_CEngGfxTaskOrder KeyOrder = 0;
+		s3d_CEngUtilGfxUtil::AppendTask(
+				m_ShaderEnv->m_MemPool, TaskArray, Rank, KeyOrder, GfxElemJob);
+	}
+}
+
+void *gtp_Shader_CubeTexFilterInst::GfxElemJobExec(
+        s3d_CEngShaderScope *Scope,
+        void *GfxMark)
+{
+    gtp_Shader_CubeTexFilterGfx *ShaderGfx = m_ShaderGfx;
+    const gtp_Shader_CubeTexFilterData *Data = ShaderGfx->m_Data;
+
+    s3d_CDrvGfxEng *GfxEng = m_GfxCtx->m_GfxEng;
+    if(!GfxEng)
+        return GfxMark;
+
+    s3d_CEngUtilShaderDestGfx *FilterDestGfx = &ShaderGfx->m_FilterDestGfx;
+
+    s3d_CEngGfxVarTexChanArray FilterSrcTexArray;
+    FetchSrcArray(
+            m_ShaderEnv->m_MemPool, Scope, Data->m_SrcVarInfo.GetChars(), 
+            FilterSrcTexArray, ShaderGfx->m_SrcVarSlotArray);
+
+    int RawBaseWidth = 0;
+    int RawBaseHeight = 0;
+    CalcSrcTexSize(
+            m_ShaderEnv->m_MemPool, Scope, GfxEng, 
+            RawBaseWidth, RawBaseHeight, FilterSrcTexArray);
+    
+    int DestProp = 0;
+    if(!FilterDestGfx->GetSnapTexPropWidthHeight(
+                m_ShaderEnv, Scope, Data->m_Dest, 
+                RawBaseWidth, RawBaseHeight, DestProp))
+        return GfxMark;
+
+    float BaseWidth = RawBaseWidth * Data->m_WidthScale;
+    float BaseHeight = RawBaseHeight * Data->m_HeightScale;
+    if(BaseWidth <= 0)
+        return GfxMark;
+    if(BaseHeight <= 0)
+        return GfxMark;
+
+    int IterStart = Data->m_IterStart;
+    int IterEnd = Data->m_IterEnd;
+    int IterStep = Data->m_IterStep;
+    if(IterStep > 0)
+    {
+        float CurWidth = BaseWidth;
+        float CurHeight = BaseHeight;
+        int Iter;
+        for(Iter = IterStart; Iter <= IterEnd; Iter += IterStep)
+        {
+            CurWidth /= Data->m_IterWidthScale;
+            CurHeight /= Data->m_IterHeightScale;
+        }
+        for(Iter = IterStart; Iter <= IterEnd; Iter += IterStep)
+        {
+            CurWidth *= Data->m_IterWidthScale;
+            CurHeight *= Data->m_IterHeightScale;
+            Iteration(Scope, Iter, DestProp, CurWidth, CurHeight);
+        }
+    }
+    else if(IterStep < 0)
+    {
+        float CurWidth = BaseWidth;
+        float CurHeight = BaseHeight;
+        int Iter;
+        for(Iter = IterStart; Iter >= IterEnd; Iter += IterStep)
+        {
+            CurWidth /= Data->m_IterWidthScale;
+            CurHeight /= Data->m_IterHeightScale;
+        }
+        for(Iter = IterStart; Iter >= IterEnd; Iter += IterStep)
+        {
+            CurWidth *= Data->m_IterWidthScale;
+            CurHeight *= Data->m_IterHeightScale;
+            Iteration(Scope, Iter, DestProp, CurWidth, CurHeight);
+        }
+    }
+    else
+        Iteration(Scope, IterStart, DestProp, BaseWidth, BaseHeight);
+
+    return 0;
+}
+
+void gtp_Shader_CubeTexFilterInst::Iteration(
+        s3d_CEngShaderScope *Scope, int Iter,
+        int DestProp, float WantWidth, float WantHeight)
+{
+    gtp_Shader_CubeTexFilterGfx *ShaderGfx = m_ShaderGfx;
+    gtp_Shader_CubeTexFilterData *Data = ShaderGfx->m_Data;
+    s3d_CEngUtilShaderDestGfx *FilterDestGfx = &ShaderGfx->m_FilterDestGfx;
+
+    if(!Scope)
+        return;
+
+    s3d_CEngGfxPortion *Portion = Scope->m_Portion;
+    if(!Portion)
+        return;
+    s3d_CEngGfxCycle *Cycle = Portion->m_Cycle;
+    if(!Cycle)
+        return;
+
+    s3d_CUtilMemPool *MemPool = m_ShaderEnv->m_MemPool;
+
+    s3d_CDrvVarVec4f *TaskInfoVar = new(MemPool) s3d_CDrvVarVec4f;
+    TaskInfoVar->m_Val = 0;
+    TaskInfoVar->m_Val.m_x = s3d_SysFloatOfInt<float>(Iter);
+    s3d_DrvVarSet(Scope->m_VarBlk, ShaderGfx->m_TaskInfoVarSlot, TaskInfoVar);
+
+    if(!s3d_CEngUtilGfxUtil::VerifyGfxClosed(
+            m_ShaderEnv->m_MsgHandler, Data->m_RankInfo.GetChars(), 
+            Portion->m_Cycle))
+    {
+        Data->m_Rank = 0; // Avoid the error being reported each frame
+        return;
+    }
+
+    s3d_CDrvGfxEng *GfxEng = m_GfxCtx->m_GfxEng;
+    if(!GfxEng)
+        return;
+
+    s3d_CEngGfxVarTexChanArray FilterSrcTexArray;
+    FetchSrcArray(
+            MemPool, Scope, Data->m_SrcVarInfo.GetChars(), 
+            FilterSrcTexArray, ShaderGfx->m_SrcVarSlotArray);
+
+    int DestWidth = s3d_SysIntOfFloatNearest(WantWidth);
+    int DestHeight = s3d_SysIntOfFloatNearest(WantHeight);
+    int DestDepth = 1;
+    int DestSnap = s3d_CDrvGfxEng::TexSnap_PreferUp;
+    GfxEng->SnapTexSize(DestWidth, DestHeight, DestDepth, DestProp, DestSnap);
+
+    s3d_CEngUtilShaderDestJob *DestJob = FilterDestGfx->CreateJob(
+                m_ShaderEnv, Scope, Data->m_Dest, DestWidth, DestHeight);
+    if(!DestJob)
+        return;
+
+    s3d_CSysIntps nSrcTex = FilterSrcTexArray.GetCnt();
+    int nSamp = GfxEng->GetSampCnt();
+    
+    if(nSrcTex > nSamp)
+    {
+        s3d_CUtilMsg e;
+        e.m_Code = "eng/shader/eng_shader_special_filter.too_many_tex";
+        e.m_StdTempl = "Too many textures specified. "
+                       "Max textures allowed '[1]'.";
+        e.AddInfo(Data->m_Info);
+        e.AddInfo(s3d_CUtilStrUtil::StrOfInt(nSamp));
+        s3d_UtilMsgReportError(m_ShaderEnv->m_MsgHandler, e);
+        return;
+    }
+
+    // Filter:
+
+    GfxEng->SetTransfIdentity(s3d_CDrvGfxEng::TransfChan_View, 0);
+    GfxEng->SetTransfIdentity(s3d_CDrvGfxEng::TransfChan_Proj, 0);
+    GfxEng->SetPaintMode(s3d_CDrvGfxEng::PaintMode_Fill);
+    GfxEng->SetCullMode(s3d_CDrvGfxEng::CullMode_None);
+    GfxEng->SetDepthTest(s3d_CDrvGfxEng::TestMode_Always);
+    GfxEng->SetDepthWrite(false);
+    GfxEng->SetDepthBias(0, 0);
+    GfxEng->SetStencilMode(
+            0, 
+            0, 
+            s3d_CDrvGfxEng::TestMode_Always, 
+            s3d_CDrvGfxEng::TestMode_Always, 
+            0,
+            s3d_CDrvGfxEng::StencilOp_Keep, 
+            s3d_CDrvGfxEng::StencilOp_Keep, 
+            s3d_CDrvGfxEng::StencilOp_Keep,
+            s3d_CDrvGfxEng::StencilOp_Keep, 
+            s3d_CDrvGfxEng::StencilOp_Keep, 
+            s3d_CDrvGfxEng::StencilOp_Keep);
+    GfxEng->SetFogNone();
+    GfxEng->SetBlendMode(
+            s3d_CDrvGfxEng::BlendFac_One, 
+            s3d_CDrvGfxEng::BlendFac_Zero,
+            s3d_CDrvGfxEng::BlendOp_SrcPlusDest,
+            s3d_CDrvGfxEng::BlendFac_One, 
+            s3d_CDrvGfxEng::BlendFac_Zero,
+            s3d_CDrvGfxEng::BlendOp_SrcPlusDest);
+    GfxEng->SetAlphaTest(s3d_CDrvGfxEng::TestMode_Always, 0);
+    GfxEng->DisableLighting();
+    GfxEng->SetColorAlpha(1);
+
+    GfxEng->SetSampTexElseNone(int(nSrcTex));
+
+    s3d_CDrvGfxProg *DrvProg = 0;
+    if(m_GfxProg)
+        DrvProg = m_GfxProg->GetDrvProg();
+
+    s3d_CDrvGfxParam GfxParam;
+    GfxParam.m_Blk.m_Decl = ShaderGfx->m_ProgParamDecl;
+    GfxParam.m_Blk.m_Data = Scope->m_VarBlk.m_Data;
+
+    s3d_CUtilMemPoolFrm MemPoolFrm(MemPool);
+    s3d_CDrvUtilPaintTri PaintTri(
+            Data->m_Info.GetChars(), MemPool, GfxEng, DrvProg);
+
+    s3d_CDrvGfxClearParam ClearParam;
+    s3d_CDrvGfxDest *Dest = DestJob->m_DrvGfxDestArray.GetPtrRaw();
+    s3d_CSysIntps nDestTex = DestJob->m_DrvGfxDestArray.GetCnt();
+    
+	static const int CubeFaceMap[] =
+    {
+        s3d_CDrvGfxEng::TexPart_CubePosX, s3d_CDrvGfxEng::TexPart_CubeNegX, 
+        s3d_CDrvGfxEng::TexPart_CubePosY, s3d_CDrvGfxEng::TexPart_CubeNegY,   
+        s3d_CDrvGfxEng::TexPart_CubePosZ, s3d_CDrvGfxEng::TexPart_CubeNegZ, 
+    };
+
+	for(int iFace = 0; iFace < 6; iFace++)	
+	{
+		if(!Data->m_UpdateAllFace)
+		{
+			iFace = m_CurrentFace;
+			m_CurrentFace = (++m_CurrentFace) % 6;
+		}
+
+		for(int j = 0; j < nDestTex; j++)
+		  Dest[j].m_Part = CubeFaceMap[iFace];
+
+		GfxEng->BeginRenderTex(Data->m_DestProp, ClearParam,
+				DestWidth, DestHeight, nDestTex, Dest);
+		GfxEng->SetViewRect(1);
+    
+		int iSamp;
+		for(iSamp = 0; iSamp < nSrcTex; iSamp++)
+		{
+			const s3d_CEngGfxVarTexChan *SrcTexChanVar = 
+					FilterSrcTexArray[iSamp];
+			s3d_CDrvGfxTex *DrvTex = 0;
+			if(SrcTexChanVar)
+				DrvTex = SrcTexChanVar->m_Val.m_FixedDrvTex;
+			GfxEng->SetSampTex(iSamp, DrvTex);
+			GfxEng->SetSampMode(iSamp, SrcTexChanVar->m_Val.m_FixedSampMode);
+		}
+        		
+		PaintTri.AddQuadAligned(
+            s3d_CUtilVec2f(-1, -1), 
+            s3d_CUtilVec2f(0, 0), 
+            s3d_CUtilVec2f(1, 1), 
+            s3d_CUtilVec2f(1, 1), 
+            (float)iFace, 1);
+
+		PaintTri.Perform(GfxParam);
+
+		GfxEng->EndRender();		
+	}
+
+    FilterDestGfx->FinishJob(
+            m_ShaderEnv, Scope, Data->m_Dest, DestJob);
+}
+
+void gtp_Shader_CubeTexFilterInst::FetchSrcArray(
+        s3d_CUtilMemPool *MemPool, s3d_CEngShaderScope *Scope, 
+        const s3d_CSysChar *Info,
+        s3d_CEngGfxVarTexChanArray &SrcTexArray,
+        s3d_CDrvVarSlotArray &SrcVarSlotArray)
+{
+    s3d_CSysIntps nTex = SrcVarSlotArray.GetCnt();
+    SrcTexArray.SetCnt(MemPool, nTex);
+    s3d_CSysIntps iTex;
+    for(iTex = 0; iTex < nTex; iTex++)
+    {
+        s3d_CEngGfxVarTexChan *TexChanVar = 
+                s3d_EngGfxVarFetchWaryTexChan(
+                    m_ShaderEnv->m_MsgHandler, Info, Scope->m_VarBlk, 
+                    SrcVarSlotArray.RefAt(iTex));        
+        SrcTexArray.SetAt(iTex, TexChanVar);
+    }
+}
+
+void gtp_Shader_CubeTexFilterInst::CalcSrcTexSize(
+        s3d_CUtilMemPool *MemPool, s3d_CEngShaderScope *Scope,
+        s3d_CDrvGfxEng *GfxEng, int &Width, int &Height, 
+        s3d_CEngGfxVarTexChanArray &FilterSrcTexArray)
+{
+    Width = 0;
+    Height = 0;
+
+    s3d_CSysIntps nSrcTex = FilterSrcTexArray.GetCnt();
+    s3d_CSysIntps iSrcTex;
+    for(iSrcTex = 0; iSrcTex < nSrcTex; iSrcTex++)
+    {
+        s3d_CEngGfxVarTexChan *SrcTexChan = FilterSrcTexArray[iSrcTex];
+        if(!SrcTexChan)
+            continue;
+        s3d_CDrvGfxTex *SrcDrvTex = SrcTexChan->m_Val.m_FixedDrvTex;
+        if(!SrcDrvTex)
+            continue;
+
+        int SrcTexWidth, SrcTexHeight, SrcTexDepth;
+        SrcDrvTex->GetSize(SrcTexWidth, SrcTexHeight, SrcTexDepth);
+
+        if(Width < SrcTexWidth)
+            Width = SrcTexWidth;
+        if(Height < SrcTexHeight)
+            Height = SrcTexHeight;
+    }
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/eng_shader_special_worldmat.cpp
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/eng_shader_special_worldmat.cpp	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/eng_shader_special_worldmat.cpp	(revision 2453)
@@ -0,0 +1,306 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+//@cpp
+
+#include "eng_shader_special_worldmat.h"
+#include "../../util/eng_util_gfxutil.h"
+#include "../../util/eng_util_shaderutil.h"
+#include "../../util/eng_util_mathutil.h"
+#include "../../../drv/interf/drv_vartypes.h"
+#include "../../../drv/util/drv_util_varutil.h"
+#include "../../../util/snk/util_snk_extractutil.h"
+#include "../../../util/math/util_geo_types.h"
+
+///////////////////////////////////////////////////////////////////////////////
+/*@{ 
+
+@declare{shadercomp.class}{eng_shader_special.worldmat}{}
+
+Provides a matrix which maps from view coordinates
+in world coordinates.
+@p
+
+Important warning!
+Usually, if you need this matrix something is wrong!
+See @ref{prog_man.shader.coord_systems}.
+@p
+
+@}*/
+///////////////////////////////////////////////////////////////////////////////
+
+S3D_UTIL_RTTI_TABLE_DEFINE_BEGIN(s3d_CEngShaderSpecialWorldMat)
+S3D_UTIL_RTTI_TABLE_DEFINE_BASE(s3d_CEngShader)
+S3D_UTIL_RTTI_TABLE_DEFINE_BASE(s3d_CCompUtilUniqueBase)
+S3D_UTIL_RTTI_TABLE_DEFINE_BASE(s3d_CCompSetup)
+S3D_UTIL_RTTI_TABLE_DEFINE_END
+
+s3d_CEngShaderSpecialWorldMat::s3d_CEngShaderSpecialWorldMat()
+{
+}
+
+void s3d_CEngShaderSpecialWorldMat::SetupInit(
+        s3d_CUtilMsgHandler *MsgHandler, s3d_CUtilStr_cr Info,
+        s3d_CCompSuppl *FetchSuppl, s3d_CUtilSnkChunk *Param)
+{
+    m_Data = S3D_SYS_NEW s3d_CEngShaderSpecialWorldMatData;
+
+    s3d_CUtilSnkExtract SnkExtract;
+    SnkExtract.Assign(MsgHandler, Param);
+    m_Data->m_Info = SnkExtract.GetInfo();
+
+    /*@{ @declare{shadercomp.param}{eng_shader_special.worldmat.env}{$ [str]}
+        See @ident{comp}{eng_shader_std.group.env}.
+    @}*/
+    s3d_CUtilStr EnvIdent, EnvInfo;
+    SnkExtract.ExtractStr(EnvInfo, EnvIdent, "env", true);
+
+    m_ShaderEnv = s3d_CompSupplObjT<s3d_CEngShaderEnv>(
+            MsgHandler, EnvInfo, FetchSuppl, 
+            EnvIdent, S3D_GENERAL_INTEROP_INTERF);
+    if(!m_ShaderEnv)
+        return;
+
+    /*@{ @declare{shadercomp.param}{eng_shader_special.worldmat.methods}
+            {$ [str] .. [str]}
+        See @ref{prog_man.shader.methods}.
+    @}*/
+    s3d_CUtilSnkExtractUtil::ExtractAtomSortedArray(
+            m_Data->m_MethodArray, m_ShaderEnv->m_AtomMgr, 
+            SnkExtract, "methods", true);
+
+    /*@{ @declare{shadercomp.param}
+            {eng_shader_special.worldmat.worldmat_var}{$ [str]}
+        The variable stores the resulting matrix.
+        The variable is of type mat4x4f. 
+    @}*/
+    s3d_CUtilSnkExtractUtil::ExtractAtom(
+            m_Data->m_WorldMatVarInfo, m_Data->m_WorldMatVarAtom,
+            m_ShaderEnv->m_AtomMgr, SnkExtract, "worldmat_var", true);
+	
+	/*@{ @declare{shadercomp.param}
+            {eng_shader_special.worldmat.inverse}{$ [bool]}
+        Sets if the matrix should be inverted.
+    @}*/
+	m_Data->m_Inverse = SnkExtract.ExtractBool("inverse", true, false);
+	/*@{ @declare{shadercomp.param}
+            {eng_shader_special.worldmat.transpose}{$ [bool]}
+        Sets if the matrix should be transposed.
+    @}*/
+	m_Data->m_Transpose = SnkExtract.ExtractBool("transpose", true, false);
+
+    SnkExtract.CheckForUnknown();
+}
+
+void s3d_CEngShaderSpecialWorldMat::SetupDone()
+{
+}
+
+s3d_CUtilStr s3d_CEngShaderSpecialWorldMat::GetInfo()
+{
+    return m_Data->m_Info;
+}
+
+void s3d_CEngShaderSpecialWorldMat::RegisterNotif(s3d_CUtilNotifRecip *Recip)
+{
+}
+
+s3d_CEngShaderGfxPtr s3d_CEngShaderSpecialWorldMat::FindShaderGfx(
+        s3d_CUtilNotifGather *NotifGather, s3d_CEngGfxCtx *GfxCtx)
+{
+    if(!m_ShaderEnv)
+        return 0;
+
+    s3d_CEngShaderSpecialWorldMatGfxPtr ShaderGfx;
+
+    s3d_CEngShaderSpecialWorldMatGfxTree::CNode *Pos
+            = s3d_UtilTreeSortedGetStart(m_ShaderGfxTree, GfxCtx);
+    if(s3d_UtilTreeIsEqualAt(Pos, GfxCtx))
+        ShaderGfx = Pos->m_Data.m_Val;
+    else
+    {
+        ShaderGfx = S3D_SYS_NEW s3d_CEngShaderSpecialWorldMatGfx(
+                m_ShaderEnv, GfxCtx, m_Data);
+        s3d_CEngShaderSpecialWorldMatGfxTree::CNode *Node
+                = ShaderGfx->GetNode();
+        m_ShaderGfxTree.InsertBefore(Pos, Node);
+    }
+    return ShaderGfx.Get();
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+s3d_CEngShaderSpecialWorldMatGfx::s3d_CEngShaderSpecialWorldMatGfx(
+        s3d_CEngShaderEnv *ShaderEnv, s3d_CEngGfxCtx *GfxCtx,
+        s3d_CEngShaderSpecialWorldMatData *Data)
+{
+    m_Node.m_Data.m_Key = GfxCtx;
+    m_Node.m_Data.m_Val = this;
+    m_ShaderEnv = ShaderEnv;
+    m_Data = Data;
+}
+
+s3d_CEngShaderSpecialWorldMatGfxTree::CNode *
+        s3d_CEngShaderSpecialWorldMatGfx::GetNode()
+{
+    return &m_Node;
+}
+
+void s3d_CEngShaderSpecialWorldMatGfx::RegisterNotif(
+        s3d_CUtilNotifRecip *Recip)
+{
+}
+
+void s3d_CEngShaderSpecialWorldMatGfx::ExtractGfx()
+{
+    m_Node.Extract();
+}
+
+bool s3d_CEngShaderSpecialWorldMatGfx::IsValid()
+{
+    return true;
+}
+
+void s3d_CEngShaderSpecialWorldMatGfx::LinkCollect(
+        s3d_CUtilAtomSet &VarAtomSet)
+{
+    s3d_CDrvUtilVarUtil::LinkCollect(
+            VarAtomSet, m_Data->m_WorldMatVarAtom);
+}
+
+void s3d_CEngShaderSpecialWorldMatGfx::LinkAppoint(
+        s3d_CDrvVarDecl *VarDecl)
+{
+    s3d_CDrvUtilVarUtil::LinkAppoint(
+            m_WorldMatVarSlot.m_Val, 
+            VarDecl, m_Data->m_WorldMatVarAtom);
+}
+
+s3d_CEngShaderInstPtr s3d_CEngShaderSpecialWorldMatGfx::CreateShaderInst(
+        s3d_CEngShaderHead *Head)
+{
+    return S3D_SYS_NEW s3d_CEngShaderSpecialWorldMatInst(
+            m_ShaderEnv, this);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+s3d_CEngShaderSpecialWorldMatInst::s3d_CEngShaderSpecialWorldMatInst(
+        s3d_CEngShaderEnv *ShaderEnv, 
+        s3d_CEngShaderSpecialWorldMatGfx *ShaderGfx)
+{
+    m_ShaderEnv = ShaderEnv;
+    m_ShaderGfx = ShaderGfx;
+}
+
+void s3d_CEngShaderSpecialWorldMatInst::RegisterNotif(
+        s3d_CUtilNotifRecip *Recip)
+{
+}
+
+void s3d_CEngShaderSpecialWorldMatInst::SetShaderCtx(
+        s3d_CEngShaderCtx *ShaderCtx)
+{
+}
+
+void s3d_CEngShaderSpecialWorldMatInst::SetGfxState(s3d_CEngGfxState *GfxState)
+{
+}
+
+void s3d_CEngShaderSpecialWorldMatInst::SetPos(s3d_CEngPos *Pos)
+{
+    m_Pos = Pos;
+}
+
+void s3d_CEngShaderSpecialWorldMatInst::SetModel(s3d_CEngModel *Model)
+{
+}
+
+void s3d_CEngShaderSpecialWorldMatInst::ArrangeCollect(
+        s3d_CUtilMemPool *MemPool, 
+        s3d_CEngShaderScopeArray &ScopeArray)
+{
+}
+
+void s3d_CEngShaderSpecialWorldMatInst::ArrangeInit(
+        s3d_CUtilMemPool *MemPool, 
+        s3d_CEngShaderScopeArray_cr ScopeArray)
+{
+    s3d_CSysIntps nScope = ScopeArray.GetCnt();
+    s3d_CSysIntps iScope;
+    for(iScope = 0; iScope < nScope; iScope++)
+    {
+        s3d_CEngShaderScope *Scope = ScopeArray.GetAt(iScope);
+        SetVars(MemPool, Scope);
+    }
+}
+
+void s3d_CEngShaderSpecialWorldMatInst::ArrangePerform(
+        s3d_CUtilMemPool *MemPool, 
+        s3d_CEngShaderScopeArray_cr ScopeArray)
+{
+}
+
+void s3d_CEngShaderSpecialWorldMatInst::ArrangeFeedback(
+        s3d_CUtilMemPool *MemPool, 
+        s3d_CEngShaderScopeArray_cr ScopeArray)
+{
+}
+
+void s3d_CEngShaderSpecialWorldMatInst::ArrangeGather(
+        s3d_CEngShaderExecArray &ExecArray)
+{
+    s3d_CEngShaderSpecialWorldMatData *Data = m_ShaderGfx->m_Data;
+
+    s3d_CEngUtilShaderUtil::ArrangeGather(
+            ExecArray, Data->m_MethodArray, this);
+}
+
+void s3d_CEngShaderSpecialWorldMatInst::ShaderExecPerform(
+        s3d_CEngShaderScope *Scope, 
+        s3d_CUtilAtom *Method,
+        s3d_CEngGfxTaskArray &TaskArray)
+{
+    SetVars(m_ShaderEnv->m_MemPool, Scope);
+}
+
+void s3d_CEngShaderSpecialWorldMatInst::SetVars(
+        s3d_CUtilMemPool *MemPool, s3d_CEngShaderScope *Scope)
+{
+    s3d_CEngShaderSpecialWorldMatGfx *ShaderGfx = m_ShaderGfx;
+    s3d_CEngShaderSpecialWorldMatData *Data = ShaderGfx->m_Data;
+
+    s3d_CDrvVarSlot WorldMatVarSlot = ShaderGfx->m_WorldMatVarSlot;
+    if(WorldMatVarSlot >= 0)
+    {
+        s3d_CEngGfxPortion *Portion = Scope->m_Portion;
+		if(Portion)
+		{
+			s3d_CUtilMat4x4f WorldMat;
+			if(!Data->m_Inverse)
+				WorldMat = s3d_CUtilGeof::GetMapOfTransf3(Portion->m_Cam.m_Transf);
+			else 
+				WorldMat = s3d_CUtilGeof::GetMapOfInvTransf3(Portion->m_Cam.m_Transf);
+			
+			if(Data->m_Transpose)
+				WorldMat = WorldMat.GetTransp();			
+
+			s3d_CDrvVarMat4x4f *WorldMatVar = new(MemPool) s3d_CDrvVarMat4x4f;
+			WorldMatVar->m_Val = WorldMat;
+			s3d_DrvVarSet(Scope->m_VarBlk, WorldMatVarSlot, WorldMatVar);
+		}
+    }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_mainenum.cpp
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_mainenum.cpp	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_mainenum.cpp	(revision 2453)
@@ -0,0 +1,290 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+//@cpp
+
+#include "gtp_shader_mainenum.h"
+#include "../../util/eng_util_gfxutil.h"
+#include "../../util/eng_util_shaderutil.h"
+#include "../../util/eng_util_mathutil.h"
+#include "../../../drv/interf/drv_vartypes.h"
+#include "../../../drv/util/drv_util_varutil.h"
+#include "../../../util/snk/util_snk_extractutil.h"
+#include "../../../util/math/util_geo_types.h"
+
+///////////////////////////////////////////////////////////////////////////////
+/*@{ 
+
+@declare{shadercomp.class}{eng_shader_special.worldmat}{}
+
+Provides a matrix which maps from view coordinates
+in world coordinates.
+@p
+
+Important warning!
+Usually, if you need this matrix something is wrong!
+See @ref{prog_man.shader.coord_systems}.
+@p
+
+@}*/
+///////////////////////////////////////////////////////////////////////////////
+
+S3D_UTIL_RTTI_TABLE_DEFINE_BEGIN(gtp_Shader_MainEnum)
+S3D_UTIL_RTTI_TABLE_DEFINE_BASE(s3d_CEngShader)
+S3D_UTIL_RTTI_TABLE_DEFINE_BASE(s3d_CCompUtilUniqueBase)
+S3D_UTIL_RTTI_TABLE_DEFINE_BASE(s3d_CCompSetup)
+S3D_UTIL_RTTI_TABLE_DEFINE_END
+
+gtp_Shader_MainEnum::gtp_Shader_MainEnum()
+{
+}
+
+void gtp_Shader_MainEnum::SetupInit(
+        s3d_CUtilMsgHandler *MsgHandler, s3d_CUtilStr_cr Info,
+        s3d_CCompSuppl *FetchSuppl, s3d_CUtilSnkChunk *Param)
+{
+    m_Data = S3D_SYS_NEW gtp_Shader_MainEnumData;
+
+    s3d_CUtilSnkExtract SnkExtract;
+    SnkExtract.Assign(MsgHandler, Param);
+    m_Data->m_Info = SnkExtract.GetInfo();
+
+    /*@{ @declare{shadercomp.param}{eng_shader_special.worldmat.env}{$ [str]}
+        See @ident{comp}{eng_shader_std.group.env}.
+    @}*/
+    s3d_CUtilStr EnvIdent, EnvInfo;
+    SnkExtract.ExtractStr(EnvInfo, EnvIdent, "env", true);
+
+    m_ShaderEnv = s3d_CompSupplObjT<s3d_CEngShaderEnv>(
+            MsgHandler, EnvInfo, FetchSuppl, 
+            EnvIdent, S3D_GENERAL_INTEROP_INTERF);
+    if(!m_ShaderEnv)
+        return;
+
+    /*@{ @declare{shadercomp.param}{eng_shader_special.worldmat.methods}
+            {$ [str] .. [str]}
+        See @ref{prog_man.shader.methods}.
+    @}*/
+    s3d_CUtilSnkExtractUtil::ExtractAtomSortedArray(
+            m_Data->m_MethodArray, m_ShaderEnv->m_AtomMgr, 
+            SnkExtract, "methods", true);
+
+    /*@{ @declare{shadercomp.param}
+            {eng_shader_special.worldmat.worldmat_var}{$ [str]}
+        The variable stores the resulting matrix.
+        The variable is of type mat4x4f. 
+    @}*/
+    s3d_CUtilSnkExtractUtil::ExtractAtom(
+            m_Data->m_MainEnumVarInfo, m_Data->m_MainEnumVarAtom,
+            m_ShaderEnv->m_AtomMgr, SnkExtract, "coll_var", true);	
+
+    SnkExtract.CheckForUnknown();
+}
+
+void gtp_Shader_MainEnum::SetupDone()
+{
+}
+
+s3d_CUtilStr gtp_Shader_MainEnum::GetInfo()
+{
+    return m_Data->m_Info;
+}
+
+void gtp_Shader_MainEnum::RegisterNotif(s3d_CUtilNotifRecip *Recip)
+{
+}
+
+s3d_CEngShaderGfxPtr gtp_Shader_MainEnum::FindShaderGfx(
+        s3d_CUtilNotifGather *NotifGather, s3d_CEngGfxCtx *GfxCtx)
+{
+    if(!m_ShaderEnv)
+        return 0;
+
+    gtp_Shader_MainEnumGfxPtr ShaderGfx;
+
+    gtp_Shader_MainEnumGfxTree::CNode *Pos
+            = s3d_UtilTreeSortedGetStart(m_ShaderGfxTree, GfxCtx);
+    if(s3d_UtilTreeIsEqualAt(Pos, GfxCtx))
+        ShaderGfx = Pos->m_Data.m_Val;
+    else
+    {
+        ShaderGfx = S3D_SYS_NEW gtp_Shader_MainEnumGfx(
+                m_ShaderEnv, GfxCtx, m_Data);
+        gtp_Shader_MainEnumGfxTree::CNode *Node
+                = ShaderGfx->GetNode();
+        m_ShaderGfxTree.InsertBefore(Pos, Node);
+    }
+    return ShaderGfx.Get();
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+gtp_Shader_MainEnumGfx::gtp_Shader_MainEnumGfx(
+        s3d_CEngShaderEnv *ShaderEnv, s3d_CEngGfxCtx *GfxCtx,
+        gtp_Shader_MainEnumData *Data)
+{
+    m_Node.m_Data.m_Key = GfxCtx;
+    m_Node.m_Data.m_Val = this;
+    m_ShaderEnv = ShaderEnv;
+    m_Data = Data;
+}
+
+gtp_Shader_MainEnumGfxTree::CNode *
+        gtp_Shader_MainEnumGfx::GetNode()
+{
+    return &m_Node;
+}
+
+void gtp_Shader_MainEnumGfx::RegisterNotif(
+        s3d_CUtilNotifRecip *Recip)
+{
+}
+
+void gtp_Shader_MainEnumGfx::ExtractGfx()
+{
+    m_Node.Extract();
+}
+
+bool gtp_Shader_MainEnumGfx::IsValid()
+{
+    return true;
+}
+
+void gtp_Shader_MainEnumGfx::LinkCollect(
+        s3d_CUtilAtomSet &VarAtomSet)
+{
+    s3d_CDrvUtilVarUtil::LinkCollect(
+            VarAtomSet, m_Data->m_MainEnumVarAtom);
+}
+
+void gtp_Shader_MainEnumGfx::LinkAppoint(
+        s3d_CDrvVarDecl *VarDecl)
+{
+    s3d_CDrvUtilVarUtil::LinkAppoint(
+            m_MainEnumVarSlot.m_Val, 
+            VarDecl, m_Data->m_MainEnumVarAtom);
+}
+
+s3d_CEngShaderInstPtr gtp_Shader_MainEnumGfx::CreateShaderInst(
+        s3d_CEngShaderHead *Head)
+{
+    return S3D_SYS_NEW gtp_Shader_MainEnumInst(
+            m_ShaderEnv, this);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+gtp_Shader_MainEnumInst::gtp_Shader_MainEnumInst(
+        s3d_CEngShaderEnv *ShaderEnv, 
+        gtp_Shader_MainEnumGfx *ShaderGfx)
+{
+    m_ShaderEnv = ShaderEnv;
+    m_ShaderGfx = ShaderGfx;
+}
+
+void gtp_Shader_MainEnumInst::RegisterNotif(
+        s3d_CUtilNotifRecip *Recip)
+{
+}
+
+void gtp_Shader_MainEnumInst::SetShaderCtx(
+        s3d_CEngShaderCtx *ShaderCtx)
+{
+}
+
+void gtp_Shader_MainEnumInst::SetGfxState(s3d_CEngGfxState *GfxState)
+{
+}
+
+void gtp_Shader_MainEnumInst::SetPos(s3d_CEngPos *Pos)
+{
+    m_Pos = Pos;
+}
+
+void gtp_Shader_MainEnumInst::SetModel(s3d_CEngModel *Model)
+{
+}
+
+void gtp_Shader_MainEnumInst::ArrangeCollect(
+        s3d_CUtilMemPool *MemPool, 
+        s3d_CEngShaderScopeArray &ScopeArray)
+{
+}
+
+void gtp_Shader_MainEnumInst::ArrangeInit(
+        s3d_CUtilMemPool *MemPool, 
+        s3d_CEngShaderScopeArray_cr ScopeArray)
+{
+    s3d_CSysIntps nScope = ScopeArray.GetCnt();
+    s3d_CSysIntps iScope;
+    for(iScope = 0; iScope < nScope; iScope++)
+    {
+        s3d_CEngShaderScope *Scope = ScopeArray.GetAt(iScope);
+        SetVars(MemPool, Scope);
+    }
+}
+
+void gtp_Shader_MainEnumInst::ArrangePerform(
+        s3d_CUtilMemPool *MemPool, 
+        s3d_CEngShaderScopeArray_cr ScopeArray)
+{
+}
+
+void gtp_Shader_MainEnumInst::ArrangeFeedback(
+        s3d_CUtilMemPool *MemPool, 
+        s3d_CEngShaderScopeArray_cr ScopeArray)
+{
+}
+
+void gtp_Shader_MainEnumInst::ArrangeGather(
+        s3d_CEngShaderExecArray &ExecArray)
+{
+    gtp_Shader_MainEnumData *Data = m_ShaderGfx->m_Data;
+
+    s3d_CEngUtilShaderUtil::ArrangeGather(
+            ExecArray, Data->m_MethodArray, this);
+}
+
+void gtp_Shader_MainEnumInst::ShaderExecPerform(
+        s3d_CEngShaderScope *Scope, 
+        s3d_CUtilAtom *Method,
+        s3d_CEngGfxTaskArray &TaskArray)
+{
+    SetVars(m_ShaderEnv->m_MemPool, Scope);
+}
+
+void gtp_Shader_MainEnumInst::SetVars(
+        s3d_CUtilMemPool *MemPool, s3d_CEngShaderScope *Scope)
+{
+    gtp_Shader_MainEnumGfx *ShaderGfx = m_ShaderGfx;
+    gtp_Shader_MainEnumData *Data = ShaderGfx->m_Data;
+
+    s3d_CDrvVarSlot MainEnumVarSlot = ShaderGfx->m_MainEnumVarSlot;
+    if(MainEnumVarSlot >= 0)
+    {
+        s3d_CEngGfxPortion *Portion = Scope->m_Portion;
+		if(Portion)
+		{
+			s3d_CEngGfxVarColl *MainEnumVar = new(MemPool) s3d_CEngGfxVarColl;
+			MainEnumVar->m_Val.m_GfxElemArray.Reset();
+			int size = Portion->m_VisibleGfxElemArrayMain.GetCntInt();
+			for(int i = 0; i< size ; i++)
+               MainEnumVar->m_Val.m_GfxElemArray.InsertBack(
+					MemPool,Portion->m_VisibleGfxElemArrayMain[i]);
+			s3d_DrvVarSet(Scope->m_VarBlk, MainEnumVarSlot, MainEnumVar);
+		}
+    }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_cubetexfilter.h
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_cubetexfilter.h	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_cubetexfilter.h	(revision 2453)
@@ -0,0 +1,282 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+//@cpp
+
+#ifndef GTP_SHADER_CUBETEXFILTER_H
+#define GTP_SHADER_CUBETEXFILTER_H
+
+#include "../../interf/eng_gfxvar.h"
+#include "../../interf/eng_shader.h"
+#include "../../interf/eng_shaderenv.h"
+#include "../../util/eng_util_shaderdest.h"
+#include "../../util/eng_util_shaderexec.h"
+#include "../../../comp/core/comp_setup.h"
+#include "../../../comp/util/comp_util_uniquebase.h"
+#include "../../../util/mempool/util_mempool_array_types.h"
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct gtp_Shader_CubeTexFilterDestGfx
+{
+    s3d_CDrvVarSlot m_FromVarSlot;
+    s3d_CDrvVarSlot m_ToVarSlot;
+    int m_TexProp;
+};
+
+typedef s3d_CUtilArray<gtp_Shader_CubeTexFilterDestGfx>
+        gtp_Shader_CubeTexFilterDestGfxArray;
+
+typedef const gtp_Shader_CubeTexFilterDestGfxArray &
+        gtp_Shader_CubeTexFilterDestGfxArray_cr;
+
+///////////////////////////////////////////////////////////////////////////////
+
+class gtp_Shader_CubeTexFilterGfx;
+
+//@
+typedef s3d_CUtilKeyEntry<s3d_CEngGfxCtxPtr, gtp_Shader_CubeTexFilterGfx*>
+        gtp_Shader_CubeTexFilterGfxEntry;
+
+//@
+typedef s3d_CUtilTree<gtp_Shader_CubeTexFilterGfxEntry>
+        gtp_Shader_CubeTexFilterGfxTree;
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct gtp_Shader_CubeTexFilterData: s3d_CUtilPtrBase
+{
+    s3d_CUtilStr m_Info;
+    s3d_CUtilAtomArray m_MethodArray;
+    s3d_CUtilStr m_RankInfo;
+    int m_Rank;
+    int m_IterStart;
+    int m_IterEnd;
+    int m_IterStep;
+    float m_IterWidthScale;
+    float m_IterHeightScale;
+    int m_DestProp;
+    float m_WidthScale;
+    float m_HeightScale;
+    s3d_CUtilStr m_TaskInfoVarInfo;
+    s3d_CUtilAtomPtr m_TaskInfoVarAtom;
+    s3d_CUtilStr m_SrcVarInfo;
+    s3d_CUtilAtomArray m_SrcVarAtomArray;
+    s3d_CEngUtilShaderDest m_Dest;
+    s3d_CUtilStr m_ProgInfo;
+    s3d_CUtilStr m_ProgIdent;
+    s3d_CUtilStr m_ProgParamInfo;
+    s3d_CUtilAtomPairArray m_ProgParamMapArray;
+
+	int m_UpdateInterval;
+	int m_StartFrame;
+	bool m_UpdateAllFace;	
+};
+
+typedef s3d_CUtilPtr<gtp_Shader_CubeTexFilterData>
+        gtp_Shader_CubeTexFilterDataPtr;
+
+///////////////////////////////////////////////////////////////////////////////
+
+//@
+class gtp_Shader_CubeTexFilter
+    : public s3d_CEngShader,
+    public s3d_CCompUtilUniqueBase,
+    public s3d_CCompSetup
+{
+public:
+    S3D_UTIL_RTTI_TABLE_DECLARE
+
+    //@
+    gtp_Shader_CubeTexFilter();
+
+    //@
+    void SetupInit(
+            s3d_CUtilMsgHandler *MsgHandler, s3d_CUtilStr_cr Info,
+            s3d_CCompSuppl *FetchSuppl, s3d_CUtilSnkChunk *Param);
+
+    //@
+    void SetupDone();
+
+    //@
+    s3d_CUtilStr GetInfo();
+
+    //@
+    void RegisterNotif(s3d_CUtilNotifRecip *Recip);
+
+    //@
+    s3d_CEngShaderGfxPtr FindShaderGfx(
+            s3d_CUtilNotifGather *NotifGather, s3d_CEngGfxCtx *GfxCtx);
+
+private:
+    s3d_CEngShaderEnvPtr m_ShaderEnv;
+    gtp_Shader_CubeTexFilterGfxTree m_ShaderGfxTree;
+    gtp_Shader_CubeTexFilterDataPtr m_Data;
+
+    friend class gtp_Shader_CubeTexFilterGfx;
+    friend class gtp_Shader_CubeTexFilterInst;
+};
+
+//@
+typedef s3d_CUtilPtr<gtp_Shader_CubeTexFilter>
+        gtp_Shader_CubeTexFilterPtr;
+
+///////////////////////////////////////////////////////////////////////////////
+
+//@
+class gtp_Shader_CubeTexFilterGfx: public s3d_CEngShaderGfx
+{
+public:
+    //@
+    gtp_Shader_CubeTexFilterGfx(
+            s3d_CEngShaderEnv *ShaderEnv, 
+            s3d_CUtilNotifGather *NotifGather,
+            s3d_CEngGfxCtx *GfxCtx, 
+            gtp_Shader_CubeTexFilterData *Data);
+
+    //@
+    gtp_Shader_CubeTexFilterGfxTree::CNode *GetNode();
+
+    //@
+    void RegisterNotif(s3d_CUtilNotifRecip *Recip);
+
+    //@
+    void ExtractGfx();
+
+    //@
+    bool IsValid();
+
+    //@
+    void LinkCollect(s3d_CUtilAtomSet &VarAtomSet);
+
+    //@
+    void LinkAppoint(s3d_CDrvVarDecl *VarDecl);
+
+    //@
+    s3d_CEngShaderInstPtr CreateShaderInst(
+            s3d_CEngShaderHead *Head);
+
+private:
+    gtp_Shader_CubeTexFilterGfxTree::CNode m_Node;
+    s3d_CEngShaderEnvPtr m_ShaderEnv;
+    gtp_Shader_CubeTexFilterDataPtr m_Data;
+
+    // ShaderGfx-Data Variables:
+    s3d_CEngGfxProgPtr m_GfxProg;
+    s3d_CDrvVarSlotArray m_SrcVarSlotArray;
+    s3d_CEngUtilShaderDestGfx m_FilterDestGfx;
+    s3d_CDrvVarSlotInit m_TaskInfoVarSlot;
+    s3d_CDrvVarDeclPtr m_ProgParamDecl;
+
+    friend class gtp_Shader_CubeTexFilterInst;
+};
+
+//@
+typedef s3d_CUtilPtr<gtp_Shader_CubeTexFilterGfx> 
+        gtp_Shader_CubeTexFilterGfxPtr;
+
+///////////////////////////////////////////////////////////////////////////////
+
+//@
+
+class gtp_Shader_CubeTexFilterInst
+    : public s3d_CEngShaderInst,
+    public s3d_CEngShaderExec
+{
+public:
+    //@
+    gtp_Shader_CubeTexFilterInst(
+            s3d_CEngShaderEnv *ShaderEnv,
+            s3d_CEngGfxCtx *GfxCtx,
+            gtp_Shader_CubeTexFilterGfx *ShaderGfx,
+            s3d_CEngGfxProg *GfxProg);
+
+    //@
+    void RegisterNotif(s3d_CUtilNotifRecip *Recip);
+
+    //@
+    void SetShaderCtx(s3d_CEngShaderCtx *ShaderCtx);
+
+    //@
+    void SetGfxState(s3d_CEngGfxState *GfxState);
+
+    //@
+    void SetPos(s3d_CEngPos *Pos);
+
+    //@
+    void SetModel(s3d_CEngModel *Model);
+
+    //@
+    void ArrangeCollect(
+            s3d_CUtilMemPool *MemPool,
+            s3d_CEngShaderScopeArray &ScopeArray);
+
+    //@
+    void ArrangeInit(
+            s3d_CUtilMemPool *MemPool,
+            s3d_CEngShaderScopeArray_cr ScopeArray);
+
+    //@
+    void ArrangePerform(
+            s3d_CUtilMemPool *MemPool,
+            s3d_CEngShaderScopeArray_cr ScopeArray);
+
+    //@
+    void ArrangeFeedback(
+            s3d_CUtilMemPool *MemPool,
+            s3d_CEngShaderScopeArray_cr ScopeArray);
+
+    //@
+    void ArrangeGather(
+            s3d_CEngShaderExecArray &ExecArray);
+
+    //@
+    void ShaderExecPerform(
+            s3d_CEngShaderScope *Scope, 
+            s3d_CUtilAtom *Method,
+            s3d_CEngGfxTaskArray &TaskArray);
+
+    //@
+    void *GfxElemJobExec(
+            s3d_CEngShaderScope *Scope,
+            void *GfxMark);
+
+private:
+    int m_FrameCount;
+    int m_CurrentFace;
+	   
+	s3d_CEngShaderEnvPtr m_ShaderEnv;
+    s3d_CEngGfxCtxPtr m_GfxCtx;
+    gtp_Shader_CubeTexFilterGfxPtr m_ShaderGfx;
+    s3d_CEngGfxProgPtr m_GfxProg;
+
+    void Iteration(
+            s3d_CEngShaderScope *Scope, int Iter,
+            int DestProp, float WantWidth, float WantHeight);
+
+	
+    void FetchSrcArray(
+            s3d_CUtilMemPool *MemPool, s3d_CEngShaderScope *Scope, 
+            const s3d_CSysChar *Info,
+            s3d_CEngGfxVarTexChanArray &FilterSrcTexArray,
+            s3d_CDrvVarSlotArray &SrcVarSlotArray);
+
+    void CalcSrcTexSize(
+            s3d_CUtilMemPool *MemPool, s3d_CEngShaderScope *Scope,
+            s3d_CDrvGfxEng *GfxEng, int &Width, int &Height,
+            s3d_CEngGfxVarTexChanArray &FilterSrcTexArray);
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/eng_shader_special_worldmat.h
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/eng_shader_special_worldmat.h	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/eng_shader_special_worldmat.h	(revision 2453)
@@ -0,0 +1,215 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+//@cpp
+
+#ifndef GTP_SHADER_WORLDMAT_H
+#define GTP_SHADER_WORLDMAT_H
+
+#include "../../interf/eng_shader.h"
+#include "../../interf/eng_shaderenv.h"
+#include "../../interf/eng_pos.h"
+#include "../../../comp/core/comp_setup.h"
+#include "../../../comp/util/comp_util_uniquebase.h"
+
+///////////////////////////////////////////////////////////////////////////////
+
+class s3d_CEngShaderSpecialWorldMatGfx;
+
+//@
+typedef s3d_CUtilKeyEntry<s3d_CEngGfxCtxPtr, s3d_CEngShaderSpecialWorldMatGfx*>
+        s3d_CEngShaderSpecialWorldMatGfxEntry;
+
+//@
+typedef s3d_CUtilTree<s3d_CEngShaderSpecialWorldMatGfxEntry>
+        s3d_CEngShaderSpecialWorldMatGfxTree;
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct s3d_CEngShaderSpecialWorldMatData: s3d_CUtilPtrBase
+{
+    s3d_CUtilStr m_Info;
+    s3d_CUtilAtomArray m_MethodArray;
+    s3d_CUtilStr m_WorldMatVarInfo;
+    s3d_CUtilAtomPtr m_WorldMatVarAtom;
+	bool m_Inverse;
+	bool m_Transpose;
+};
+
+typedef s3d_CUtilPtr<s3d_CEngShaderSpecialWorldMatData>
+        s3d_CEngShaderSpecialWorldMatDataPtr;
+
+///////////////////////////////////////////////////////////////////////////////
+
+//@
+class s3d_CEngShaderSpecialWorldMat
+    : public s3d_CEngShader,
+    public s3d_CCompUtilUniqueBase,
+    public s3d_CCompSetup
+{
+public:
+    S3D_UTIL_RTTI_TABLE_DECLARE
+
+    //@
+    s3d_CEngShaderSpecialWorldMat();
+
+    //@
+    void SetupInit(
+            s3d_CUtilMsgHandler *MsgHandler, s3d_CUtilStr_cr Info,
+            s3d_CCompSuppl *FetchSuppl, s3d_CUtilSnkChunk *Param);
+
+    //@
+    void SetupDone();
+
+    //@
+    s3d_CUtilStr GetInfo();
+
+    //@
+    void RegisterNotif(s3d_CUtilNotifRecip *Recip);
+
+    //@
+    s3d_CEngShaderGfxPtr FindShaderGfx(
+            s3d_CUtilNotifGather *NotifGather, s3d_CEngGfxCtx *GfxCtx);
+
+private:
+    s3d_CEngShaderEnvPtr m_ShaderEnv;
+    s3d_CEngShaderSpecialWorldMatGfxTree m_ShaderGfxTree;
+    s3d_CEngShaderSpecialWorldMatDataPtr m_Data;
+};
+
+//@
+typedef s3d_CUtilPtr<s3d_CEngShaderSpecialWorldMat>
+        s3d_CEngShaderSpecialWorldMatPtr;
+
+///////////////////////////////////////////////////////////////////////////////
+
+//@
+class s3d_CEngShaderSpecialWorldMatGfx: public s3d_CEngShaderGfx
+{
+public:
+    //@
+    s3d_CEngShaderSpecialWorldMatGfx(
+            s3d_CEngShaderEnv *ShaderEnv, s3d_CEngGfxCtx *GfxCtx,
+            s3d_CEngShaderSpecialWorldMatData *Data);
+
+    //@
+    s3d_CEngShaderSpecialWorldMatGfxTree::CNode *GetNode();
+
+    //@
+    void RegisterNotif(s3d_CUtilNotifRecip *Recip);
+
+    //@
+    void ExtractGfx();
+
+    //@
+    bool IsValid();
+
+    //@
+    void LinkCollect(s3d_CUtilAtomSet &VarAtomSet);
+
+    //@
+    void LinkAppoint(s3d_CDrvVarDecl *VarDecl);
+
+    //@
+    s3d_CEngShaderInstPtr CreateShaderInst(
+            s3d_CEngShaderHead *Head);
+
+private:
+    s3d_CEngShaderSpecialWorldMatGfxTree::CNode m_Node;
+    s3d_CEngShaderEnvPtr m_ShaderEnv;
+    s3d_CEngShaderSpecialWorldMatDataPtr m_Data;
+
+    // ShaderGfx-Data Variables:
+    s3d_CDrvVarSlotInit m_WorldMatVarSlot;
+
+    friend class s3d_CEngShaderSpecialWorldMatInst;
+};
+
+//@
+typedef s3d_CUtilPtr<s3d_CEngShaderSpecialWorldMatGfx>
+        s3d_CEngShaderSpecialWorldMatGfxPtr;
+
+///////////////////////////////////////////////////////////////////////////////
+
+//@
+class s3d_CEngShaderSpecialWorldMatInst
+    : public s3d_CEngShaderInst,
+    public s3d_CEngShaderExec
+{
+public:
+    //@
+    s3d_CEngShaderSpecialWorldMatInst(
+            s3d_CEngShaderEnv *ShaderEnv, 
+            s3d_CEngShaderSpecialWorldMatGfx *ShaderGfx);
+
+    //@
+    void RegisterNotif(s3d_CUtilNotifRecip *Recip);
+
+    //@
+    void SetShaderCtx(s3d_CEngShaderCtx *ShaderCtx);
+
+    //@
+    void SetGfxState(s3d_CEngGfxState *GfxState);
+
+    //@
+    void SetPos(s3d_CEngPos *Pos);
+
+    //@
+    void SetModel(s3d_CEngModel *Model);
+
+    //@
+    void ArrangeCollect(
+            s3d_CUtilMemPool *MemPool,
+            s3d_CEngShaderScopeArray &ScopeArray);
+
+    //@
+    void ArrangeInit(
+            s3d_CUtilMemPool *MemPool,
+            s3d_CEngShaderScopeArray_cr ScopeArray);
+
+    //@
+    void ArrangePerform(
+            s3d_CUtilMemPool *MemPool,
+            s3d_CEngShaderScopeArray_cr ScopeArray);
+
+    //@
+    void ArrangeFeedback(
+            s3d_CUtilMemPool *MemPool,
+            s3d_CEngShaderScopeArray_cr ScopeArray);
+
+    //@
+    void ArrangeGather(
+            s3d_CEngShaderExecArray &ExecArray);
+
+    //@
+    void ShaderExecPerform(
+            s3d_CEngShaderScope *Scope, 
+            s3d_CUtilAtom *Method,
+            s3d_CEngGfxTaskArray &TaskArray);
+
+private:
+    s3d_CEngShaderEnvPtr m_ShaderEnv;
+    s3d_CEngShaderSpecialWorldMatGfxPtr m_ShaderGfx;
+    s3d_CEngPosPtr m_Pos;
+
+    void SetVars(
+            s3d_CUtilMemPool *MemPool, s3d_CEngShaderScope *Scope);
+};
+
+//@
+typedef s3d_CUtilPtr<s3d_CEngShaderSpecialWorldMatInst>
+        s3d_CEngShaderSpecialWorldMatInstPtr;
+
+///////////////////////////////////////////////////////////////////////////////
+
+#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_public.cpp
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_public.cpp	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_public.cpp	(revision 2453)
@@ -0,0 +1,18 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+//@cpp
+
+#include "gtp_shader_public.h"
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_mainenum.h
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_mainenum.h	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_mainenum.h	(revision 2453)
@@ -0,0 +1,213 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+//@cpp
+
+#ifndef GTP_SHADER_MAINENUM_H
+#define GTP_SHADER_MAINENUM_H
+
+#include "../../interf/eng_shader.h"
+#include "../../interf/eng_shaderenv.h"
+#include "../../interf/eng_pos.h"
+#include "../../../comp/core/comp_setup.h"
+#include "../../../comp/util/comp_util_uniquebase.h"
+
+///////////////////////////////////////////////////////////////////////////////
+
+class gtp_Shader_MainEnumGfx;
+
+//@
+typedef s3d_CUtilKeyEntry<s3d_CEngGfxCtxPtr, gtp_Shader_MainEnumGfx*>
+        gtp_Shader_MainEnumGfxEntry;
+
+//@
+typedef s3d_CUtilTree<gtp_Shader_MainEnumGfxEntry>
+        gtp_Shader_MainEnumGfxTree;
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct gtp_Shader_MainEnumData: s3d_CUtilPtrBase
+{
+    s3d_CUtilStr m_Info;
+    s3d_CUtilAtomArray m_MethodArray;
+    s3d_CUtilStr m_MainEnumVarInfo;
+    s3d_CUtilAtomPtr m_MainEnumVarAtom;	
+};
+
+typedef s3d_CUtilPtr<gtp_Shader_MainEnumData>
+        gtp_Shader_MainEnumDataPtr;
+
+///////////////////////////////////////////////////////////////////////////////
+
+//@
+class gtp_Shader_MainEnum
+    : public s3d_CEngShader,
+    public s3d_CCompUtilUniqueBase,
+    public s3d_CCompSetup
+{
+public:
+    S3D_UTIL_RTTI_TABLE_DECLARE
+
+    //@
+    gtp_Shader_MainEnum();
+
+    //@
+    void SetupInit(
+            s3d_CUtilMsgHandler *MsgHandler, s3d_CUtilStr_cr Info,
+            s3d_CCompSuppl *FetchSuppl, s3d_CUtilSnkChunk *Param);
+
+    //@
+    void SetupDone();
+
+    //@
+    s3d_CUtilStr GetInfo();
+
+    //@
+    void RegisterNotif(s3d_CUtilNotifRecip *Recip);
+
+    //@
+    s3d_CEngShaderGfxPtr FindShaderGfx(
+            s3d_CUtilNotifGather *NotifGather, s3d_CEngGfxCtx *GfxCtx);
+
+private:
+    s3d_CEngShaderEnvPtr m_ShaderEnv;
+    gtp_Shader_MainEnumGfxTree m_ShaderGfxTree;
+    gtp_Shader_MainEnumDataPtr m_Data;
+};
+
+//@
+typedef s3d_CUtilPtr<gtp_Shader_MainEnum>
+        gtp_Shader_MainEnumPtr;
+
+///////////////////////////////////////////////////////////////////////////////
+
+//@
+class gtp_Shader_MainEnumGfx: public s3d_CEngShaderGfx
+{
+public:
+    //@
+    gtp_Shader_MainEnumGfx(
+            s3d_CEngShaderEnv *ShaderEnv, s3d_CEngGfxCtx *GfxCtx,
+            gtp_Shader_MainEnumData *Data);
+
+    //@
+    gtp_Shader_MainEnumGfxTree::CNode *GetNode();
+
+    //@
+    void RegisterNotif(s3d_CUtilNotifRecip *Recip);
+
+    //@
+    void ExtractGfx();
+
+    //@
+    bool IsValid();
+
+    //@
+    void LinkCollect(s3d_CUtilAtomSet &VarAtomSet);
+
+    //@
+    void LinkAppoint(s3d_CDrvVarDecl *VarDecl);
+
+    //@
+    s3d_CEngShaderInstPtr CreateShaderInst(
+            s3d_CEngShaderHead *Head);
+
+private:
+    gtp_Shader_MainEnumGfxTree::CNode m_Node;
+    s3d_CEngShaderEnvPtr m_ShaderEnv;
+    gtp_Shader_MainEnumDataPtr m_Data;
+
+    // ShaderGfx-Data Variables:
+    s3d_CDrvVarSlotInit m_MainEnumVarSlot;
+
+    friend class gtp_Shader_MainEnumInst;
+};
+
+//@
+typedef s3d_CUtilPtr<gtp_Shader_MainEnumGfx>
+        gtp_Shader_MainEnumGfxPtr;
+
+///////////////////////////////////////////////////////////////////////////////
+
+//@
+class gtp_Shader_MainEnumInst
+    : public s3d_CEngShaderInst,
+    public s3d_CEngShaderExec
+{
+public:
+    //@
+    gtp_Shader_MainEnumInst(
+            s3d_CEngShaderEnv *ShaderEnv, 
+            gtp_Shader_MainEnumGfx *ShaderGfx);
+
+    //@
+    void RegisterNotif(s3d_CUtilNotifRecip *Recip);
+
+    //@
+    void SetShaderCtx(s3d_CEngShaderCtx *ShaderCtx);
+
+    //@
+    void SetGfxState(s3d_CEngGfxState *GfxState);
+
+    //@
+    void SetPos(s3d_CEngPos *Pos);
+
+    //@
+    void SetModel(s3d_CEngModel *Model);
+
+    //@
+    void ArrangeCollect(
+            s3d_CUtilMemPool *MemPool,
+            s3d_CEngShaderScopeArray &ScopeArray);
+
+    //@
+    void ArrangeInit(
+            s3d_CUtilMemPool *MemPool,
+            s3d_CEngShaderScopeArray_cr ScopeArray);
+
+    //@
+    void ArrangePerform(
+            s3d_CUtilMemPool *MemPool,
+            s3d_CEngShaderScopeArray_cr ScopeArray);
+
+    //@
+    void ArrangeFeedback(
+            s3d_CUtilMemPool *MemPool,
+            s3d_CEngShaderScopeArray_cr ScopeArray);
+
+    //@
+    void ArrangeGather(
+            s3d_CEngShaderExecArray &ExecArray);
+
+    //@
+    void ShaderExecPerform(
+            s3d_CEngShaderScope *Scope, 
+            s3d_CUtilAtom *Method,
+            s3d_CEngGfxTaskArray &TaskArray);
+
+private:
+    s3d_CEngShaderEnvPtr m_ShaderEnv;
+    gtp_Shader_MainEnumGfxPtr m_ShaderGfx;
+    s3d_CEngPosPtr m_Pos;
+
+    void SetVars(
+            s3d_CUtilMemPool *MemPool, s3d_CEngShaderScope *Scope);
+};
+
+//@
+typedef s3d_CUtilPtr<gtp_Shader_MainEnumInst>
+        gtp_Shader_MainEnumInstPtr;
+
+///////////////////////////////////////////////////////////////////////////////
+
+#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader.cpp
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader.cpp	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader.cpp	(revision 2453)
@@ -0,0 +1,35 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+//@cpp
+
+#include "gtp_shader.h"
+#include "gtp_shader_module.h"
+#include "../../util/eng_util_shaderutil.h"
+#include "../../../general/general_def.h"
+
+///////////////////////////////////////////////////////////////////////////////
+
+s3d_CCompSupplPtr gtp_ShaderCompSupplCreate()
+{
+    return S3D_SYS_NEW gtp_ShaderModuleSuppl();
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+S3D_COMP_MODULE_ENTRANCE_IMPL_STD(
+        s3d_ModuleEntrance_eng_shader_special,
+        gtp_ShaderModuleCover)
+
+///////////////////////////////////////////////////////////////////////////////
+
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_versioncheck.cpp
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_versioncheck.cpp	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_versioncheck.cpp	(revision 2453)
@@ -0,0 +1,26 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+//@cpp
+
+// Such a file should be included into every DLL and application
+// to perform a DLL version check.
+
+#include "../../../sys/core/sys_versioncheck.h"
+
+///////////////////////////////////////////////////////////////////////////////
+
+S3D_SYS_VERSIONCHECK
+
+///////////////////////////////////////////////////////////////////////////////
+
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_public.h
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_public.h	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_public.h	(revision 2453)
@@ -0,0 +1,39 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+//@cpp
+
+#ifndef S3D_ENG_SHADER_SPECIAL_PUBLIC_H
+#define S3D_ENG_SHADER_SPECIAL_PUBLIC_H
+
+#include "../../../general/general_env.h"
+#include "../../../sys/core/sys_libstd.h"
+
+#ifdef S3D_GENERAL_PLATFORM_WIN32
+#pragma warning(disable: 4273 4049 4660 4231 4251)
+#pragma warning(error: 4661)
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+
+#ifdef S3D_ENG_SHADER_SPECIAL_EXPORTS
+#define S3D_ENG_SHADER_SPECIAL_PUBLIC_DECL S3D_SYS_LIBSTD_DECL_EXPORT
+#define S3D_ENG_SHADER_SPECIAL_PUBLIC_TEMPL  S3D_SYS_LIBSTD_TEMPL_EXPORT
+#else
+#define S3D_ENG_SHADER_SPECIAL_PUBLIC_DECL S3D_SYS_LIBSTD_DECL_IMPORT
+#define S3D_ENG_SHADER_SPECIAL_PUBLIC_TEMPL S3D_SYS_LIBSTD_TEMPL_IMPORT
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+
+#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_createtex.cpp
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_createtex.cpp	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_createtex.cpp	(revision 2453)
@@ -0,0 +1,390 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+//@cpp
+
+#include "gtp_shader_createtex.h"
+#include "../../interf/eng_gfxvar.h"
+#include "../../util/eng_util_gfxutil.h"
+#include "../../util/eng_util_shaderutil.h"
+#include "../../../drv/interf/drv_vartypes.h"
+#include "../../../drv/util/drv_util_varutil.h"
+#include "../../../util/snk/util_snk_extractutil.h"
+
+///////////////////////////////////////////////////////////////////////////////
+/*@{ 
+
+@declare{shadercomp.class}{eng_shader_std.directtexchan}{}
+
+This component writes a reference to a texture 
+into a texture channel variable.
+See also @ref{prog_man.shader.texture_channels}.
+@p
+
+@}*/
+///////////////////////////////////////////////////////////////////////////////
+
+S3D_UTIL_RTTI_TABLE_DEFINE_BEGIN(gtp_ShaderCreateTex)
+S3D_UTIL_RTTI_TABLE_DEFINE_BASE(s3d_CEngShader)
+S3D_UTIL_RTTI_TABLE_DEFINE_BASE(s3d_CCompUtilUniqueBase)
+S3D_UTIL_RTTI_TABLE_DEFINE_BASE(s3d_CCompSetup)
+S3D_UTIL_RTTI_TABLE_DEFINE_END
+
+gtp_ShaderCreateTex::gtp_ShaderCreateTex()
+{
+}
+
+void gtp_ShaderCreateTex::SetupInit(
+        s3d_CUtilMsgHandler *MsgHandler, s3d_CUtilStr_cr Info,
+        s3d_CCompSuppl *FetchSuppl, s3d_CUtilSnkChunk *Param)
+{
+    m_Data = S3D_SYS_NEW gtp_ShaderCreateTexData;
+
+    s3d_CUtilSnkExtract SnkExtract;
+    SnkExtract.Assign(MsgHandler, Param);
+    m_Data->m_Info = SnkExtract.GetInfo();
+
+    /*@{ @declare{shadercomp.param}{eng_shader_std.directtexchan.env}{$ [str]}
+        See @ident{comp}{eng_shader_std.group.env}.
+    @}*/
+    s3d_CUtilStr EnvIdent, EnvInfo;
+    SnkExtract.ExtractStr(EnvInfo, EnvIdent, "env", true);
+
+    m_ShaderEnv = s3d_CompSupplObjT<s3d_CEngShaderEnv>(
+            MsgHandler, EnvInfo, FetchSuppl, 
+            EnvIdent, S3D_GENERAL_INTEROP_INTERF);
+    if(!m_ShaderEnv)
+        return;
+
+    /*@{ @declare{shadercomp.param}{eng_shader_std.directtexchan.methods}
+            {$ [str] .. [str]}
+        See @ref{prog_man.shader.methods}.
+    @}*/
+    s3d_CUtilSnkExtractUtil::ExtractAtomSortedArray(
+            m_Data->m_MethodArray, m_ShaderEnv->m_AtomMgr, 
+            SnkExtract, "methods", true);
+
+
+	///Texture properties
+	int TexWidth = 256, TexHeight = 256, TexDepth = 1, TexCompCnt = 3, TexBitPComp = 8;
+	
+	int TexProp = 0;
+    if(SnkExtract.ExtractBool("texprop_rendertarget", true))
+		TexProp |= s3d_CDrvGfxEng::TexProp_RenderTarget;
+	if(SnkExtract.ExtractBool("texprop_cube", true))
+		TexProp |= s3d_CDrvGfxEng::TexProp_Cube;
+	if(SnkExtract.ExtractBool("texprop_volume", true))
+		TexProp |= s3d_CDrvGfxEng::TexProp_Volume;
+	if(SnkExtract.ExtractBool("texprop_mipmap", true))
+		TexProp |= s3d_CDrvGfxEng::TexProp_Mipmap;
+	if(SnkExtract.ExtractBool("texprop_float", true))
+		TexProp |= s3d_CDrvGfxEng::TexProp_Float;
+	if(SnkExtract.ExtractBool("texprop_signed", true))
+		TexProp |= s3d_CDrvGfxEng::TexProp_Signed;
+	if(SnkExtract.ExtractBool("texprop_restrusage", true))
+		TexProp |= s3d_CDrvGfxEng::TexProp_RestrUsage;
+	if(SnkExtract.ExtractBool("texprop_compressed", true))
+		TexProp |= s3d_CDrvGfxEng::TexProp_Compress;
+	if(SnkExtract.ExtractBool("texprop_dynamic", true))
+		TexProp |= s3d_CDrvGfxEng::TexProp_Dynamic;
+	if(SnkExtract.ExtractBool("texprop_alpha_mask", true))
+		TexProp |= s3d_CDrvGfxEng::TexProp_AlphaIsMask;
+
+	TexCompCnt = SnkExtract.ExtractInt("texprop_comp", true, TexCompCnt);
+	TexBitPComp = SnkExtract.ExtractInt("texprop_bitspercomp", true, TexBitPComp);
+
+	switch(TexCompCnt)
+	{
+		case 1:
+			TexProp |= s3d_CDrvGfxEng::TexProp_Comp1;
+			break;
+		case 2:
+			TexProp |= s3d_CDrvGfxEng::TexProp_Comp2;
+			break;
+		case 4:
+			TexProp |= s3d_CDrvGfxEng::TexProp_Comp4;
+			break;
+		default:
+			TexProp |= s3d_CDrvGfxEng::TexProp_Comp3;
+	}
+
+	switch(TexBitPComp)
+	{
+		case 16:
+			TexProp |= s3d_CDrvGfxEng::TexProp_BitsPerComp16;
+			break;
+		case 32:
+			TexProp |= s3d_CDrvGfxEng::TexProp_BitsPerComp32;
+			break;
+		default:
+			TexProp |= s3d_CDrvGfxEng::TexProp_BitsPerComp8;
+	}
+	
+	TexWidth = SnkExtract.ExtractInt("width", true, TexWidth);
+	TexHeight = SnkExtract.ExtractInt("height", true, TexHeight);
+	TexDepth = SnkExtract.ExtractInt("depth", true, TexDepth);
+	
+	
+	m_Data->m_TexProp = TexProp;
+	m_Data->m_TexWidth = TexWidth;
+	m_Data->m_TexHeight = TexHeight;
+	m_Data->m_TexDepth = TexDepth;
+
+   
+		
+   /* s3d_CCompSetup::SetupInitObj(
+            m_ShaderEnv->m_MsgHandler, Info, Tex, FetchSuppl, TexParam);
+    m_Data->m_Tex = Tex;*/
+
+    /*@{ @declare{shadercomp.param}{eng_shader_std.directtexchan.texchan_var}
+            {$ [str]}
+       Variable where texture is being stored in for use by shader components 
+       within this group.
+    @}*/
+    s3d_CUtilAtomPtr TexChanVarAtom;
+    s3d_CUtilStr TexChanInfo;
+    s3d_CUtilSnkExtractUtil::ExtractAtom(
+            m_Data->m_TexChanVarInfo, m_Data->m_TexChanVarAtom,
+            m_ShaderEnv->m_AtomMgr, SnkExtract, "texchan_var", true);
+
+    m_Data->m_SampMode = 0;
+
+    /*@{ @declare{shadercomp.param}
+            {eng_shader_std.directtexchan.samplermode_clamp}
+            {$ [bool]}
+    @}*/
+    if(SnkExtract.ExtractBool("samplermode_clamp", true))
+    {
+        m_Data->m_SampMode |= s3d_CDrvGfxEng::SampMode_ClampX;
+        m_Data->m_SampMode |= s3d_CDrvGfxEng::SampMode_ClampY;
+    }
+
+    /*@{ @declare{shadercomp.param}
+            {eng_shader_std.directtexchan.samplermode_filter}
+            {$ [bool]}
+    @}*/
+    if(SnkExtract.ExtractBool("samplermode_filter", true))
+        m_Data->m_SampMode |= s3d_CDrvGfxEng::SampMode_Filter;
+
+    SnkExtract.CheckForUnknown();
+}
+
+void gtp_ShaderCreateTex::SetupDone()
+{
+}
+
+s3d_CUtilStr gtp_ShaderCreateTex::GetInfo()
+{
+    return m_Data->m_Info;
+}
+
+void gtp_ShaderCreateTex::RegisterNotif(
+        s3d_CUtilNotifRecip *Recip)
+{
+}
+
+s3d_CEngShaderGfxPtr gtp_ShaderCreateTex::FindShaderGfx(
+        s3d_CUtilNotifGather *NotifGather, s3d_CEngGfxCtx *GfxCtx)
+{
+    if(!m_ShaderEnv)
+        return 0;
+
+    gtp_ShaderCreateTexGfxPtr ShaderGfx;
+    gtp_ShaderCreateTexGfxTree::CNode *Pos
+            = s3d_UtilTreeSortedGetStart(m_ShaderGfxTree, GfxCtx);
+    if(s3d_UtilTreeIsEqualAt(Pos, GfxCtx))
+        ShaderGfx = Pos->m_Data.m_Val;
+    else
+    {
+        ShaderGfx = S3D_SYS_NEW gtp_ShaderCreateTexGfx(
+                m_ShaderEnv, GfxCtx, m_Data);
+        gtp_ShaderCreateTexGfxTree::CNode *Node
+                = ShaderGfx->GetNode();
+        m_ShaderGfxTree.InsertBefore(Pos, Node);
+    }
+    return ShaderGfx.Get();
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+gtp_ShaderCreateTexGfx::gtp_ShaderCreateTexGfx(
+        s3d_CEngShaderEnv *ShaderEnv,
+        s3d_CEngGfxCtx *GfxCtx,
+        gtp_ShaderCreateTexData *Data)
+{
+    m_Node.m_Data.m_Key = GfxCtx;
+    m_Node.m_Data.m_Val = this;
+    m_ShaderEnv = ShaderEnv;
+    m_Data = Data;
+
+	
+}
+
+gtp_ShaderCreateTexGfxTree::CNode 
+        *gtp_ShaderCreateTexGfx::GetNode()
+{
+    return &m_Node;
+}
+
+void gtp_ShaderCreateTexGfx::RegisterNotif(
+        s3d_CUtilNotifRecip *Recip)
+{
+}
+
+void gtp_ShaderCreateTexGfx::ExtractGfx()
+{
+    m_Node.Extract();
+}
+
+bool gtp_ShaderCreateTexGfx::IsValid()
+{
+    return true;
+}
+
+void gtp_ShaderCreateTexGfx::LinkCollect(
+        s3d_CUtilAtomSet &VarAtomSet)
+{
+    s3d_CDrvUtilVarUtil::LinkCollect(
+            VarAtomSet, m_Data->m_TexChanVarAtom);
+}
+
+void gtp_ShaderCreateTexGfx::LinkAppoint(
+        s3d_CDrvVarDecl *VarDecl)
+{
+    s3d_CDrvUtilVarUtil::LinkAppoint(
+            m_TexChanVarSlot.m_Val,
+            VarDecl, m_Data->m_TexChanVarAtom);   
+}
+
+s3d_CEngShaderInstPtr gtp_ShaderCreateTexGfx::CreateShaderInst(
+        s3d_CEngShaderHead *Head)
+{
+    return S3D_SYS_NEW gtp_ShaderCreateTexInst(
+            m_ShaderEnv, this);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+gtp_ShaderCreateTexInst::gtp_ShaderCreateTexInst(
+        s3d_CEngShaderEnv *ShaderEnv,
+        gtp_ShaderCreateTexGfx *ShaderGfx)
+{
+    m_ShaderEnv = ShaderEnv;
+    m_ShaderGfx = ShaderGfx;
+
+	 s3d_CDrvGfxTexPtr Tex = 
+		 m_ShaderGfx->m_Node.m_Data.m_Key->m_GfxEng->
+				   CreateTexDirect( m_ShaderGfx->m_Data->m_Info, 
+									m_ShaderGfx->m_Data->m_TexProp,
+									m_ShaderGfx->m_Data->m_TexWidth,
+									m_ShaderGfx->m_Data->m_TexHeight,
+									m_ShaderGfx->m_Data->m_TexDepth);
+
+	 m_TexGfx = m_ShaderGfx->m_Data->m_Tex = Tex;
+}
+
+void gtp_ShaderCreateTexInst::RegisterNotif(
+        s3d_CUtilNotifRecip *Recip)
+{
+}
+
+void gtp_ShaderCreateTexInst::SetShaderCtx(
+        s3d_CEngShaderCtx *ShaderCtx)
+{
+}
+
+void gtp_ShaderCreateTexInst::SetGfxState(
+        s3d_CEngGfxState *GfxState)
+{
+}
+
+void gtp_ShaderCreateTexInst::SetPos(s3d_CEngPos *Pos)
+{
+}
+
+void gtp_ShaderCreateTexInst::SetModel(s3d_CEngModel *Model)
+{
+}
+
+void gtp_ShaderCreateTexInst::ArrangeCollect(
+        s3d_CUtilMemPool *MemPool, 
+        s3d_CEngShaderScopeArray &ScopeArray)
+{
+}
+
+void gtp_ShaderCreateTexInst::ArrangeInit(
+        s3d_CUtilMemPool *MemPool, 
+        s3d_CEngShaderScopeArray_cr ScopeArray)
+{
+    s3d_CSysIntps nScope = ScopeArray.GetCnt();
+    s3d_CSysIntps iScope;
+    for(iScope = 0; iScope < nScope; iScope++)
+    {
+        s3d_CEngShaderScope *Scope = ScopeArray.GetAt(iScope);
+        SetVars(MemPool, Scope);
+    }
+}
+
+void gtp_ShaderCreateTexInst::ArrangePerform(
+        s3d_CUtilMemPool *MemPool, 
+        s3d_CEngShaderScopeArray_cr ScopeArray)
+{
+}
+
+void gtp_ShaderCreateTexInst::ArrangeFeedback(
+        s3d_CUtilMemPool *MemPool, 
+        s3d_CEngShaderScopeArray_cr ScopeArray)
+{
+}
+
+void gtp_ShaderCreateTexInst::ArrangeGather(
+        s3d_CEngShaderExecArray &ExecArray)
+{
+    gtp_ShaderCreateTexData *Data = m_ShaderGfx->m_Data;
+
+    s3d_CEngUtilShaderUtil::ArrangeGather(
+            ExecArray, Data->m_MethodArray, this);
+}
+
+void gtp_ShaderCreateTexInst::ShaderExecPerform(
+        s3d_CEngShaderScope *Scope, 
+        s3d_CUtilAtom *Method,
+        s3d_CEngGfxTaskArray &TaskArray)
+{
+    SetVars(m_ShaderEnv->m_MemPool, Scope);
+}
+
+void gtp_ShaderCreateTexInst::SetVars(
+        s3d_CUtilMemPool *MemPool, s3d_CEngShaderScope *Scope)
+{
+    gtp_ShaderCreateTexGfx *ShaderGfx = m_ShaderGfx;
+    gtp_ShaderCreateTexData *Data = ShaderGfx->m_Data;
+
+    s3d_CDrvVarSlot TexChanVarSlot = ShaderGfx->m_TexChanVarSlot;
+    if(TexChanVarSlot >= 0)
+    {
+        s3d_CEngGfxVarTexChan *TexChanVar = 
+                new(MemPool) s3d_CEngGfxVarTexChan;
+
+        s3d_CEngTexChan *TexChan = &TexChanVar->m_Val;
+        TexChan->m_FixedDrvTex = 0;
+        s3d_CDrvGfxTexPtr TexGfx = m_TexGfx;
+        if(TexGfx)
+            TexChan->m_FixedDrvTex = TexGfx;
+        TexChan->m_FixedSampMode = Data->m_SampMode;
+
+        s3d_DrvVarSet(Scope->m_VarBlk, TexChanVarSlot, TexChanVar);
+    }
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader.h
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader.h	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader.h	(revision 2453)
@@ -0,0 +1,34 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+//@cpp
+
+#ifndef S3D_ENG_SHADER_SPECIAL_H
+#define S3D_ENG_SHADER_SPECIAL_H
+
+#include "eng_shader_special_public.h"
+#include "../../interf/eng_shader.h"
+#include "../../../comp/core/comp_module.h"
+#include "../../../comp/core/comp_setup.h"
+
+///////////////////////////////////////////////////////////////////////////////
+
+//@
+S3D_ENG_SHADER_SPECIAL_PUBLIC_DECL 
+s3d_CCompSupplPtr gtp_ShaderCompSupplCreate();
+        
+S3D_COMP_MODULE_ENTRANCE_DECL_STD(s3d_ModuleEntrance_eng_shader_special);
+
+///////////////////////////////////////////////////////////////////////////////
+
+#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_focusedprojmat.cpp
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_focusedprojmat.cpp	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_focusedprojmat.cpp	(revision 2453)
@@ -0,0 +1,393 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+//@cpp
+
+#include "gtp_shader_focusedprojmat.h"
+#include "../../util/eng_util_gfxutil.h"
+#include "../../util/eng_util_shaderutil.h"
+#include "../../util/eng_util_mathutil.h"
+#include "../../../drv/interf/drv_vartypes.h"
+#include "../../../drv/util/drv_util_varutil.h"
+#include "../../../util/snk/util_snk_extractutil.h"
+#include "../../../util/math/util_geo_types.h"
+
+///////////////////////////////////////////////////////////////////////////////
+/*@{ 
+
+@declare{shadercomp.class}{eng_shader_special.worldmat}{}
+
+Provides a matrix which maps from view coordinates
+in world coordinates.
+@p
+
+Important warning!
+Usually, if you need this matrix something is wrong!
+See @ref{prog_man.shader.coord_systems}.
+@p
+
+@}*/
+///////////////////////////////////////////////////////////////////////////////
+
+S3D_UTIL_RTTI_TABLE_DEFINE_BEGIN(gtp_Shader_FocusedProjMat)
+S3D_UTIL_RTTI_TABLE_DEFINE_BASE(s3d_CEngShader)
+S3D_UTIL_RTTI_TABLE_DEFINE_BASE(s3d_CCompUtilUniqueBase)
+S3D_UTIL_RTTI_TABLE_DEFINE_BASE(s3d_CCompSetup)
+S3D_UTIL_RTTI_TABLE_DEFINE_END
+
+gtp_Shader_FocusedProjMat::gtp_Shader_FocusedProjMat()
+{
+}
+
+void gtp_Shader_FocusedProjMat::SetupInit(
+        s3d_CUtilMsgHandler *MsgHandler, s3d_CUtilStr_cr Info,
+        s3d_CCompSuppl *FetchSuppl, s3d_CUtilSnkChunk *Param)
+{
+    m_Data = S3D_SYS_NEW gtp_Shader_FocusedProjMatData;
+
+    s3d_CUtilSnkExtract SnkExtract;
+    SnkExtract.Assign(MsgHandler, Param);
+    m_Data->m_Info = SnkExtract.GetInfo();
+
+    /*@{ @declare{shadercomp.param}{eng_shader_special.worldmat.env}{$ [str]}
+        See @ident{comp}{eng_shader_std.group.env}.
+    @}*/
+    s3d_CUtilStr EnvIdent, EnvInfo;
+    SnkExtract.ExtractStr(EnvInfo, EnvIdent, "env", true);
+
+    m_ShaderEnv = s3d_CompSupplObjT<s3d_CEngShaderEnv>(
+            MsgHandler, EnvInfo, FetchSuppl, 
+            EnvIdent, S3D_GENERAL_INTEROP_INTERF);
+    if(!m_ShaderEnv)
+        return;
+
+    /*@{ @declare{shadercomp.param}{eng_shader_special.worldmat.methods}
+            {$ [str] .. [str]}
+        See @ref{prog_man.shader.methods}.
+    @}*/
+    s3d_CUtilSnkExtractUtil::ExtractAtomSortedArray(
+            m_Data->m_MethodArray, m_ShaderEnv->m_AtomMgr, 
+            SnkExtract, "methods", true);
+
+    /*@{ @declare{shadercomp.param}
+            {eng_shader_special.worldmat.worldmat_var}{$ [str]}
+        The variable stores the resulting matrix.
+        The variable is of type mat4x4f. 
+    @}*/
+    s3d_CUtilSnkExtractUtil::ExtractAtom(
+            m_Data->m_FocusedProjMatVarInfo, m_Data->m_FocusedProjMatVarAtom,
+            m_ShaderEnv->m_AtomMgr, SnkExtract, "destmat_var", true);	
+
+	/*@{ @declare{shader.param}{eng_shader_special.envmap.mesh_var}{$ [str]}
+    @}*/
+    s3d_CUtilSnkExtractUtil::ExtractAtom(
+            m_Data->m_MeshVarInfo, m_Data->m_MeshVarAtom, 
+            m_ShaderEnv->m_AtomMgr, SnkExtract, "mesh_var", true);
+
+	s3d_CUtilSnkExtractUtil::ExtractAtom(
+            m_Data->m_CenterPointVarInfo, m_Data->m_CenterPointVarAtom,
+            m_ShaderEnv->m_AtomMgr, SnkExtract, "centerpoint_var", true);
+
+    SnkExtract.CheckForUnknown();
+}
+
+void gtp_Shader_FocusedProjMat::SetupDone()
+{
+}
+
+s3d_CUtilStr gtp_Shader_FocusedProjMat::GetInfo()
+{
+    return m_Data->m_Info;
+}
+
+void gtp_Shader_FocusedProjMat::RegisterNotif(s3d_CUtilNotifRecip *Recip)
+{
+}
+
+s3d_CEngShaderGfxPtr gtp_Shader_FocusedProjMat::FindShaderGfx(
+        s3d_CUtilNotifGather *NotifGather, s3d_CEngGfxCtx *GfxCtx)
+{
+    if(!m_ShaderEnv)
+        return 0;
+
+    gtp_Shader_FocusedProjMatGfxPtr ShaderGfx;
+
+    gtp_Shader_FocusedProjMatGfxTree::CNode *Pos
+            = s3d_UtilTreeSortedGetStart(m_ShaderGfxTree, GfxCtx);
+    if(s3d_UtilTreeIsEqualAt(Pos, GfxCtx))
+        ShaderGfx = Pos->m_Data.m_Val;
+    else
+    {
+        ShaderGfx = S3D_SYS_NEW gtp_Shader_FocusedProjMatGfx(
+                m_ShaderEnv, GfxCtx, m_Data);
+        gtp_Shader_FocusedProjMatGfxTree::CNode *Node
+                = ShaderGfx->GetNode();
+        m_ShaderGfxTree.InsertBefore(Pos, Node);
+    }
+    return ShaderGfx.Get();
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+gtp_Shader_FocusedProjMatGfx::gtp_Shader_FocusedProjMatGfx(
+        s3d_CEngShaderEnv *ShaderEnv, s3d_CEngGfxCtx *GfxCtx,
+        gtp_Shader_FocusedProjMatData *Data)
+{
+    m_Node.m_Data.m_Key = GfxCtx;
+    m_Node.m_Data.m_Val = this;
+    m_ShaderEnv = ShaderEnv;
+    m_Data = Data;
+}
+
+gtp_Shader_FocusedProjMatGfxTree::CNode *
+        gtp_Shader_FocusedProjMatGfx::GetNode()
+{
+    return &m_Node;
+}
+
+void gtp_Shader_FocusedProjMatGfx::RegisterNotif(
+        s3d_CUtilNotifRecip *Recip)
+{
+}
+
+void gtp_Shader_FocusedProjMatGfx::ExtractGfx()
+{
+    m_Node.Extract();
+}
+
+bool gtp_Shader_FocusedProjMatGfx::IsValid()
+{
+    return true;
+}
+
+void gtp_Shader_FocusedProjMatGfx::LinkCollect(
+        s3d_CUtilAtomSet &VarAtomSet)
+{
+    s3d_CDrvUtilVarUtil::LinkCollect(
+            VarAtomSet, m_Data->m_FocusedProjMatVarAtom);
+	s3d_CDrvUtilVarUtil::LinkCollect(
+            VarAtomSet, m_Data->m_CenterPointVarAtom);
+	s3d_CDrvUtilVarUtil::LinkCollect(
+            VarAtomSet, m_Data->m_MeshVarAtom);    
+}
+
+void gtp_Shader_FocusedProjMatGfx::LinkAppoint(
+        s3d_CDrvVarDecl *VarDecl)
+{
+    s3d_CDrvUtilVarUtil::LinkAppoint(
+            m_FocusedProjMatVarSlot.m_Val, 
+            VarDecl, m_Data->m_FocusedProjMatVarAtom);
+	s3d_CDrvUtilVarUtil::LinkAppoint(
+            m_CenterPointVarSlot.m_Val, 
+            VarDecl, m_Data->m_CenterPointVarAtom);
+	s3d_CDrvUtilVarUtil::LinkAppoint(
+            m_MeshVarSlot.m_Val, 
+            VarDecl, m_Data->m_MeshVarAtom);
+}
+
+s3d_CEngShaderInstPtr gtp_Shader_FocusedProjMatGfx::CreateShaderInst(
+        s3d_CEngShaderHead *Head)
+{
+    return S3D_SYS_NEW gtp_Shader_FocusedProjMatInst(
+            m_ShaderEnv, this);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+gtp_Shader_FocusedProjMatInst::gtp_Shader_FocusedProjMatInst(
+        s3d_CEngShaderEnv *ShaderEnv, 
+        gtp_Shader_FocusedProjMatGfx *ShaderGfx)
+{
+    m_ShaderEnv = ShaderEnv;
+    m_ShaderGfx = ShaderGfx;
+}
+
+void gtp_Shader_FocusedProjMatInst::RegisterNotif(
+        s3d_CUtilNotifRecip *Recip)
+{
+}
+
+void gtp_Shader_FocusedProjMatInst::SetShaderCtx(
+        s3d_CEngShaderCtx *ShaderCtx)
+{
+}
+
+void gtp_Shader_FocusedProjMatInst::SetGfxState(s3d_CEngGfxState *GfxState)
+{
+}
+
+void gtp_Shader_FocusedProjMatInst::SetPos(s3d_CEngPos *Pos)
+{
+    m_Pos = Pos;
+}
+
+void gtp_Shader_FocusedProjMatInst::SetModel(s3d_CEngModel *Model)
+{
+}
+
+void gtp_Shader_FocusedProjMatInst::ArrangeCollect(
+        s3d_CUtilMemPool *MemPool, 
+        s3d_CEngShaderScopeArray &ScopeArray)
+{
+}
+
+void gtp_Shader_FocusedProjMatInst::ArrangeInit(
+        s3d_CUtilMemPool *MemPool, 
+        s3d_CEngShaderScopeArray_cr ScopeArray)
+{
+    s3d_CSysIntps nScope = ScopeArray.GetCnt();
+    s3d_CSysIntps iScope;
+    for(iScope = 0; iScope < nScope; iScope++)
+    {
+        s3d_CEngShaderScope *Scope = ScopeArray.GetAt(iScope);
+        SetVars(MemPool, Scope);
+    }
+}
+
+void gtp_Shader_FocusedProjMatInst::ArrangePerform(
+        s3d_CUtilMemPool *MemPool, 
+        s3d_CEngShaderScopeArray_cr ScopeArray)
+{
+}
+
+void gtp_Shader_FocusedProjMatInst::ArrangeFeedback(
+        s3d_CUtilMemPool *MemPool, 
+        s3d_CEngShaderScopeArray_cr ScopeArray)
+{
+}
+
+void gtp_Shader_FocusedProjMatInst::ArrangeGather(
+        s3d_CEngShaderExecArray &ExecArray)
+{
+    gtp_Shader_FocusedProjMatData *Data = m_ShaderGfx->m_Data;
+
+    s3d_CEngUtilShaderUtil::ArrangeGather(
+            ExecArray, Data->m_MethodArray, this);
+}
+
+void gtp_Shader_FocusedProjMatInst::ShaderExecPerform(
+        s3d_CEngShaderScope *Scope, 
+        s3d_CUtilAtom *Method,
+        s3d_CEngGfxTaskArray &TaskArray)
+{
+	gtp_Shader_FocusedProjMatGfx *ShaderGfx = m_ShaderGfx;
+    gtp_Shader_FocusedProjMatData *Data = ShaderGfx->m_Data;
+	
+	
+
+    SetVars(m_ShaderEnv->m_MemPool, Scope);
+}
+
+void gtp_Shader_FocusedProjMatInst::SetVars(
+        s3d_CUtilMemPool *MemPool, s3d_CEngShaderScope *Scope)
+{
+    gtp_Shader_FocusedProjMatGfx *ShaderGfx = m_ShaderGfx;
+    gtp_Shader_FocusedProjMatData *Data = ShaderGfx->m_Data;
+
+
+
+
+    s3d_CDrvVarSlot ProjMatVarSlot = ShaderGfx->m_FocusedProjMatVarSlot;
+    if(ProjMatVarSlot >= 0)
+    {
+        s3d_CEngGfxPortion *Portion = Scope->m_Portion;
+		if(Portion)
+		{
+			s3d_CEngGfxCam *Cam = &Portion->m_Cam;
+			s3d_CEngGfxVarMesh *MeshVar = s3d_EngGfxVarFetchWaryMesh(
+            m_ShaderEnv->m_MsgHandler, Scope->m_Info, 
+            Scope->m_VarBlk, m_ShaderGfx->m_MeshVarSlot.m_Val);
+			if(!MeshVar)
+				return;
+
+			s3d_CDrvVarVec4f *CenterPointVar
+				= s3d_DrvVarFetchWaryVec4f(
+					m_ShaderEnv->m_MsgHandler, Data->m_CenterPointVarInfo.GetChars(), 
+					Scope->m_VarBlk, ShaderGfx->m_CenterPointVarSlot.m_Val);
+			if(!CenterPointVar)
+				return;
+
+            s3d_CUtilTranslQuatf viewToWorld = Cam->m_Transf;
+			s3d_CUtilTranslQuatf modelToView = MeshVar->m_Val.m_ViewTransf;
+			
+			s3d_CUtilVec3f BoundCen = MeshVar->m_Val.m_MeshCompos.m_BoundCen;
+			s3d_CUtilVec3f BoundCenView = modelToView.ApplyToPoint(BoundCen);
+			
+			s3d_CUtilVec3f BoundExt = MeshVar->m_Val.m_MeshCompos.m_BoundExt;			
+			s3d_CUtilVec3f CenterPositionView = s3d_CUtilVec3f(CenterPointVar->m_Val.m_x,
+														       CenterPointVar->m_Val.m_y,
+														       CenterPointVar->m_Val.m_z);
+			
+		    s3d_CUtilVec3f DirView = (BoundCenView - CenterPositionView);
+			float d = DirView.GetLen();
+			float r = BoundExt.GetLen();
+			DirView = DirView.GetNormalized();
+			
+			if(d < 1.5 * r)
+			{
+				d = 1.5 * r;								
+				CenterPositionView = BoundCenView - DirView * d;				
+			}			
+			float NearPlane = d - r;
+			float FarPlane = d + r;
+			
+			float cotanFov = 1.0 / s3d_SysTan(s3d_SysAsin(r / d));
+			float Q = FarPlane / (FarPlane - NearPlane);
+			s3d_CUtilMat4x4f lightProjMat(cotanFov,        0, 0,            0,
+				                                 0, cotanFov, 0,            0,
+									             0,        0, Q, -Q*NearPlane,
+									             0,        0, 1,            0);
+			//float tanFov = s3d_SysTan(s3d_SysAsin(r / d));
+			//s3d_CUtilMat4x4f lightProjMat = s3d_CEngUtilMathUtil::CalcProjPersp( tanFov, tanFov, 0, 0, NearPlane, FarPlane);
+           
+			/*CenterPositionView = BoundCenView - DirView * r;
+			s3d_CUtilMat4x4f lightProjMat(1.0 / r,       0,       0, 0,
+				                                0, 1.0 / r,       0, 0,
+									            0,       0, 0.5 / r, 0,
+									            0,       0,       0, 1);*/
+
+			s3d_CUtilMat4x4f worldToViewMatIT = s3d_CUtilGeof::GetMapOfTransf3(viewToWorld);
+            worldToViewMatIT = worldToViewMatIT.GetTransp();
+
+			s3d_CUtilVec4f upView4 = worldToViewMatIT * s3d_CUtilVec4f(0,0,-1,1);
+			s3d_CUtilVec3f upView(upView4.m_x, upView4.m_y, upView4.m_z);
+            upView = upView.GetNormalized();
+			s3d_CUtilVec3f rightView = upView^DirView;
+			rightView = rightView.GetNormalized();
+			upView = DirView^rightView;
+			upView = upView.GetNormalized();
+			
+			s3d_CUtilMat4x4f viewToLightViewMatRot(rightView.m_x, rightView.m_y, rightView.m_z, 0,
+				                                   upView.m_x,    upView.m_y,    upView.m_z,    0,
+									               DirView.m_x,   DirView.m_y,   DirView.m_z,   0,
+									               0,             0,             0,             1);
+			s3d_CUtilMat4x4f viewToLightViewMatTransl(1, 0, 0, -CenterPositionView.m_x,
+				                                       0, 1, 0, -CenterPositionView.m_y,
+									                   0, 0, 1, -CenterPositionView.m_z,
+									                   0, 0, 0,  1);
+			
+			s3d_CUtilMat4x4f viewToLightViewMat = viewToLightViewMatRot * viewToLightViewMatTransl;
+			
+			s3d_CUtilMat4x4f FinalMat = lightProjMat * viewToLightViewMat;	
+
+			s3d_CUtilVec4f temp  = FinalMat * s3d_CUtilVec4f(1,0,0,1);
+			
+			s3d_CDrvVarMat4x4f *FinalMatVar = new(MemPool) s3d_CDrvVarMat4x4f;
+			FinalMatVar->m_Val = FinalMat;
+			s3d_DrvVarSet(Scope->m_VarBlk, ProjMatVarSlot, FinalMatVar);
+		}
+    }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_module.cpp
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_module.cpp	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_module.cpp	(revision 2453)
@@ -0,0 +1,86 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+//@cpp
+
+#include "gtp_shader_module.h"
+#include "gtp_shader_envmap.h"
+#include "gtp_shader_focusedprojmat.h"
+#include "eng_shader_special_worldmat.h"
+#include "gtp_shader_mainenum.h"
+#include "gtp_shader_createtex.h"
+#include "gtp_shader_cubetexfilter.h"
+#include "gtp_shader_causticcube.h"
+#include "../../util/eng_util_shaderutil.h"
+#include "../../../general/general_def.h"
+
+///////////////////////////////////////////////////////////////////////////////
+/*@{ 
+
+@declare{mod.mod}{eng_shader_special}{}
+
+Special shaders.
+@p
+
+@}*/
+///////////////////////////////////////////////////////////////////////////////
+
+s3d_CCompObjPtr gtp_ShaderModuleSuppl::SupplObj(
+                s3d_CUtilMsgHandler *MsgHandler, s3d_CUtilStr_cr Info,
+                s3d_CUtilStr_cr Ident, s3d_CUtilStr_cr Version)
+{
+    if(!s3d_CompSupplCheckVersion(
+            MsgHandler, Info, Ident, S3D_GENERAL_INTEROP_INTERF, Version))
+        return 0;
+
+
+    if(Ident == "envmap")
+        return S3D_SYS_NEW gtp_Shader_EnvMap();
+	if(Ident == "createtex")
+	    return S3D_SYS_NEW gtp_ShaderCreateTex();
+	if(Ident == "worldmat")
+	    return S3D_SYS_NEW s3d_CEngShaderSpecialWorldMat();
+	if(Ident == "cubetexfilter")
+		return S3D_SYS_NEW gtp_Shader_CubeTexFilter();
+	if(Ident == "mainenum")
+		return S3D_SYS_NEW gtp_Shader_MainEnum();
+	if(Ident == "focusedprojmat")
+		return S3D_SYS_NEW gtp_Shader_FocusedProjMat();
+	if(Ident == "causticcube")
+		return S3D_SYS_NEW gtp_Shader_CausticCube();
+   
+    s3d_CompSupplUnknownIdent(MsgHandler, Info, Ident);
+    return 0;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+s3d_CUtilStr gtp_ShaderModuleCover::GetName() const
+{
+    return "gtp_shader";
+}
+
+s3d_CUtilStr gtp_ShaderModuleCover::GetAbout() const
+{
+    return S3D_GENERAL_IDENT_EXE;
+}
+
+s3d_CCompSupplPtr gtp_ShaderModuleCover::CreateSuppl(
+                s3d_CUtilMsgHandler *MsgHandler, s3d_CUtilStr_cr Info,
+                const s3d_CUtilSnkChunk *Param) const
+{
+    return S3D_SYS_NEW gtp_ShaderModuleSuppl;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_envmap.cpp
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_envmap.cpp	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_envmap.cpp	(revision 2453)
@@ -0,0 +1,647 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+//@cpp
+
+#include "gtp_shader_envmap.h"
+#include "gtp_shader_opticsutil.h"
+#include "../../interf/eng_pos.h"
+#include "../../interf/eng_gfxvar.h"
+#include "../../interf/eng_gfxport.h"
+#include "../../util/eng_util_gfxutil.h"
+#include "../../util/eng_util_gfxbegin.h"
+#include "../../util/eng_util_gfxelemjobbegin.h"
+#include "../../util/eng_util_mathutil.h"
+#include "../../util/eng_util_shaderutil.h"
+#include "../../util/eng_util_shaderitemjob.h"
+#include "../../../drv/interf/drv_vartypes.h"
+#include "../../../drv/util/drv_util_varutil.h"
+#include "../../../drv/util/drv_util_gfxutil.h"
+#include "../../../util/math/util_geo_types.h"
+#include "../../../util/snk/util_snk_extractutil.h"
+
+///////////////////////////////////////////////////////////////////////////////
+/*@{ 
+
+@declare{shader.class}{gtp_shader.envmap}{}
+
+@}*/
+///////////////////////////////////////////////////////////////////////////////
+
+S3D_UTIL_RTTI_TABLE_DEFINE_BEGIN(gtp_Shader_EnvMap)
+S3D_UTIL_RTTI_TABLE_DEFINE_BASE(s3d_CEngShader)
+S3D_UTIL_RTTI_TABLE_DEFINE_BASE(s3d_CCompUtilUniqueBase)
+S3D_UTIL_RTTI_TABLE_DEFINE_BASE(s3d_CCompSetup)
+S3D_UTIL_RTTI_TABLE_DEFINE_END
+
+gtp_Shader_EnvMap::gtp_Shader_EnvMap()
+{
+}
+
+void gtp_Shader_EnvMap::SetupInit(
+        s3d_CUtilMsgHandler *MsgHandler, s3d_CUtilStr_cr Info,
+        s3d_CCompSuppl *FetchSuppl, s3d_CUtilSnkChunk *Param)
+{
+    m_Data = S3D_SYS_NEW gtp_Shader_EnvMapData;
+
+    s3d_CUtilSnkExtract SnkExtract;
+    SnkExtract.Assign(MsgHandler, Param);
+    m_Data->m_Info = SnkExtract.GetInfo();
+    
+    /*@{ @declare{shader.param}{eng_shader_special.envmap.env}{$ [str]}
+    @}*/
+    s3d_CUtilStr EnvIdent, EnvInfo;
+    SnkExtract.ExtractStr(EnvInfo, EnvIdent, "env", true);
+
+    m_ShaderEnv = s3d_CompSupplObjT<s3d_CEngShaderEnv>(
+            MsgHandler, EnvInfo, FetchSuppl, 
+            EnvIdent, S3D_GENERAL_INTEROP_INTERF);
+    if(!m_ShaderEnv)
+        return;
+
+    /*@{ @declare{shader.param}{eng_shader_special.envmap.methods}
+            {$ [str] .. [str]}
+    @}*/
+    s3d_CUtilSnkExtractUtil::ExtractAtomSortedArray(
+            m_Data->m_MethodArray, m_ShaderEnv->m_AtomMgr, 
+            SnkExtract, "methods", true);
+
+    /*@{ @declare{shader.param}{eng_shader_special.envmap.rank}{$ [int]}
+        See @ref{prog_man.shader.ranks}.
+    @}*/
+    SnkExtract.ExtractInt(
+            m_Data->m_RankInfo, m_Data->m_Rank, "rank", true);
+
+    /*@{ @declare{shader.param}{eng_shader_special|envmap.proj_neg_z}
+            {$ [float]} 
+        See @ident{comp}{kit_engbase.gfxport}. 
+    @}*/
+    m_Data->m_NegZ = SnkExtract.ExtractFloat("proj_neg_z", true);
+
+    /*@{ @declare{shader.param}{eng_shader_special|envmap.proj_pos_z}
+            {$ [float]} 
+        See @ident{comp}{kit_engbase.gfxport}. 
+    @}*/
+    m_Data->m_PosZ = SnkExtract.ExtractFloat("proj_pos_z", true);
+
+    /*@{ @declare{shader.param}{eng_shader_special|envmap.max_ext}{$ [int]} 
+        Maximal texture width and heigth. 
+    @}*/
+    m_Data->m_MaxExt = SnkExtract.ExtractInt("max_ext", true);
+
+    /*@{ @declare{shader.param}{eng_shader_special|envmap.ext_dist_scale}
+            {$ [float]} 
+        Distance factor.
+        At larger distance a smaller texture is used.
+        If this factor is larger, a larger texture is used
+        also at larger distances.
+        Note that the texture is never larger than
+        @ident{comp}{eng_shader_special|envmap.max_ext}.
+    @}*/
+    m_Data->m_ExtDistScale = SnkExtract.ExtractFloat("ext_dist_scale", true);
+
+    /*@{ @declare{shader.param}{eng_shader_special.envmap.max_recursion}
+            {$ [int]} 
+        See @ident{comp}{eng_shader_special.opticsdirect.max_recursion}. 
+    @}*/
+    m_Data->m_MaxRecursion = SnkExtract.ExtractInt("max_recursion", true);
+
+    /*@{ @declare{shader.param}{eng_shader_special.envmap.enum_trigger}
+            {$ [str]}
+        Trigger used for rendering the mirror image.
+    @}*/
+    m_Data->m_EnumTrigger = s3d_CUtilSnkExtractUtil::ExtractAtom(
+            m_ShaderEnv->m_AtomMgr, SnkExtract, "enum_trigger", true);
+
+    /*@{ @declare{shader.param}{eng_shader_special.envmap.mesh_var}{$ [str]}
+    @}*/
+    s3d_CUtilSnkExtractUtil::ExtractAtom(
+            m_Data->m_MeshVarInfo, m_Data->m_MeshVarAtom, 
+            m_ShaderEnv->m_AtomMgr, SnkExtract, "mesh_var", true);
+
+    m_Data->m_DestProp = 0;
+
+    /*@{ @declare{shader.param}
+            {eng_shader_special.envmap.destprop_antialias}{$ [bool]}
+        Render the main rendering
+        of @ident{comp}{eng_shader_special.envmap.dest_array} 
+        with antialiasing.
+    @}*/
+    if(SnkExtract.ExtractBool("destprop_antialias", true))
+        m_Data->m_DestProp |= s3d_CDrvGfxEng::DestProp_Antialias;
+
+    /*@{ @declare{shader.param}{eng_shader_special.envmap.dest_array}
+            {$ [chunk]..[chunk]}
+        See @ident{comp}{<dest_array>}.
+    @}*/
+    s3d_CUtilSnkChunkArray DestChunkArray;
+    SnkExtract.ExtractChunkArray(DestChunkArray, "dest_array", true);
+
+	m_Data->m_UpdateAllFace = SnkExtract.ExtractBool("update_all_face", true, true);
+	m_Data->m_WorldSpace = SnkExtract.ExtractBool("world_space", true, false);
+	m_Data->m_UpdateInterval = SnkExtract.ExtractInt("update_interval", true, 1);
+	m_Data->m_StartFrame = SnkExtract.ExtractInt("start_frame", true, 0);
+	
+	s3d_CUtilSnkExtractUtil::ExtractAtom(
+    m_Data->m_LastCenterVarInfo, m_Data->m_LastCenterVarAtom, 
+    m_ShaderEnv->m_AtomMgr, SnkExtract, "last_center_var", true);
+
+    SnkExtract.CheckForUnknown();
+
+    int ExtraTexProp = s3d_CDrvGfxEng::TexProp_Cube;
+    int ExtraSampMode = 0;
+    m_Data->m_Dest.Init(m_ShaderEnv, ExtraTexProp, 
+            ExtraSampMode, DestChunkArray);
+}
+
+void gtp_Shader_EnvMap::SetupDone()
+{
+}
+
+s3d_CUtilStr gtp_Shader_EnvMap::GetInfo()
+{
+    return m_Data->m_Info;
+}
+
+void gtp_Shader_EnvMap::RegisterNotif(s3d_CUtilNotifRecip *Recip)
+{
+}
+
+s3d_CEngShaderGfxPtr gtp_Shader_EnvMap::FindShaderGfx(
+        s3d_CUtilNotifGather *NotifGather, s3d_CEngGfxCtx *GfxCtx)
+{
+    if(!m_ShaderEnv)
+        return 0;
+
+    gtp_Shader_EnvMapGfxPtr ShaderGfx;
+    gtp_Shader_EnvMapGfxTree::CNode *Pos
+            = s3d_UtilTreeSortedGetStart(m_ShaderGfxTree, GfxCtx);
+    if(s3d_UtilTreeIsEqualAt(Pos, GfxCtx))
+        ShaderGfx = Pos->m_Data.m_Val;
+    else
+    {
+        ShaderGfx = S3D_SYS_NEW gtp_Shader_EnvMapGfx(
+                m_ShaderEnv, GfxCtx, m_Data);
+        gtp_Shader_EnvMapGfxTree::CNode *Node
+                = ShaderGfx->GetNode();
+        m_ShaderGfxTree.InsertBefore(Pos, Node);
+    }
+    return ShaderGfx.Get();
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+gtp_Shader_EnvMapGfx::gtp_Shader_EnvMapGfx(
+        s3d_CEngShaderEnv *ShaderEnv,
+        s3d_CEngGfxCtx *GfxCtx,
+        gtp_Shader_EnvMapData *Data)
+{
+    m_Node.m_Data.m_Key = GfxCtx;
+    m_Node.m_Data.m_Val = this;
+    m_ShaderEnv = ShaderEnv;
+    m_Data = Data;
+
+    m_DestGfx.Init(ShaderEnv, GfxCtx);
+}
+
+gtp_Shader_EnvMapGfxTree::CNode 
+        *gtp_Shader_EnvMapGfx::GetNode()
+{
+    return &m_Node;
+}
+
+void gtp_Shader_EnvMapGfx::RegisterNotif(
+        s3d_CUtilNotifRecip *Recip)
+{
+}
+
+void gtp_Shader_EnvMapGfx::ExtractGfx()
+{
+    m_Node.Extract();
+}
+
+bool gtp_Shader_EnvMapGfx::IsValid()
+{
+    return true;
+}
+
+void gtp_Shader_EnvMapGfx::LinkCollect(
+        s3d_CUtilAtomSet &VarAtomSet)
+{
+    s3d_CDrvUtilVarUtil::LinkCollect(
+            VarAtomSet, m_Data->m_MeshVarAtom);
+    m_DestGfx.LinkCollect(VarAtomSet, m_Data->m_Dest);
+	
+	s3d_CDrvUtilVarUtil::LinkCollect(
+            VarAtomSet, m_Data->m_LastCenterVarAtom);
+}
+
+void gtp_Shader_EnvMapGfx::LinkAppoint(
+        s3d_CDrvVarDecl *VarDecl)
+{
+    s3d_CDrvUtilVarUtil::LinkAppoint(
+            m_MeshVarSlot.m_Val, 
+            VarDecl, m_Data->m_MeshVarAtom);
+    m_DestGfx.LinkAppoint(VarDecl, m_Data->m_Dest);
+
+	s3d_CDrvUtilVarUtil::LinkAppoint(
+            m_LastCenterVarSlot.m_Val,
+            VarDecl, m_Data->m_LastCenterVarAtom); 
+}
+
+s3d_CEngShaderInstPtr gtp_Shader_EnvMapGfx::CreateShaderInst(
+        s3d_CEngShaderHead *Head)
+{
+    s3d_CEngGfxCtx *GfxCtx = m_Node.m_Data.m_Key;
+    return S3D_SYS_NEW gtp_Shader_EnvMapInst(
+            m_ShaderEnv, GfxCtx, Head, this);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+gtp_Shader_EnvMapInst::gtp_Shader_EnvMapInst(
+        s3d_CEngShaderEnv *ShaderEnv,
+        s3d_CEngGfxCtx *GfxCtx, s3d_CEngShaderHead *Head,
+        gtp_Shader_EnvMapGfx *ShaderGfx)
+{
+	m_FrameCount = 0;
+	if(ShaderGfx->m_Data->m_UpdateInterval > 0)
+	m_FrameCount = ShaderGfx->m_Data->m_StartFrame 
+						% ShaderGfx->m_Data->m_UpdateInterval;
+	m_CurrentFace = 0;
+    m_ShaderEnv = ShaderEnv;
+    m_GfxCtx = GfxCtx;
+    m_Head = Head;
+    m_ShaderGfx = ShaderGfx;
+    m_CanRenderColorAlphaTex = false;
+    
+    if(GfxCtx)
+    {
+        if(s3d_CDrvUtilGfxUtil::HasCap(
+                GfxCtx->m_GfxEng, S3D_DRV_GFX_CAP_RENDER_TEX_COLORALPHA))
+            m_CanRenderColorAlphaTex = true;
+    }
+}
+
+void gtp_Shader_EnvMapInst::RegisterNotif(
+        s3d_CUtilNotifRecip *Recip)
+{
+}
+
+void gtp_Shader_EnvMapInst::SetShaderCtx(
+        s3d_CEngShaderCtx *ShaderCtx)
+{
+}
+
+void gtp_Shader_EnvMapInst::SetGfxState(
+        s3d_CEngGfxState *GfxState)
+{
+}
+
+void gtp_Shader_EnvMapInst::SetPos(s3d_CEngPos *Pos)
+{
+}
+
+void gtp_Shader_EnvMapInst::SetModel(s3d_CEngModel *Model)
+{
+}
+
+void gtp_Shader_EnvMapInst::ArrangeCollect(
+        s3d_CUtilMemPool *MemPool, 
+        s3d_CEngShaderScopeArray &ScopeArray)
+{
+}
+
+void gtp_Shader_EnvMapInst::ArrangeInit(
+        s3d_CUtilMemPool *MemPool, 
+        s3d_CEngShaderScopeArray_cr ScopeArray)
+{
+	s3d_CSysIntps nScope = ScopeArray.GetCnt();
+    s3d_CSysIntps iScope;
+    for(iScope = 0; iScope < nScope; iScope++)
+    {
+        s3d_CEngShaderScope *Scope = ScopeArray.GetAt(iScope);
+        SetVars(MemPool, Scope);
+    }
+}
+
+void gtp_Shader_EnvMapInst::ArrangePerform(
+        s3d_CUtilMemPool *MemPool, 
+        s3d_CEngShaderScopeArray_cr ScopeArray)
+{
+}
+
+void gtp_Shader_EnvMapInst::ArrangeFeedback(
+        s3d_CUtilMemPool *MemPool, 
+        s3d_CEngShaderScopeArray_cr ScopeArray)
+{
+}
+
+void gtp_Shader_EnvMapInst::ArrangeGather(
+        s3d_CEngShaderExecArray &ExecArray)
+{
+    gtp_Shader_EnvMapData *Data = m_ShaderGfx->m_Data;
+
+    s3d_CEngUtilShaderUtil::ArrangeGather(
+            ExecArray, Data->m_MethodArray, this);
+}
+
+void gtp_Shader_EnvMapInst::ShaderExecPerform(
+        s3d_CEngShaderScope *Scope, 
+        s3d_CUtilAtom *Method,
+        s3d_CEngGfxTaskArray &TaskArray)
+{
+	gtp_Shader_EnvMapData *Data = m_ShaderGfx->m_Data;
+	
+	bool doRender = true;
+	if(Data->m_UpdateInterval > 1)
+	{
+		if(m_FrameCount == Data->m_UpdateInterval)
+			m_FrameCount = 0;
+		m_FrameCount++;
+		if(!(m_FrameCount % Data->m_UpdateInterval == 1))	
+			doRender = false;
+	}
+	if(Data->m_UpdateInterval < 0)
+		doRender = false;
+	if(Data->m_UpdateInterval == 0)
+	{
+		Data->m_UpdateInterval = -1;
+		Data->m_UpdateAllFace = true;
+	}
+
+    int Rank = Data->m_Rank;
+    if(Rank == 0)
+        doRender = false;
+
+	if(doRender)
+	{
+		s3d_CEngGfxElemJob *GfxElemJob = new(m_ShaderEnv->m_MemPool) 
+				s3d_CEngUtilShaderItemJob<gtp_Shader_EnvMapInst>(
+				Scope, 0,
+				this, &gtp_Shader_EnvMapInst::GfxElemJobExec);
+
+		s3d_CEngGfxTaskOrder KeyOrder = 0;
+		s3d_CEngUtilGfxUtil::AppendTask(
+				m_ShaderEnv->m_MemPool, TaskArray, Rank, KeyOrder, GfxElemJob);
+	}
+	SetVars(m_ShaderEnv->m_MemPool, Scope);
+}
+
+void *gtp_Shader_EnvMapInst::GfxElemJobExec(
+        s3d_CEngShaderScope *Scope,
+        void *GfxMark)
+{
+	
+    gtp_Shader_EnvMapData *Data = m_ShaderGfx->m_Data;
+
+    if(!Scope)
+        return GfxMark;
+
+    s3d_CEngGfxPortion *Portion = Scope->m_Portion;
+    if(!Portion)
+        return GfxMark;
+
+    s3d_CUtilMemPool *MemPool = m_ShaderEnv->m_MemPool;
+
+    s3d_CEngGfxVarMesh *MeshVar = s3d_EngGfxVarFetchWaryMesh(
+            m_ShaderEnv->m_MsgHandler, Scope->m_Info, 
+            Scope->m_VarBlk, m_ShaderGfx->m_MeshVarSlot.m_Val);
+    if(!MeshVar)
+        return GfxMark;
+
+    s3d_CUtilTranslQuatf ViewTransf = MeshVar->m_Val.m_ViewTransf;
+    s3d_CUtilVec3f BoundCen = MeshVar->m_Val.m_MeshCompos.m_BoundCen;
+    s3d_CUtilVec3f BoundExt = MeshVar->m_Val.m_MeshCompos.m_BoundExt;
+
+	s3d_CEngUtilShaderDestJob *DestJob = 0;
+
+	Calc(MemPool, Scope, ViewTransf, BoundCen, BoundExt, DestJob);
+
+    s3d_CEngUtilShaderDestGfx *DestGfx = &m_ShaderGfx->m_DestGfx;
+    DestGfx->FinishJob(m_ShaderEnv, Scope, Data->m_Dest, DestJob);
+
+    return 0;
+}
+
+
+
+void gtp_Shader_EnvMapInst::Calc(
+        s3d_CUtilMemPool *MemPool, s3d_CEngShaderScope *Scope, 
+        s3d_CUtilTranslQuatf_cr ViewTransf,
+        s3d_CUtilVec3f_cr BoundCen, s3d_CUtilVec3f_cr BoundExt,
+        s3d_CEngUtilShaderDestJob *&DestJob)
+{
+    DestJob = 0;
+    gtp_Shader_EnvMapData *Data = m_ShaderGfx->m_Data;
+    s3d_CEngUtilShaderDestGfx *DestGfx = &m_ShaderGfx->m_DestGfx;
+
+    s3d_CEngGfxPortion *Portion = Scope->m_Portion;
+    if(!Portion)
+        return;
+    s3d_CEngGfxCycle *Cycle = Portion->m_Cycle;
+    if(!Cycle)
+        return;
+    s3d_CEngGfxRun *Run = Cycle->m_Run;
+    if(!Run)
+        return;
+    s3d_CDrvGfxEng *GfxEng = Run->m_GfxEng;
+    if(!GfxEng)
+        return;
+    
+    s3d_CEngGfxPort *Port = s3d_UtilRecogCastCheck<s3d_CEngGfxPort>(
+            m_ShaderEnv->m_MsgHandler, Data->m_RankInfo,
+            Portion->m_Port);
+    if(!Port)
+        return;
+
+    if(!m_CanRenderColorAlphaTex)
+        return;
+
+	s3d_CEngGfxCam *Cam = &Portion->m_Cam;
+
+	if(Data->m_WorldSpace) 
+	 m_LastCenter = s3d_CUtilVec4f(Cam->m_Transf.ApplyToPoint(
+							ViewTransf.ApplyToPoint(BoundCen)),1);
+	else
+	 m_LastCenter = s3d_CUtilVec4f(ViewTransf.ApplyToPoint(BoundCen),1);
+
+    
+    // Check if rendering into texture is possible:
+
+    if(!s3d_CEngUtilGfxUtil::VerifyGfxClosed(
+            m_ShaderEnv->m_MsgHandler, Data->m_RankInfo.GetChars(), 
+            Portion->m_Cycle))
+    {
+        Data->m_Rank = 0; // Avoid the error being reported each frame
+        return;
+    }
+
+    // Check recursion level:
+    if(Cam->m_Recursion >= Data->m_MaxRecursion)
+        return;
+
+    // Calculate texture size:
+    float EffWidth = Cam->m_TotWidth * Cam->m_ViewPane.m_Scale.m_x;
+    float EffHeight = Cam->m_TotHeight * Cam->m_ViewPane.m_Scale.m_y;
+    float CamExt = s3d_SysMax(EffWidth, EffHeight);
+    float Dist = ViewTransf.m_Transl.GetLen();
+    int RawTexExt = s3d_SysIntOfFloatNearest(
+            Data->m_ExtDistScale * CamExt / Dist);
+    int WantTexExt = gtp_ShaderOpticsUtil::RoundToPowerOfTwoUp(
+                                RawTexExt);
+    if(WantTexExt > Data->m_MaxExt)
+        WantTexExt = Data->m_MaxExt;
+
+    int TexProp = 0;
+    if(!DestGfx->GetSnapTexPropWidthHeight(
+                m_ShaderEnv, Scope, Data->m_Dest, 
+                WantTexExt, WantTexExt, TexProp))
+        return;
+
+    int TexWidth = WantTexExt;
+    int TexHeight = WantTexExt;
+    int TexDepth = 1;
+    int TexSnap = s3d_CDrvGfxEng::TexSnap_PreferUp;
+    GfxEng->SnapTexSize(TexWidth, TexHeight, TexDepth, TexProp, TexSnap);
+
+	/////////////////
+    // Allocate texture:
+    DestJob = DestGfx->CreateJob(
+                m_ShaderEnv, Scope, Data->m_Dest, TexWidth, TexHeight);
+    if(!DestJob)
+        return;
+
+    static const int CubeFaceMap[] =
+    {
+        s3d_CDrvGfxEng::TexPart_CubePosX, s3d_CDrvGfxEng::TexPart_CubeNegX, 
+        s3d_CDrvGfxEng::TexPart_CubePosY, s3d_CDrvGfxEng::TexPart_CubeNegY,   
+        s3d_CDrvGfxEng::TexPart_CubePosZ, s3d_CDrvGfxEng::TexPart_CubeNegZ, 
+    };
+    static const s3d_CUtilVec3f ViewDirMap[] = 
+    {
+        s3d_CUtilVec3f( 1.f, 0.f, 0.f), s3d_CUtilVec3f(-1.f,  0.f,  0.f), 
+        s3d_CUtilVec3f( 0.f, 1.f, 0.f), s3d_CUtilVec3f( 0.f, -1.f,  0.f), 
+        s3d_CUtilVec3f( 0.f, 0.f, 1.f), s3d_CUtilVec3f( 0.f,  0.f, -1.f),  
+    };
+
+    static const s3d_CUtilVec3f AlsoFromMap[] = 
+    {
+        s3d_CUtilVec3f( 1.f, 0.f, 0.f), s3d_CUtilVec3f( 1.f,  0.f, 0.f), 
+        s3d_CUtilVec3f( 0.f, 1.f, 0.f), s3d_CUtilVec3f( 0.f,  1.f, 0.f), 
+        s3d_CUtilVec3f( 1.f, 0.f, 0.f), s3d_CUtilVec3f( 1.f,  0.f, 0.f), 
+    };
+    static const s3d_CUtilVec3f AlsoToMap[] = 
+    {
+        s3d_CUtilVec3f( 0.f,  0.f, -1.f), s3d_CUtilVec3f(  0.f, 0.f, 1.f),  
+        s3d_CUtilVec3f( 0.f,  0.f, -1.f), s3d_CUtilVec3f(  0.f, 0.f, 1.f),  
+        s3d_CUtilVec3f( 1.f,  0.f,  0.f), s3d_CUtilVec3f( -1.f, 0.f, 0.f), 
+    };
+
+    // Camera:
+    s3d_CEngGfxCam ChildCam(*Cam);
+    ChildCam.m_ViewPane = 1;
+    ChildCam.m_ViewDepthStart = 0;
+    ChildCam.m_ViewDepthEnd = 1;
+    ChildCam.m_TotWidth = TexWidth;
+    ChildCam.m_TotHeight = TexHeight;
+    ChildCam.m_Proj = s3d_CEngUtilMathUtil::CalcProjStd(
+            false, 1, -1, 0, 0, Data->m_NegZ, Data->m_PosZ);
+    ChildCam.m_Reverse = true;
+    ChildCam.m_Recursion = ChildCam.m_Recursion + 1;
+
+    // Move record cam to object center
+    s3d_CUtilTranslQuatf TranslQuat = Cam->m_Transf.Concat(ViewTransf);
+    ChildCam.m_Transf.m_Transl = TranslQuat.m_Transl;
+    ChildCam.m_BasePoint = ChildCam.m_Transf.m_Transl;
+    ChildCam.m_VisibPoint = ChildCam.m_BasePoint;
+    ChildCam.m_Exclude = m_Head;
+
+    // Rendering:
+    s3d_CDrvGfxDest *Dest = DestJob->m_DrvGfxDestArray.GetPtrRaw();
+    s3d_CSysIntps nDestTex = DestJob->m_DrvGfxDestArray.GetCnt();
+    s3d_CEngUtilGfxBeginTex *GfxBegin
+            = new(m_ShaderEnv->m_MemPool) s3d_CEngUtilGfxBeginTex(
+                    GfxEng, TexWidth, TexHeight, nDestTex, Dest, 1);
+
+    const s3d_CUtilVec3f CamDir(0, 0, 1);
+    
+	s3d_CUtilQuatf BaseQuat;
+	if(!Data->m_WorldSpace)
+		BaseQuat = Cam->m_Transf.m_Quat;
+	else
+		BaseQuat = s3d_CUtilQuatf(1,0,0,1);
+
+
+    s3d_CEngGfxTaskArray ChildTaskArray;
+    int iFace;
+	//framecount++;
+	//framecount = framecount % 6;	
+	//iFace = framecount;
+    for(iFace = 0; iFace < 6; iFace++)
+    {
+		if(!Data->m_UpdateAllFace)
+		{
+			iFace = m_CurrentFace;
+			m_CurrentFace = (++m_CurrentFace) % 6;
+		}
+
+        s3d_CSysIntps iDestTex = 0;
+        for(iDestTex = 0; iDestTex < nDestTex; iDestTex++)
+            Dest[iDestTex].m_Part = CubeFaceMap[iFace];
+		
+		s3d_CUtilQuatf EffQuat;
+		if(Data->m_WorldSpace)
+			EffQuat = s3d_CUtilQuatf::ByPathAlso(
+                CamDir, ViewDirMap[iFace], AlsoFromMap[iFace], 
+                        AlsoToMap[iFace]);
+		else
+			EffQuat = BaseQuat * s3d_CUtilQuatf::ByPathAlso(
+                CamDir, ViewDirMap[iFace], AlsoFromMap[iFace], 
+                        AlsoToMap[iFace]);
+		
+        ChildCam.m_Transf.m_Quat = EffQuat;
+
+        s3d_CEngGfxCycle *ChildCycle = Port->CollectNewCycle(
+                Run, ChildCam, Data->m_EnumTrigger, ChildTaskArray);
+        s3d_CEngUtilGfxElemJobBegin::AddGfxBegin(
+                m_ShaderEnv->m_MsgHandler, Data->m_RankInfo.GetChars(), 
+                ChildCycle, Data->m_DestProp, ChildCam.m_ClearParam, 
+                ChildTaskArray, GfxBegin);
+        s3d_CEngUtilGfxUtil::PerformChild(
+                Cycle, ChildCycle, ChildTaskArray);
+        s3d_CEngUtilGfxUtil::CloseGfxTex(
+                m_ShaderEnv->m_MsgHandler, Data->m_RankInfo.GetChars(),
+                Cycle, GfxBegin);
+        ChildTaskArray.Clear();
+
+		if(!Data->m_UpdateAllFace)
+			break;
+    }
+    ChildTaskArray.Reset();
+}
+
+void gtp_Shader_EnvMapInst::SetVars(
+        s3d_CUtilMemPool *MemPool, s3d_CEngShaderScope *Scope)
+{
+	gtp_Shader_EnvMapData *Data = m_ShaderGfx->m_Data;
+
+    s3d_CDrvVarSlot LastCenterVarSlot = m_ShaderGfx->m_LastCenterVarSlot;
+    if(LastCenterVarSlot >= 0)
+    {
+		s3d_CDrvVarVec4f *ValVar = new(MemPool) s3d_CDrvVarVec4f;
+		ValVar->m_Val = m_LastCenter;
+        s3d_DrvVarSet(Scope->m_VarBlk, LastCenterVarSlot, ValVar);
+    }
+}
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_createtex.h
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_createtex.h	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_createtex.h	(revision 2453)
@@ -0,0 +1,217 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+//@cpp
+
+#ifndef GTP_SHADER_CREATETEX_H
+#define GTP_SHADER_CREATETEX_H
+
+#include "../../interf/eng_shader.h"
+#include "../../interf/eng_shaderenv.h"
+#include "../../../comp/core/comp_setup.h"
+#include "../../../comp/util/comp_util_uniquebase.h"
+
+///////////////////////////////////////////////////////////////////////////////
+
+class gtp_ShaderCreateTexGfx;
+
+//@
+typedef s3d_CUtilKeyEntry<s3d_CEngGfxCtxPtr, 
+        gtp_ShaderCreateTexGfx*>
+                gtp_ShaderCreateTexGfxEntry;
+
+//@
+typedef s3d_CUtilTree<gtp_ShaderCreateTexGfxEntry>
+                gtp_ShaderCreateTexGfxTree;
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct gtp_ShaderCreateTexData: s3d_CUtilPtrBase
+{
+    s3d_CUtilStr m_Info;
+    s3d_CUtilAtomArray m_MethodArray;
+    s3d_CDrvGfxTexPtr m_Tex;
+    s3d_CUtilStr m_TexChanVarInfo;
+    s3d_CUtilAtomPtr m_TexChanVarAtom;
+    int m_SampMode;
+	int m_TexWidth;
+	int m_TexHeight;
+	int m_TexDepth;
+	int m_TexProp;
+};
+
+typedef s3d_CUtilPtr<gtp_ShaderCreateTexData>
+        gtp_ShaderCreateTexDataPtr;
+
+///////////////////////////////////////////////////////////////////////////////
+
+//@
+class gtp_ShaderCreateTex
+    : public s3d_CEngShader,
+    public s3d_CCompUtilUniqueBase,
+    public s3d_CCompSetup
+{
+public:
+    S3D_UTIL_RTTI_TABLE_DECLARE
+
+    //@
+    gtp_ShaderCreateTex();
+
+    //@
+    void SetupInit(
+            s3d_CUtilMsgHandler *MsgHandler, s3d_CUtilStr_cr Info,
+            s3d_CCompSuppl *FetchSuppl, s3d_CUtilSnkChunk *Param);
+
+    //@
+    void SetupDone();
+
+    //@
+    s3d_CUtilStr GetInfo();
+
+    //@
+    void RegisterNotif(s3d_CUtilNotifRecip *Recip);
+
+    //@
+    s3d_CEngShaderGfxPtr FindShaderGfx(
+            s3d_CUtilNotifGather *NotifGather, s3d_CEngGfxCtx *GfxCtx);
+
+private:
+    s3d_CEngShaderEnvPtr m_ShaderEnv;
+    gtp_ShaderCreateTexGfxTree m_ShaderGfxTree;
+    gtp_ShaderCreateTexDataPtr m_Data;
+};
+
+//@
+typedef s3d_CUtilPtr<gtp_ShaderCreateTex> 
+        gtp_ShaderCreateTexPtr;
+
+///////////////////////////////////////////////////////////////////////////////
+
+//@
+class gtp_ShaderCreateTexGfx: public s3d_CEngShaderGfx
+{
+public:
+    //@
+    gtp_ShaderCreateTexGfx(
+            s3d_CEngShaderEnv *ShaderEnv,
+            s3d_CEngGfxCtx *GfxCtx,
+            gtp_ShaderCreateTexData *Data);
+
+    //@
+    gtp_ShaderCreateTexGfxTree::CNode *GetNode();
+
+    //@
+    void RegisterNotif(s3d_CUtilNotifRecip *Recip);
+
+    //@
+    void ExtractGfx();
+
+    //@
+    bool IsValid();
+
+    //@
+    void LinkCollect(s3d_CUtilAtomSet &VarAtomSet);
+
+    //@
+    void LinkAppoint(s3d_CDrvVarDecl *VarDecl);
+
+    //@
+    s3d_CEngShaderInstPtr CreateShaderInst(
+            s3d_CEngShaderHead *Head);
+
+private:
+    gtp_ShaderCreateTexGfxTree::CNode m_Node;
+    s3d_CEngShaderEnvPtr m_ShaderEnv;
+    gtp_ShaderCreateTexDataPtr m_Data;
+
+    // ShaderGfx-Data Variables:
+    s3d_CDrvVarSlotInit m_TexChanVarSlot;
+
+    friend class gtp_ShaderCreateTexInst;
+};
+
+//@
+typedef s3d_CUtilPtr<gtp_ShaderCreateTexGfx> 
+        gtp_ShaderCreateTexGfxPtr;
+
+///////////////////////////////////////////////////////////////////////////////
+
+//@
+class gtp_ShaderCreateTexInst
+    : public s3d_CEngShaderInst,
+    public s3d_CEngShaderExec
+{
+public:
+    //@
+    gtp_ShaderCreateTexInst(
+            s3d_CEngShaderEnv *ShaderEnv,
+            gtp_ShaderCreateTexGfx *ShaderGfx);
+
+    //@
+    void RegisterNotif(s3d_CUtilNotifRecip *Recip);
+
+    //@
+    void SetShaderCtx(s3d_CEngShaderCtx *ShaderCtx);
+
+    //@
+    void SetGfxState(s3d_CEngGfxState *GfxState);
+
+    //@
+    void SetPos(s3d_CEngPos *Pos);
+
+    //@
+    void SetModel(s3d_CEngModel *Model);
+
+    //@
+    void ArrangeCollect(
+            s3d_CUtilMemPool *MemPool,
+            s3d_CEngShaderScopeArray &ScopeArray);
+
+    //@
+    void ArrangeInit(
+            s3d_CUtilMemPool *MemPool,
+            s3d_CEngShaderScopeArray_cr ScopeArray);
+
+    //@
+    void ArrangePerform(
+            s3d_CUtilMemPool *MemPool,
+            s3d_CEngShaderScopeArray_cr ScopeArray);
+
+    //@
+    void ArrangeFeedback(
+            s3d_CUtilMemPool *MemPool,
+            s3d_CEngShaderScopeArray_cr ScopeArray);
+
+    //@
+    void ArrangeGather(
+            s3d_CEngShaderExecArray &ExecArray);
+
+    //@
+    void ShaderExecPerform(
+            s3d_CEngShaderScope *Scope, 
+            s3d_CUtilAtom *Method,
+            s3d_CEngGfxTaskArray &TaskArray);
+
+private:
+    void SetVars(
+            s3d_CUtilMemPool *MemPool, s3d_CEngShaderScope *Scope);
+
+    s3d_CEngShaderEnvPtr m_ShaderEnv;
+    gtp_ShaderCreateTexGfxPtr m_ShaderGfx;
+	s3d_CDrvGfxTexPtr m_TexGfx;
+    
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_focusedprojmat.h
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_focusedprojmat.h	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_focusedprojmat.h	(revision 2453)
@@ -0,0 +1,220 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+//@cpp
+
+#ifndef GTP_SHADER_FOCUSEPROJMAT_H
+#define GTP_SHADER_FOCUSEDPROJMAT_H
+
+#include "../../interf/eng_shader.h"
+#include "../../interf/eng_shaderenv.h"
+#include "../../interf/eng_pos.h"
+#include "../../../comp/core/comp_setup.h"
+#include "../../../comp/util/comp_util_uniquebase.h"
+
+///////////////////////////////////////////////////////////////////////////////
+
+class gtp_Shader_FocusedProjMatGfx;
+
+//@
+typedef s3d_CUtilKeyEntry<s3d_CEngGfxCtxPtr, gtp_Shader_FocusedProjMatGfx*>
+        gtp_Shader_FocusedProjMatGfxEntry;
+
+//@
+typedef s3d_CUtilTree<gtp_Shader_FocusedProjMatGfxEntry>
+        gtp_Shader_FocusedProjMatGfxTree;
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct gtp_Shader_FocusedProjMatData: s3d_CUtilPtrBase
+{
+    s3d_CUtilStr m_Info;
+    s3d_CUtilAtomArray m_MethodArray;
+    s3d_CUtilStr m_FocusedProjMatVarInfo;
+    s3d_CUtilAtomPtr m_FocusedProjMatVarAtom;
+	s3d_CUtilStr m_CenterPointVarInfo;
+    s3d_CUtilAtomPtr m_CenterPointVarAtom;	
+	s3d_CUtilStr m_MeshVarInfo;
+    s3d_CUtilAtomPtr m_MeshVarAtom;
+   
+};
+
+typedef s3d_CUtilPtr<gtp_Shader_FocusedProjMatData>
+        gtp_Shader_FocusedProjMatDataPtr;
+
+///////////////////////////////////////////////////////////////////////////////
+
+//@
+class gtp_Shader_FocusedProjMat
+    : public s3d_CEngShader,
+    public s3d_CCompUtilUniqueBase,
+    public s3d_CCompSetup
+{
+public:
+    S3D_UTIL_RTTI_TABLE_DECLARE
+
+    //@
+    gtp_Shader_FocusedProjMat();
+
+    //@
+    void SetupInit(
+            s3d_CUtilMsgHandler *MsgHandler, s3d_CUtilStr_cr Info,
+            s3d_CCompSuppl *FetchSuppl, s3d_CUtilSnkChunk *Param);
+
+    //@
+    void SetupDone();
+
+    //@
+    s3d_CUtilStr GetInfo();
+
+    //@
+    void RegisterNotif(s3d_CUtilNotifRecip *Recip);
+
+    //@
+    s3d_CEngShaderGfxPtr FindShaderGfx(
+            s3d_CUtilNotifGather *NotifGather, s3d_CEngGfxCtx *GfxCtx);
+
+private:
+    s3d_CEngShaderEnvPtr m_ShaderEnv;
+    gtp_Shader_FocusedProjMatGfxTree m_ShaderGfxTree;
+    gtp_Shader_FocusedProjMatDataPtr m_Data;
+};
+
+//@
+typedef s3d_CUtilPtr<gtp_Shader_FocusedProjMat>
+        gtp_Shader_FocusedProjMatPtr;
+
+///////////////////////////////////////////////////////////////////////////////
+
+//@
+class gtp_Shader_FocusedProjMatGfx: public s3d_CEngShaderGfx
+{
+public:
+    //@
+    gtp_Shader_FocusedProjMatGfx(
+            s3d_CEngShaderEnv *ShaderEnv, s3d_CEngGfxCtx *GfxCtx,
+            gtp_Shader_FocusedProjMatData *Data);
+
+    //@
+    gtp_Shader_FocusedProjMatGfxTree::CNode *GetNode();
+
+    //@
+    void RegisterNotif(s3d_CUtilNotifRecip *Recip);
+
+    //@
+    void ExtractGfx();
+
+    //@
+    bool IsValid();
+
+    //@
+    void LinkCollect(s3d_CUtilAtomSet &VarAtomSet);
+
+    //@
+    void LinkAppoint(s3d_CDrvVarDecl *VarDecl);
+
+    //@
+    s3d_CEngShaderInstPtr CreateShaderInst(
+            s3d_CEngShaderHead *Head);
+
+private:
+    gtp_Shader_FocusedProjMatGfxTree::CNode m_Node;
+    s3d_CEngShaderEnvPtr m_ShaderEnv;
+    gtp_Shader_FocusedProjMatDataPtr m_Data;
+
+    // ShaderGfx-Data Variables:
+    s3d_CDrvVarSlotInit m_FocusedProjMatVarSlot;
+	s3d_CDrvVarSlotInit m_CenterPointVarSlot;
+	s3d_CDrvVarSlotInit m_MeshVarSlot;
+   
+    friend class gtp_Shader_FocusedProjMatInst;
+};
+
+//@
+typedef s3d_CUtilPtr<gtp_Shader_FocusedProjMatGfx>
+        gtp_Shader_FocusedProjMatGfxPtr;
+
+///////////////////////////////////////////////////////////////////////////////
+
+//@
+class gtp_Shader_FocusedProjMatInst
+    : public s3d_CEngShaderInst,
+    public s3d_CEngShaderExec
+{
+public:
+    //@
+    gtp_Shader_FocusedProjMatInst(
+            s3d_CEngShaderEnv *ShaderEnv, 
+            gtp_Shader_FocusedProjMatGfx *ShaderGfx);
+
+    //@
+    void RegisterNotif(s3d_CUtilNotifRecip *Recip);
+
+    //@
+    void SetShaderCtx(s3d_CEngShaderCtx *ShaderCtx);
+
+    //@
+    void SetGfxState(s3d_CEngGfxState *GfxState);
+
+    //@
+    void SetPos(s3d_CEngPos *Pos);
+
+    //@
+    void SetModel(s3d_CEngModel *Model);
+
+    //@
+    void ArrangeCollect(
+            s3d_CUtilMemPool *MemPool,
+            s3d_CEngShaderScopeArray &ScopeArray);
+
+    //@
+    void ArrangeInit(
+            s3d_CUtilMemPool *MemPool,
+            s3d_CEngShaderScopeArray_cr ScopeArray);
+
+    //@
+    void ArrangePerform(
+            s3d_CUtilMemPool *MemPool,
+            s3d_CEngShaderScopeArray_cr ScopeArray);
+
+    //@
+    void ArrangeFeedback(
+            s3d_CUtilMemPool *MemPool,
+            s3d_CEngShaderScopeArray_cr ScopeArray);
+
+    //@
+    void ArrangeGather(
+            s3d_CEngShaderExecArray &ExecArray);
+
+    //@
+    void ShaderExecPerform(
+            s3d_CEngShaderScope *Scope, 
+            s3d_CUtilAtom *Method,
+            s3d_CEngGfxTaskArray &TaskArray);
+
+private:
+    s3d_CEngShaderEnvPtr m_ShaderEnv;
+    gtp_Shader_FocusedProjMatGfxPtr m_ShaderGfx;
+    s3d_CEngPosPtr m_Pos;
+
+    void SetVars(
+            s3d_CUtilMemPool *MemPool, s3d_CEngShaderScope *Scope);
+};
+
+//@
+typedef s3d_CUtilPtr<gtp_Shader_FocusedProjMatInst>
+        gtp_Shader_FocusedProjMatInstPtr;
+
+///////////////////////////////////////////////////////////////////////////////
+
+#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_causticcube.cpp
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_causticcube.cpp	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_causticcube.cpp	(revision 2453)
@@ -0,0 +1,831 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+//@cpp
+
+#include "gtp_shader_causticcube.h"
+#include "../../interf/eng_gfxvar.h"
+#include "../../util/eng_util_gfxutil.h"
+#include "../../util/eng_util_gfxparamutil.h"
+#include "../../util/eng_util_shaderutil.h"
+#include "../../util/eng_util_shaderitemjob.h"
+#include "../../../drv/interf/drv_vartypes.h"
+#include "../../../drv/util/drv_util_varutil.h"
+#include "../../../drv/util/drv_util_gfxutil.h"
+#include "../../../drv/util/drv_util_paintprim.h"
+#include "../../../util/snk/util_snk_extractutil.h"
+#include "../../util/eng_util_mathutil.h"
+#include "../../../util/math/util_geo_types.h"
+
+///////////////////////////////////////////////////////////////////////////////
+/*@{ 
+
+@declare{shadercomp.class}{eng_shader_special.filter}{}
+
+This component performs some iterative texture filtering.
+@p
+
+The component takes none, one or multiple source textures as input,
+see @sident{comp}{eng_shader_special.filter.src_array}.
+Then it passes them to a shaderprogram,
+see @sident{comp}{eng_shader_special.filter.shaderprog_ident}.
+Then it writes the result to none, one or multiple @em{destination} textures,
+see @sident{comp}{eng_shader_special.filter.dest_array}.
+@p
+
+If the destination textures have already been allocated 
+they are used "as is", but only if they all have the same size.
+Otherwise temporary textures will fetched.
+Their size is the maximum of the source textures scaled by
+@sident{comp}{eng_shader_special.filter.width_scale} and
+@sident{comp}{eng_shader_special.filter.height_scale}.
+If necessary the destination texture size is @em{snapped}
+to a value acceptable to the graphics card.
+@p
+
+@}*/
+///////////////////////////////////////////////////////////////////////////////
+
+S3D_UTIL_RTTI_TABLE_DEFINE_BEGIN(gtp_Shader_CausticCube)
+S3D_UTIL_RTTI_TABLE_DEFINE_BASE(s3d_CEngShader)
+S3D_UTIL_RTTI_TABLE_DEFINE_BASE(s3d_CCompUtilUniqueBase)
+S3D_UTIL_RTTI_TABLE_DEFINE_BASE(s3d_CCompSetup)
+S3D_UTIL_RTTI_TABLE_DEFINE_END
+
+gtp_Shader_CausticCube::gtp_Shader_CausticCube()
+{
+}
+
+void gtp_Shader_CausticCube::SetupInit(
+        s3d_CUtilMsgHandler *MsgHandler, s3d_CUtilStr_cr Info,
+        s3d_CCompSuppl *FetchSuppl, s3d_CUtilSnkChunk *Param)
+{
+    m_Data = S3D_SYS_NEW gtp_Shader_CausticCubeData;
+
+    s3d_CUtilSnkExtract SnkExtract;
+    SnkExtract.Assign(MsgHandler, Param);
+    m_Data->m_Info = SnkExtract.GetInfo();
+    
+    /*@{ @declare{shadercomp.param}{eng_shader_special.filter.env}{$ [str]}
+        See @ident{comp}{eng_shader_std.group.env}.
+    @}*/
+    s3d_CUtilStr EnvIdent, EnvInfo;
+    SnkExtract.ExtractStr(EnvInfo, EnvIdent, "env", true);
+
+    m_ShaderEnv = s3d_CompSupplObjT<s3d_CEngShaderEnv>(
+            MsgHandler, EnvInfo, FetchSuppl, 
+            EnvIdent, S3D_GENERAL_INTEROP_INTERF);
+    if(!m_ShaderEnv)
+        return;
+
+    /*@{ @declare{shadercomp.param}
+            {eng_shader_special.filter.methods}{$ [str] .. [str]}
+        See @ref{prog_man.shader.methods}.
+    @}*/
+    s3d_CUtilSnkExtractUtil::ExtractAtomSortedArray(
+            m_Data->m_MethodArray, m_ShaderEnv->m_AtomMgr, 
+            SnkExtract, "methods", true);
+
+    /*@{ @declare{shadercomp.param}
+            {eng_shader_special.filter.rank}{$ [str]}
+       Rank of the shader in the rendering sequence.
+    @}*/
+    SnkExtract.ExtractInt(m_Data->m_RankInfo, m_Data->m_Rank, "rank", true);
+    
+    /*@{ @declare{shadercomp.param}
+            {eng_shader_special.filter.iter_start}{$ [int]}
+        Iteration start value.
+    @}*/
+    m_Data->m_IterStart = SnkExtract.ExtractInt("iter_start", true);
+
+    /*@{ @declare{shadercomp.param}
+            {eng_shader_special.filter.iter_end}{$ [int]}
+        Iteration end value.
+    @}*/
+    m_Data->m_IterEnd = SnkExtract.ExtractInt("iter_end", true);
+
+    /*@{ @declare{shadercomp.param}
+            {eng_shader_special.filter.iter_step}{$ [int]}
+        Iteration step.
+        If the step is positive, then the step is added to the start value 
+        until the value is larger than the end.
+        If the step is negative, then the step is added to the start value
+        until the value is smaller than the end.
+        If the step is zero, the iteration is only executed once
+        for the start value.
+    @}*/
+    m_Data->m_IterStep = SnkExtract.ExtractInt("iter_step", true);
+
+    /*@{ @declare{shadercomp.param}
+            {eng_shader_special.filter.iter_width_scale}{$ [float]}
+        Scale the image by this scale each iteration.
+        The last iteration 
+    @}*/
+    m_Data->m_IterWidthScale = SnkExtract.ExtractFloat(
+            "iter_width_scale", false);
+    if(m_Data->m_IterWidthScale <= 0)
+        m_Data->m_IterWidthScale = 1;
+
+    /*@{ @declare{shadercomp.param}
+            {eng_shader_special.filter.iter_height_scale}{$ [float]}
+        Scale the image by this scale each iteration.
+        The last iteration 
+    @}*/
+    m_Data->m_IterHeightScale 
+            = SnkExtract.ExtractFloat("iter_height_scale", false);
+    if(m_Data->m_IterHeightScale <= 0)
+        m_Data->m_IterHeightScale = 1;
+
+    m_Data->m_DestProp = 0;
+
+    /*@{ @declare{shadercomp.param}
+            {eng_shader_special.filter.destprop_antialias}{$ [bool]}
+        Render the filtering with antialiasing.
+    @}*/
+    if(SnkExtract.ExtractBool("destprop_antialias", true))
+        m_Data->m_DestProp |= s3d_CDrvGfxEng::DestProp_Antialias;
+
+    /*@{ @declare{shadercomp.param}
+            {eng_shader_special.filter.width_scale}{$ [float]}
+       Requested final horizontal scaling factor.
+    @}*/
+    m_Data->m_WidthScale = SnkExtract.ExtractFloat("width_scale", false);
+    if(m_Data->m_WidthScale <= 0)
+        m_Data->m_WidthScale = 1;
+
+    /*@{ @declare{shadercomp.param}
+            {eng_shader_special.filter.height_scale}{$ [float]}
+       Requested final vertical scaling factor.
+    @}*/
+    m_Data->m_HeightScale = SnkExtract.ExtractFloat("height_scale", false);
+    if(m_Data->m_HeightScale <= 0)
+        m_Data->m_HeightScale = 1;
+
+    /*@{ @declare{shadercomp.param}
+            {eng_shader_special.filter.passinfo_var}{$ [str]}
+       This variable is a name for the float4-vector
+       containing information about the iteration.
+       The first component of the vector contains the current iteration number,
+       The second the total number of iterations.
+       The remaining components are unused.
+    @}*/
+    s3d_CUtilSnkExtractUtil::ExtractAtom(
+            m_Data->m_TaskInfoVarInfo, m_Data->m_TaskInfoVarAtom,
+            m_ShaderEnv->m_AtomMgr, SnkExtract, "passinfo_var", true);
+
+    /*@{ @declare{shadercomp.param}
+            {eng_shader_special.filter.shaderprog_ident}{$ [str]}
+       Shader program used for the smoothing iterations.
+    @}*/
+    SnkExtract.ExtractStr(
+            m_Data->m_ProgInfo, m_Data->m_ProgIdent, 
+            "shaderprog_ident", true);
+
+    /*@{ @declare{shadercomp.param}
+            {eng_shader_special.filter.shaderprog_param_array}
+            {$ [chunk] .. [chunk]}
+       Defines which variables are passed to the shader program.
+       See @ident{comp}{<shaderprog.map_prog_array>} for details.
+    @}*/
+    s3d_CUtilSnkChunkArray ProgParamChunkArray;
+    SnkExtract.ExtractChunkArray(
+            m_Data->m_ProgParamInfo, ProgParamChunkArray, 
+            "shaderprog_param_array", true);
+    
+    /*@{ @declare{shadercomp.param}
+            {eng_shader_special.filter.src_array}{$ [str]..[str]}
+    @}*/
+    s3d_CUtilSnkExtractUtil::ExtractAtomArray(
+            m_Data->m_SrcVarInfo, m_Data->m_SrcVarAtomArray,
+            m_ShaderEnv->m_AtomMgr, SnkExtract, "src_array", true);
+    
+    /*@{ @declare{shadercomp.param}
+            {eng_shader_special.filter.dest_array}{$ [chunk]..[chunk]}
+        See @ident{comp}{<dest_array>}.
+    @}*/
+    s3d_CUtilSnkChunkArray DestChunkArray;
+    SnkExtract.ExtractChunkArray(DestChunkArray, "dest_array", true);
+
+	m_Data->m_UpdateInterval = SnkExtract.ExtractInt("update_interval", true, 1);
+	m_Data->m_StartFrame = SnkExtract.ExtractInt("start_frame", true, 0);
+    m_Data->m_UpdateAllFace = SnkExtract.ExtractBool("update_all_face", true, true);
+	m_Data->m_UsePoints = SnkExtract.ExtractBool("use_points", true, true);
+	m_Data->m_PhotonCount = SnkExtract.ExtractInt("photon_count", true, 32*32);
+	
+    SnkExtract.CheckForUnknown();
+
+    int ExtraTexProp = 0;
+    int ExtraSampMode = 0;
+    m_Data->m_Dest.Init(m_ShaderEnv, ExtraTexProp, 
+            ExtraSampMode, DestChunkArray);
+
+    s3d_CEngUtilGfxParamUtil::EvalMapProg(
+            MsgHandler, m_Data->m_ProgParamInfo, 
+            m_ShaderEnv->m_AtomMgr, ProgParamChunkArray,
+            m_Data->m_ProgParamMapArray);
+}
+
+void gtp_Shader_CausticCube::SetupDone()
+{
+}
+
+s3d_CUtilStr gtp_Shader_CausticCube::GetInfo()
+{
+    return m_Data->m_Info;
+}
+
+void gtp_Shader_CausticCube::RegisterNotif(s3d_CUtilNotifRecip *Recip)
+{
+}
+
+s3d_CEngShaderGfxPtr gtp_Shader_CausticCube::FindShaderGfx(
+        s3d_CUtilNotifGather *NotifGather, s3d_CEngGfxCtx *GfxCtx)
+{
+    if(!m_ShaderEnv)
+        return 0;
+
+    gtp_Shader_CausticCubeGfxPtr ShaderGfx;
+    gtp_Shader_CausticCubeGfxTree::CNode *Pos
+            = s3d_UtilTreeSortedGetStart(m_ShaderGfxTree, GfxCtx);
+    if(s3d_UtilTreeIsEqualAt(Pos, GfxCtx))
+        ShaderGfx = Pos->m_Data.m_Val;
+    else
+    {
+        ShaderGfx = S3D_SYS_NEW gtp_Shader_CausticCubeGfx(
+                m_ShaderEnv, NotifGather, GfxCtx, m_Data);
+        gtp_Shader_CausticCubeGfxTree::CNode *Node
+                = ShaderGfx->GetNode();
+        m_ShaderGfxTree.InsertBefore(Pos, Node);
+    }
+    return ShaderGfx.Get();
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+gtp_Shader_CausticCubeGfx::gtp_Shader_CausticCubeGfx(
+        s3d_CEngShaderEnv *ShaderEnv, s3d_CUtilNotifGather *NotifGather,
+        s3d_CEngGfxCtx *GfxCtx, 
+        gtp_Shader_CausticCubeData *Data)
+{
+    m_Node.m_Data.m_Key = GfxCtx;
+    m_Node.m_Data.m_Val = this;
+    m_ShaderEnv = ShaderEnv;
+    m_Data = Data;
+
+    m_FilterDestGfx.Init(ShaderEnv, GfxCtx);
+
+    s3d_CEngGfxProgMgr *GfxProgMgr = ShaderEnv->m_GfxProgMgr;
+    if(GfxProgMgr)
+        m_GfxProg = GfxProgMgr->CreateGfxProg(
+                Data->m_ProgInfo, GfxCtx, NotifGather, 
+                Data->m_ProgIdent);
+}
+
+gtp_Shader_CausticCubeGfxTree::CNode 
+        *gtp_Shader_CausticCubeGfx::GetNode()
+{
+    return &m_Node;
+}
+
+void gtp_Shader_CausticCubeGfx::RegisterNotif(
+        s3d_CUtilNotifRecip *Recip)
+{
+}
+
+void gtp_Shader_CausticCubeGfx::ExtractGfx()
+{
+    m_Node.Extract();
+}
+
+bool gtp_Shader_CausticCubeGfx::IsValid()
+{
+    if(m_GfxProg && !m_GfxProg->IsValid())
+        return false;
+    return true;
+}
+
+void gtp_Shader_CausticCubeGfx::LinkCollect(
+        s3d_CUtilAtomSet &VarAtomSet)
+{
+    s3d_CDrvUtilVarUtil::LinkCollect(
+            VarAtomSet, m_Data->m_TaskInfoVarAtom);
+    s3d_CDrvUtilVarUtil::LinkCollectArray(
+            VarAtomSet, m_Data->m_SrcVarAtomArray);
+
+    m_FilterDestGfx.LinkCollect(VarAtomSet, m_Data->m_Dest);
+
+    s3d_CDrvUtilVarUtil::LinkCollectExport(
+            VarAtomSet, m_Data->m_ProgParamMapArray);
+}
+
+void gtp_Shader_CausticCubeGfx::LinkAppoint(
+        s3d_CDrvVarDecl *VarDecl)
+{
+    s3d_CDrvUtilVarUtil::LinkAppoint(
+            m_TaskInfoVarSlot.m_Val, 
+            VarDecl, m_Data->m_TaskInfoVarAtom);
+    s3d_CDrvUtilVarUtil::LinkAppointArray(
+            m_SrcVarSlotArray, 
+            VarDecl, m_Data->m_SrcVarAtomArray);
+    
+    m_FilterDestGfx.LinkAppoint(VarDecl, m_Data->m_Dest);
+
+    s3d_CDrvUtilVarUtil::LinkAppointExport(
+            m_ShaderEnv->m_MsgHandler, m_Data->m_ProgParamInfo,
+            m_ProgParamDecl, VarDecl,
+            m_Data->m_ProgParamMapArray);
+}
+
+s3d_CEngShaderInstPtr gtp_Shader_CausticCubeGfx::CreateShaderInst(
+        s3d_CEngShaderHead *Head)
+{
+    s3d_CEngGfxCtx *GfxCtx = m_Node.m_Data.m_Key;
+    return S3D_SYS_NEW gtp_Shader_CausticCubeInst(
+            m_ShaderEnv, GfxCtx, this, m_GfxProg);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+gtp_Shader_CausticCubeInst::gtp_Shader_CausticCubeInst(
+        s3d_CEngShaderEnv *ShaderEnv,
+        s3d_CEngGfxCtx *GfxCtx,
+        gtp_Shader_CausticCubeGfx *ShaderGfx,
+        s3d_CEngGfxProg *GfxProg)
+{
+    m_FrameCount = 0;
+	m_ShaderEnv = ShaderEnv;
+    m_GfxCtx = GfxCtx;
+    m_ShaderGfx = ShaderGfx;
+    m_GfxProg = GfxProg;
+}
+
+void gtp_Shader_CausticCubeInst::RegisterNotif(
+        s3d_CUtilNotifRecip *Recip)
+{
+}
+
+void gtp_Shader_CausticCubeInst::SetShaderCtx(
+        s3d_CEngShaderCtx *ShaderCtx)
+{
+}
+
+void gtp_Shader_CausticCubeInst::SetGfxState(
+        s3d_CEngGfxState *GfxState)
+{
+}
+
+void gtp_Shader_CausticCubeInst::SetPos(s3d_CEngPos *Pos)
+{
+}
+
+void gtp_Shader_CausticCubeInst::SetModel(s3d_CEngModel *Model)
+{
+}
+
+void gtp_Shader_CausticCubeInst::ArrangeCollect(
+        s3d_CUtilMemPool *MemPool, 
+        s3d_CEngShaderScopeArray &ScopeArray)
+{
+}
+
+void gtp_Shader_CausticCubeInst::ArrangeInit(
+        s3d_CUtilMemPool *MemPool, 
+        s3d_CEngShaderScopeArray_cr ScopeArray)
+{
+}
+
+void gtp_Shader_CausticCubeInst::ArrangePerform(
+        s3d_CUtilMemPool *MemPool, 
+        s3d_CEngShaderScopeArray_cr ScopeArray)
+{
+}
+
+void gtp_Shader_CausticCubeInst::ArrangeFeedback(
+        s3d_CUtilMemPool *MemPool, 
+        s3d_CEngShaderScopeArray_cr ScopeArray)
+{
+}
+
+void gtp_Shader_CausticCubeInst::ArrangeGather(
+        s3d_CEngShaderExecArray &ExecArray)
+{
+    gtp_Shader_CausticCubeData *Data = m_ShaderGfx->m_Data;
+
+    s3d_CEngUtilShaderUtil::ArrangeGather(
+            ExecArray, Data->m_MethodArray, this);
+}
+
+void gtp_Shader_CausticCubeInst::ShaderExecPerform(
+        s3d_CEngShaderScope *Scope, 
+        s3d_CUtilAtom *Method,
+        s3d_CEngGfxTaskArray &TaskArray)
+{
+    gtp_Shader_CausticCubeData *Data = m_ShaderGfx->m_Data;
+
+	bool doRender = true;
+	if(Data->m_UpdateInterval > 1)
+	{
+		if(m_FrameCount == Data->m_UpdateInterval)
+			m_FrameCount = 0;
+		m_FrameCount++;
+		if(!(m_FrameCount % Data->m_UpdateInterval == 1))	
+			doRender = false;
+	}
+	if(Data->m_UpdateInterval < 0)
+		doRender = false;
+	if(Data->m_UpdateInterval == 0)
+	{
+		Data->m_UpdateInterval = -1;
+	    Data->m_UpdateAllFace = true;
+	}		
+
+    int Rank = Data->m_Rank;
+    if(Rank == 0)
+        return;
+	
+	if(doRender)
+	{
+		s3d_CEngGfxElemJob *GfxElemJob = new(m_ShaderEnv->m_MemPool) 
+				s3d_CEngUtilShaderItemJob<gtp_Shader_CausticCubeInst>(
+				Scope, 0,
+				this, &gtp_Shader_CausticCubeInst::GfxElemJobExec);
+
+		s3d_CEngGfxTaskOrder KeyOrder = 0;
+		s3d_CEngUtilGfxUtil::AppendTask(
+				m_ShaderEnv->m_MemPool, TaskArray, Rank, KeyOrder, GfxElemJob);
+	}
+}
+
+void *gtp_Shader_CausticCubeInst::GfxElemJobExec(
+        s3d_CEngShaderScope *Scope,
+        void *GfxMark)
+{
+    gtp_Shader_CausticCubeGfx *ShaderGfx = m_ShaderGfx;
+    const gtp_Shader_CausticCubeData *Data = ShaderGfx->m_Data;
+
+    s3d_CDrvGfxEng *GfxEng = m_GfxCtx->m_GfxEng;
+    if(!GfxEng)
+        return GfxMark;
+
+    s3d_CEngUtilShaderDestGfx *FilterDestGfx = &ShaderGfx->m_FilterDestGfx;
+
+    s3d_CEngGfxVarTexChanArray FilterSrcTexArray;
+    FetchSrcArray(
+            m_ShaderEnv->m_MemPool, Scope, Data->m_SrcVarInfo.GetChars(), 
+            FilterSrcTexArray, ShaderGfx->m_SrcVarSlotArray);
+
+    int RawBaseWidth = 0;
+    int RawBaseHeight = 0;
+    CalcSrcTexSize(
+            m_ShaderEnv->m_MemPool, Scope, GfxEng, 
+            RawBaseWidth, RawBaseHeight, FilterSrcTexArray);
+    
+    int DestProp = 0;
+    if(!FilterDestGfx->GetSnapTexPropWidthHeight(
+                m_ShaderEnv, Scope, Data->m_Dest, 
+                RawBaseWidth, RawBaseHeight, DestProp))
+        return GfxMark;
+
+    float BaseWidth = RawBaseWidth * Data->m_WidthScale;
+    float BaseHeight = RawBaseHeight * Data->m_HeightScale;
+    if(BaseWidth <= 0)
+        return GfxMark;
+    if(BaseHeight <= 0)
+        return GfxMark;
+
+    int IterStart = Data->m_IterStart;
+    int IterEnd = Data->m_IterEnd;
+    int IterStep = Data->m_IterStep;
+    if(IterStep > 0)
+    {
+        float CurWidth = BaseWidth;
+        float CurHeight = BaseHeight;
+        int Iter;
+        for(Iter = IterStart; Iter <= IterEnd; Iter += IterStep)
+        {
+            CurWidth /= Data->m_IterWidthScale;
+            CurHeight /= Data->m_IterHeightScale;
+        }
+        for(Iter = IterStart; Iter <= IterEnd; Iter += IterStep)
+        {
+            CurWidth *= Data->m_IterWidthScale;
+            CurHeight *= Data->m_IterHeightScale;
+            Iteration(Scope, Iter, DestProp, CurWidth, CurHeight);
+        }
+    }
+    else if(IterStep < 0)
+    {
+        float CurWidth = BaseWidth;
+        float CurHeight = BaseHeight;
+        int Iter;
+        for(Iter = IterStart; Iter >= IterEnd; Iter += IterStep)
+        {
+            CurWidth /= Data->m_IterWidthScale;
+            CurHeight /= Data->m_IterHeightScale;
+        }
+        for(Iter = IterStart; Iter >= IterEnd; Iter += IterStep)
+        {
+            CurWidth *= Data->m_IterWidthScale;
+            CurHeight *= Data->m_IterHeightScale;
+            Iteration(Scope, Iter, DestProp, CurWidth, CurHeight);
+        }
+    }
+    else
+        Iteration(Scope, IterStart, 0/*DestProp*/, BaseWidth, BaseHeight);
+
+    return 0;
+}
+
+void gtp_Shader_CausticCubeInst::Iteration(
+        s3d_CEngShaderScope *Scope, int Iter,
+        int DestProp, float WantWidth, float WantHeight)
+{
+    gtp_Shader_CausticCubeGfx *ShaderGfx = m_ShaderGfx;
+    gtp_Shader_CausticCubeData *Data = ShaderGfx->m_Data;
+    s3d_CEngUtilShaderDestGfx *FilterDestGfx = &ShaderGfx->m_FilterDestGfx;
+
+    if(!Scope)
+        return;
+
+    s3d_CEngGfxPortion *Portion = Scope->m_Portion;
+    if(!Portion)
+        return;
+    s3d_CEngGfxCycle *Cycle = Portion->m_Cycle;
+    if(!Cycle)
+        return;
+
+    s3d_CUtilMemPool *MemPool = m_ShaderEnv->m_MemPool;
+
+    s3d_CDrvVarVec4f *TaskInfoVar = new(MemPool) s3d_CDrvVarVec4f;
+    TaskInfoVar->m_Val = 0;
+    TaskInfoVar->m_Val.m_x = s3d_SysFloatOfInt<float>(Iter);
+    s3d_DrvVarSet(Scope->m_VarBlk, ShaderGfx->m_TaskInfoVarSlot, TaskInfoVar);
+
+    if(!s3d_CEngUtilGfxUtil::VerifyGfxClosed(
+            m_ShaderEnv->m_MsgHandler, Data->m_RankInfo.GetChars(), 
+            Portion->m_Cycle))
+    {
+        Data->m_Rank = 0; // Avoid the error being reported each frame
+        return;
+    }
+
+    s3d_CDrvGfxEng *GfxEng = m_GfxCtx->m_GfxEng;
+    if(!GfxEng)
+        return;
+
+    s3d_CEngGfxVarTexChanArray FilterSrcTexArray;
+    FetchSrcArray(
+            MemPool, Scope, Data->m_SrcVarInfo.GetChars(), 
+            FilterSrcTexArray, ShaderGfx->m_SrcVarSlotArray);
+
+    int DestWidth = s3d_SysIntOfFloatNearest(WantWidth);
+    int DestHeight = s3d_SysIntOfFloatNearest(WantHeight);
+    int DestDepth = 1;
+    int DestSnap = s3d_CDrvGfxEng::TexSnap_PreferUp;
+    GfxEng->SnapTexSize(DestWidth, DestHeight, DestDepth, DestProp, DestSnap);
+
+    s3d_CEngUtilShaderDestJob *DestJob = FilterDestGfx->CreateJob(
+                m_ShaderEnv, Scope, Data->m_Dest, DestWidth, DestHeight);
+    if(!DestJob)
+        return;
+
+    s3d_CSysIntps nSrcTex = FilterSrcTexArray.GetCnt();
+    int nSamp = GfxEng->GetSampCnt();
+    
+    if(nSrcTex > nSamp)
+    {
+        s3d_CUtilMsg e;
+        e.m_Code = "eng/shader/eng_shader_special_filter.too_many_tex";
+        e.m_StdTempl = "Too many textures specified. "
+                       "Max textures allowed '[1]'.";
+        e.AddInfo(Data->m_Info);
+        e.AddInfo(s3d_CUtilStrUtil::StrOfInt(nSamp));
+        s3d_UtilMsgReportError(m_ShaderEnv->m_MsgHandler, e);
+        return;
+    }
+
+    // Filter:
+
+    GfxEng->SetPaintMode(s3d_CDrvGfxEng::PaintMode_Fill);
+    GfxEng->SetCullMode(s3d_CDrvGfxEng::CullMode_None);
+    GfxEng->SetDepthTest(s3d_CDrvGfxEng::TestMode_Always);
+    GfxEng->SetDepthWrite(false);
+    GfxEng->SetDepthBias(0, 0);
+    GfxEng->SetStencilMode(
+            0, 
+            0, 
+            s3d_CDrvGfxEng::TestMode_Always, 
+            s3d_CDrvGfxEng::TestMode_Always, 
+            0,
+            s3d_CDrvGfxEng::StencilOp_Keep, 
+            s3d_CDrvGfxEng::StencilOp_Keep, 
+            s3d_CDrvGfxEng::StencilOp_Keep,
+            s3d_CDrvGfxEng::StencilOp_Keep, 
+            s3d_CDrvGfxEng::StencilOp_Keep, 
+            s3d_CDrvGfxEng::StencilOp_Keep);
+    GfxEng->SetFogNone();
+    
+    GfxEng->SetAlphaTest(s3d_CDrvGfxEng::TestMode_Always, 0);
+    GfxEng->DisableLighting();
+    GfxEng->SetColorAlpha(0);
+
+    GfxEng->SetSampTexElseNone(int(nSrcTex));
+
+    s3d_CDrvGfxProg *DrvProg = 0;
+    if(m_GfxProg)
+        DrvProg = m_GfxProg->GetDrvProg();
+
+    s3d_CDrvGfxParam GfxParam;
+    GfxParam.m_Blk.m_Decl = ShaderGfx->m_ProgParamDecl;
+    GfxParam.m_Blk.m_Data = Scope->m_VarBlk.m_Data;
+
+    s3d_CUtilMemPoolFrm MemPoolFrm(MemPool);
+    s3d_CDrvUtilPaintTri PaintTri(
+            Data->m_Info.GetChars(), MemPool, GfxEng, DrvProg);
+
+    s3d_CDrvGfxClearParam ClearParam;
+    s3d_CDrvGfxDest *Dest = DestJob->m_DrvGfxDestArray.GetPtrRaw();
+    s3d_CSysIntps nDestTex = DestJob->m_DrvGfxDestArray.GetCnt();
+    
+	
+
+	static const int CubeFaceMap[] =
+    {
+        s3d_CDrvGfxEng::TexPart_CubeNegX, s3d_CDrvGfxEng::TexPart_CubePosX, 
+        s3d_CDrvGfxEng::TexPart_CubeNegY, s3d_CDrvGfxEng::TexPart_CubePosY,   
+        s3d_CDrvGfxEng::TexPart_CubePosZ, s3d_CDrvGfxEng::TexPart_CubeNegZ, 
+    };
+	static const s3d_CUtilVec3f ViewDirMap[] = 
+    {
+        s3d_CUtilVec3f( 1.f, 0.f, 0.f), s3d_CUtilVec3f(-1.f,  0.f,  0.f), 
+        s3d_CUtilVec3f( 0.f, 1.f, 0.f), s3d_CUtilVec3f( 0.f, -1.f,  0.f), 
+        s3d_CUtilVec3f( 0.f, 0.f, 1.f), s3d_CUtilVec3f( 0.f,  0.f, -1.f),  
+    };
+    static const s3d_CUtilVec3f AlsoFromMap[] = 
+    {
+        s3d_CUtilVec3f( 1.f, 0.f, 0.f), s3d_CUtilVec3f( 1.f,  0.f, 0.f), 
+        s3d_CUtilVec3f( 0.f, 1.f, 0.f), s3d_CUtilVec3f( 0.f,  1.f, 0.f), 
+        s3d_CUtilVec3f( 1.f, 0.f, 0.f), s3d_CUtilVec3f( 1.f,  0.f, 0.f), 
+    };
+    static const s3d_CUtilVec3f AlsoToMap[] = 
+    {
+        s3d_CUtilVec3f( 0.f,  0.f, -1.f), s3d_CUtilVec3f(  0.f, 0.f, 1.f),  
+        s3d_CUtilVec3f( 0.f,  0.f, -1.f), s3d_CUtilVec3f(  0.f, 0.f, 1.f),  
+        s3d_CUtilVec3f( 1.f,  0.f,  0.f), s3d_CUtilVec3f( -1.f, 0.f, 0.f), 
+    };
+    
+	GfxEng->SetTransfIdentity(s3d_CDrvGfxEng::TransfChan_Proj, 0);
+    GfxEng->SetTransfIdentity(s3d_CDrvGfxEng::TransfChan_View, 0);
+    
+	const s3d_CUtilVec3f CamDir(0, 0, 1);
+	s3d_CUtilMat4x4f projMat = s3d_CEngUtilMathUtil::CalcProjStd(
+            false, 1, -1, 0, 0, 0.1, 5.0);	
+	GfxEng->SetTransf(s3d_CDrvGfxEng::TransfChan_Proj, 0, projMat);
+
+    s3d_CUtilTranslQuatf ViewTransf;
+	ViewTransf.m_Transl = s3d_CUtilVec3f(0,0,0);
+
+	s3d_CUtilMat4x4f viewMat;
+
+	int steps = 1;
+	if(Data->m_UsePoints)
+	{
+		steps = 2;
+		GfxEng->SetPaintMode(s3d_CDrvGfxEng::PaintMode_Point);
+	}        
+	float pixelSize = 1.0f / (float) Data->m_PhotonCount;
+	float halfPixelSize = 0.5f * pixelSize;
+     
+	
+	ClearParam.m_MustColorAlpha = true;
+	ClearParam.m_MustDepth = false;
+	ClearParam.m_Depth = 1.0;
+	ClearParam.m_ColorAlpha = s3d_CUtilVec4f(0.0,0.0,0.0,1.0);
+
+	for(int iFace = 0; iFace < 6; iFace++)	
+	{
+		if(!Data->m_UpdateAllFace)
+		{
+			iFace = m_CurrentFace;
+			m_CurrentFace = (++m_CurrentFace) % 6;
+		}
+      
+         for(int i = 0; i < Data->m_PhotonCount - 1; i += steps)
+			for(int j = 0; j < Data->m_PhotonCount - 1; j += steps)
+			{
+			  float X1 = i * pixelSize + halfPixelSize; 
+			  float Y1 = j * pixelSize + halfPixelSize; 
+			  float X2 = (i + 1) * pixelSize + halfPixelSize; 
+			  float Y2 = (j + 1) * pixelSize + halfPixelSize; 
+			
+			  PaintTri.AddQuadAligned(
+				s3d_CUtilVec2f(X1, Y1), 
+				s3d_CUtilVec2f(0, 0), 
+				s3d_CUtilVec2f(X2, Y2), 
+				s3d_CUtilVec2f(1, 1), 
+				0, s3d_CUtilVec4f(0,0,0,0));
+			}
+
+		s3d_CUtilQuatf EffQuat = s3d_CUtilQuatf::ByPathAlso(
+                CamDir, ViewDirMap[iFace], AlsoFromMap[iFace], 
+                        AlsoToMap[iFace]);
+		ViewTransf.m_Quat = EffQuat;
+		viewMat = s3d_CUtilGeof::GetMapOfTransf3(ViewTransf);
+		GfxEng->SetTransf(s3d_CDrvGfxEng::TransfChan_View, 0, viewMat);
+        
+		for(int j = 0; j < nDestTex; j++)
+		  Dest[j].m_Part = CubeFaceMap[iFace];        
+		
+		GfxEng->BeginRenderTex(Data->m_DestProp, ClearParam,
+				DestWidth, DestHeight, nDestTex, Dest);
+
+		GfxEng->SetBlendMode(
+             s3d_CDrvGfxEng::BlendFac_SrcAlpha, 
+            s3d_CDrvGfxEng::BlendFac_One,
+            s3d_CDrvGfxEng::BlendOp_SrcPlusDest,
+            s3d_CDrvGfxEng::BlendFac_One, 
+            s3d_CDrvGfxEng::BlendFac_One,
+            s3d_CDrvGfxEng::BlendOp_SrcPlusDest);
+
+		GfxEng->SetViewRect(1);
+    
+		int iSamp;
+		for(iSamp = 0; iSamp < nSrcTex; iSamp++)
+		{
+			const s3d_CEngGfxVarTexChan *SrcTexChanVar = 
+					FilterSrcTexArray[iSamp];
+			s3d_CDrvGfxTex *DrvTex = 0;
+			if(SrcTexChanVar)
+				DrvTex = SrcTexChanVar->m_Val.m_FixedDrvTex;
+			GfxEng->SetSampTex(iSamp, DrvTex);
+			GfxEng->SetSampMode(iSamp, SrcTexChanVar->m_Val.m_FixedSampMode);
+		}		
+
+		PaintTri.Perform(GfxParam);
+
+		GfxEng->EndRender();		
+	}
+
+    FilterDestGfx->FinishJob(
+            m_ShaderEnv, Scope, Data->m_Dest, DestJob);
+}
+
+void gtp_Shader_CausticCubeInst::FetchSrcArray(
+        s3d_CUtilMemPool *MemPool, s3d_CEngShaderScope *Scope, 
+        const s3d_CSysChar *Info,
+        s3d_CEngGfxVarTexChanArray &SrcTexArray,
+        s3d_CDrvVarSlotArray &SrcVarSlotArray)
+{
+    s3d_CSysIntps nTex = SrcVarSlotArray.GetCnt();
+    SrcTexArray.SetCnt(MemPool, nTex);
+    s3d_CSysIntps iTex;
+    for(iTex = 0; iTex < nTex; iTex++)
+    {
+        s3d_CEngGfxVarTexChan *TexChanVar = 
+                s3d_EngGfxVarFetchWaryTexChan(
+                    m_ShaderEnv->m_MsgHandler, Info, Scope->m_VarBlk, 
+                    SrcVarSlotArray.RefAt(iTex));        
+        SrcTexArray.SetAt(iTex, TexChanVar);
+    }
+}
+
+void gtp_Shader_CausticCubeInst::CalcSrcTexSize(
+        s3d_CUtilMemPool *MemPool, s3d_CEngShaderScope *Scope,
+        s3d_CDrvGfxEng *GfxEng, int &Width, int &Height, 
+        s3d_CEngGfxVarTexChanArray &FilterSrcTexArray)
+{
+    Width = 0;
+    Height = 0;
+
+    s3d_CSysIntps nSrcTex = FilterSrcTexArray.GetCnt();
+    s3d_CSysIntps iSrcTex;
+    for(iSrcTex = 0; iSrcTex < nSrcTex; iSrcTex++)
+    {
+        s3d_CEngGfxVarTexChan *SrcTexChan = FilterSrcTexArray[iSrcTex];
+        if(!SrcTexChan)
+            continue;
+        s3d_CDrvGfxTex *SrcDrvTex = SrcTexChan->m_Val.m_FixedDrvTex;
+        if(!SrcDrvTex)
+            continue;
+
+        int SrcTexWidth, SrcTexHeight, SrcTexDepth;
+        SrcDrvTex->GetSize(SrcTexWidth, SrcTexHeight, SrcTexDepth);
+
+        if(Width < SrcTexWidth)
+            Width = SrcTexWidth;
+        if(Height < SrcTexHeight)
+            Height = SrcTexHeight;
+    }
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_module.h
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_module.h	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_module.h	(revision 2453)
@@ -0,0 +1,55 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+//@cpp
+
+#ifndef S3D_ENG_SHADER_SPECIAL_MODULE_H
+#define S3D_ENG_SHADER_SPECIAL_MODULE_H
+
+#include "../../interf/eng_shader.h"
+#include "../../../comp/core/comp_module.h"
+#include "../../../comp/core/comp_setup.h"
+
+///////////////////////////////////////////////////////////////////////////////
+
+//@ 
+class gtp_ShaderModuleSuppl: public s3d_CCompSuppl
+{
+public:
+    //@
+    s3d_CCompObjPtr SupplObj(
+            s3d_CUtilMsgHandler *MsgHandler, s3d_CUtilStr_cr Info,
+                s3d_CUtilStr_cr Ident, s3d_CUtilStr_cr Version);
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+//@
+class gtp_ShaderModuleCover: public s3d_CCompModuleCover
+{
+public:
+    //@
+    s3d_CUtilStr GetName() const;
+
+    //@
+    s3d_CUtilStr GetAbout() const;
+
+    //@
+    s3d_CCompSupplPtr CreateSuppl(
+            s3d_CUtilMsgHandler *MsgHandler, s3d_CUtilStr_cr Info,
+            const s3d_CUtilSnkChunk *Param) const;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_envmap.h
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_envmap.h	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/gtp_shader/gtp_shader_envmap.h	(revision 2453)
@@ -0,0 +1,260 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+//@cpp
+
+#ifndef GTP_SHADER_ENVMAP_H
+#define GTP_SHADER_ENVMAP_H
+
+#include "../../interf/eng_shader.h"
+#include "../../interf/eng_shaderenv.h"
+#include "../../util/eng_util_shaderdest.h"
+#include "../../../comp/core/comp_setup.h"
+#include "../../../comp/util/comp_util_uniquebase.h"
+
+///////////////////////////////////////////////////////////////////////////////
+
+class gtp_Shader_EnvMapGfx;
+
+//@
+typedef s3d_CUtilKeyEntry<s3d_CEngGfxCtxPtr, gtp_Shader_EnvMapGfx*>
+        gtp_Shader_EnvMapGfxEntry;
+
+//@
+typedef s3d_CUtilTree<gtp_Shader_EnvMapGfxEntry>
+        gtp_Shader_EnvMapGfxTree;
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct gtp_Shader_EnvMapData: s3d_CUtilPtrBase
+{
+    s3d_CUtilStr m_Info;
+
+    s3d_CUtilStr m_MeshVarInfo;
+    s3d_CUtilAtomPtr m_MeshVarAtom;
+    s3d_CUtilStr m_TexChanInfo;
+    int m_DestProp;
+    s3d_CEngUtilShaderDest m_Dest;
+
+    float m_NegZ;
+    float m_PosZ;
+    int m_MaxExt;
+    float m_ExtDistScale;
+    int m_MaxRecursion;
+
+	int m_UpdateInterval;
+	int m_StartFrame;
+	bool m_UpdateAllFace;
+	bool m_WorldSpace;
+	s3d_CUtilAtomPtr m_LastCenterVarAtom;
+	s3d_CUtilStr m_LastCenterVarInfo;
+
+    s3d_CUtilStr m_RankInfo;
+    int m_Rank;
+    s3d_CUtilAtomArray m_MethodArray;
+    s3d_CUtilAtomPtr m_EnumTrigger;
+};
+
+typedef s3d_CUtilPtr<gtp_Shader_EnvMapData>
+        gtp_Shader_EnvMapDataPtr;
+
+///////////////////////////////////////////////////////////////////////////////
+
+//@
+class gtp_Shader_EnvMap
+    : public s3d_CEngShader,
+    public s3d_CCompUtilUniqueBase,
+    public s3d_CCompSetup
+{
+public:
+    S3D_UTIL_RTTI_TABLE_DECLARE
+
+    //@
+    gtp_Shader_EnvMap();
+
+    //@
+    void SetupInit(
+            s3d_CUtilMsgHandler *MsgHandler, s3d_CUtilStr_cr Info,
+            s3d_CCompSuppl *FetchSuppl, s3d_CUtilSnkChunk *Param);
+
+    //@
+    void SetupDone();
+
+    //@
+    s3d_CUtilStr GetInfo();
+
+    //@
+    void RegisterNotif(s3d_CUtilNotifRecip *Recip);
+
+    //@
+    s3d_CEngShaderGfxPtr FindShaderGfx(
+            s3d_CUtilNotifGather *NotifGather, s3d_CEngGfxCtx *GfxCtx);
+
+private:
+    s3d_CEngShaderEnvPtr m_ShaderEnv;
+    gtp_Shader_EnvMapGfxTree m_ShaderGfxTree;
+    gtp_Shader_EnvMapDataPtr m_Data;
+
+    friend class gtp_Shader_EnvMapGfx;
+    friend class gtp_Shader_EnvMapInst;
+};
+
+//@
+typedef s3d_CUtilPtr<gtp_Shader_EnvMap>
+        gtp_Shader_EnvMapPtr;
+
+///////////////////////////////////////////////////////////////////////////////
+
+//@
+class gtp_Shader_EnvMapGfx: public s3d_CEngShaderGfx
+{
+public:
+    //@
+    gtp_Shader_EnvMapGfx(
+            s3d_CEngShaderEnv *ShaderEnv,
+            s3d_CEngGfxCtx *GfxCtx,
+            gtp_Shader_EnvMapData *Data);
+
+    //@
+    gtp_Shader_EnvMapGfxTree::CNode *GetNode();
+
+    //@
+    void RegisterNotif(s3d_CUtilNotifRecip *Recip);
+
+    //@
+    void ExtractGfx();
+
+    //@
+    bool IsValid();
+
+    //@
+    void LinkCollect(s3d_CUtilAtomSet &VarAtomSet);
+
+    //@
+    void LinkAppoint(s3d_CDrvVarDecl *VarDecl);
+
+    //@
+    s3d_CEngShaderInstPtr CreateShaderInst(
+            s3d_CEngShaderHead *Head);
+
+private:
+    gtp_Shader_EnvMapGfxTree::CNode m_Node;
+    s3d_CEngShaderEnvPtr m_ShaderEnv;
+    gtp_Shader_EnvMapDataPtr m_Data;
+
+    // ShaderGfx-Data Variables:
+    s3d_CDrvVarSlotInit m_MeshVarSlot;
+    s3d_CEngUtilShaderDestGfx m_DestGfx;
+	s3d_CDrvVarSlotInit m_LastCenterVarSlot;
+
+    friend class gtp_Shader_EnvMapInst;
+};
+
+//@
+typedef s3d_CUtilPtr<gtp_Shader_EnvMapGfx> 
+        gtp_Shader_EnvMapGfxPtr;
+
+///////////////////////////////////////////////////////////////////////////////
+
+//@
+class gtp_Shader_EnvMapInst
+    : public s3d_CEngShaderInst,
+    public s3d_CEngShaderExec
+
+{
+public:
+    //@
+    gtp_Shader_EnvMapInst(
+            s3d_CEngShaderEnv *ShaderEnv,
+            s3d_CEngGfxCtx *GfxCtx, s3d_CEngShaderHead *Head,
+            gtp_Shader_EnvMapGfx *GfxShader);
+
+    //@
+    void RegisterNotif(s3d_CUtilNotifRecip *Recip);
+
+    //@
+    void SetShaderCtx(s3d_CEngShaderCtx *ShaderCtx);
+
+    //@
+    void SetGfxState(s3d_CEngGfxState *GfxState);
+
+    //@
+    void SetPos(s3d_CEngPos *Pos);
+
+    //@
+    void SetModel(s3d_CEngModel *Model);
+
+    //@
+    void ArrangeCollect(
+            s3d_CUtilMemPool *MemPool,
+            s3d_CEngShaderScopeArray &ScopeArray);
+
+    //@
+    void ArrangeInit(
+            s3d_CUtilMemPool *MemPool,
+            s3d_CEngShaderScopeArray_cr ScopeArray);
+
+    //@
+    void ArrangePerform(
+            s3d_CUtilMemPool *MemPool,
+            s3d_CEngShaderScopeArray_cr ScopeArray);
+
+    //@
+    void ArrangeFeedback(
+            s3d_CUtilMemPool *MemPool,
+            s3d_CEngShaderScopeArray_cr ScopeArray);
+
+    //@
+    void ArrangeGather(
+            s3d_CEngShaderExecArray &ExecArray);
+
+    //@
+    void ShaderExecPerform(
+            s3d_CEngShaderScope *Scope, 
+            s3d_CUtilAtom *Method,
+            s3d_CEngGfxTaskArray &TaskArray);
+
+    //@
+    void *GfxElemJobExec(
+            s3d_CEngShaderScope *Scope,
+            void *GfxMark);
+
+private:
+	int m_FrameCount;
+    int m_CurrentFace;
+	s3d_CEngShaderEnvPtr m_ShaderEnv;
+    gtp_Shader_EnvMapGfxPtr m_ShaderGfx;
+    s3d_CEngGfxCtxPtr m_GfxCtx;
+    s3d_CEngShaderHeadEye m_Head;
+    bool m_CanRenderColorAlphaTex;
+	s3d_CUtilVec4f m_LastCenter;
+
+    void Calc(
+            s3d_CUtilMemPool *MemPool, s3d_CEngShaderScope *Scope, 
+            s3d_CUtilTranslQuatf_cr ViewTransf,
+            s3d_CUtilVec3f_cr BoundCen, s3d_CUtilVec3f_cr BoundExt,
+            s3d_CEngUtilShaderDestJob *&DestJob);
+	
+	void SetVars(
+            s3d_CUtilMemPool *MemPool, s3d_CEngShaderScope *Scope);
+
+    
+};
+
+//@
+typedef s3d_CUtilPtr<gtp_Shader_EnvMapInst>
+        gtp_Shader_EnvMapInstPtr;
+
+///////////////////////////////////////////////////////////////////////////////
+
+#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/universe/actor/universe.s3d_actor
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/universe/actor/universe.s3d_actor	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/universe/actor/universe.s3d_actor	(revision 2453)
@@ -0,0 +1,182 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Universe definition. 
+// The universe contains the game state.
+
+actor_ident "kit_base.capsule"
+actor_param
+{
+    active 1
+    scope "universe"
+    local_name "capsule"
+    deleg_target "dispatch_export"
+    child_ident "kit_base.group"
+    child_param
+    {
+        // Delegate action calls to the children.
+        active 1
+        child_array
+        {
+            ident "kit_base.dispatch"
+            param
+            {
+                name "dispatch_export"
+                entry_array
+                {
+                    cmds "produce_player"
+                    targets "player_netproducer"
+                    newcmd "produce"
+                }
+                {
+                    cmds "net_traverse"
+                    targets 
+                        "setting_serroot"
+                }
+                {
+                    cmds "net_traverse"
+                    targets 
+                        "player_netproducer"
+                        "player_netappear"
+                    newcmd "traverse"
+                }
+            }
+        }
+        {
+            // Dispatcher handling messages from the universe,
+            // which contains the game state.
+            ident "kit_base.dispatch"
+            param
+            {
+                name "dispatch_serialize"
+                entry_array
+                {
+                    cmds "store_pre" "store_post" "load_post"
+                    targets "player_set"
+                }
+                {
+                    // Handle every command to avoid error:
+                    cmds "delete_pre" "delete_post"
+                        "store_pre" "store_post"
+                        "load_pre" "load_post"
+                    targets
+                }
+            }
+        }
+        {
+            ident "kit_base.dispatch"
+            param
+            {
+                name "dispatch_setting"
+                entry_array
+                {
+                    cmds 
+                        "get_basesuppl"
+                        "ignore_frmtime"
+                        "cfg_access_int_info"
+                        "cfg_access_float_info"
+                        "cfg_access_str_info"
+                        "cfg_access_chunk_info"
+                        "universe_cfg_access_int_info"
+                        "universe_cfg_access_float_info"
+                        "universe_cfg_access_str_info"
+                        "universe_cfg_access_chunk_info"
+                    targets "^dispatch_universe"
+                }
+                {
+                    cmds 
+                        "notice_level_load_pre"
+                        "notice_level_load_post"
+                    targets "player_set"
+                }
+            }
+        }
+        {
+            // Define a serialization actor.
+            // This actor can store and load its child into and from a file.
+            // Important! This actor defines a local namespace. 
+            // It is not possible to access actors outside this namespace.
+            // Instead, you can send commands to the "outside" actor.
+            ident "kit_base.serroot"
+            param
+            {
+                // Delegate action calls to the child.
+                active 1
+                // Scope of the local namespace.
+                scope "setting"
+                // Actor name from outside.
+                export_name "setting"
+                // Name to delegate commands inside the universe to.
+                export_deleg_name "setting_serroot"
+                // Name to send commands for outside the universe to.
+                deleg_target "dispatch_export"
+                // Target to send commands outside the universe to.
+                local_outside_name "outside"
+                // 
+                outside_target "dispatch_setting"
+                // Objects outside the universe referenced from inside,
+                // fetched from the outside actor:
+                known_cmds "get_basesuppl"
+                // Header identifier for the state files.
+                ident "std"
+                // Notification commands about loading and saving.
+                notify_target "dispatch_serialize"
+                notify_pre_delete_cmd "delete_pre"
+                notify_post_delete_cmd "delete_post"
+                notify_pre_store_cmd "store_pre"
+                notify_post_store_cmd "store_post"
+                notify_pre_load_cmd "load_pre"
+                notify_post_load_cmd "load_post"
+                // The level root has an own namespace:
+                child_ident "kit_base.extern"
+                child_param
+                {
+                    // Delegate action calls to the child:
+                    active 1
+                    res "universe/actor/setting.s3d_actor_run"
+                }
+            }
+        }
+        {
+            // External file describing the structure of each player:
+            ident "kit_base.extern"
+            param
+            {
+                // Delegate action calls to the child:
+                active 1
+                res "universe/actor/universeplayer.s3d_actor_run"
+            }
+        }
+        {
+            ident "kit_engbase.netproducer"
+            param
+            {
+                name "player_netproducer"
+                produce_target "player_rawproducer"
+                produce_cmd "produce"
+                net_traverse_cmd "net_traverse"
+                created_local_cmd "created_local"
+                created_net_cmd "created_net"
+            }
+        }
+        {
+            ident "kit_engbase.netappear"
+            param
+            {
+                name "player_netappear"
+                appear_target "player_set"
+                appear_cmd "net_appear"
+            }
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/universe/actor/.sconsign
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/universe/actor/.sconsign	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/universe/actor/.sconsign	(revision 2453)
@@ -0,0 +1,9 @@
+}q(Usettingplayer.s3d_actorq(cSCons.Node.FS
+BuildInfo
+qoq}q(U	timestampqJÈEeFUcsigqJÈEeFubUlevels.s3d_actorq(hoq	}q
+(U	timestampq
+JÈEeFUcsigq
+JÈEeFubUuniverseplayer.s3d_actorq
+(hoq}q(hJÈEeFhJÈEeFubUuniverse.s3d_actorq(hoq}q(hJÈEeFhJÈEeFubUsetting.s3d_actorq(hoq}q(h
+JÈEeFh
+JÈEeFubu.
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/universe/actor/levels.s3d_actor
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/universe/actor/levels.s3d_actor	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/universe/actor/levels.s3d_actor	(revision 2453)
@@ -0,0 +1,107 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Level manager definition. 
+// This includes references to all available levels.
+
+actor_ident "kit_base.group"
+actor_param
+{
+    // Delegate action calls to the children.
+    active 1
+    child_array
+    {
+        // Actor evaluating level switch commands.
+        ident "kit_base.dispatch"
+        param
+        {
+            name "levelmgr"
+            log 1   // To log level switches.
+            entry_array
+            {
+                cmds "goto_level0"
+                targets "goto_level"
+                newcmd "perform"
+            }
+            {
+                cmds "goto_level1"
+                targets "goto_level"
+                newcmd "perform"
+            }
+            {
+                cmds "goto_level2"
+                targets "goto_level"
+                newcmd "perform"
+            }
+            {
+                cmds "goto_level3"
+                targets "goto_level"
+                newcmd "perform"
+            }
+            {
+                cmds "goto_level4"
+                targets "goto_level"
+                newcmd "perform"
+            }
+            {
+                cmds "goto_level5"
+                targets "goto_level"
+                newcmd "perform"
+            }
+            {
+                cmds "goto_level6"
+                targets "goto_level"
+                newcmd "perform"
+            }
+            {
+                cmds "goto_level7"
+                targets "goto_level"
+                newcmd "perform"
+            }
+            {
+                cmds "goto_level8"
+                targets "goto_level"
+                newcmd "perform"
+            }
+            {
+                cmds "goto_level9"
+                targets "goto_level"
+                newcmd "perform"
+            }
+        }
+    }
+    {
+        ident "kit_base.paramstr"
+        param
+        {
+            name "goto_level"
+            target "levelloader"
+            cmd "goto"
+            param "level/actor/main.s3d_actor_run"
+        }
+    }
+    {
+        ident "kit_snk.childif"
+        param
+        {
+            extcfg_actor "setting_cfg"
+            extcfg_entry_switch "server"
+            then_child_ident "kit_base.oninit"
+            then_child_param
+            {
+                target "levelmgr"
+                cmd "goto_level0"
+            }
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/universe/actor/settingplayer.s3d_actor
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/universe/actor/settingplayer.s3d_actor	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/universe/actor/settingplayer.s3d_actor	(revision 2453)
@@ -0,0 +1,291 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Definition of a player on the setting.
+//
+// It mainly manages the connection to the client.
+// A player actor lives as long as the connection to the client exists.
+//
+// A player actor does not contain level-specific player information.
+// Such information is managed by a level-specific level-player actor.
+// The level-player actor is created each time again entering a new level.
+// For this, a level must understand a level-player command for producing
+// the a level-player.
+
+// Since each dsc-file formally can only contain a singe actor,
+// we use the group actor to define more than one actor.
+actor_ident "kit_base.group"
+actor_param
+{
+    // Delegate action calls to the children.
+    active 1
+    child_array
+    {
+        ident "kit_base.producer"
+        param
+        {
+            name "player_rawproducer"
+            deleg_name "player_set"
+            active 1
+            ident "kit_base.capsule"
+            param
+            {
+                // Delegate the action calls to all children:
+                active 1
+                // Name of the scope of the capsule.
+                scope "settingplayer"
+                // Name of the capsule actor within its own namespace.
+                // Actors within the capsule can access the capsule
+                // actor itself by this name.
+                local_name "capsule"
+                // Name of the capsule seen from outside
+                // registered in the local namespace. Commands sent
+                // to this actor are delegate to "delegate_target".
+                local_deleg_name "capsule_deleg"
+                // Delegate commands from outside to the dispatcher.
+                deleg_target "dispatch_export"
+                // The capsule contains a group of child actors.
+                child_ident "kit_base.group"
+                child_param
+                {
+                    // Delegate action calls to the children.
+                    active 1
+                    child_array
+                    {
+                        // Dispatcher for events from outside the player
+                        // capsule.
+                        ident "kit_base.dispatch"
+                        param
+                        {
+                            name "dispatch_export"
+                            entry_array
+                            {
+                                cmds "destroy"
+                                targets "levelplayer" "capsule"
+                            }
+                            {
+                                cmds "created_local"
+                                targets
+                            }
+                            {
+                                cmds "created_net"
+                                targets "reproduce"
+                                newcmd "set_blocked"
+                            }
+                            {
+                                cmds "net_traverse"
+                                targets
+                                    "levelplayer_netproduce"
+                                    "levelplayer_netappear"
+                                newcmd "traverse"
+                            }
+                            {
+                                cmds "net_appear"
+                                targets "reproduce"
+                                newcmd "rework"
+                            }
+                            {
+                                cmds "add_motion"
+                                targets "levelplayer"
+                            }
+                            {
+                                // Store the inform-actor in "inform":
+                                cmds "assign_inform" "set_inform"
+                                targets "inform_deleg"
+                                newcmd "set_deleg_target"
+                            }
+                            {
+                                cmds "assign_inform" "set_inform"
+                                targets "informanswer"
+                            }
+                            {
+                                // Refresh connection to setting-player.
+                                cmds "assign_inform"
+                                targets "levelplayer_refresh_charge"
+                                newcmd "perform"
+                            }
+                            {
+                                cmds "search_inform" "search_noinform"
+                                targets "informanswer"
+                            }
+                            {
+                                cmds "god" "goto_level_next" "goto_level_prev"
+                                    "special"
+                                // Delegate to the level-player:
+                                targets "levelplayer"
+                            }
+                        }
+                    }
+                    {
+                        ident "kit_base.dispatch"
+                        param
+                        {
+                            name "dispatch"
+                            entry_array
+                            {
+                                cmds "levelplayer_pre"
+                                targets
+                            }
+                            {
+                                cmds "levelplayer_post"
+                                targets
+                            }
+                        }
+                    }
+                    {
+                        // Dispatcher for commands from the level player:
+                        ident "kit_base.dispatch"
+                        param
+                        {
+                            name "dispatch_inform"
+                            entry_array
+                            {
+                                cmds 
+                                    "set_gfxmgr_level"
+                                    "set_sndmgr_level"
+                                    "set_state_world"
+                                    "set_state_sky"
+                                    "set_sim_world"
+                                    "set_noise_world"
+                                    "set_sensorstate_world"
+                                    "set_camera"
+                                    "set_playerbody"
+                                targets "inform"
+                            }
+                            {
+                                cmds "reproduce"
+                                targets "levelplayer_netproduce"
+                            }
+                        }
+                    }
+                    {
+                        ident "kit_base.deleg"
+                        param
+                        {
+                            name "inform_deleg"
+                            deleg_name "inform"
+                            deleg_target ""
+                            allow_no_target 1
+                            enabled 1
+                        }
+                    }
+                    {
+                        ident "kit_engobj.informanswer"
+                        param
+                        {
+                            name "informanswer"
+                            answer_cmd "add_result"
+                            answer_actor "capsule_deleg"
+                        }
+                    }
+                    {
+                        ident "kit_engobj.informmgr"
+                        param
+                        {
+                            name "levelplayer_informmgr"
+                            //
+                            deleg_name "levelplayer"
+                            // The inform-actor. A level player sends
+                            // its commands to this actor:
+                            inform "dispatch_inform"
+                            ignore_no_charge 1
+                            // Recip about level-player changes.
+                            notify_target "dispatch"
+                            notify_pre_cmd "levelplayer_pre"
+                            notify_post_cmd "levelplayer_post"
+                            // If no level player exists, this command is sent
+                            // to this actor to get a player in a level.
+                            produce_target "^level"
+                            produce_cmd "produce_player"
+                        }
+                    }
+                    {
+                        ident "kit_base.paramvoid"
+                        param
+                        {
+                            name "levelplayer_refresh_charge"
+                            target "levelplayer_informmgr"
+                            cmd "refresh_charge"
+                        }
+                    }
+                    {
+                        ident "kit_engbase.netproducer"
+                        param
+                        {
+                            name "levelplayer_netproduce"
+                            produce_target "levelplayer_informmgr"
+                            produce_cmd "produce_charge"
+                            net_traverse_cmd "net_traverse"
+                            created_local_cmd "created_local"
+                            created_net_cmd "created_net"
+                        }
+                    }
+                    {
+                        ident "kit_engbase.netappear"
+                        param
+                        {
+                            name "levelplayer_netappear"
+                            appear_target "levelplayer"
+                            appear_cmd "net_appear"
+                        }
+                    }
+                    {
+                        ident "kit_engobj.fetch"
+                        param
+                        {
+                            name "levelplayer_fetch"
+                            query_target "levelplayer_informmgr"
+                            query_cmd "get_charge"
+                            produce_target "levelplayer_netproduce"
+                            produce_cmd "produce"
+                            produce_report_target ""
+                            produce_report_cmd ""
+                            enum_target ""
+                            enum_cmd ""
+                            enum_report_target ""
+                            enum_report_cmd ""
+                        }
+                    }
+                    {
+                        ident "kit_engbase.netreproduce"
+                        param
+                        {
+                            name "reproduce"
+                            producer "inform"
+                            charge "capsule_deleg"
+                            reproduce_cmd "reproduce"
+                        }
+                    }                    
+                    {
+                        ident "kit_snk.childif"
+                        param
+                        {
+                            extcfg_actor "^setting_cfg"
+                            extcfg_entry_switch "server"
+                            then_child_ident "kit_base.onaction"
+                            then_child_param
+                            {
+                                // Check if a new player must be created.
+                                active 1
+                                name "check_levelplayer_onaction"
+                                target "levelplayer_fetch"
+                                cmd "check_produce_charge"
+                            }
+                        }
+                    }
+                    
+                }
+            }
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/universe/actor/setting.s3d_actor
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/universe/actor/setting.s3d_actor	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/universe/actor/setting.s3d_actor	(revision 2453)
@@ -0,0 +1,222 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+actor_ident "kit_base.group"
+actor_param
+{
+    // Delegate action calls to the children.
+    active 1
+    child_array
+    {
+        // Dispatcher handling messages for the level root.            
+        ident "kit_base.dispatch"
+        param
+        {
+            name "dispatch_export"
+            entry_array
+            {
+                cmds "rawproduce_player"
+                targets "player_rawproducer"
+                newcmd "produce"
+            }
+            {
+                cmds "find_player"
+                targets "player_set"
+                newcmd "search_noinform"
+            }
+            {
+                cmds "net_traverse"
+                targets 
+                    "level_extern"
+                newcmd "traverse"
+            }
+            {
+                cmds "store_pre"
+                targets "player_set"
+            }
+            {
+                cmds "goto"
+                    "goto_level0" "goto_level1" 
+                    "goto_level2" "goto_level3" 
+                    "goto_level4" "goto_level5" 
+                    "goto_level6" "goto_level7" 
+                    "goto_level8" "goto_level9" 
+                    "goto_level10" "goto_level11" 
+                    "goto_level12" "goto_level13" 
+                    "goto_level14" "goto_level15" 
+                    "goto_level16" "goto_level17" 
+                    "goto_level18" "goto_level19" 
+                    "goto_level20" "goto_level21" 
+                targets "levelmgr"
+            }
+        }
+    }
+    {
+        ident "kit_base.dispatch"
+        param
+        {
+            name "dispatch"
+            entry_array
+            {
+                cmds 
+                    "notice_level_load_pre"
+                    "notice_level_load_post"
+                targets "outside"
+            }
+        }
+    }
+    {
+        // Stub object for the cfg actor.
+        // Delegates the commands to the real cfg actor 
+        // outside the universe.
+        ident "kit_base.dispatch"
+        param
+        {
+            name "cfg"
+            entry_array
+            {
+                cmds "access_int_info"
+                targets "outside"
+                newcmd "cfg_access_int_info"
+            }
+            {
+                cmds "access_float_info"
+                targets "outside"
+                newcmd "cfg_access_float_info"
+            }
+            {
+                cmds "access_str_info"
+                targets "outside"
+                newcmd "cfg_access_str_info"
+            }
+            {
+                cmds "access_chunk_info"
+                targets "outside"
+                newcmd "cfg_access_chunk_info"
+            }
+        }
+    }
+    {
+        // Stub object for the cfg actor.
+        // Delegates the commands to the real cfg actor 
+        // outside the universe.
+        ident "kit_base.dispatch"
+        param
+        {
+            name "setting_cfg"
+            entry_array
+            {
+                cmds "access_int_info"
+                targets "outside"
+                newcmd "universe_cfg_access_int_info"
+            }
+            {
+                cmds "access_float_info"
+                targets "outside"
+                newcmd "universe_cfg_access_float_info"
+            }
+            {
+                cmds "access_str_info"
+                targets "outside"
+                newcmd "universe_cfg_access_str_info"
+            }
+            {
+                cmds "access_chunk_info"
+                targets "outside"
+                newcmd "universe_cfg_access_chunk_info"
+            }
+        }
+    }
+    {
+        ident "kit_base.env"
+        param
+        {
+            name "env"
+        }
+    }
+    {
+        ident "kit_base.envcompsuppl"
+        param
+        {
+            name "envcompsuppl"
+        }
+    }
+    {
+        ident "kit_base.dispatch"
+        param
+        {
+            name "basesuppl"
+            entry_array
+            {
+                cmds "get_obj"
+                targets "outside"
+                newcmd "get_basesuppl"
+            }
+        }
+    }
+    {
+        ident "kit_perch.mgr"
+        param
+        {
+            name "perchmgr"
+        }
+    }
+    {
+        // Extern actor loading and holding the current level.
+        ident "kit_engbase.extern"
+        param
+        {
+            active 1
+            name "level_extern"
+            deleg_name "level"
+            res ""
+            allow_no_target 1
+            notify_target "dispatch"
+            notify_pre_cmd "notice_level_load_pre"
+            notify_post_cmd "notice_level_load_post"
+        }
+    }
+    {
+        ident "kit_base.dispatch"
+        param
+        {
+            name "levelloader"
+            entry_array
+            {
+                cmds "goto"
+                targets "level_extern"
+                newcmd "load"
+            }
+        }
+    }
+    {
+        // External files describing all levels:
+        ident "kit_base.extern"
+        param
+        {
+            // Delegate action calls to the child:
+            active 1
+            res "universe/actor/levels.s3d_actor_run"
+        }
+    }
+    {
+        // External file describing the structure of each player:
+        ident "kit_base.extern"
+        param
+        {
+            // Delegate action calls to the child:
+            active 1
+            res "universe/actor/settingplayer.s3d_actor_run"
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/universe/actor/universeplayer.s3d_actor
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/universe/actor/universeplayer.s3d_actor	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/universe/actor/universeplayer.s3d_actor	(revision 2453)
@@ -0,0 +1,343 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Definition of a player on the universe.
+//
+// It mainly manages the connection to the client.
+// A player actor lives as long as the connection to the client exists.
+//
+// A player actor does not contain level-specific player information.
+// Such information is managed by a level-specific level-player actor.
+// The level-player actor is created each time again entering a new level.
+// For this, a level must understand a level-player command for producing
+// the a level-player.
+
+// Since each dsc-file formally can only contain a singe actor,
+// we use the group actor to define more than one actor.
+actor_ident "kit_base.group"
+actor_param
+{
+    // Delegate action calls to the children.
+    active 1
+    child_array
+    {
+        ident "kit_base.producer"
+        param
+        {
+            name "player_rawproducer"
+            deleg_name "player_set"
+            active 1
+            ident "kit_base.capsule"
+            param
+            {
+                // Delegate the action calls to all children:
+                active 1
+                // Name of the scope of the capsule.
+                scope "universeplayer"
+                // Name of the capsule actor within its own namespace.
+                // Actors within the capsule can access the capsule
+                // actor itself by this name.
+                local_name "capsule"
+                // Name of the capsule seen from outside
+                // registered in the local namespace. Commands sent
+                // to this actor are delegate to "delegate_target".
+                local_deleg_name "capsule_deleg"
+                // Delegate commands from outside to the dispatcher.
+                deleg_target "dispatch_export"
+                // The capsule contains a group of child actors.
+                child_ident "kit_base.group"
+                child_param
+                {
+                    // Delegate action calls to the children.
+                    active 1
+                    child_array
+                    {
+                        // Dispatcher for events from outside the player
+                        // capsule.
+                        ident "kit_base.dispatch"
+                        param
+                        {
+                            name "dispatch_export"
+                            entry_array
+                            {
+                                cmds "destroy"
+                                targets "settingplayer" "capsule"
+                            }
+                            {
+                                cmds "created_local"
+                                targets
+                            }
+                            {
+                                cmds "created_net"
+                                targets "reproduce"
+                                newcmd "set_blocked"
+                            }
+                            {
+                                cmds "created_net"
+                                targets "netlost"
+                                newcmd "set_observe_activate"
+                            }
+                            {
+                                cmds "store_pre"
+                                targets "settingplayer_informmgr"
+                                newcmd "inform_reset"
+                            }
+                            {
+                                cmds "store_post"
+                                targets "settingplayer_informmgr"
+                                newcmd "inform_set"
+                            }
+                            {
+                                cmds "load_post"
+                                targets "settingplayer_fetch"
+                                newcmd "perform_fetch_charge"
+                            }
+                            {
+                                cmds "net_traverse"
+                                targets
+                                    "settingplayer_netproduce"
+                                    "settingplayer_netappear"
+                                    "netlost"
+                                newcmd "traverse"
+                            }
+                            {
+                                cmds "net_appear"
+                                targets "reproduce"
+                                newcmd "rework"
+                            }
+                            {
+                                // Store the inform-actor in "inform":
+                                cmds "assign_inform" "set_inform"
+                                targets "inform_deleg"
+                                newcmd "set_deleg_target"
+                            }
+                            {
+                                cmds "assign_inform" "set_inform"
+                                targets "informanswer"
+                            }
+                            {
+                                // Refresh connection to setting-player.
+                                cmds "assign_inform" "set_inform"
+                                targets "settingplayer_refresh_charge"
+                                newcmd "perform"
+                            }
+                            {
+                                cmds "search_inform" "search_noinform"
+                                targets "informanswer"
+                            }
+                            {
+                                cmds "add_motion"
+                                targets "settingplayer"
+                            }
+                            {
+                                cmds "goto_level0" "goto_level1"
+                                    "goto_level2" "goto_level3"
+                                    "goto_level4" "goto_level5"
+                                    "goto_level6" "goto_level7"
+                                    "goto_level8" "goto_level9"
+                                    "goto_level10" "goto_level11"
+                                    "goto_level12" "goto_level13"
+                                    "goto_level14" "goto_level15"
+                                    "goto_level16" "goto_level17"
+                                    "goto_level18" "goto_level19"
+                                    "goto_level20" "goto_level21"
+                                targets "^setting_serroot"
+                            }
+                            {
+                                cmds "god" "goto_level_next" "goto_level_prev" 
+                                    "special"
+                                // Delegate to the setting-player:
+                                targets "settingplayer"
+                            }
+                            {
+                                cmds "store_file" "load_file"
+                                targets "^setting"
+                            }
+                            {
+                                cmds
+                                    "notice_level_load_pre"
+                                    "notice_level_load_post"
+                                targets "inform"
+                            }
+                        }
+                    }
+                    {
+                        ident "kit_base.dispatch"
+                        param
+                        {
+                            name "dispatch"
+                            entry_array
+                            {
+                                cmds
+                                    "settingplayer_pre"
+                                    "settingplayer_post"
+                                targets
+                            }
+                        }
+                    }
+                    {
+                        // Dispatcher for commands from the setting player:
+                        ident "kit_base.dispatch"
+                        param
+                        {
+                            name "dispatch_inform"
+                            entry_array
+                            {
+                                cmds 
+                                    "set_gfxmgr_level"
+                                    "set_sndmgr_level"
+                                    "set_state_world"
+                                    "set_state_sky"
+                                    "set_sim_world"
+                                    "set_noise_world"
+                                    "set_sensorstate_world"
+                                    "set_camera"
+                                    "set_playerbody"
+                                targets "inform"
+                            }
+                            {
+                                cmds "reproduce"
+                                targets "settingplayer_netproduce"
+                            }
+                        }
+                    }
+                    {
+                        ident "kit_base.deleg"
+                        param
+                        {
+                            name "inform_deleg"
+                            deleg_name "inform"
+                            deleg_target ""
+                            allow_no_target 1
+                            enabled 1
+                        }
+                    }
+                    {
+                        ident "kit_engobj.informanswer"
+                        param
+                        {
+                            name "informanswer"
+                            answer_cmd "add_result"
+                            answer_actor "capsule_deleg"
+                        }
+                    }
+                    {
+                        ident "kit_engobj.informmgr"
+                        param
+                        {
+                            name "settingplayer_informmgr"
+                            //
+                            deleg_name "settingplayer"
+                            // The inform-actor. A setting player sends
+                            // its commands to this actor:
+                            inform "dispatch_inform"
+                            ignore_no_charge 1
+                            // Recip about setting-player changes.
+                            notify_target "dispatch"
+                            notify_pre_cmd "settingplayer_pre"
+                            notify_post_cmd "settingplayer_post"
+                            // If no setting player exists, this command is 
+                            // sent to this actor to get a player in a setting.
+                            produce_target "^setting_serroot"
+                            produce_cmd "rawproduce_player"
+                        }
+                    }
+                    {
+                        ident "kit_base.paramvoid"
+                        param
+                        {
+                            name "settingplayer_refresh_charge"
+                            target "settingplayer_informmgr"
+                            cmd "refresh_charge"
+                        }
+                    }
+                    {
+                        ident "kit_engbase.netproducer"
+                        param
+                        {
+                            name "settingplayer_netproduce"
+                            produce_target "settingplayer_informmgr"
+                            produce_cmd "produce_charge"
+                            net_traverse_cmd "net_traverse"
+                            created_local_cmd "created_local"
+                            created_net_cmd "created_net"
+                        }
+                    }
+                    {
+                        ident "kit_engbase.netappear"
+                        param
+                        {
+                            name "settingplayer_netappear"
+                            appear_target "settingplayer"
+                            appear_cmd "net_appear"
+                        }
+                    }
+                    {
+                        ident "kit_engobj.fetch"
+                        param
+                        {
+                            name "settingplayer_fetch"
+                            query_target "settingplayer_informmgr"
+                            query_cmd "get_charge"
+                            produce_target "settingplayer_netproduce"
+                            produce_cmd "produce"
+                            produce_report_target ""
+                            produce_report_cmd ""
+                            enum_target "^setting_serroot"
+                            enum_cmd "find_player"
+                            enum_report_target "settingplayer_informmgr"
+                            enum_report_cmd "assign_charge"
+                        }
+                    }
+                    {
+                        ident "kit_engbase.netreproduce"
+                        param
+                        {
+                            name "reproduce"
+                            producer "^player_netproducer"
+                            charge "capsule_deleg"
+                            reproduce_cmd "reproduce"
+                        }
+                    }
+                    {
+                        ident "kit_snk.childif"
+                        param
+                        {
+                            extcfg_actor "^^universe_cfg"
+                            extcfg_entry_switch "server"
+                            then_child_ident "kit_base.onaction"
+                            then_child_param
+                            {
+                                // Check if a new player must be created.
+                                active 1
+                                name "check_settingplayer_onaction"
+                                target "settingplayer_fetch"
+                                cmd "check_produce_charge"
+                            }
+                        }
+                    }
+                    {
+                        ident "kit_engbase.netlost"
+                        param
+                        {
+                            active 0
+                            name "netlost"
+                            lost_target "dispatch_export"
+                            lost_cmd "destroy"
+                        }
+                    }
+                }
+            }
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/main/actor/.sconsign
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/main/actor/.sconsign	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/main/actor/.sconsign	(revision 2453)
@@ -0,0 +1,8 @@
+}q(U
+cas.s3d_actorq(cSCons.Node.FS
+BuildInfo
+qoq}q(U	timestampqJÈEeFUcsigqJÈEeFubUcommon.s3d_actorq(hoq	}q
+(hJÈEeFhJÈEeFubUmain.s3d_actorq
+(hoq
+}q
+(hJÈEeFhJÈEeFubu.
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/main/actor/main.s3d_actor
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/main/actor/main.s3d_actor	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/main/actor/main.s3d_actor	(revision 2453)
@@ -0,0 +1,178 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Startup file.
+//
+// This file is the first resource file loaded by the Shark 3D player.
+// Job of this file is to define global components which are used both 
+// by the server and client, and to define the server and client actors.
+// The server is loaded from "server/actor/server.s3d_actor_run",
+// the client is loaded from "client/actor/client.s3d_actor_run".
+
+// Scope name of the global namespace.
+// This name is used to display error messages if an actor is not found.
+scope "root"
+// Name of the root actor. See in the docu for the actor ident "kit.root".
+// This actor can perform commands like "quit".
+name "root"
+// Name of the actor delegating commands to.
+// This can be used if C++ components outside the actor tree
+// want to send commands to the actor tree, 
+// for example from a script within a HTML page.
+deleg_target "dispatch_export"
+// Type of the child actor.
+// In this case, the root actor is a group actor, containing several 
+// child actors. The ident "kit_base.group" means to search the actor 
+// of ident "group" in the DLL which was registered under the name "core",
+// see "example.cfg".
+child_ident "kit_base.group"   
+// Parameters of the child actor. The kind of parameters which are understood 
+// depends on the type of the actor. In this case the type of the actor 
+// is "kit_base.group", which understands the parameter "child_array".
+// See the actor reference in the programmer reference in the documentation.
+// This reference contains a list of all actor types and its parameters.
+child_param
+{
+    // Delegate action calls to the children.
+    active 1
+    // List of child actors of this group actor.
+    // Each child actor again is described by its type and parameters.
+    // See the actor reference in the programmer reference in the 
+    // documentation. This reference contains a list of all actor types 
+    // and its parameters.
+    child_array
+    {
+        ident "kit_base.dispatch"
+        param
+        {
+            name "dispatch_export"
+            entry_array
+            {
+                cmds "report_note" "res_refresh" "refresh_all_res"
+                targets "root"
+            }
+        }
+    }
+    {
+        // Actor managing the cfguration data from the cfguration file,
+        // for example from "run_win32.cfg".
+        ident "kit_snk.data"
+        param
+        {
+            name "cfg"
+            // The cfguration data from the cfg-file can be retrieved
+            // from the actor root:
+            src_actor "root"
+            src_cmd "get_cfg"
+        }
+    }
+    {
+        ident "kit_base.extern"
+        param
+        {
+            // Delegate action calls to the child:
+            active 1
+            deleg_name "common"
+            res "main/actor/common.s3d_actor_run"
+        }
+    }
+    {
+        // Create a CAS access server is enabled. 
+        ident "kit_snk.childif"
+        param
+        {
+            // Name of the actor containing the cfguration data.
+            extcfg_actor "cfg"
+            // Check for this entry of the cfguration file.
+            extcfg_entry_switch "cas.enabled"
+            // Type of the child actor.
+            // In this case, the child actor loads another dsc-file.
+            then_child_ident "kit_base.extern"
+            // Parameters of the child actor.
+            then_child_param
+            {
+                // Delegate action calls to the child:
+                active 1
+                deleg_name "cas"
+                res "main/actor/cas.s3d_actor_run"
+            }
+        }
+    }
+    {
+        // Create a server is enabled. This actor only creates a child actor
+        // if a particular cfguration entry is present.
+        ident "kit_snk.childif"
+        param
+        {
+            // Name of the actor containing the cfguration data.
+            extcfg_actor "cfg"
+            // Check for this entry of the cfguration file.
+            extcfg_entry_switch "server.enabled"
+            // Type of the child actor.
+            // In this case, the child actor loads another dsc-file.
+            then_child_ident "kit_base.extern"
+            // Parameters of the child actor.
+            then_child_param
+            {
+                // Delegate action calls to the child:
+                active 1
+                // Name of this extern actor.
+                name "server_extern"
+                // Name to send commands for the server to.
+                deleg_name "server"
+                // Name of the description file describing the server:
+                res "server/actor/server.s3d_actor_run"
+            }
+        }
+    }
+    {
+        // Create a client is enabled. 
+        // Works in the same way as for the server.
+        ident "kit_snk.childif"
+        param
+        {
+            extcfg_actor "cfg"
+            extcfg_entry_switch "client.enabled"
+            then_child_ident "kit_base.extern"
+            then_child_param
+            {
+                // Delegate action calls to the child:
+                active 1
+                // Name of this extern actor.
+                name "client_extern"
+                // Name to send commands for the client to.
+                deleg_name "client"
+                // Name of the description file describing the client:
+                res "client/actor/client.s3d_actor_run"
+            }
+        }
+    }
+    {
+        // Second client.
+        ident "kit_snk.childif"
+        param
+        {
+            extcfg_actor "cfg"
+            extcfg_entry_switch "client.enabled"
+            then_child_ident "kit_base.extern"
+            then_child_param
+            {
+                // Delegate action calls to the child:
+                active 1
+                name "client_sec_extern"
+                deleg_name "client_sec"
+                res ""
+            }
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/main/actor/cas.s3d_actor
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/main/actor/cas.s3d_actor	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/main/actor/cas.s3d_actor	(revision 2453)
@@ -0,0 +1,132 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Definition of the CAS (component access shell).
+// The CAS allows to interactively inspect and modify the actors at runtime
+// via a TCP port.
+
+// Encapsulate all actors defining the CAS in an own namespace:
+actor_ident "kit_base.capsule"
+actor_param
+{
+    active 1
+    scope "cas"
+    local_name "capsule"
+    deleg_target ""
+    child_ident "kit_base.group"   
+    child_param                  
+    {
+        // Delegate action calls to the children.
+        active 1
+        child_array
+        {
+            // Producer for CAS objects:
+            ident "kit_base.producer"
+            param
+            {
+                active 1
+                name "connection_producer"
+                deleg_name "connectionset"
+                ident "kit_base.capsule"
+                param
+                {
+                    active 1
+                    scope "cas_connection"
+                    local_name "capsule"
+                    deleg_target "dispatch_export"
+                    child_ident "kit_base.group"
+                    child_param
+                    {
+                        // Delegate action calls to the children.
+                        active 1
+                        child_array
+                        {
+                            // Dispatcher for commands from outside 
+                            // the capsule:
+                            ident "kit_base.dispatch"
+                            param
+                            {
+                                name "dispatch_export"
+                                entry_array
+                                {
+                                    // Assign the socket object.
+                                    cmds "set_tcpstream"
+                                    targets "tcpinput"
+                                }
+                            }
+                        }
+                        {
+                            // Dispatcher within the CAS capsule.
+                            ident "kit_base.dispatch"
+                            param
+                            {
+                                name "dispatch"
+                                entry_array
+                                {
+                                    // If the connection is lost or closed,
+                                    // destroy the CAS object.
+                                    cmds "notify_lost" "notify_closed"
+                                    targets "capsule"
+                                    newcmd "destroy"
+                                }
+                            }
+                        }
+                        {
+                            // The CAS shell evaluating commands.
+                            ident "kit_com.shell"
+                            param
+                            {
+                                name "shell"
+                                write_line_cmd "write_line"
+                                quit_cmd "close"
+                                start_actor "^^root"
+                            }
+                        }
+                        {
+                            // CAS socket and line parser:
+                            ident "kit_com.tcpinput"
+                            param
+                            {
+                                active 1
+                                name "tcpinput"
+                                extcfg_actor "^^cfg"
+                                extcfg_entry_addrport ""
+                                extcfg_entry_echo "cas.echo"
+                                extcfg_entry_telnet "cas.telnet"
+                                interpreter "shell"
+                                welcome 
+                                    "Welcome to the Shark 3D "
+                                    & "component access shell (CAS)."
+                                    "Type 'help' for help."
+                                prompt "Shark3D-CAS> "
+                                notify "dispatch"
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        {
+            // Listen socket waiting for incoming connections:
+            ident "kit_com.tcplisten"
+            param
+            {
+                active 1
+                ignore_socket_errors 1
+                extcfg_actor "^cfg"
+                extcfg_entry_addrport "cas.addrport"
+                producer "connection_producer"
+            }
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/main/actor/common.s3d_actor
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/main/actor/common.s3d_actor	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/main/actor/common.s3d_actor	(revision 2453)
@@ -0,0 +1,1024 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+actor_ident "kit_base.group"
+actor_param
+{
+    // Delegate action calls to the children.
+    active 1
+    child_array
+    {
+        ident "kit_base.env"
+        param
+        {
+            name "env"
+        }
+    }
+    {
+        ident "kit_base.envcompsuppl"
+        param
+        {
+            name "envcompsuppl"
+        }
+    }
+    
+    // Forward declaration of the base suppl:
+    {
+        // A kind of forward declaration of the main generic suppl 
+        // named "basesuppl".
+        ident "kit_base.obj"
+        param
+        {
+            name "basesuppl"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.delegsuppl"
+            obj_param
+            {
+                env "env"
+                target "rawsuppl"
+            }
+        }
+    }
+    
+    // Bitmap parser:
+    {
+        // Actor containing the bitmap parser.
+        // A bitmap parser is necessary to load different bitmap file formats.
+        ident "kit_base.extobj"
+        param
+        {
+            name "bitmapparser"
+            // Get parameters from the actor "cfg", which is defined above.
+            obj_suppl "envcompsuppl"
+            extcfg_actor "cfg"
+            // Get the parameters from the "bitmapparser" entry.
+            extcfg_entry_ident "bitmapparser.ident"
+            extcfg_entry_param "bitmapparser.param"
+            given_array
+            {
+                item "env"
+                given_ident "env"
+            }
+        }
+    }
+    
+    // Video parser:
+    {
+        // Actor containing the bitmap parser.
+        // A video parser is necessary to load different video file formats.
+        ident "kit_base.extobj"
+        param
+        {
+            name "videoparser"
+            obj_suppl "envcompsuppl"
+            // Get parameters from the actor "cfg", which is defined above.
+            extcfg_actor "cfg"
+            // Get the parameters from the "videoparser" entry.
+            extcfg_entry_ident "videoparser.ident"
+            extcfg_entry_param "videoparser.param"
+            given_array
+            {
+                item "env"
+                given_ident "env"
+            }
+        }
+    }
+    
+    // Standard model suppl:
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "stdmodelsupplraw"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_model_std.modelsuppl"
+            obj_param
+            {
+                env "env"
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "stdmodelsupplindiv"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.indivsuppl"
+            obj_param
+            {
+                env "env"
+                child_suppl "stdmodelsupplraw"
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "stdmodelsuppl"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.uniquesuppl"
+            obj_param
+            {
+                env "env"
+                child_suppl "stdmodelsupplindiv"
+            }
+        }
+    }
+    
+    // Rectangle model suppl:
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "rectmodelsupplraw"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_model_special.rectmodelsuppl"
+            obj_param
+            {
+                env "env"
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "rectmodelsuppl"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.uniquesuppl"
+            obj_param
+            {
+                env "env"
+                child_suppl "rectmodelsupplraw"
+            }
+        }
+    }
+    
+    // Geo suppl:
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "geosupplraw"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_geo_std.geosuppl"
+            obj_param
+            {
+                env "env" 
+                modelsuppl "stdmodelsuppl"
+                usage "geo"
+                max_tri_cnt 1000
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "geosuppl"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.uniquesuppl"
+            obj_param
+            {
+                env "env" 
+                child_suppl "geosupplraw"
+            }
+        }
+    }
+    
+    // Path suppl:
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "pathsupplraw"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_pos_std.pathsuppl"
+            obj_param
+            {
+                env "env"
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "pathsuppl"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.uniquesuppl"
+            obj_param
+            {
+                env "env" 
+                child_suppl "pathsupplraw"
+            }
+        }
+    }
+    
+    // Bone-anim suppl:
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "boneanimsupplraw"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_pos_std.boneanimsuppl"
+            obj_param
+            {
+                env "env"
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "boneanimsuppl"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.uniquesuppl"
+            obj_param
+            {
+                env "env"
+                child_suppl "boneanimsupplraw"
+            }
+        }
+    }
+    
+    // Bone-motion suppl:
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "bonemotionsuppl"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_pos_std.bonemotionsuppl"
+            obj_param
+            {
+                env "env"
+                gensuppl "basesuppl"
+            }
+        }
+    }
+    
+    // PVS suppl:
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "visibpvssuppl"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_visib_pvs.pvssuppl"
+            obj_param
+            {
+                env "env"
+            }
+        }
+    }
+
+    // Static texture suppl:
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "statictexsupplraw"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_tex_std.statictexsuppl"
+            obj_param
+            {
+                env "env"
+                bitmapparser "bitmapparser"
+                scale 0.0
+                char_taildelim "#"
+                patexp_scalable "*scalable*"
+                patexp_restrusage "*rect*"
+                patexp_mipmap "!*nomipmap*"
+                patexp_compress "*compress*"
+                patexp_dynamic "*dynamic*"
+                patexp_signed "*signed*"
+                patexp_comp1 "*comp1*"
+                patexp_comp2 "*comp2*"
+                patexp_comp3 "*comp3*"
+                patexp_comp4 "*comp4*"
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "statictexsuppl"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.uniquesuppl"
+            obj_param
+            {
+                env "env"
+                child_suppl "statictexsupplraw"
+            }
+        }
+    }
+    
+    // Cube texture suppl:
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "cubetexsupplraw"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_tex_std.cubetexsuppl"
+            obj_param
+            {
+                env "env"
+                bitmapparser "bitmapparser"
+                scale 0.0
+                char_taildelim "#"
+                char_cubejoker "§"
+                patexp_scalable "*scalable*"
+                patexp_restrusage "*rect*"
+                patexp_mipmap "!*nomipmap*"
+                patexp_compress "*compress*"
+                patexp_dynamic "*dynamic*"
+                patexp_signed "*signed*"
+                patexp_comp1 "*comp1*"
+                patexp_comp2 "*comp2*"
+                patexp_comp3 "*comp3*"
+                patexp_comp4 "*comp4*"
+                cube_face_negx "negx"
+                cube_face_posx "posx"
+                cube_face_negy "negy"
+                cube_face_posy "posy"
+                cube_face_negz "negz"
+                cube_face_posz "posz"
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "cubetexsuppl"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.uniquesuppl"
+            obj_param
+            {
+                env "env"
+                child_suppl "cubetexsupplraw"
+            }
+        }
+    }
+
+    // Ident texture supplier:
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "identtexsupplraw"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_tex_std.identtexsuppl"
+            obj_param
+            {
+                env "env"
+                char_taildelim "#"
+                patexp_scalable "*scalable*"
+                patexp_restrusage "*rect*"
+                patexp_mipmap "!*nomipmap*"
+                patexp_compress "*compress*"
+                patexp_dynamic "*dynamic*"
+                patexp_signed "*signed*"
+                patexp_comp1 "*comp1*"
+                patexp_comp2 "*comp2*"
+                patexp_comp3 "*comp3*"
+                patexp_comp4 "*comp4*"
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "identtexsuppl"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.uniquesuppl"
+            obj_param
+            {
+                env "env"
+                child_suppl "identtexsupplraw"
+            }
+        }
+    }
+
+    // Video texture suppl:
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "videotexsupplraw"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_tex_std.videotexsuppl"
+            obj_param
+            {
+                env "env"
+                videoparser "videoparser"
+                char_taildelim "#"
+                patexp_scalable "*scalable*"
+                patexp_restrusage "*rect*"
+                patexp_mipmap "!*nomipmap*"
+                patexp_compress "*compress*"
+                patexp_dynamic "*dynamic*"
+                patexp_signed "*signed*"
+                patexp_comp1 "*comp1*"
+                patexp_comp2 "*comp2*"
+                patexp_comp3 "*comp3*"
+                patexp_comp4 "*comp4*"
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "videotexsuppl"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.uniquesuppl"
+            obj_param
+            {
+                env "env"
+                child_suppl "videotexsupplraw"
+            }
+        }
+    }
+
+    // Bitmap fonts and font textures:
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "rastfontsupplraw"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_font_std.rastfontsuppl"
+            obj_param
+            {
+                env "env"
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "rastfontsuppl"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.uniquesuppl"
+            obj_param
+            {
+                env "env"
+                child_suppl "rastfontsupplraw"
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "fonttexsupplraw"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_font_std.texsuppl"
+            obj_param
+            {
+                env "env"
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "fonttexsuppl"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.uniquesuppl"
+            obj_param
+            {
+                env "env"
+                child_suppl "fonttexsupplraw"
+            }
+        }
+    }
+    
+    // Vector fonts and font models:
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "vecfontsupplraw"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_font_std.vecfontsuppl"
+            obj_param
+            {
+                env "env"
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "vecfontsuppl"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.uniquesuppl"
+            obj_param
+            {
+                env "env"
+                child_suppl "vecfontsupplraw"
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "fontmodelsupplraw"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_font_std.modelsuppl"
+            obj_param
+            {
+                env "env"
+                font_suppl "vecfontsuppl"
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "fontmodelsuppl"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.uniquesuppl"
+            obj_param
+            {
+                env "env"
+                child_suppl "fontmodelsupplraw"
+            }
+        }
+    }
+    
+    // Shader suppl:
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "gfxbatchmgr"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.gfxbatchmgr"
+            obj_param
+            {
+                env "env"
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "gfxprogmgr"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.gfxprogmgr"
+            obj_param
+            {
+                env "env"
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "texpool"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.texpool"
+            obj_param
+            {
+                env "env"
+            }
+        }
+    }
+    {
+        ident "kit_engbase.shaderenv"
+        param
+        {
+            name "shaderenv"
+            childshadersuppl "envcompsuppl"
+            bitmapparser "bitmapparser"
+            gensuppl "basesuppl"
+            texpool "texpool"
+            gfxprogmgr "gfxprogmgr"
+            gfxbatchmgr "gfxbatchmgr"
+            extcfg_actor "cfg"
+            extcfg_entry_economise "view.economise"
+            extcfg_entry_reduce "view.reduce"
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "shadersupplraw"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.shadersuppl"
+            obj_param
+            {
+                shaderenv "shaderenv" 
+                given_array
+                {
+                    item "shaderenv"
+                    given_ident "shaderenv"
+                }
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "shadersuppl"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.uniquesuppl"
+            obj_param
+            {
+                env "env" 
+                child_suppl "shadersupplraw"
+            }
+        }
+    }
+    
+    // Wave suppl:
+    {
+        // Actor managing a wave file parser. 
+        ident "kit_base.extobj"
+        param
+        {
+            name "waveparser"
+            // Get parameters from the actor "cfg", which is defined above.
+            obj_suppl "envcompsuppl"
+            extcfg_actor "cfg"
+            // Get the parameters from the "waveparser" entry.
+            extcfg_entry_ident "waveparser.ident"
+            extcfg_entry_param "waveparser.param"
+            given_array
+            {
+                item "env"
+                given_ident "env"
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "stdwavesupplraw"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_wave_std.wavesuppl"
+            obj_param
+            {
+                env "env" 
+                waveparser "waveparser"
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "stdwavesuppl"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.uniquesuppl"
+            obj_param
+            {
+                env "env" 
+                child_suppl "stdwavesupplraw"
+            }
+        }
+    }
+    
+    // Main suppl:
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "rawsuppl"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.prefixsuppl"
+            obj_param
+            {
+                env "env"
+                entry_array
+                {
+                    prefix "direct:"
+                    new_suppl "envcompsuppl"
+                    new_ident ""
+                    new_append 1
+                    // Main component suppl:
+                }
+                {
+                    prefix "clock:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_base.clock"
+                    new_append 0
+                }
+                {
+                    prefix "state:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_base.state"
+                    new_append 0
+                }
+                {
+                    prefix "group:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_base.group"
+                    new_append 0
+                }
+                {
+                    prefix "simplepos:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_base.simplepos"
+                    new_append 0
+                }
+                {
+                    prefix "concatpos:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_base.concatpos"
+                    new_append 0
+                }
+                {
+                    prefix "rectmodel:"
+                    new_suppl "rectmodelsuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                {
+                    prefix "geo:"
+                    new_suppl "geosuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                {
+                    prefix "tex:"
+                    new_suppl "statictexsuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                {
+                    prefix "cubetex:"
+                    new_suppl "cubetexsuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                {
+                    prefix "identtex:"
+                    new_suppl "identtexsuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                {
+                    prefix "statictex:"
+                    new_suppl "statictexsuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                {
+                    prefix "videotex:"
+                    new_suppl "videotexsuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                {
+                    prefix "fonttex:"
+                    new_suppl "fonttexsuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                {
+                    prefix "fontmodel:"
+                    new_suppl "fontmodelsuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                {
+                    prefix "wave:"
+                    new_suppl "stdwavesuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                {
+                    prefix "speaker:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_base.speaker"
+                    new_append 0
+                }
+                {
+                    prefix "rastfont:"
+                    new_suppl "rastfontsuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                {
+                    prefix "vecfont:"
+                    new_suppl "vecfontsuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                {
+                    prefix "actulin:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_base.actulin"
+                    new_append 0
+                }
+                {
+                    prefix "actucyc:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_base.actucyc"
+                    new_append 0
+                }
+                {
+                    prefix "visibpvs:"
+                    new_suppl "visibpvssuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                {
+                    prefix "sim:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_phys_std.sim"
+                    new_append 0
+                }
+                {
+                    prefix "noise:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_base.noise"
+                    new_append 0
+                }
+                {
+                    prefix "boneanim:"
+                    new_suppl "boneanimsuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                {
+                    prefix "bonemotion:"
+                    new_suppl "bonemotionsuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                // Standard suppls:
+                {
+                    prefix "stdmodel:"
+                    new_suppl "stdmodelsuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                {
+                    prefix "stdgeo:"
+                    new_suppl "geosuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                {
+                    prefix "stdtex:"
+                    new_suppl "statictexsuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                {
+                    prefix "stdshader:"
+                    new_suppl "shadersuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                {
+                    prefix "stdsimplepos:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_base.simplepos"
+                    new_append 0
+                }
+                {
+                    prefix "stdconcatpos:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_base.concatpos"
+                    new_append 0
+                }
+                {
+                    prefix "stdpath:"
+                    new_suppl "pathsuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                {
+                    prefix "stdskin:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_pos_std.combine"
+                    new_append 0
+                }
+                {
+                    prefix "stdskel:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_pos_std.boneskel"
+                    new_append 0
+                }
+                {
+                    prefix "stdbonesel:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_pos_std.pick"
+                    new_append 0
+                }
+                {
+                    prefix "stdgear:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_phys_std.gear"
+                    new_append 0
+                }
+                {
+                    prefix "stdbody:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_phys_std.body"
+                    new_append 0
+                }
+                {
+                    prefix "stdfixed:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_phys_std.fixed"
+                    new_append 0
+                }
+                {
+                    prefix "stddisjunct:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_phys_std.disjunct"
+                    new_append 0
+                }
+                {
+                    prefix "stdconstrstand:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_phys_std.constrstand"
+                    new_append 0
+                }
+                {
+                    prefix "stdconstrball:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_phys_std.constrball"
+                    new_append 0
+                }
+                {
+                    prefix "stdconstrhinge:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_phys_std.constrhinge"
+                    new_append 0
+                }
+                {
+                    prefix "stdconstrhingetwo:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_phys_std.constrhingetwo"
+                    new_append 0
+                }
+                {
+                    prefix "stdconstrslider:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_phys_std.constrslider"
+                    new_append 0
+                }
+                {
+                    prefix "stdconstrattach:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_phys_std.constrattach"
+                    new_append 0
+                }
+                {
+                    prefix "stdinst:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_base.inst"
+                    new_append 0
+                }
+                {
+                    prefix "stdsensorstate:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_sensor_std.sensorstate"
+                    new_append 0
+                }
+                {
+                    prefix "stdsensor:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_sensor_std.sensorvol"
+                    new_append 0
+                }
+            }
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/basic.s3d_shader
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/basic.s3d_shader	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/basic.s3d_shader	(revision 2453)
@@ -0,0 +1,689 @@
+// Shark 3D Snake Text Stream 1x0 (ascii).
+shader_array
+{
+    // Shader useful for max helper objects.
+    name "pos_helper"
+    ident ""
+    param
+    {
+    }
+}
+{
+    // Shader rendering w/o lighting.
+    name "plain"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                usage "render"
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                insp_ident "showmesh"
+                insp_rank 80000
+                insp_color 1.0 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 12000
+                insp_ident "showwire"
+                
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                color 1.0 1.0 1.0
+
+                shaderprog_ident "levelutil/shader/prog/"
+                        & "plain_pointtex.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+    }
+}
+{
+    // Simple transparence without lighting.
+    name "plain_transp"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                usage "render"
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                insp_ident "showmesh"
+                insp_rank 80000
+                insp_color 1.0 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 34000
+                back_to_front 1
+                insp_ident "showwire"
+
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 0
+                blend_col_src_fac "src_alpha"
+                blend_col_dest_fac "inv_src_alpha"
+
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+
+                shaderprog_ident "levelutil/shader/prog/"
+                        & "plain_pointtex.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+    }
+}
+{
+    // Shader rendering with lighting not using the normal vectors.
+    name "ambient"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                usage "render"
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                insp_ident "showmesh"
+                insp_rank 80000
+                insp_color 1.0 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+                {
+                    triggers "drvlight_trigger"
+                    method "drvlight_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.drvlightcoll"
+            param
+            {
+                env "shaderenv"
+                reset_methods "init_method"
+                append_methods "drvlight_method"
+                
+                lightarray_var "lightarray"
+                diffuse_var "light_diffuse"
+                ambient_var "light_ambient"
+                specular_var "light_specular"
+                cenrange_var "light_cenrange"
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 12000
+                insp_ident "showwire"
+
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+
+                mtl
+                {
+                    ambient 1. 1. 1.
+                }
+
+                lightarray_var "lightarray"
+
+                shaderprog_ident "levelutil/shader/prog/"
+                        & "standard.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+    }
+}
+{
+    // Shader using vertex lighting
+    name "plain_drvlight"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                usage "render"
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                insp_ident "showmesh"
+                insp_rank 80000
+                insp_color 1.0 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+                {
+                    triggers "drvlight_trigger"
+                    method "drvlight_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.drvlightcoll"
+            param
+            {   
+                env "shaderenv"
+                reset_methods "main_method"
+                append_methods "drvlight_method"
+
+                lightarray_var "lightarray"
+                diffuse_var "light_diffuse"
+                ambient_var "light_ambient"
+                specular_var "light_specular"
+                cenrange_var "light_cenrange"
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 12000
+                insp_ident "showwire"
+
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+
+                fog_enabled 1
+
+                mtl
+                {
+                    diffuse 1. 1. 1.
+                }
+
+                lightarray_var "lightarray"
+
+                shaderprog_ident "levelutil/shader/prog/"
+                        & "standard.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+    }
+}
+{
+    // A simple shader using vertex colors exported from Max.
+    name "plain_vertex_colors"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                usage "render"
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                insp_ident "showmesh"
+                insp_rank 80000
+                insp_color 1.0 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 12000
+                insp_ident "showwire"
+
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_coloralpha 1
+
+                fog_enabled 1
+
+                shaderprog_ident "levelutil/shader/prog/"
+                        & "plain_pointcoltex.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+    }
+}
+{
+    // Additive glass: Additive blending
+    // with faked environment mappping.
+    // In contrast to alpha-blended glass,
+    // such glass looks more unrealistic,
+    // but avoids transparency sorting problems.
+    name "blend_glass_add"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                usage "render"
+                mesh_var "mesh"
+                texchan_var_array "tex0" // //xxx should be sphere
+                tex_attr_var_array "attr0"
+                insp_ident "showmesh"
+                insp_rank 80000
+                insp_color 1.0 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+                {
+                    triggers "drvlight_trigger"
+                    method "drvlight_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.drvlightcoll"
+            param
+            {
+                env "shaderenv"
+                reset_methods "main_method"
+                append_methods "drvlight_method"
+
+                lightarray_var "lightarray"
+                diffuse_var "light_diffuse"
+                ambient_var "light_ambient"
+                specular_var "light_specular"
+                cenrange_var "light_cenrange"
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 34000
+                back_to_front 1
+                insp_ident "showwire"
+
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 0
+
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+
+                blend_col_src_fac "one"
+                blend_col_dest_fac "one"
+                fog_black 1
+
+                mtl
+                {
+                    ambient 1. 1. 1.
+                }
+
+                lightarray_var "lightarray"
+
+                shaderprog_ident "levelutil/shader/prog/"
+                        & "standard.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+    }
+}
+{
+    // Additive fluid: Transparent, distorted mapping.
+    name "blend_fluid_add"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                usage "render"
+                mesh_var "mesh"
+                texchan_var_array "tex0" // //xxx should be distort
+                tex_attr_var_array "attr0"
+                insp_ident "showmesh"
+                insp_rank 80000
+                insp_color 1.0 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+                {
+                    triggers "drvlight_trigger"
+                    method "drvlight_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.drvlightcoll"
+            param
+            {
+                env "shaderenv"
+                reset_methods "main_method"
+                append_methods "drvlight_method"
+
+                lightarray_var "lightarray"
+                diffuse_var "light_diffuse"
+                ambient_var "light_ambient"
+                specular_var "light_specular"
+                cenrange_var "light_cenrange"
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 34000
+                back_to_front 1
+                insp_ident "showwire"
+
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 0
+
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+
+                blend_col_src_fac "one"
+                blend_col_dest_fac "one"
+                fog_black 1
+
+                mtl
+                {
+                    ambient 1. 1. 1.
+                }
+
+                lightarray_var "lightarray"
+
+                shaderprog_ident "levelutil/shader/prog/"
+                        & "standard.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/.sconsign
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/.sconsign	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/.sconsign	(revision 2453)
@@ -0,0 +1,7 @@
+}q(Uposteffects.s3d_shaderq(cSCons.Node.FS
+BuildInfo
+qoq}q(U	timestampqJÊEeFUcsigqJÊEeFubUsky.s3d_shaderq(hoq	}q
+(hJÊEeFhJÊEeFubUcomic.s3d_shaderq
+(hoq
+}q
+(hJÊEeFhJÊEeFubUordinary.s3d_shaderq(hoq}q(hJÊEeFhJÊEeFubUbasic.s3d_shaderq(hoq}q(hJÉEeFhJÉEeFubUdisplay.s3d_shaderq(hoq}q(hJÉEeFhJÉEeFubUordinary_transp.s3d_shaderq(hoq}q(hJÊEeFhJÊEeFubu.
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/display.s3d_shader
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/display.s3d_shader	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/display.s3d_shader	(revision 2453)
@@ -0,0 +1,156 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Definition of the shaders for the display.
+// A shader is an object responsible for drawing objects.
+shader_array
+{
+    // Shader rendering without lighting.
+    name "plain"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                usage "render"
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                insp_ident "showmesh"
+                insp_rank 80000
+                insp_color 1.0 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 41000
+                insp_ident "showwire"
+
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+
+                shaderprog_ident "levelutil/shader/prog/"
+                        & "plain_pointtex.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+    }
+}
+{
+    // Transparent shader rendering without lighting.
+    name "plain_transp"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                usage "render"
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                insp_ident "showmesh"
+                insp_rank 80000
+                insp_color 1.0 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 44000
+                insp_ident "showwire"
+
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+
+                mesh_var "mesh"
+
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+
+                blend_col_src_fac "src_alpha"
+                blend_col_dest_fac "inv_src_alpha"
+
+                shaderprog_ident "levelutil/shader/prog/"
+                        & "plain_pointtex.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/posteffects.s3d_shader
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/posteffects.s3d_shader	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/posteffects.s3d_shader	(revision 2453)
@@ -0,0 +1,210 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Definition of the shaders.
+// A shader is an object responsible for drawing objects.
+
+shader_array
+{
+    name "bloom"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.regionenter"
+            param
+            {
+                env "shaderenv"
+                usage "geo"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+    
+                enter_array
+                {
+                    triggers "main_trigger"
+                    method "main_method"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.bundle"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 35010
+                new_method "bundle_method"
+            }
+        }
+        {
+            ident "eng_shader_std.redirect"
+            param
+            {
+                env "shaderenv"
+                register_methods "main_method"
+                // negative value of 'close_rank'
+                register_rank -35010
+                close_methods "bundle_method"
+                // define when EndRenderTex is called
+                close_rank 90000
+                // define when BeginRenderMain is called
+                open_methods "bundle_method"
+                open_rank 90030
+                destprop_antialias 0
+                dest_array
+                {
+                    from_var ""
+                    to_var "screentex"
+                    texprop_restrusage 0
+                    texprop_depth 0
+                    texprop_float 0
+                    texprop_comp 4
+                    texprop_bitspercomp 0
+                    samplermode_filter 0
+                    samplermode_clamp 1
+                }
+            }
+        }
+        {
+            // Reduce image size and get bright pixels.
+            ident "eng_shader_special.filter"
+            param
+            {
+                env "shaderenv"
+                methods "bundle_method"
+                rank 90010
+    
+                iter_start 0
+                iter_end 0
+                iter_step 0
+                width_scale 0.5
+                height_scale 0.5
+                destprop_antialias 0
+
+                passinfo_var "passinfo"
+    
+                src_array "screentex"
+                dest_array
+                {
+                    from_var ""
+                    to_var "brightsmooth"
+                    texprop_restrusage 0
+                    texprop_depth 0
+                    texprop_float 0
+                    texprop_comp 4
+                    texprop_bitspercomp 0
+                    samplermode_filter 1
+                    samplermode_clamp 1
+                }
+    
+                shaderprog_ident "levelutil/shader/prog/"
+                        & "bloom_bright.s3d_shaderprog_run"
+                //shaderprog_ident "levelutil/shader/prog/"
+                //      & "bloom_presmooth_bright.s3d_shaderprog_run"
+                shaderprog_param_array
+                {
+                    src_var "passinfo"
+                    dest_progvar "prog_passinfo"
+                }
+            }
+        }
+        {
+            // Smooth (exponential averaging).
+            ident "eng_shader_special.filter"
+            param
+            {
+                env "shaderenv"
+                methods "bundle_method"
+                rank 90020
+    
+                iter_start 4
+                iter_end 0
+                iter_step -1
+                width_scale 1.0
+                height_scale 1.0
+                destprop_antialias 0
+
+                passinfo_var "passinfo"
+    
+                src_array "brightsmooth"
+                dest_array
+                {
+                    from_var ""
+                    to_var "brightsmooth"
+                    texprop_restrusage 0
+                    texprop_depth 0
+                    texprop_float 0
+                    texprop_comp 4
+                    texprop_bitspercomp 0
+                    samplermode_filter 1
+                    samplermode_clamp 1
+                }
+       
+                shaderprog_ident "levelutil/shader/prog/"
+                        & "bloom_smooth.s3d_shaderprog_run"
+                shaderprog_param_array
+                {
+                    src_var "passinfo"
+                    dest_progvar "prog_passinfo"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.rectmesh"
+            param
+            {
+                env "shaderenv"
+                methods "bundle_method"
+
+                mesh_var "rectmesh"
+                attr_var "rectattr"
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "bundle_method"
+                rank 90040
+                
+                cull_mode "back"
+                depth_test "always"
+                depth_write 0
+    
+                mesh_var "rectmesh"
+                texchan_var_array "screentex" "brightsmooth"
+                tex_attr_var_array "rectattr"
+                attrmat_var_array ""
+                
+                use_vertex_point 1
+
+                blend_col_src_fac "one"
+                blend_col_dest_fac "zero"
+
+                shaderprog_ident "levelutil/shader/prog/"
+                        & "bloom_combine.s3d_shaderprog_run"
+                shaderprog_param_array
+                {
+                    src_var "passinfo"
+                    dest_progvar "prog_passinfo"
+                }
+            }
+        }
+    }
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/sky.s3d_shader
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/sky.s3d_shader	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/sky.s3d_shader	(revision 2453)
@@ -0,0 +1,84 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Definition of the shaders.
+// A shader is an object responsible for drawing objects.
+
+shader_array
+{
+    name "plain"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                usage "render"
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                insp_ident "showmesh"
+                insp_rank 80000
+                insp_color 1.0 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 12000
+                insp_ident "showwire"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+
+                lightarray_var ""
+
+                shaderprog_ident "levelutil/shader/prog/"
+                        & "plain_pointtex.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/ordinary.s3d_shader
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/ordinary.s3d_shader	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/ordinary.s3d_shader	(revision 2453)
@@ -0,0 +1,3414 @@
+// Machine-made Shark 3D Snake Text 2x0 Stream. Format: ascii.
+shader_array
+{
+    name "ordinary"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                mesh_var "mesh"
+                texchan_var_array "tex0" "normalmap"
+                tex_attr_var_array "attr0"
+                usage "render"
+                tangentu_attr_var "tangentu"
+                tangentv_attr_var "tangentv"
+                insp_ident "showmesh"
+                insp_rank 80000
+                insp_color 1.0 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                usage "shvol_occl"
+                mesh_var "mesh_shvol_occl"
+                texchan_var_array
+                tex_attr_var_array
+                insp_ident "showocclmesh"
+                insp_rank 80000
+                insp_color 0.5 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+                {
+                    triggers "gtp_distance_impostor_trigger"
+                    method "gtp_distance_impostor_method"
+                }
+                {
+                    triggers "gen_shmap_trigger"
+                    method "gen_shmap_method"
+                }
+                {
+                    triggers "light_trigger"
+                    method "light_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                }
+                {
+                    triggers "lightmild_trigger"
+                    method "lightmild_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                }
+                {
+                    triggers "lightbright_trigger"
+                    method "lightbright_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                    {
+                        src_extvar "ext_light_brighttex"
+                        dest_var "light_brighttex"
+                    }
+                    {
+                        src_extvar "ext_light_brightmat"
+                        dest_var "light_brightmat"
+                    }
+                }
+                {
+                    triggers "lightshmap_trigger"
+                    method "lightshmap_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                    {
+                        src_extvar "ext_light_projmat"
+                        dest_var "light_projmat"
+                    }
+                    {
+                        src_extvar "ext_light_shmapmat"
+                        dest_var "light_shmapmat"
+                    }
+                    {
+                        src_extvar "ext_light_projtex"
+                        dest_var "light_projtex"
+                    }
+                    {
+                        src_extvar "ext_light_shmap"
+                        dest_var "light_shmap"
+                    }
+                }
+                {
+                    triggers "gen_brightmap_for_softshmap_trigger"
+                    method "gen_brightmap_for_softshmap_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_intens"
+                        dest_var "light_intens"
+                    }
+                    {
+                        src_extvar "ext_light_projmat"
+                        dest_var "light_projmat"
+                    }
+                    {
+                        src_extvar "ext_light_shmapmat"
+                        dest_var "light_shmapmat"
+                    }
+                    {
+                        src_extvar "ext_light_projtex"
+                        dest_var "light_projtex"
+                    }
+                    {
+                        src_extvar "ext_light_shmap"
+                        dest_var "light_shmap"
+                    }
+                }
+                {
+                    triggers "gen_brightclear_trigger"
+                    method "gen_brightclear_method"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh_shvol_occl"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "shvol_mark_trigger"
+                    method "shvol_mark_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_shvolparam"
+                        dest_var "light_shvolparam"
+                    }
+                }
+            }
+        }
+        {
+            ident "eng_shader_shvol.occluder"
+            param
+            {
+                env "shaderenv"
+                methods "shvol_mark_method"
+                reverse_rank 90010
+                nonreverse_rank 90000
+                insp_ident "showocclwire"
+                rel_gap 0.01
+                backface 0
+                mesh_var "mesh_shvol_occl"
+                cenrange_var "light_cenrange"
+                shvolparam_var "light_shvolparam"
+                extrude_var "light_extrude"
+                strict_shaderprog_ident
+                    "levelutil/shader/prog/gen_shvol_strict.s3d_shaderprog_run"
+                strict_shaderprog_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_progvar "prog_light_cenrange"
+                }
+                {
+                    src_var "light_extrude"
+                    dest_progvar "prog_light_extrude"
+                }
+                quick_shaderprog_ident
+                    "levelutil/shader/prog/gen_shvol_quick.s3d_shaderprog_run"
+                quick_shaderprog_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_progvar "prog_light_cenrange"
+                }
+                {
+                    src_var "light_extrude"
+                    dest_progvar "prog_light_extrude"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                rank 99999
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                methods "gen_shmap_method"
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                shaderprog_ident
+                    "levelutil/shader/prog/gen_shmap.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 12000
+                insp_ident "showwire"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 0
+                color 0.0 0.0 0.0
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array
+                attrmat_var_array
+                lightarray_var ""
+                shaderprog_ident
+                    "levelutil/shader/prog/plain_point.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "light_method"
+                rank 99999
+                insp_ident "showwire"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+                mesh_var "mesh"
+                texchan_var_array "tex0" "normalmap"
+                tex_attr_var_array "attr0" "tangentu" "tangentv"
+                attrmat_var_array ""
+                blend_col_src_fac "one"
+                blend_col_dest_fac "inv_src_col"
+                lightarray_var ""
+                shaderprog_ident
+                    "levelutil/shader/prog/bump.s3d_shaderprog_run"
+                shaderprog_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_progvar "prog_light_cenrange"
+                }
+                {
+                    src_var "light_ambient"
+                    dest_progvar "prog_light_ambient"
+                }
+                {
+                    src_var "light_diffuse"
+                    dest_progvar "prog_light_diffuse"
+                }
+                {
+                    src_var "light_specular"
+                    dest_progvar "prog_light_specular"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "lightmild_method"
+                rank 99999
+                insp_ident "showwire"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+                mesh_var "mesh"
+                texchan_var_array "tex0" "normalmap"
+                tex_attr_var_array "attr0" "tangentu" "tangentv"
+                attrmat_var_array ""
+                blend_col_src_fac "one"
+                blend_col_dest_fac "inv_src_col"
+                lightarray_var ""
+                shaderprog_ident
+                    "levelutil/shader/prog/bump_mild.s3d_shaderprog_run"
+                shaderprog_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_progvar "prog_light_cenrange"
+                }
+                {
+                    src_var "light_ambient"
+                    dest_progvar "prog_light_ambient"
+                }
+                {
+                    src_var "light_diffuse"
+                    dest_progvar "prog_light_diffuse"
+                }
+                {
+                    src_var "light_specular"
+                    dest_progvar "prog_light_specular"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "lightbright_method"
+                rank 12000
+                insp_ident "showwire"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 0
+                mesh_var "mesh"
+                texchan_var_array "tex0" "normalmap" "light_brighttex"
+                tex_attr_var_array "attr0" "tangentu" "tangentv"
+                attrmat_var_array "" "" ""
+                blend_col_src_fac "one"
+                blend_col_dest_fac "inv_src_col"
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+                shaderprog_ident
+                    "levelutil/shader/prog/bump_bright.s3d_shaderprog_run"
+                shaderprog_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_progvar "prog_light_cenrange"
+                }
+                {
+                    src_var "light_ambient"
+                    dest_progvar "prog_light_ambient"
+                }
+                {
+                    src_var "light_diffuse"
+                    dest_progvar "prog_light_diffuse"
+                }
+                {
+                    src_var "light_specular"
+                    dest_progvar "prog_light_specular"
+                }
+                {
+                    src_var "light_brightmat"
+                    dest_progvar "prog_light_brightmat"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "lightshmap_method"
+                rank 99999
+                insp_ident "showwire"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 0
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+                mesh_var "mesh"
+                texchan_var_array "tex0" "normalmap" "light_projtex"
+                    "light_shmap"
+                tex_attr_var_array "attr0" "tangentu" "tangentv"
+                attrmat_var_array ""
+                blend_col_src_fac "one"
+                blend_col_dest_fac "inv_src_col"
+                lightarray_var ""
+                shaderprog_ident
+                    "levelutil/shader/prog/bump_shmap.s3d_shaderprog_run"
+                shaderprog_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_progvar "prog_light_cenrange"
+                }
+                {
+                    src_var "light_ambient"
+                    dest_progvar "prog_light_ambient"
+                }
+                {
+                    src_var "light_diffuse"
+                    dest_progvar "prog_light_diffuse"
+                }
+                {
+                    src_var "light_specular"
+                    dest_progvar "prog_light_specular"
+                }
+                {
+                    src_var "light_projmat"
+                    dest_progvar "prog_light_projmat"
+                }
+                {
+                    src_var "light_shmapmat"
+                    dest_progvar "prog_light_shmapmat"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "gen_brightmap_for_softshmap_method"
+                rank 99999
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 0
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+                mesh_var "mesh"
+                texchan_var_array "light_projtex" "light_shmap"
+                tex_attr_var_array ""
+                attrmat_var_array ""
+                blend_col_src_fac "one"
+                blend_col_dest_fac "inv_src_col"
+                lightarray_var ""
+                shaderprog_ident
+                    "levelutil/shader/prog/gen_brightmap_for_softshmap.s3d_sha"
+                    & "derprog_run"
+                shaderprog_param_array
+                {
+                    src_var "light_intens"
+                    dest_progvar "prog_light_intens"
+                }
+                {
+                    src_var "light_projmat"
+                    dest_progvar "prog_light_projmat"
+                }
+                {
+                    src_var "light_shmapmat"
+                    dest_progvar "prog_light_shmapmat"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "gen_brightclear_method"
+                rank 12000
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array
+                attrmat_var_array
+                fog_enabled 0
+                blend_col_src_fac "one"
+                blend_col_dest_fac "zero"
+                color 0.0 0.0 0.0
+                alpha 0.0
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                shaderprog_ident
+                    "levelutil/shader/prog/gen_brightclear.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "gtp_distance_impostor_method"
+                rank 12000
+                insp_ident "insp_shader_mesh"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                color 1.0 1.0 1.0
+                shaderprog_ident
+                    "levelutil/shader/prog/gtp_distance_impostor.s3d_shaderpro"
+                    & "g_run"
+                shaderprog_param_array
+            }
+        }
+    }
+}
+{
+    name "ordinary_diffuse"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                mesh_var "mesh"
+                texchan_var_array "tex0" "normalmap"
+                tex_attr_var_array "attr0"
+                usage "render"
+                tangentu_attr_var "tangentu"
+                tangentv_attr_var "tangentv"
+            }
+        }
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                usage "shvol_occl"
+                mesh_var "mesh_shvol_occl"
+                texchan_var_array
+                tex_attr_var_array
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh"
+                insp_ident "insp_shader_bound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+                {
+                    triggers "gtp_distance_impostor_trigger"
+                    method "gtp_distance_impostor_method"
+                }
+                {
+                    triggers "gen_shmap_trigger"
+                    method "gen_shmap_method"
+                }
+                {
+                    triggers "light_trigger"
+                    method "light_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                }
+                {
+                    triggers "lightmild_trigger"
+                    method "lightmild_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                }
+                {
+                    triggers "lightbright_trigger"
+                    method "lightbright_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                    {
+                        src_extvar "ext_light_brighttex"
+                        dest_var "light_brighttex"
+                    }
+                    {
+                        src_extvar "ext_light_brightmat"
+                        dest_var "light_brightmat"
+                    }
+                }
+                {
+                    triggers "lightshmap_trigger"
+                    method "lightshmap_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                    {
+                        src_extvar "ext_light_projmat"
+                        dest_var "light_projmat"
+                    }
+                    {
+                        src_extvar "ext_light_shmapmat"
+                        dest_var "light_shmapmat"
+                    }
+                    {
+                        src_extvar "ext_light_projtex"
+                        dest_var "light_projtex"
+                    }
+                    {
+                        src_extvar "ext_light_shmap"
+                        dest_var "light_shmap"
+                    }
+                }
+                {
+                    triggers "gen_brightmap_for_softshmap_trigger"
+                    method "gen_brightmap_for_softshmap_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_intens"
+                        dest_var "light_intens"
+                    }
+                    {
+                        src_extvar "ext_light_projmat"
+                        dest_var "light_projmat"
+                    }
+                    {
+                        src_extvar "ext_light_shmapmat"
+                        dest_var "light_shmapmat"
+                    }
+                    {
+                        src_extvar "ext_light_projtex"
+                        dest_var "light_projtex"
+                    }
+                    {
+                        src_extvar "ext_light_shmap"
+                        dest_var "light_shmap"
+                    }
+                }
+                {
+                    triggers "gen_brightclear_trigger"
+                    method "gen_brightclear_method"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh_shvol_occl"
+                insp_ident "insp_shader_bound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "shvol_mark_trigger"
+                    method "shvol_mark_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_shvolparam"
+                        dest_var "light_shvolparam"
+                    }
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 12000
+                insp_ident "insp_shader_mesh"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 0
+                color 0.0 0.0 0.0
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array
+                attrmat_var_array
+                lightarray_var ""
+                shaderprog_ident
+                    "levelutil/shader/prog/plain_point.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+        {
+            ident "gtp_shader.createtex"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                texchan_var "envmap0"
+                width 128
+                height 128
+                texprop_rendertarget 1
+                texprop_cube 1
+                texprop_float 0
+                texprop_comp 4
+                texprop_bitspercomp 8
+                samplermode_clamp 0
+                samplermode_filter 1
+            }
+        }
+        {
+            ident "gtp_shader.envmap"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank -9000
+                max_ext 256
+                max_recursion 1
+                ext_dist_scale 20.0
+                proj_neg_z 0.1
+                proj_pos_z 100.0
+                enum_trigger "mirror_trigger"
+                destprop_antialias 0
+                mesh_var "mesh"
+                update_interval 1
+                update_all_face 1
+                start_frame 0
+                last_center_var "lastCenter"
+                world_space 1
+                dest_array
+                {
+                    from_var "envmap0"
+                    to_var "envmap0"
+                    texprop_restrusage 0
+                    texprop_depth 0
+                    texprop_comp 3
+                    texprop_float 0
+                    samplermode_filter 0
+                    samplermode_clamp 1
+                }
+            }
+        }
+        {
+            ident "gtp_shader.createtex"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                texchan_var "dist"
+                width 128
+                height 128
+                texprop_rendertarget 1
+                texprop_cube 1
+                texprop_float 1
+                texprop_comp 2
+                texprop_bitspercomp 16
+                samplermode_clamp 0
+                samplermode_filter 0
+            }
+        }
+        {
+            ident "gtp_shader.envmap"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank -9000
+                max_ext 128
+                max_recursion 1
+                ext_dist_scale 20.0
+                proj_neg_z 0.1
+                proj_pos_z 100.0
+                enum_trigger "gtp_distance_impostor_trigger"
+                destprop_antialias 0
+                mesh_var "mesh"
+                update_interval 1
+                update_all_face 1
+                start_frame 0
+                last_center_var ""
+                world_space 1
+                dest_array
+                {
+                    from_var "dist"
+                    to_var "dist"
+                    texprop_restrusage 0
+                    texprop_depth 0
+                    texprop_comp 1
+                    texprop_float 1
+                    samplermode_filter 0
+                    samplermode_clamp 1
+                }
+            }
+        }
+        {
+            ident "gtp_shader.createtex"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                texchan_var "filteredenvmap"
+                width 4
+                height 4
+                texprop_rendertarget 1
+                texprop_cube 1
+                texprop_float 0
+                texprop_comp 4
+                texprop_bitspercomp 8
+                samplermode_clamp 0
+                samplermode_filter 1
+            }
+        }
+        {
+            ident "gtp_shader.cubetexfilter"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank -8000
+                iter_start 0
+                iter_end 0
+                iter_step 0
+                width_scale 1.0
+                height_scale 1.0
+                destprop_antialias 0
+                passinfo_var ""
+                src_array "envmap0"
+                update_interval 1
+                dest_array
+                {
+                    from_var "filteredenvmap"
+                    to_var "filteredenvmap"
+                    texprop_restrusage 0
+                    texprop_depth 0
+                    texprop_float 0
+                    texprop_comp 4
+                    texprop_bitspercomp 0
+                    samplermode_filter 1
+                    samplermode_clamp 1
+                }
+                shaderprog_ident
+                    "levelutil/shader/prog/gtp_reduce_cubemap.s3d_shaderprog_r"
+                    & "un"
+                shaderprog_param_array
+                {
+                }
+            }
+        }
+        {
+            ident "gtp_shader.worldmat"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                worldmat_var "worldMat"
+            }
+        }
+        {
+            ident "gtp_shader.worldmat"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                worldmat_var "worldMatIT"
+                inverse 1
+                transpose 1
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 12000
+                insp_ident "insp_shader_mesh"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 0
+                mesh_var "mesh"
+                texchan_var_array "filteredenvmap" "dist"
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+                use_vertex_coloralpha 0
+                blend_col_src_fac "one"
+                blend_col_dest_fac "zero"
+                shaderprog_ident
+                    "levelutil/shader/prog/gtp_diffuse.s3d_shaderprog_run"
+                shaderprog_param_array
+                {
+                    src_var "lastCenter"
+                    dest_progvar "lastCenter"
+                }
+                {
+                    src_var "worldMat"
+                    dest_progvar "worldMat"
+                }
+                {
+                    src_var "worldMatIT"
+                    dest_progvar "worldMatIT"
+                }
+            }
+        }
+    }
+}
+{
+    name "ordinary_caustic_receiver"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                mesh_var "mesh"
+                texchan_var_array "tex0" "normalmap"
+                tex_attr_var_array "attr0"
+                usage "render"
+                tangentu_attr_var "tangentu"
+                tangentv_attr_var "tangentv"
+                insp_ident "showmesh"
+                insp_rank 80000
+                insp_color 1.0 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                usage "shvol_occl"
+                mesh_var "mesh_shvol_occl"
+                texchan_var_array
+                tex_attr_var_array
+                insp_ident "showocclmesh"
+                insp_rank 80000
+                insp_color 0.5 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+                {
+                    triggers "gtp_distance_impostor_trigger"
+                    method "gtp_distance_impostor_method"
+                }
+                {
+                    triggers "caustic_recieve_trigger"
+                    method "caustic_recieve_method"
+                    param_array
+                    {
+                        src_extvar "lastCenter"
+                        dest_var "cauCubeLastCenter"
+                    }
+                    {
+                        src_extvar "cauCubeMap"
+                        dest_var "cauCubeMap"
+                    }
+                }
+                {
+                    triggers "gen_shmap_trigger"
+                    method "gen_shmap_method"
+                }
+                {
+                    triggers "light_trigger"
+                    method "light_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                }
+                {
+                    triggers "lightmild_trigger"
+                    method "lightmild_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                }
+                {
+                    triggers "lightbright_trigger"
+                    method "lightbright_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                    {
+                        src_extvar "ext_light_brighttex"
+                        dest_var "light_brighttex"
+                    }
+                    {
+                        src_extvar "ext_light_brightmat"
+                        dest_var "light_brightmat"
+                    }
+                }
+                {
+                    triggers "lightshmap_trigger"
+                    method "lightshmap_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                    {
+                        src_extvar "ext_light_projmat"
+                        dest_var "light_projmat"
+                    }
+                    {
+                        src_extvar "ext_light_shmapmat"
+                        dest_var "light_shmapmat"
+                    }
+                    {
+                        src_extvar "ext_light_projtex"
+                        dest_var "light_projtex"
+                    }
+                    {
+                        src_extvar "ext_light_shmap"
+                        dest_var "light_shmap"
+                    }
+                }
+                {
+                    triggers "gen_brightmap_for_softshmap_trigger"
+                    method "gen_brightmap_for_softshmap_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_intens"
+                        dest_var "light_intens"
+                    }
+                    {
+                        src_extvar "ext_light_projmat"
+                        dest_var "light_projmat"
+                    }
+                    {
+                        src_extvar "ext_light_shmapmat"
+                        dest_var "light_shmapmat"
+                    }
+                    {
+                        src_extvar "ext_light_projtex"
+                        dest_var "light_projtex"
+                    }
+                    {
+                        src_extvar "ext_light_shmap"
+                        dest_var "light_shmap"
+                    }
+                }
+                {
+                    triggers "gen_brightclear_trigger"
+                    method "gen_brightclear_method"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh_shvol_occl"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "shvol_mark_trigger"
+                    method "shvol_mark_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_shvolparam"
+                        dest_var "light_shvolparam"
+                    }
+                }
+            }
+        }
+        {
+            ident "eng_shader_shvol.occluder"
+            param
+            {
+                env "shaderenv"
+                methods "shvol_mark_method"
+                reverse_rank 90010
+                nonreverse_rank 90000
+                insp_ident "showocclwire"
+                rel_gap 0.01
+                backface 0
+                mesh_var "mesh_shvol_occl"
+                cenrange_var "light_cenrange"
+                shvolparam_var "light_shvolparam"
+                extrude_var "light_extrude"
+                strict_shaderprog_ident
+                    "levelutil/shader/prog/gen_shvol_strict.s3d_shaderprog_run"
+                strict_shaderprog_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_progvar "prog_light_cenrange"
+                }
+                {
+                    src_var "light_extrude"
+                    dest_progvar "prog_light_extrude"
+                }
+                quick_shaderprog_ident
+                    "levelutil/shader/prog/gen_shvol_quick.s3d_shaderprog_run"
+                quick_shaderprog_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_progvar "prog_light_cenrange"
+                }
+                {
+                    src_var "light_extrude"
+                    dest_progvar "prog_light_extrude"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                rank 99999
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                methods "gen_shmap_method"
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                shaderprog_ident
+                    "levelutil/shader/prog/gen_shmap.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 12000
+                insp_ident "showwire"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 0
+                color 0.0 0.0 0.0
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array
+                attrmat_var_array
+                lightarray_var ""
+                shaderprog_ident
+                    "levelutil/shader/prog/plain_point.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "light_method"
+                rank 99999
+                insp_ident "showwire"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+                mesh_var "mesh"
+                texchan_var_array "tex0" "normalmap"
+                tex_attr_var_array "attr0" "tangentu" "tangentv"
+                attrmat_var_array ""
+                blend_col_src_fac "one"
+                blend_col_dest_fac "inv_src_col"
+                lightarray_var ""
+                shaderprog_ident
+                    "levelutil/shader/prog/bump.s3d_shaderprog_run"
+                shaderprog_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_progvar "prog_light_cenrange"
+                }
+                {
+                    src_var "light_ambient"
+                    dest_progvar "prog_light_ambient"
+                }
+                {
+                    src_var "light_diffuse"
+                    dest_progvar "prog_light_diffuse"
+                }
+                {
+                    src_var "light_specular"
+                    dest_progvar "prog_light_specular"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "lightmild_method"
+                rank 99999
+                insp_ident "showwire"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+                mesh_var "mesh"
+                texchan_var_array "tex0" "normalmap"
+                tex_attr_var_array "attr0" "tangentu" "tangentv"
+                attrmat_var_array ""
+                blend_col_src_fac "one"
+                blend_col_dest_fac "inv_src_col"
+                lightarray_var ""
+                shaderprog_ident
+                    "levelutil/shader/prog/bump_mild.s3d_shaderprog_run"
+                shaderprog_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_progvar "prog_light_cenrange"
+                }
+                {
+                    src_var "light_ambient"
+                    dest_progvar "prog_light_ambient"
+                }
+                {
+                    src_var "light_diffuse"
+                    dest_progvar "prog_light_diffuse"
+                }
+                {
+                    src_var "light_specular"
+                    dest_progvar "prog_light_specular"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "lightbright_method"
+                rank 12000
+                insp_ident "showwire"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 0
+                mesh_var "mesh"
+                texchan_var_array "tex0" "normalmap" "light_brighttex"
+                tex_attr_var_array "attr0" "tangentu" "tangentv"
+                attrmat_var_array "" "" ""
+                blend_col_src_fac "one"
+                blend_col_dest_fac "inv_src_col"
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+                shaderprog_ident
+                    "levelutil/shader/prog/bump_bright.s3d_shaderprog_run"
+                shaderprog_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_progvar "prog_light_cenrange"
+                }
+                {
+                    src_var "light_ambient"
+                    dest_progvar "prog_light_ambient"
+                }
+                {
+                    src_var "light_diffuse"
+                    dest_progvar "prog_light_diffuse"
+                }
+                {
+                    src_var "light_specular"
+                    dest_progvar "prog_light_specular"
+                }
+                {
+                    src_var "light_brightmat"
+                    dest_progvar "prog_light_brightmat"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "lightshmap_method"
+                rank 99999
+                insp_ident "showwire"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 0
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+                mesh_var "mesh"
+                texchan_var_array "tex0" "normalmap" "light_projtex"
+                    "light_shmap"
+                tex_attr_var_array "attr0" "tangentu" "tangentv"
+                attrmat_var_array ""
+                blend_col_src_fac "one"
+                blend_col_dest_fac "inv_src_col"
+                lightarray_var ""
+                shaderprog_ident
+                    "levelutil/shader/prog/bump_shmap.s3d_shaderprog_run"
+                shaderprog_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_progvar "prog_light_cenrange"
+                }
+                {
+                    src_var "light_ambient"
+                    dest_progvar "prog_light_ambient"
+                }
+                {
+                    src_var "light_diffuse"
+                    dest_progvar "prog_light_diffuse"
+                }
+                {
+                    src_var "light_specular"
+                    dest_progvar "prog_light_specular"
+                }
+                {
+                    src_var "light_projmat"
+                    dest_progvar "prog_light_projmat"
+                }
+                {
+                    src_var "light_shmapmat"
+                    dest_progvar "prog_light_shmapmat"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "gen_brightmap_for_softshmap_method"
+                rank 99999
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 0
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+                mesh_var "mesh"
+                texchan_var_array "light_projtex" "light_shmap"
+                tex_attr_var_array ""
+                attrmat_var_array ""
+                blend_col_src_fac "one"
+                blend_col_dest_fac "inv_src_col"
+                lightarray_var ""
+                shaderprog_ident
+                    "levelutil/shader/prog/gen_brightmap_for_softshmap.s3d_sha"
+                    & "derprog_run"
+                shaderprog_param_array
+                {
+                    src_var "light_intens"
+                    dest_progvar "prog_light_intens"
+                }
+                {
+                    src_var "light_projmat"
+                    dest_progvar "prog_light_projmat"
+                }
+                {
+                    src_var "light_shmapmat"
+                    dest_progvar "prog_light_shmapmat"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "gen_brightclear_method"
+                rank 12000
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array
+                attrmat_var_array
+                fog_enabled 0
+                blend_col_src_fac "one"
+                blend_col_dest_fac "zero"
+                color 0.0 0.0 0.0
+                alpha 0.0
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                shaderprog_ident
+                    "levelutil/shader/prog/gen_brightclear.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "gtp_distance_impostor_method"
+                rank 12000
+                insp_ident "insp_shader_mesh"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                color 1.0 1.0 1.0
+                shaderprog_ident
+                    "levelutil/shader/prog/gtp_distance_impostor.s3d_shaderpro"
+                    & "g_run"
+                shaderprog_param_array
+            }
+        }
+        {
+            ident "gtp_shader.worldmat"
+            param
+            {
+                env "shaderenv"
+                methods "caustic_recieve_method"
+                worldmat_var "worldMat"
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "caustic_recieve_method"
+                rank 14000
+                insp_ident "insp_shader_mesh"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                depth_bias_overlay 1
+                depth_bias_offs 1
+                mesh_var "mesh"
+                texchan_var_array "cauCubeMap"
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                blend_col_dest_fac "one"
+                blend_col_src_fac "one"
+                blend_col_op "src_plus_dest"
+                color 1.0 1.0 1.0
+                shaderprog_ident
+                    "levelutil/shader/prog/gtp_caustic_recieve.s3d_shaderprog_"
+                    & "run"
+                shaderprog_param_array
+                {
+                    src_var "cauCubeLastCenter"
+                    dest_progvar "lastCenter"
+                }
+                {
+                    src_var "worldMat"
+                    dest_progvar "worldMat"
+                }
+            }
+        }
+    }
+}
+{
+    name "ordinary_copper"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                mesh_var "mesh"
+                texchan_var_array "tex0" "normalmap"
+                tex_attr_var_array "attr0"
+                usage "render"
+                tangentu_attr_var "tangentu"
+                tangentv_attr_var "tangentv"
+                insp_ident "showmesh"
+                insp_rank 80000
+                insp_color 1.0 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                usage "shvol_occl"
+                mesh_var "mesh_shvol_occl"
+                texchan_var_array
+                tex_attr_var_array
+                insp_ident "showocclmesh"
+                insp_rank 80000
+                insp_color 0.5 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+                {
+                    triggers "gtp_distance_impostor_trigger"
+                    method "gtp_distance_impostor_method"
+                }
+                {
+                    triggers "gen_shmap_trigger"
+                    method "gen_shmap_method"
+                }
+                {
+                    triggers "light_trigger"
+                    method "light_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                }
+                {
+                    triggers "lightmild_trigger"
+                    method "lightmild_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                }
+                {
+                    triggers "lightbright_trigger"
+                    method "lightbright_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                    {
+                        src_extvar "ext_light_brighttex"
+                        dest_var "light_brighttex"
+                    }
+                    {
+                        src_extvar "ext_light_brightmat"
+                        dest_var "light_brightmat"
+                    }
+                }
+                {
+                    triggers "lightshmap_trigger"
+                    method "lightshmap_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                    {
+                        src_extvar "ext_light_projmat"
+                        dest_var "light_projmat"
+                    }
+                    {
+                        src_extvar "ext_light_shmapmat"
+                        dest_var "light_shmapmat"
+                    }
+                    {
+                        src_extvar "ext_light_projtex"
+                        dest_var "light_projtex"
+                    }
+                    {
+                        src_extvar "ext_light_shmap"
+                        dest_var "light_shmap"
+                    }
+                }
+                {
+                    triggers "gen_brightmap_for_softshmap_trigger"
+                    method "gen_brightmap_for_softshmap_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_intens"
+                        dest_var "light_intens"
+                    }
+                    {
+                        src_extvar "ext_light_projmat"
+                        dest_var "light_projmat"
+                    }
+                    {
+                        src_extvar "ext_light_shmapmat"
+                        dest_var "light_shmapmat"
+                    }
+                    {
+                        src_extvar "ext_light_projtex"
+                        dest_var "light_projtex"
+                    }
+                    {
+                        src_extvar "ext_light_shmap"
+                        dest_var "light_shmap"
+                    }
+                }
+                {
+                    triggers "gen_brightclear_trigger"
+                    method "gen_brightclear_method"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh_shvol_occl"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "shvol_mark_trigger"
+                    method "shvol_mark_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_shvolparam"
+                        dest_var "light_shvolparam"
+                    }
+                }
+            }
+        }
+        {
+            ident "eng_shader_shvol.occluder"
+            param
+            {
+                env "shaderenv"
+                methods "shvol_mark_method"
+                reverse_rank 90010
+                nonreverse_rank 90000
+                insp_ident "showocclwire"
+                rel_gap 0.01
+                backface 0
+                mesh_var "mesh_shvol_occl"
+                cenrange_var "light_cenrange"
+                shvolparam_var "light_shvolparam"
+                extrude_var "light_extrude"
+                strict_shaderprog_ident
+                    "levelutil/shader/prog/gen_shvol_strict.s3d_shaderprog_run"
+                strict_shaderprog_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_progvar "prog_light_cenrange"
+                }
+                {
+                    src_var "light_extrude"
+                    dest_progvar "prog_light_extrude"
+                }
+                quick_shaderprog_ident
+                    "levelutil/shader/prog/gen_shvol_quick.s3d_shaderprog_run"
+                quick_shaderprog_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_progvar "prog_light_cenrange"
+                }
+                {
+                    src_var "light_extrude"
+                    dest_progvar "prog_light_extrude"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                rank 99999
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                methods "gen_shmap_method"
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                shaderprog_ident
+                    "levelutil/shader/prog/gen_shmap.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 12000
+                insp_ident "showwire"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 0
+                color 0.0 0.0 0.0
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array
+                attrmat_var_array
+                lightarray_var ""
+                shaderprog_ident
+                    "levelutil/shader/prog/plain_point.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "lightshmap_method"
+                rank 99999
+                insp_ident "showwire"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 0
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+                mesh_var "mesh"
+                texchan_var_array "tex0" "normalmap" "light_projtex"
+                    "light_shmap"
+                tex_attr_var_array "attr0" "tangentu" "tangentv"
+                attrmat_var_array ""
+                blend_col_src_fac "one"
+                blend_col_dest_fac "inv_src_col"
+                lightarray_var ""
+                shaderprog_ident
+                    "levelutil/shader/prog/bump_shmap.s3d_shaderprog_run"
+                shaderprog_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_progvar "prog_light_cenrange"
+                }
+                {
+                    src_var "light_ambient"
+                    dest_progvar "prog_light_ambient"
+                }
+                {
+                    src_var "light_diffuse"
+                    dest_progvar "prog_light_diffuse"
+                }
+                {
+                    src_var "light_specular"
+                    dest_progvar "prog_light_specular"
+                }
+                {
+                    src_var "light_projmat"
+                    dest_progvar "prog_light_projmat"
+                }
+                {
+                    src_var "light_shmapmat"
+                    dest_progvar "prog_light_shmapmat"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "gen_brightmap_for_softshmap_method"
+                rank 99999
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 0
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+                mesh_var "mesh"
+                texchan_var_array "light_projtex" "light_shmap"
+                tex_attr_var_array ""
+                attrmat_var_array ""
+                blend_col_src_fac "one"
+                blend_col_dest_fac "inv_src_col"
+                lightarray_var ""
+                shaderprog_ident
+                    "levelutil/shader/prog/gen_brightmap_for_softshmap.s3d_sha"
+                    & "derprog_run"
+                shaderprog_param_array
+                {
+                    src_var "light_intens"
+                    dest_progvar "prog_light_intens"
+                }
+                {
+                    src_var "light_projmat"
+                    dest_progvar "prog_light_projmat"
+                }
+                {
+                    src_var "light_shmapmat"
+                    dest_progvar "prog_light_shmapmat"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "gen_brightclear_method"
+                rank 12000
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array
+                attrmat_var_array
+                fog_enabled 0
+                blend_col_src_fac "one"
+                blend_col_dest_fac "zero"
+                color 0.0 0.0 0.0
+                alpha 0.0
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                shaderprog_ident
+                    "levelutil/shader/prog/gen_brightclear.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+        {
+            ident "gtp_shader.createtex"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                texchan_var "envmap0"
+                width 128
+                height 128
+                texprop_rendertarget 1
+                texprop_cube 1
+                texprop_float 0
+                texprop_comp 4
+                texprop_bitspercomp 8
+                samplermode_clamp 0
+                samplermode_filter 1
+            }
+        }
+        {
+            ident "gtp_shader.envmap"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank -90000
+                max_ext 256
+                max_recursion 2
+                ext_dist_scale 20.0
+                proj_neg_z 0.1
+                proj_pos_z 100.0
+                enum_trigger "mirror_trigger"
+                destprop_antialias 0
+                mesh_var "mesh"
+                update_interval 6
+                update_all_face 1
+                start_frame 1
+                last_center_var "lastCenter"
+                world_space 1
+                dest_array
+                {
+                    from_var "envmap0"
+                    to_var "envmap0"
+                    texprop_restrusage 0
+                    texprop_depth 0
+                    texprop_comp 3
+                    texprop_float 0
+                    samplermode_filter 0
+                    samplermode_clamp 1
+                }
+            }
+        }
+        {
+            ident "gtp_shader.createtex"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                texchan_var "dist"
+                width 128
+                height 128
+                texprop_rendertarget 1
+                texprop_cube 1
+                texprop_float 1
+                texprop_comp 2
+                texprop_bitspercomp 16
+                samplermode_clamp 0
+                samplermode_filter 1
+            }
+        }
+        {
+            ident "gtp_shader.envmap"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank -90000
+                max_ext 128
+                max_recursion 1
+                ext_dist_scale 20.0
+                proj_neg_z 0.1
+                proj_pos_z 100.0
+                enum_trigger "gtp_distance_impostor_trigger"
+                destprop_antialias 0
+                mesh_var "mesh"
+                update_interval 6
+                update_all_face 1
+                start_frame 1
+                last_center_var "lastCenter"
+                world_space 1
+                dest_array
+                {
+                    from_var "dist"
+                    to_var "dist"
+                    texprop_restrusage 0
+                    texprop_depth 0
+                    texprop_comp 1
+                    texprop_float 1
+                    samplermode_filter 0
+                    samplermode_clamp 1
+                }
+            }
+        }
+        {
+            ident "gtp_shader.worldmat"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                worldmat_var "worldMat"
+            }
+        }
+        {
+            ident "gtp_shader.worldmat"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                worldmat_var "worldMatIT"
+                inverse 1
+                transpose 1
+            }
+        }
+        {
+            ident "eng_shader_std.constvec"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                val_var "Fresnel"
+                val 0.95 0.63 0.54 1.0
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 12000
+                insp_ident "insp_shader_mesh"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 0
+                mesh_var "mesh"
+                texchan_var_array "envmap0" "dist"
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+                use_vertex_coloralpha 0
+                shaderprog_ident
+                    "levelutil/shader/prog/gtp_envmap_metal.s3d_shaderprog_run"
+                shaderprog_param_array
+                {
+                    src_var "lastCenter"
+                    dest_progvar "lastCenter"
+                }
+                {
+                    src_var "worldMat"
+                    dest_progvar "worldMat"
+                }
+                {
+                    src_var "worldMatIT"
+                    dest_progvar "worldMatIT"
+                }
+                {
+                    src_var "Fresnel"
+                    dest_progvar "Fresnel"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "gtp_distance_impostor_method"
+                rank 12000
+                insp_ident "insp_shader_mesh"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                color 1.0 1.0 1.0
+                shaderprog_ident
+                    "levelutil/shader/prog/gtp_distance_impostor.s3d_shaderpro"
+                    & "g_run"
+                shaderprog_param_array
+            }
+        }
+    }
+}
+{
+    name "ordinary_alu"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                mesh_var "mesh"
+                texchan_var_array "tex0" "normalmap"
+                tex_attr_var_array "attr0"
+                usage "render"
+                tangentu_attr_var "tangentu"
+                tangentv_attr_var "tangentv"
+                insp_ident "showmesh"
+                insp_rank 80000
+                insp_color 1.0 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                usage "shvol_occl"
+                mesh_var "mesh_shvol_occl"
+                texchan_var_array
+                tex_attr_var_array
+                insp_ident "showocclmesh"
+                insp_rank 80000
+                insp_color 0.5 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+                {
+                    triggers "gtp_distance_impostor_trigger"
+                    method "gtp_distance_impostor_method"
+                }
+                {
+                    triggers "gen_shmap_trigger"
+                    method "gen_shmap_method"
+                }
+                {
+                    triggers "light_trigger"
+                    method "light_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                }
+                {
+                    triggers "lightmild_trigger"
+                    method "lightmild_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                }
+                {
+                    triggers "lightbright_trigger"
+                    method "lightbright_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                    {
+                        src_extvar "ext_light_brighttex"
+                        dest_var "light_brighttex"
+                    }
+                    {
+                        src_extvar "ext_light_brightmat"
+                        dest_var "light_brightmat"
+                    }
+                }
+                {
+                    triggers "lightshmap_trigger"
+                    method "lightshmap_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                    {
+                        src_extvar "ext_light_projmat"
+                        dest_var "light_projmat"
+                    }
+                    {
+                        src_extvar "ext_light_shmapmat"
+                        dest_var "light_shmapmat"
+                    }
+                    {
+                        src_extvar "ext_light_projtex"
+                        dest_var "light_projtex"
+                    }
+                    {
+                        src_extvar "ext_light_shmap"
+                        dest_var "light_shmap"
+                    }
+                }
+                {
+                    triggers "gen_brightmap_for_softshmap_trigger"
+                    method "gen_brightmap_for_softshmap_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_intens"
+                        dest_var "light_intens"
+                    }
+                    {
+                        src_extvar "ext_light_projmat"
+                        dest_var "light_projmat"
+                    }
+                    {
+                        src_extvar "ext_light_shmapmat"
+                        dest_var "light_shmapmat"
+                    }
+                    {
+                        src_extvar "ext_light_projtex"
+                        dest_var "light_projtex"
+                    }
+                    {
+                        src_extvar "ext_light_shmap"
+                        dest_var "light_shmap"
+                    }
+                }
+                {
+                    triggers "gen_brightclear_trigger"
+                    method "gen_brightclear_method"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh_shvol_occl"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "shvol_mark_trigger"
+                    method "shvol_mark_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_shvolparam"
+                        dest_var "light_shvolparam"
+                    }
+                }
+            }
+        }
+        {
+            ident "eng_shader_shvol.occluder"
+            param
+            {
+                env "shaderenv"
+                methods "shvol_mark_method"
+                reverse_rank 90010
+                nonreverse_rank 90000
+                insp_ident "showocclwire"
+                rel_gap 0.01
+                backface 0
+                mesh_var "mesh_shvol_occl"
+                cenrange_var "light_cenrange"
+                shvolparam_var "light_shvolparam"
+                extrude_var "light_extrude"
+                strict_shaderprog_ident
+                    "levelutil/shader/prog/gen_shvol_strict.s3d_shaderprog_run"
+                strict_shaderprog_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_progvar "prog_light_cenrange"
+                }
+                {
+                    src_var "light_extrude"
+                    dest_progvar "prog_light_extrude"
+                }
+                quick_shaderprog_ident
+                    "levelutil/shader/prog/gen_shvol_quick.s3d_shaderprog_run"
+                quick_shaderprog_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_progvar "prog_light_cenrange"
+                }
+                {
+                    src_var "light_extrude"
+                    dest_progvar "prog_light_extrude"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                rank 99999
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                methods "gen_shmap_method"
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                shaderprog_ident
+                    "levelutil/shader/prog/gen_shmap.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 12000
+                insp_ident "showwire"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 0
+                color 0.0 0.0 0.0
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array
+                attrmat_var_array
+                lightarray_var ""
+                shaderprog_ident
+                    "levelutil/shader/prog/plain_point.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "lightshmap_method"
+                rank 99999
+                insp_ident "showwire"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 0
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+                mesh_var "mesh"
+                texchan_var_array "tex0" "normalmap" "light_projtex"
+                    "light_shmap"
+                tex_attr_var_array "attr0" "tangentu" "tangentv"
+                attrmat_var_array ""
+                blend_col_src_fac "one"
+                blend_col_dest_fac "inv_src_col"
+                lightarray_var ""
+                shaderprog_ident
+                    "levelutil/shader/prog/bump_shmap.s3d_shaderprog_run"
+                shaderprog_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_progvar "prog_light_cenrange"
+                }
+                {
+                    src_var "light_ambient"
+                    dest_progvar "prog_light_ambient"
+                }
+                {
+                    src_var "light_diffuse"
+                    dest_progvar "prog_light_diffuse"
+                }
+                {
+                    src_var "light_specular"
+                    dest_progvar "prog_light_specular"
+                }
+                {
+                    src_var "light_projmat"
+                    dest_progvar "prog_light_projmat"
+                }
+                {
+                    src_var "light_shmapmat"
+                    dest_progvar "prog_light_shmapmat"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "gen_brightmap_for_softshmap_method"
+                rank 99999
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 0
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+                mesh_var "mesh"
+                texchan_var_array "light_projtex" "light_shmap"
+                tex_attr_var_array ""
+                attrmat_var_array ""
+                blend_col_src_fac "one"
+                blend_col_dest_fac "inv_src_col"
+                lightarray_var ""
+                shaderprog_ident
+                    "levelutil/shader/prog/gen_brightmap_for_softshmap.s3d_sha"
+                    & "derprog_run"
+                shaderprog_param_array
+                {
+                    src_var "light_intens"
+                    dest_progvar "prog_light_intens"
+                }
+                {
+                    src_var "light_projmat"
+                    dest_progvar "prog_light_projmat"
+                }
+                {
+                    src_var "light_shmapmat"
+                    dest_progvar "prog_light_shmapmat"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "gen_brightclear_method"
+                rank 12000
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array
+                attrmat_var_array
+                fog_enabled 0
+                blend_col_src_fac "one"
+                blend_col_dest_fac "zero"
+                color 0.0 0.0 0.0
+                alpha 0.0
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                shaderprog_ident
+                    "levelutil/shader/prog/gen_brightclear.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+        {
+            ident "gtp_shader.createtex"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                texchan_var "envmap0"
+                width 128
+                height 128
+                texprop_rendertarget 1
+                texprop_cube 1
+                texprop_float 0
+                texprop_comp 4
+                texprop_bitspercomp 8
+                samplermode_clamp 0
+                samplermode_filter 1
+            }
+        }
+        {
+            ident "gtp_shader.envmap"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank -90000
+                max_ext 256
+                max_recursion 2
+                ext_dist_scale 20.0
+                proj_neg_z 0.1
+                proj_pos_z 100.0
+                enum_trigger "mirror_trigger"
+                destprop_antialias 0
+                mesh_var "mesh"
+                update_interval 1
+                update_all_face 1
+                start_frame 1
+                last_center_var "lastCenter"
+                world_space 1
+                dest_array
+                {
+                    from_var "envmap0"
+                    to_var "envmap0"
+                    texprop_restrusage 0
+                    texprop_depth 0
+                    texprop_comp 3
+                    texprop_float 0
+                    samplermode_filter 0
+                    samplermode_clamp 1
+                }
+            }
+        }
+        {
+            ident "gtp_shader.createtex"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                texchan_var "dist"
+                width 128
+                height 128
+                texprop_rendertarget 1
+                texprop_cube 1
+                texprop_float 1
+                texprop_comp 2
+                texprop_bitspercomp 16
+                samplermode_clamp 0
+                samplermode_filter 1
+            }
+        }
+        {
+            ident "gtp_shader.envmap"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank -90000
+                max_ext 128
+                max_recursion 1
+                ext_dist_scale 20.0
+                proj_neg_z 0.1
+                proj_pos_z 100.0
+                enum_trigger "gtp_distance_impostor_trigger"
+                destprop_antialias 0
+                mesh_var "mesh"
+                update_interval 1
+                update_all_face 1
+                start_frame 1
+                last_center_var "lastCenter"
+                world_space 1
+                dest_array
+                {
+                    from_var "dist"
+                    to_var "dist"
+                    texprop_restrusage 0
+                    texprop_depth 0
+                    texprop_comp 1
+                    texprop_float 1
+                    samplermode_filter 0
+                    samplermode_clamp 1
+                }
+            }
+        }
+        {
+            ident "gtp_shader.worldmat"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                worldmat_var "worldMat"
+            }
+        }
+        {
+            ident "gtp_shader.worldmat"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                worldmat_var "worldMatIT"
+                inverse 1
+                transpose 1
+            }
+        }
+        {
+            ident "eng_shader_std.constvec"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                val_var "Fresnel"
+                val 0.9 0.92 0.92 1.0
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 12000
+                insp_ident "insp_shader_mesh"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 0
+                mesh_var "mesh"
+                texchan_var_array "envmap0" "dist"
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+                use_vertex_coloralpha 0
+                shaderprog_ident
+                    "levelutil/shader/prog/gtp_envmap_metal.s3d_shaderprog_run"
+                shaderprog_param_array
+                {
+                    src_var "lastCenter"
+                    dest_progvar "lastCenter"
+                }
+                {
+                    src_var "worldMat"
+                    dest_progvar "worldMat"
+                }
+                {
+                    src_var "worldMatIT"
+                    dest_progvar "worldMatIT"
+                }
+                {
+                    src_var "Fresnel"
+                    dest_progvar "Fresnel"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "gtp_distance_impostor_method"
+                rank 12000
+                insp_ident "insp_shader_mesh"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                color 1.0 1.0 1.0
+                shaderprog_ident
+                    "levelutil/shader/prog/gtp_distance_impostor.s3d_shaderpro"
+                    & "g_run"
+                shaderprog_param_array
+            }
+        }
+    }
+}
+{
+    name "caustic_caster"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array
+                usage "render"
+                tangentu_attr_var
+                tangentv_attr_var
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh"
+                insp_ident "insp_shader_bound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+                {
+                    triggers "gtp_distance_impostor_trigger"
+                    method "gtp_distance_impostor_method"
+                }
+                {
+                    triggers "caustic_cast_trigger"
+                    method "caustic_cast_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "recievers"
+                        dest_var "recievers"
+                    }
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.constvec"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                val_var "lastCenter"
+                val 0.0 0.0 0.0 1.0
+            }
+        }
+        {
+            ident "gtp_shader.createtex"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                texchan_var "envmap0"
+                width 128
+                height 128
+                texprop_rendertarget 1
+                texprop_cube 1
+                texprop_float 0
+                texprop_comp 4
+                texprop_bitspercomp 8
+                samplermode_clamp 0
+                samplermode_filter 1
+            }
+        }
+        {
+            ident "gtp_shader.envmap"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank -89500
+                max_ext 256
+                max_recursion 2
+                ext_dist_scale 20.0
+                proj_neg_z 0.1
+                proj_pos_z 100.0
+                enum_trigger "mirror_trigger"
+                destprop_antialias 0
+                mesh_var "mesh"
+                update_interval 1
+                update_all_face 1
+                start_frame 0
+                last_center_var "lastCenter"
+                world_space 1
+                dest_array
+                {
+                    from_var "envmap0"
+                    to_var "envmap0"
+                    texprop_restrusage 0
+                    texprop_depth 0
+                    texprop_comp 3
+                    texprop_float 0
+                    samplermode_filter 0
+                    samplermode_clamp 1
+                }
+            }
+        }
+        {
+            ident "gtp_shader.createtex"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                texchan_var "dist"
+                width 128
+                height 128
+                texprop_rendertarget 1
+                texprop_cube 1
+                texprop_float 1
+                texprop_comp 2
+                texprop_bitspercomp 16
+                samplermode_clamp 0
+                samplermode_filter 1
+            }
+        }
+        {
+            ident "gtp_shader.envmap"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank -89600
+                max_ext 128
+                max_recursion 1
+                ext_dist_scale 20.0
+                proj_neg_z 0.1
+                proj_pos_z 100.0
+                enum_trigger "gtp_distance_impostor_trigger"
+                destprop_antialias 0
+                mesh_var "mesh"
+                update_interval 1
+                update_all_face 1
+                start_frame 0
+                last_center_var "lastCenter"
+                world_space 1
+                dest_array
+                {
+                    from_var "dist"
+                    to_var "dist"
+                    texprop_restrusage 0
+                    texprop_depth 0
+                    texprop_comp 1
+                    texprop_float 1
+                    samplermode_filter 0
+                    samplermode_clamp 1
+                }
+            }
+        }
+        {
+            ident "gtp_shader.worldmat"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                worldmat_var "worldMat"
+            }
+        }
+        {
+            ident "gtp_shader.worldmat"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                worldmat_var "worldMatIT"
+                inverse 1
+                transpose 1
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 12000
+                insp_ident "insp_shader_mesh"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                mesh_var "mesh"
+                texchan_var_array "envmap0" "dist"
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+                use_vertex_coloralpha 0
+                shaderprog_ident
+                    "levelutil/shader/prog/gtp_envmap_refract.s3d_shaderprog_r"
+                    & "un"
+                shaderprog_param_array
+                {
+                    src_var "lastCenter"
+                    dest_progvar "lastCenter"
+                }
+                {
+                    src_var "worldMat"
+                    dest_progvar "worldMat"
+                }
+                {
+                    src_var "worldMatIT"
+                    dest_progvar "worldMatIT"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "gtp_distance_impostor_method"
+                rank 13000
+                insp_ident "insp_shader_mesh"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                color 1.0 1.0 1.0
+                shaderprog_ident
+                    "levelutil/shader/prog/gtp_distance_impostor.s3d_shaderpro"
+                    & "g_run"
+                shaderprog_param_array
+            }
+        }
+        {
+            ident "gtp_shader.createtex"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                texchan_var "cauCubeMap"
+                texprop_cube 1
+                width 128
+                height 128
+                texprop_rendertarget 1
+                texprop_float 1
+                texprop_comp 4
+                texprop_bitspercomp 16
+                samplermode_clamp 1
+                samplermode_filter 1
+            }
+        }
+        {
+            ident "gtp_shader.createtex"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                texchan_var "photonmap"
+                width 32
+                height 32
+                texprop_rendertarget 1
+                texprop_float 1
+                texprop_comp 4
+                texprop_bitspercomp 32
+                samplermode_clamp 1
+                samplermode_filter 0
+            }
+        }
+        {
+            ident "gtp_shader.focusedprojmat"
+            param
+            {
+                env "shaderenv"
+                methods "caustic_cast_method"
+                mesh_var "mesh"
+                destmat_var "lightViewProj"
+                centerpoint_var "light_cenrange"
+            }
+        }
+        {
+            ident "gtp_shader.worldmat"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                worldmat_var "viewToWorld"
+                inverse 0
+                transpose 0
+            }
+        }
+        {
+            ident "gtp_shader.worldmat"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                worldmat_var "viewToWorldInv"
+                inverse 1
+                transpose 0
+            }
+        }
+        {
+            ident "eng_shader_std.totex"
+            param
+            {
+                env "shaderenv"
+                methods "caustic_cast_method"
+                rank -7800
+                new_method "photonmap_method"
+                size_scale 1.0
+                dest_array
+                {
+                    from_var "photonmap"
+                    to_var "photonmap"
+                    texprop_restrusage 0
+                    texprop_depth 0
+                    texprop_comp 4
+                    texprop_float 1
+                    samplermode_filter 0
+                    samplermode_clamp 1
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "photonmap_method"
+                rank 1000
+                insp_ident "insp_shader_mesh"
+                cull_mode "front"
+                depth_test "less"
+                depth_write 1
+                mesh_var "mesh"
+                texchan_var_array "dist"
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_normal 1
+                use_vertex_point 1
+                color 1.0 1.0 1.0
+                shaderprog_ident
+                    "levelutil/shader/prog/gtp_cau_photonmap.s3d_shaderprog_ru"
+                    & "n"
+                shaderprog_param_array
+                {
+                    src_var "lightViewProj"
+                    dest_progvar "lightViewProj"
+                }
+                {
+                    src_var "viewToWorld"
+                    dest_progvar "viewToWorld"
+                }
+                {
+                    src_var "viewToWorldInv"
+                    dest_progvar "viewToWorldInv"
+                }
+                {
+                    src_var "light_cenrange"
+                    dest_progvar "lightPosView"
+                }
+                {
+                    src_var "lastCenter"
+                    dest_progvar "lastCenter"
+                }
+            }
+        }
+        {
+            ident "gtp_shader.causticcube"
+            param
+            {
+                env "shaderenv"
+                methods "caustic_cast_method"
+                rank -7700
+                iter_start 0
+                iter_end 0
+                iter_step 0
+                width_scale 1.0
+                height_scale 1.0
+                destprop_antialias 1
+                passinfo_var ""
+                src_array "photonmap"
+                update_interval 1
+                update_all_face 1
+                start_frame 0
+                photon_count 128
+                use_points 1
+                dest_array
+                {
+                    from_var "cauCubeMap"
+                    to_var "cauCubeMap"
+                    texprop_restrusage 0
+                    texprop_depth 0
+                    texprop_float 0
+                    texprop_comp 4
+                    texprop_bitspercomp 8
+                    samplermode_filter 0
+                    samplermode_clamp 1
+                }
+                shaderprog_ident
+                    "levelutil/shader/prog/gtp_caustic_cubemap_point.s3d_shade"
+                    & "rprog_run"
+                shaderprog_param_array
+            }
+        }
+        {
+            ident "eng_shader_std.collexec"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                coll_var "recievers"
+                rank 13500
+                exec_trigger "caustic_recieve_trigger"
+                exec_param_array
+                {
+                    src_var "lastCenter"
+                    dest_extvar "lastCenter"
+                }
+                {
+                    src_var "cauCubeMap"
+                    dest_extvar "cauCubeMap"
+                }
+            }
+        }
+    }
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/plain_pointcol.s3d_shaderprog
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/plain_pointcol.s3d_shaderprog	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/plain_pointcol.s3d_shaderprog	(revision 2453)
@@ -0,0 +1,157 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+ogl
+{
+    glsl
+    {
+        vertshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "plain_ogl_glsl_vs1x0.s3d_shadercode_run"
+            }
+
+            tracking
+            {
+                cnt 4
+                codevar "matBone[$]"
+                chan "bone"
+                trans "identity"
+            }
+
+            //  attribute vec4 bone_wgh;
+            bone_wgh "boneWgh"
+            //bone_subscr "boneSubscr"
+
+            predefine_array
+            {
+                name "S3D_USE_BONEWGH"
+            }
+        }
+    }
+}
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "plain_pointcol_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "plain_pointcol_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "plain_pointcol_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "plain_pointcol_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+
+        //fog_codevar "paramFog"
+    }
+}
+//#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/plain_point.s3d_shaderprog
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/plain_point.s3d_shaderprog	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/plain_point.s3d_shaderprog	(revision 2453)
@@ -0,0 +1,174 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Shader program configuration.
+// Different drivers access different parameters.
+
+ogl
+{
+    glsl
+    {
+        vertshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "plain_ogl_glsl_vs1x0.s3d_shadercode_run"
+            }
+
+            tracking
+            {
+                cnt 4
+                codevar "matBone[$]"
+                chan "bone"
+                trans "identity"
+            }
+
+            //  attribute vec4 bone_wgh;
+            bone_wgh "boneWgh"
+            //bone_subscr "boneSubscr"
+
+            predefine_array
+            {
+                name "S3D_USE_BONEWGH"
+            }
+        }
+    }
+}
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "plain_point_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+
+        mtl
+        {
+            power_codevar ""
+            emissive_codevar "mtrlEmissive"
+        }
+
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "plain_point_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "plain_point_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+
+        mtl
+        {
+            power_codevar ""
+            emissive_codevar "mtrlEmissive"
+        }
+
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "plain_point_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+
+        //fog_codevar "paramFog"
+    }
+}
+//#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gen_shvol_strict.s3d_shaderprog
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gen_shvol_strict.s3d_shaderprog	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gen_shvol_strict.s3d_shaderprog	(revision 2453)
@@ -0,0 +1,119 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+ogl
+{
+    univprog
+    {
+        ident "drv_univprog_std.shvol"
+        param
+        {
+            env "env"
+            cenrange_progvar "prog_light_cenrange"
+            extrude_progvar "prog_light_extrude"
+        }
+    }
+    
+    glsl
+    {
+        vertshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "gen_shvol_view_ogl_glsl_vs1x0.s3d_shadercode_run"
+            }
+
+            tracking
+
+            predefine_array
+        }
+
+        param_array
+    }
+}
+
+d3d9
+{
+    univprog
+    {
+        ident "drv_univprog_std.shvol"
+        param
+        {
+            env "env"
+            cenrange_progvar "prog_light_cenrange"
+            extrude_progvar "prog_light_extrude"
+        }
+    }
+    
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gen_shvol_view_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+
+        param_array
+        predefine_array
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    xps
+    {
+        ident "drv_xexps_std.shvol"
+        param
+        {
+            env "env"
+            cenrange_progvar "prog_light_cenrange"
+            extrude_progvar "prog_light_extrude"
+        }
+    }
+    
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gen_shvol_view_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+
+        param_array
+        predefine_array
+    }
+}
+//#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/lightfilter.s3d_shaderprog
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/lightfilter.s3d_shaderprog	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/lightfilter.s3d_shaderprog	(revision 2453)
@@ -0,0 +1,145 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+ogl
+{
+    glsl
+    {
+        vertshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "lightfilter_ogl_glsl_vs1x0.s3d_shadercode_run"
+            }
+        }
+
+        fragshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "lightfilter_ogl_glsl_fs1x0.s3d_shadercode_run"
+            }
+
+            predefine_array
+        }
+
+        param_array
+        {
+            src_progvar "prog_passinfo"
+            dest_codevar "passInfo"
+            type "float4"
+        }
+
+        tex_rcpsize_codevar_array "tex0RcpSize"
+
+        sampler_array "brightTex"
+    }
+}
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "lightfilter_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "matProjView"
+            slot 0
+            chan "projview"
+            trans "identity"
+        }
+
+        param_array
+        {
+            src_progvar "prog_passinfo"
+            dest_codevar "passInfo"
+            type "float4"
+        }
+
+        tex_rcpsize_codevar_array "tex0RcpSize"
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "lightfilter_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+
+        param_array
+        
+        predefine_array
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "lightfilter_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "matProjView"
+            slot 0
+            chan "projview"
+            trans "identity"
+        }
+
+        param_array
+        {
+            src_progvar "prog_passinfo"
+            dest_codevar "passInfo"
+            type "float4"
+        }
+
+        tex_rcpsize_codevar_array "tex0RcpSize"
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "lightfilter_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+
+        param_array
+        
+        predefine_array
+    }
+}
+//#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gtp_reduce_cubemap.s3d_shaderprog
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gtp_reduce_cubemap.s3d_shaderprog	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gtp_reduce_cubemap.s3d_shaderprog	(revision 2453)
@@ -0,0 +1,37 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                & "gtp_reduce_cubemap_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+        }      
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "3x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gtp_reduce_cubemap_d3d9_hlsl_ps3x0.s3d_shadercode_run"
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gen_brightclear.s3d_shaderprog
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gen_brightclear.s3d_shaderprog	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gen_brightclear.s3d_shaderprog	(revision 2453)
@@ -0,0 +1,150 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gen_brightclear_d3d9_hlsl_vs1x1."
+                    & "s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        param_array
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gen_brightclear_d3d9_hlsl_ps2x0."
+                    & "s3d_shadercode_run"
+        }
+        
+        param_array
+
+        tex_size_codevar_array
+        tex_rcpsize_codevar_array
+
+        predefine_array
+        {
+            name "S3D_SHMAP_ZBIAS"
+            //val "0.0003" // For no-filtering
+            val "0.0010" // For 4-filtering
+            //val "0.0010" // For 16-filtering
+        }
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gen_brightclear_d3d9_hlsl_vs1x1."
+                    & "s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        param_array
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gen_brightclear_d3d9_hlsl_ps2x0."
+                    & "s3d_shadercode_run"
+        }
+
+        param_array
+        
+        tex_size_codevar_array
+        tex_rcpsize_codevar_array
+
+        predefine_array
+        /*
+        {
+            name "S3D_SHMAP_FILTER4"
+            val ""
+        }
+        */
+        {
+            name "S3D_SHMAP_ZBIAS"
+            //val "0.0003" // For no-filtering
+            //val "0.0010" // For 4-filtering
+            val "0.0010" // For 16-filtering
+        }
+    }
+}
+//#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gen_shvol_quick.s3d_shaderprog
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gen_shvol_quick.s3d_shaderprog	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gen_shvol_quick.s3d_shaderprog	(revision 2453)
@@ -0,0 +1,165 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+ogl
+{
+    glsl
+    {
+        vertshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "gen_shvol_extrude_ogl_glsl_vs1x0.s3d_shadercode_run"
+            }
+
+            tracking
+            {
+                // uniform mat4 matBone[4];
+                cnt 4
+                codevar "matBone[$]"
+                chan "bone"
+                trans "identity"
+            }
+
+            //  attribute vec4 bone_wgh;
+            bone_wgh "boneWgh"
+            //bone_subscr "boneSubscr"
+
+            predefine_array
+            {
+                name "S3D_USE_BONEWGH"
+            }
+            {
+                name "S3D_USE_BLOAT"
+            }
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_cenrange"
+            dest_codevar "lightCenRange"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_extrude"
+            dest_codevar "lightExtrude"
+            type "float4"
+        }
+    }
+}
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gen_shvol_extrude_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_cenrange"
+            dest_codevar "lightCenRange"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_extrude"
+            dest_codevar "lightExtrude"
+            type "float4"
+        }
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+        {
+            name "S3D_USE_BLOAT"
+        }
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gen_shvol_extrude_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_cenrange"
+            dest_codevar "lightCenRange"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_extrude"
+            dest_codevar "lightExtrude"
+            type "float4"
+        }
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+        {
+            name "S3D_USE_BLOAT"
+        }
+    }
+}
+//#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/comic.s3d_shaderprog
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/comic.s3d_shaderprog	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/comic.s3d_shaderprog	(revision 2453)
@@ -0,0 +1,159 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Shader program configuration.
+// Different drivers access different parameters.
+
+ogl
+{
+    glsl
+    {
+        vertshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "comic_ogl_glsl_vs1x0.s3d_shadercode_run"
+            }
+        }
+        fragshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "comic_ogl_glsl_fs1x0.s3d_shadercode_run"
+            }
+        }
+        sampler_array "tex0"
+    }
+}
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "comic_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+        }
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+
+        light_array
+        {
+            cnt 4
+            pos_codevar "lightArray[$].pos"
+            dir_codevar ""
+            ambient_codevar "lightArray[$].ambient"
+            diffuse_codevar "lightArray[$].diffuse"
+            specular_codevar "lightArray[$].specular"
+            atten_codevar "lightArray[$].atten"
+        }
+        light_activecnt_codevar "activeLights"
+
+        mtl
+        {
+            power_codevar "mtrlPower"
+            emissive_codevar "mtrlEmissive"
+        }
+
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "comic_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+        fog_codevar "paramFog"
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "comic_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+        }
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+
+        light_array
+        {
+            cnt 4
+            pos_codevar "lightArray[$].pos"
+            dir_codevar ""
+            ambient_codevar "lightArray[$].ambient"
+            diffuse_codevar "lightArray[$].diffuse"
+            specular_codevar "lightArray[$].specular"
+            atten_codevar "lightArray[$].atten"
+        }
+        light_activecnt_codevar "activeLights"
+
+        mtl
+        {
+            //power_codevar "mtrlPower"
+            emissive_codevar "mtrlEmissive"
+        }
+
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "comic_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+        fog_codevar "paramFog"
+    }
+}
+//#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/.sconsign
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/.sconsign	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/.sconsign	(revision 2453)
@@ -0,0 +1,15 @@
+}q(U*gen_brightmap_for_softshmap.s3d_shaderprogq(cSCons.Node.FS
+BuildInfo
+qoq}q(U	timestampqJÉEeFUcsigqJÉEeFubU
+gen_brightclear.s3d_shaderprogq(hoq	}q
+(hJÉEeFhJÉEeFubUblack.s3d_shaderprogq
+(hoq
+}q
+(hJÉEeFhJÉEeFubU"gtp_caustic_recieve.s3d_shaderprogq(hoq}q(U	timestampqJÉEeFUcsigqJÉEeFubUbloom_smooth.s3d_shaderprogq(hoq}q(hJÉEeFhJÉEeFubU$gtp_distance_impostor.s3d_shaderprogq(hoq}q(U	timestampqJÉEeFUcsigqJÉEeFubUbump.s3d_shaderprogq(hoq
+}q
+(hJÉEeFhJÉEeFubUgen_shmap.s3d_shaderprogq
+(hoq}q (hJÉEeFhJÉEeFubUbloom_bright.s3d_shaderprogq!(hoq"}q#(hJÉEeFhJÉEeFubU
+plain_pointtex.s3d_shaderprogq$(hoq%}q&(hJÉEeFhJÉEeFubU(gtp_caustic_cubemap_point.s3d_shaderprogq'(hoq(}q)(hJÉEeFhJÉEeFubUpartic.s3d_shaderprogq*(hoq+}q,(hJÉEeFhJÉEeFubUlightfilter.s3d_shaderprogq-(hoq.}q/(hJÉEeFhJÉEeFubU plain_pointcoltex.s3d_shaderprogq0(hoq1}q2(hJÉEeFhJÉEeFubU
+bloom_combine.s3d_shaderprogq3(hoq4}q5(hJÉEeFhJÉEeFubU!gtp_reduce_cubemap.s3d_shaderprogq6(hoq7}q8(hJÉEeFhJÉEeFubUgen_shvol_strict.s3d_shaderprogq9(hoq:}q;(hJÉEeFhJÉEeFubU%bloom_presmooth_bright.s3d_shaderprogq<(hoq=}q>(hJÉEeFhJÉEeFubUstandard.s3d_shaderprogq?(hoq@}qA(hJÉEeFhJÉEeFubUbump_bright.s3d_shaderprogqB(hoqC}qD(hJÉEeFhJÉEeFubUbump_shmap.s3d_shaderprogqE(hoqF}qG(hJÉEeFhJÉEeFubU gtp_cau_photonmap.s3d_shaderprogqH(hoqI}qJ(hJÉEeFhJÉEeFubUplain_point.s3d_shaderprogqK(hoqL}qM(hJÉEeFhJÉEeFubUcomic.s3d_shaderprogqN(hoqO}qP(hJÉEeFhJÉEeFubU
+gen_shvol_quick.s3d_shaderprogqQ(hoqR}qS(hJÉEeFhJÉEeFubUgtp_envmap.s3d_shaderprogqT(hoqU}qV(hJÉEeFhJÉEeFubUgtp_diffuse.s3d_shaderprogqW(hoqX}qY(hJÉEeFhJÉEeFubUbump_mild.s3d_shaderprogqZ(hoq[}q\(hJÉEeFhJÉEeFubU
+plain_pointcol.s3d_shaderprogq](hoq^}q_(hJÉEeFhJÉEeFubu.
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gtp_diffuse.s3d_shaderprog
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gtp_diffuse.s3d_shaderprog	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gtp_diffuse.s3d_shaderprog	(revision 2453)
@@ -0,0 +1,82 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                & "gtp_diffuse_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+        }
+        tracking
+        {
+            codevar "matProj"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matProjView"
+            slot 0
+            chan "projview"
+            trans "identity"
+        }
+{
+    codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+}
+{
+    codevar "matViewInvTrans"
+            slot 0
+            chan "view"
+            trans "invtransp"
+}
+
+param_array
+{
+    src_progvar "lastCenter"
+    dest_codevar "last_Center"
+    type "float4"
+}
+{
+    src_progvar "worldMat"
+    dest_codevar "worldMat"
+    type "float4x4"
+}
+{
+    src_progvar "worldMatIT"
+    dest_codevar "worldMatIT"
+    type "float4x4"
+}
+
+
+
+    }
+
+    hlsl_pixshader
+    {
+      code_variant_array
+      {
+            profile "3x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gtp_diffuse_d3d9_hlsl_ps3x0.s3d_shadercode_run"
+      }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gtp_envmap.s3d_shaderprog
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gtp_envmap.s3d_shaderprog	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gtp_envmap.s3d_shaderprog	(revision 2453)
@@ -0,0 +1,82 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                & "gtp_envmapSimple_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+        }
+        tracking
+        {
+            codevar "matProj"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matProjView"
+            slot 0
+            chan "projview"
+            trans "identity"
+        }
+{
+    codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+}
+{
+    codevar "matViewInvTrans"
+            slot 0
+            chan "view"
+            trans "invtransp"
+}
+
+param_array
+{
+    src_progvar "lastCenter"
+    dest_codevar "last_Center"
+    type "float4"
+}
+{
+    src_progvar "worldMat"
+    dest_codevar "worldMat"
+    type "float4x4"
+}
+{
+    src_progvar "worldMatIT"
+    dest_codevar "worldMatIT"
+    type "float4x4"
+}
+
+
+
+    }
+
+    hlsl_pixshader
+    {
+      code_variant_array
+      {
+            profile "3x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gtp_envmapSimple_d3d9_hlsl_ps1x1.s3d_shadercode_run"
+      }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gtp_distance_impostor.s3d_shaderprog
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gtp_distance_impostor.s3d_shaderprog	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gtp_distance_impostor.s3d_shaderprog	(revision 2453)
@@ -0,0 +1,50 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                & "gtp_distance_impostor_d3d9_hlsl_vs3x0.s3d_shadercode_run"
+        }
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+	{
+	    codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+	}
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "3x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gtp_distance_impostor_d3d9_hlsl_ps3x0.s3d_shadercode_run"
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gen_brightmap_for_softshmap.s3d_shaderprog
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gen_brightmap_for_softshmap.s3d_shaderprog	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gen_brightmap_for_softshmap.s3d_shaderprog	(revision 2453)
@@ -0,0 +1,180 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gen_brightmap_for_softshmap_d3d9_hlsl_vs1x1."
+                    & "s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_projmat"
+            dest_codevar "lightProjMat"
+            type "float4x4"
+        }
+        {
+            src_progvar "prog_light_shmapmat"
+            dest_codevar "lightShmapMat"
+            type "float4x4"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gen_brightmap_for_softshmap_d3d9_hlsl_ps2x0."
+                    & "s3d_shadercode_run"
+        }
+        
+        param_array
+        {
+            src_progvar "prog_light_intens"
+            dest_codevar "lightIntens"
+            type "float4"
+        }
+
+        tex_size_codevar_array "" "" "lightShmapSize"
+        tex_rcpsize_codevar_array "" "" "lightShmapRcpSize"
+
+        predefine_array
+        {
+            name "S3D_SHMAP_ZBIAS"
+            //val "0.0003" // For no-filtering
+            val "0.0010" // For 4-filtering
+            //val "0.0010" // For 16-filtering
+        }
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gen_brightmap_for_softshmap_d3d9_hlsl_vs1x1."
+                    & "s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_projmat"
+            dest_codevar "lightProjMat"
+            type "float4x4"
+        }
+        {
+            src_progvar "prog_light_shmapmat"
+            dest_codevar "lightShmapMat"
+            type "float4x4"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gen_brightmap_for_softshmap_d3d9_hlsl_ps2x0."
+                    & "s3d_shadercode_run"
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_intens"
+            dest_codevar "lightIntens"
+            type "float4"
+        }
+
+        tex_size_codevar_array "" "" "lightShmapSize"
+        tex_rcpsize_codevar_array "" "" "lightShmapRcpSize"
+
+        predefine_array
+        /*
+        {
+            name "S3D_SHMAP_FILTER4"
+            val ""
+        }
+        */
+        {
+            name "S3D_SHMAP_ZBIAS"
+            //val "0.0003" // For no-filtering
+            //val "0.0010" // For 4-filtering
+            val "0.0010" // For 16-filtering
+        }
+    }
+}
+//#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/standard.s3d_shaderprog
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/standard.s3d_shaderprog	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/standard.s3d_shaderprog	(revision 2453)
@@ -0,0 +1,215 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Shader program configuration.
+// Different drivers access different parameters.
+
+ogl
+{
+    glsl
+    {
+        vertshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "standard_ogl_glsl_vs1x0.s3d_shadercode_run"
+            }
+
+            tracking
+            {
+                // uniform mat4 matBone[4];
+                cnt 4
+                codevar "matBone[$]"
+                chan "bone"
+                trans "identity"
+            }
+
+            //  attribute vec4 bone_wgh;
+            bone_wgh "boneWgh"
+            //bone_subscr "boneSubscr"
+
+            predefine_array
+            {
+                name "S3D_USE_BONEWGH"
+            }
+        }
+    }
+}
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "standard_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+            //debug_code_file "src/res/levelutil/shader/prog/d3d9_hlsl/"
+            //      & "standard_d3d9_hlsl_vs2x0.s3d_shadercode"
+        }
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "standard_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+            //debug_code_file "src/res/levelutil/shader/prog/d3d9_hlsl/"
+            //      & "standard_d3d9_hlsl_vs1x1.s3d_shadercode"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        light_array
+        {
+            cnt 5
+            pos_codevar "lightArray[$].pos"
+            dir_codevar ""
+            ambient_codevar "lightArray[$].ambient"
+            diffuse_codevar "lightArray[$].diffuse"
+            specular_codevar "lightArray[$].specular"
+            atten_codevar "lightArray[$].atten"
+        }
+        light_activecnt_codevar "activeLights"
+
+        mtl
+        {
+            power_codevar "mtrlPower"
+            emissive_codevar "mtrlEmissive"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+        {
+            name "S3D_LIGHT_CNT"
+            val "5"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "standard_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+            
+        fog_codevar "paramFog"
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "standard_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+            //debug_code_file "src/res/levelutil/shader/prog/d3d9_hlsl/"
+            //      & "standard_d3d9_hlsl_vs2x0.s3d_shadercode"
+        }
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "standard_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+            //debug_code_file "src/res/levelutil/shader/prog/d3d9_hlsl/"
+            //      & "standard_d3d9_hlsl_vs1x1.s3d_shadercode"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        light_array
+        {
+            cnt 5
+            pos_codevar "lightArray[$].pos"
+            dir_codevar ""
+            ambient_codevar "lightArray[$].ambient"
+            diffuse_codevar "lightArray[$].diffuse"
+            specular_codevar "lightArray[$].specular"
+            atten_codevar "lightArray[$].atten"
+        }
+        light_activecnt_codevar "activeLights"
+
+        mtl
+        {
+            power_codevar "mtrlPower"
+            emissive_codevar "mtrlEmissive"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+        {
+            name "S3D_LIGHT_CNT"
+            val "5"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "standard_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+            
+        fog_codevar "paramFog"
+    }
+}
+//#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/bump_bright.s3d_shaderprog
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/bump_bright.s3d_shaderprog	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/bump_bright.s3d_shaderprog	(revision 2453)
@@ -0,0 +1,370 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Opengl Highlevel Shaderlanguage
+ogl
+{
+    glsl
+    {
+        vertshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "bump_ogl_glsl_vs1x0.s3d_shadercode_run"
+            }
+            tracking
+            {
+                // uniform mat4 matBone[4];
+                cnt 4
+                codevar "matBone[$]"
+                chan "bone"
+                trans "identity"
+            }
+
+            //  attribute vec4 bone_wgh;
+            bone_wgh "boneWgh"
+            //bone_subscr "boneSubscr"
+
+            predefine_array
+            {
+                name "S3D_USE_BONEWGH"
+            }
+            {
+                name "S3D_LIGHT_BRIGHT"
+            }
+            {
+                name "S3D_LIGHT_BRIGHT_CARE"
+            }
+            {
+                name "S3D_PARALLAX_MAPPING"
+            }
+        }
+
+        fragshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "bump_ogl_glsl_fs1x0.s3d_shadercode_run"
+            }
+            predefine_array
+            {
+                name "S3D_SPECULAR_EXP"
+                val "4.0"
+            }
+            {
+                name "S3D_GEOMETRIC_SHADOW"
+            }
+            {
+                name "S3D_PARALLAX_MAPPING"
+            }
+            {
+                name "S3D_PARALLAX_SCALE"
+                val "0.07"
+            }
+            {
+                name "S3D_PARALLAX_BIAS"
+                val "0.50196078431372549" // = 128/255
+            }
+            {
+                name "S3D_LIGHT_BRIGHT"
+            }
+            {
+                name "S3D_LIGHT_BRIGHT_CARE"
+            }
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_cenrange"
+            dest_codevar "lightCenRange"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_ambient"
+            dest_codevar "lightAmbient"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_diffuse"
+            dest_codevar "lightDiffuse"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_specular"
+            dest_codevar "lightSpecular"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_brightmat"
+            dest_codevar "lightBrightMat"
+            type "float4x4"
+        }
+
+        sampler_array "tex0" "normalSamp" "lightBrightSamp"
+        tex_rcpsize_codevar_array "" "" "lightBrightRcpSize"
+    }
+}
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        // Code of the pixel program
+        code_variant_array
+       {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bump_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+            debug_code_file "src/res/levelutil/shader/prog/d3d9_hlsl/"
+                    & "bump_d3d9_hlsl_vs1x1.s3d_shadercode"
+        }
+
+
+        // Copy matrices into vertex program constants.
+        // The field "chan" can be one
+        // of "identity", "proj", "view" or "projview" "bone"
+        // The field "trans" can be one
+        // of "identity", "inv", "transp" or "invtransp"
+        // One matrix needs 4 constants.
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_cenrange"
+            dest_codevar "lightCenRange"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_brightmat"
+            dest_codevar "lightBrightMat"
+            type "float4x4"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+        {
+            name "S3D_PARALLAX_MAPPING"
+        }
+        {
+            name "S3D_LIGHT_BRIGHT"
+        }
+        {
+            name "S3D_LIGHT_BRIGHT_CARE"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bump_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+        
+        param_array
+        {
+            src_progvar "prog_light_ambient"
+            dest_codevar "lightAmbient"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_diffuse"
+            dest_codevar "lightDiffuse"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_specular"
+            dest_codevar "lightSpecular"
+            type "float4"
+        }
+        
+        predefine_array
+        {
+            name "S3D_SPECULAR_EXP"
+            val "4.0"
+        }
+        {
+            name "S3D_GEOMETRIC_SHADOW"
+        }
+        {
+            name "S3D_PARALLAX_MAPPING"
+        }
+        {
+            name "S3D_PARALLAX_SCALE"
+            val "0.07"
+        }
+        {
+            name "S3D_PARALLAX_BIAS"
+            val "0.50196078431372549" // = 128/255
+        }
+        {
+            name "S3D_LIGHT_BRIGHT"
+        }
+        {
+            name "S3D_LIGHT_BRIGHT_CARE"
+        }
+
+        tex_rcpsize_codevar_array "" "" "lightBrightRcpSize" 
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        // Code of the pixel program
+        code_variant_array
+       {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bump_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+            debug_code_file "src/res/levelutil/shader/prog/d3d9_hlsl/"
+                    & "bump_d3d9_hlsl_vs1x1.s3d_shadercode"
+        }
+
+
+        // Copy matrices into vertex program constants.
+        // The field "chan" can be one
+        // of "identity", "proj", "view" or "projview" "bone"
+        // The field "trans" can be one
+        // of "identity", "inv", "transp" or "invtransp"
+        // One matrix needs 4 constants.
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_cenrange"
+            dest_codevar "lightCenRange"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_brightmat"
+            dest_codevar "lightBrightMat"
+            type "float4x4"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+        {
+            name "S3D_PARALLAX_MAPPING"
+        }
+        {
+            name "S3D_LIGHT_BRIGHT"
+        }
+        {
+            name "S3D_LIGHT_BRIGHT_CARE"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bump_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+
+        param_array        
+        {
+            src_progvar "prog_light_ambient"
+            dest_codevar "lightAmbient"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_diffuse"
+            dest_codevar "lightDiffuse"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_specular"
+            dest_codevar "lightSpecular"
+            type "float4"
+        }
+
+        predefine_array
+        {
+            name "S3D_SPECULAR_EXP"
+            val "4.0"
+        }
+        {
+            name "S3D_GEOMETRIC_SHADOW"
+        }
+        {
+            name "S3D_PARALLAX_MAPPING"
+        }
+        {
+            name "S3D_PARALLAX_SCALE"
+            val "0.07"
+        }
+        {
+            name "S3D_PARALLAX_BIAS"
+            val "0.50196078431372549" // = 128/255
+        }
+        {
+            name "S3D_LIGHT_BRIGHT"
+        }
+        {
+            name "S3D_LIGHT_BRIGHT_CARE"
+        }
+
+        tex_rcpsize_codevar_array "" "" "lightBrightRcpSize" 
+    }
+}
+//#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/bloom_presmooth_bright.s3d_shaderprog
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/bloom_presmooth_bright.s3d_shaderprog	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/bloom_presmooth_bright.s3d_shaderprog	(revision 2453)
@@ -0,0 +1,134 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+ogl
+{
+    glsl
+    {
+        vertshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                    & "bloom_presmooth_bright_ogl_glsl_vs1x0."
+                    & "s3d_shadercode_run"
+            }
+        }
+        fragshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                    & "bloom_presmooth_bright_ogl_glsl_fs1x0."
+                    & "s3d_shadercode_run"
+            }
+        }
+
+        sampler_array "tex0"
+        tex_size_codevar_array "tex0Size"
+        tex_rcpsize_codevar_array "tex0RcpSize"
+    }
+}
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bloom_presmooth_bright_d3d9_hlsl_vs1x1."
+                    & "s3d_shadercode_run"
+        }
+        tracking
+        {
+            codevar "matProjView"
+            slot 0
+            chan "projview"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+
+        mtl
+        {
+            emissive_codevar "mtrlEmissive"
+        }
+
+        tex_rcpsize_codevar_array "tex0RcpSize"
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bloom_presmooth_bright_d3d9_hlsl_ps2x0."
+                    & "s3d_shadercode_run"
+        }
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bloom_presmooth_bright_d3d9_hlsl_vs1x1."
+                    & "s3d_shadercode_run"
+        }
+        tracking
+        {
+            codevar "matProjView"
+            slot 0
+            chan "projview"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+        tex_rcpsize_codevar_array "tex0RcpSize"
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bloom_presmooth_bright_d3d9_hlsl_ps2x0."
+                    & "s3d_shadercode_run"
+        }
+    }
+}
+//#endif
+
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gtp_caustic_recieve.s3d_shaderprog
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gtp_caustic_recieve.s3d_shaderprog	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gtp_caustic_recieve.s3d_shaderprog	(revision 2453)
@@ -0,0 +1,61 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                & "gtp_caustic_recieve_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+        }
+        tracking
+        {
+            codevar "matProj"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }        
+        {
+            codevar "matView"
+                    slot 0
+                    chan "view"
+                    trans "identity"
+        }
+        param_array
+        {
+            src_progvar "lastCenter"
+            dest_codevar "last_Center"
+            type "float4"
+        }
+        {
+            src_progvar "worldMat"
+            dest_codevar "worldMat"
+            type "float4x4"
+        }
+    }
+
+    hlsl_pixshader
+    {
+      code_variant_array
+      {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gtp_caustic_recieve_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+      }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gtp_caustic_cubemap_point.s3d_shaderprog
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gtp_caustic_cubemap_point.s3d_shaderprog	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gtp_caustic_cubemap_point.s3d_shaderprog	(revision 2453)
@@ -0,0 +1,56 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "3x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                & "gtp_caustic_cubemap_point_d3d9_hlsl_vs3x0.s3d_shadercode_run"
+        } 
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        } 
+        {
+            codevar "matViewInv"
+            slot 0
+            chan "view"
+            trans "inv"
+        }        
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "3x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gtp_caustic_cubemap_point_d3d9_hlsl_ps3x0.s3d_shadercode_run"
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/black.s3d_shaderprog
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/black.s3d_shaderprog	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/black.s3d_shaderprog	(revision 2453)
@@ -0,0 +1,104 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+ogl
+{
+    glsl
+    {
+        vertshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "black_ogl_glsl_vs1x0.s3d_shadercode_run"
+            }
+        }
+
+        fragshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "black_ogl_glsl_fs1x0.s3d_shadercode_run"
+            }
+        }
+    }
+}
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "black_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+        }
+        tracking
+        {
+            codevar "matProjView"
+            slot 0
+            chan "projview"
+            trans "identity"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "black_d3d9_hlsl_ps1x1.s3d_shadercode_run"
+        }
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "black_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+        }
+        tracking
+        {
+            codevar "matProjView"
+            slot 0
+            chan "projview"
+            trans "identity"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "black_d3d9_hlsl_ps1x1.s3d_shadercode_run"
+        }
+    }
+}
+//#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gen_shmap_d3d9_hlsl_vs2x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gen_shmap_d3d9_hlsl_vs2x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gen_shmap_d3d9_hlsl_vs2x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,53 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+    float2 depthScr: TEXCOORD0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 projMat;
+S3D_MATBONE_DECL_STD(matBone)
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 2x0
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+    float4x4 matBoneFinal;
+    S3D_BONE_TRANSF_STD(
+            matBoneFinal, matBone, input.boneWgh, input.boneSubscr); 
+
+    float4 viewPos = mul(input.posObj, matBoneFinal);
+    output.posScr = mul(viewPos, projMat);
+    output.depthScr.xy = output.posScr.zw;
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/bloom_bright_d3d9_hlsl_ps2x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/bloom_bright_d3d9_hlsl_ps2x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/bloom_bright_d3d9_hlsl_ps2x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,37 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+struct PS_INPUT
+{
+    float2 mainTexCoord: TEXCOORD0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+sampler tex0: register(s0);
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+
+float4 main(PS_INPUT input): COLOR0
+{
+    float2 mainTexCoord = input.mainTexCoord;
+
+    float4 color = tex2D(tex0, mainTexCoord);
+    float intensity = max(color.x, max(color.y, color.z));
+    color = color * intensity;
+    return color;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/bloom_smooth_d3d9_hlsl_vs1x1.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/bloom_smooth_d3d9_hlsl_vs1x1.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/bloom_smooth_d3d9_hlsl_vs1x1.s3d_shadercode	(revision 2453)
@@ -0,0 +1,89 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    float2 mainTexCoord: TEXCOORD0;
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+    float fog: FOG;
+    float4 diffuse: COLOR0;
+    float2 mainTexCoord: TEXCOORD0;
+    float4 baseVec: TEXCOORD2;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 matProjView;
+const float4x4 matView;
+const float4 mtrlEmissive;
+
+const float4 passInfo;
+const float4 tex0RcpSize;
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 1x1
+
+VS_OUTPUT main( VS_INPUT input )
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    //Transform position to clip space
+    output.posScr = mul(input.posObj, matProjView);
+
+    //Transform position to eye space -> pos
+    float4 posView = mul(input.posObj, matView);
+
+    //fog
+    output.fog = posView.z / posView.w;
+
+    //Color
+    output.diffuse = mtrlEmissive;
+
+    // Texture coordinates
+    output.mainTexCoord = input.mainTexCoord;
+
+    // Scaling offset
+    int iter = passInfo.x;
+
+    // Use fractional basis value to reduce banding:
+    float2 offsScale = tex0RcpSize * pow(2.1, iter) * 0.5;
+
+    float4 dirVec;
+    int fiter = fmod(iter, 4.0);
+    if(fiter < 2.0)
+    {
+        if(fiter < 1.0)
+            dirVec = float4(1, 0, 0, 1); // Vectors (1, 0) and (0, 1)
+        else
+            dirVec = float4(1, 1,-1, 1); // Vectors (1, 1) and (-1, 1)
+    }
+    else
+    {
+        if(fiter < 3.0)
+            dirVec = float4(2, 1,-1, 2); // Vectors (2, 1) and (-1, 2)
+        else
+            dirVec = float4(1, 2,-2, 1); // Vectors (1, 2) and (-2, 1)
+    }
+    
+    output.baseVec = dirVec * offsScale.xyxy;
+
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_distance_impostor_d3d9_hlsl_vs3x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_distance_impostor_d3d9_hlsl_vs3x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_distance_impostor_d3d9_hlsl_vs3x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,47 @@
+
+// gametools
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+    float3 viewVec: TEXCOORD1;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 projMat;
+const float4x4 matView;
+
+S3D_MATBONE_DECL_STD(matBone)
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 2x0
+
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    float4x4 matBoneFinal;
+    S3D_BONE_TRANSF_STD(
+            matBoneFinal, matBone, input.boneWgh, input.boneSubscr);
+    // Transform vectors by matBoneFinal
+
+    float4 posView = mul(input.posObj, matBoneFinal);
+
+    output.posScr = mul(posView, projMat);
+    output.viewVec = posView;
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/bump_d3d9_hlsl_vs1x1.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/bump_d3d9_hlsl_vs1x1.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/bump_d3d9_hlsl_vs1x1.s3d_shadercode	(revision 2453)
@@ -0,0 +1,123 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    float3 normalObj: NORMAL;
+    S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+    float2 mainTexCoord: TEXCOORD0;
+    float3 tangentUObj: TEXCOORD1;
+    float3 tangentVObj: TEXCOORD2;
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+    float2 mainTexCoord: TEXCOORD0;
+    float3 diffuseDirSurf: TEXCOORD1;
+    float3 specularDirSurf: TEXCOORD2;
+    float3 scaledSurfToLight: TEXCOORD3;
+#ifdef S3D_PARALLAX_MAPPING
+    float3 camToVertSurf: TEXCOORD4;
+#endif
+#ifdef S3D_LIGHT_BRIGHT
+    float4 lightBrightCoord: TEXCOORD5;
+    float4 secPosScr: TEXCOORD6;
+#endif
+#ifdef S3D_LIGHT_PROJ
+    float4 lightProjCoord: TEXCOORD5;
+#endif
+#ifdef S3D_LIGHT_SHMAP
+    float4 lightShmapCoord: TEXCOORD6;
+#endif
+    float fog: FOG;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 projMat;
+S3D_MATBONE_DECL_STD(matBone)
+
+const float4 lightCenRange;
+#ifdef S3D_LIGHT_BRIGHT
+const float4x4 lightBrightMat;
+#endif
+#ifdef S3D_LIGHT_PROJ
+const float4x4 lightProjMat;
+#endif
+#ifdef S3D_LIGHT_SHMAP
+const float4x4 lightShmapMat;
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 1x1
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    float4x4 matBoneFinal;
+    S3D_BONE_TRANSF_STD(
+            matBoneFinal, matBone, input.boneWgh, input.boneSubscr);
+    // Transform vectors by matBoneFinal
+    float4 posView = mul(input.posObj, matBoneFinal);
+    float3 normalView = mul(input.normalObj, matBoneFinal).xyz;
+    float3 tangentUObj = input.tangentUObj.xyz;
+    float3 tangentVObj = input.tangentVObj.xyz;
+    float3 tangentUView = mul(tangentUObj, matBoneFinal);
+    float3 tangentVView = mul(tangentVObj, matBoneFinal);
+
+    output.posScr = mul(posView, projMat);
+    output.mainTexCoord = input.mainTexCoord;
+
+    output.fog = posView.z / posView.w;
+
+    float3 camToVertView = posView.xyz;
+    float3 vertToLightView = lightCenRange - camToVertView;   
+    float3 vertToLightDirView = normalize(vertToLightView);
+    float3 halfDirView = vertToLightDirView - camToVertView;
+    s3d_calcBump(
+            output.diffuseDirSurf, output.specularDirSurf, normalView,
+            vertToLightDirView, halfDirView, tangentUView, tangentVView);
+    // Lightrange-factor: 1 - (lightpos - surfacepos)^2 / range^2
+    output.scaledSurfToLight = vertToLightView / lightCenRange.w;
+
+#ifdef S3D_PARALLAX_MAPPING
+    output.camToVertSurf.x = dot(tangentUView, camToVertView);
+    output.camToVertSurf.y = dot(tangentVView, camToVertView);
+    output.camToVertSurf.z = dot(normalView, camToVertView);
+#endif
+
+#ifdef S3D_LIGHT_BRIGHT
+    output.lightBrightCoord = mul(posView, lightBrightMat);
+    output.secPosScr = output.posScr;
+#endif
+
+#ifdef S3D_LIGHT_PROJ
+    output.lightProjCoord = mul(posView, lightProjMat);
+#endif    
+#ifdef S3D_LIGHT_SHMAP
+    output.lightShmapCoord = mul(posView, lightShmapMat);
+#endif
+
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/bloom_combine_d3d9_hlsl_vs1x1.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/bloom_combine_d3d9_hlsl_vs1x1.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/bloom_combine_d3d9_hlsl_vs1x1.s3d_shadercode	(revision 2453)
@@ -0,0 +1,59 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    float2 mainTexCoord: TEXCOORD0;
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+    float fog: FOG;
+    float4 diffuse: COLOR0;
+    float2 mainTexCoord: TEXCOORD0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 matProjView;
+const float4x4 matView;
+const float4 mtrlEmissive;
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 1x1
+
+VS_OUTPUT main( VS_INPUT input )
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    //Transform position to clip space
+    output.posScr = mul(input.posObj, matProjView);
+
+    //Transform position to eye space -> pos
+    float4 posView = mul(input.posObj, matView);
+
+    //fog
+    output.fog = posView.z / posView.w;
+
+    //Color
+    output.diffuse = mtrlEmissive;
+
+    output.mainTexCoord = input.mainTexCoord;
+
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_envmapSimple_d3d9_hlsl_ps1x1.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_envmapSimple_d3d9_hlsl_ps1x1.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_envmapSimple_d3d9_hlsl_ps1x1.s3d_shadercode	(revision 2453)
@@ -0,0 +1,151 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+
+#define NITERATION 4
+
+struct PS_INPUT
+{
+float3 eye     : TEXCOORD0;
+float3 normal  : TEXCOORD1;
+float3 posView : TEXCOORD2;
+};
+
+sampler colorSamp: register(s0);
+sampler distanceSamp: register(s1);
+
+float readDistanceCubeMap(samplerCUBE m, float3 r)
+{
+ float dist = texCUBE(m, r).r;
+ if(dist == 0) dist = 10;
+ return dist;
+}
+
+half3 Hit(samplerCUBE tex, half3 R, half3 p0)
+{
+        float rl = texCUBE(tex, R).r;
+        float dp = rl - dot(p0, R);
+        float3 p = p0 + R * dp;
+        float ppp = length(p) / texCUBE(tex, p).r;
+        float dun = 0, dov = 0, pun = ppp, pov = ppp;
+        if (ppp < 1) dun = dp; else dov = dp;
+        float dl = max( dp + rl * (1 - ppp), 0);
+        float3 RR = p0 + R * dl;
+
+        for(int i = 0; i < NITERATION; i++) {
+                float ddl;
+                float llp = length(RR) / readDistanceCubeMap(tex, RR);
+                if (llp < 1) {
+                        dun = dl; pun = llp;
+                        ddl = (dov == 0) ? rl * (1 - llp) :
+                                (dl - dov) * (1 - llp)/(llp - pov);
+                } else {
+                        dov = dl; pov = llp;
+                        ddl = (dun == 0) ? rl * (1 - llp) :
+                                (dl - dun) * (1 - llp)/(llp - pun);
+                }
+                dl = max(dl + ddl, 0);
+                RR = p0 + R * dl;
+        }
+        return RR;
+}
+
+
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 3x0
+// reflective
+
+
+float4 main(PS_INPUT input): COLOR0
+{
+// return  texCUBE(colorSamp, input.normal);
+//return float4(input.normal, 1);
+
+const float g_FresnelCoeff = 1.0;
+const float g_Transparency = 0.0;
+const float g_RefractFactor = 1.0f;
+
+float3 normal = normalize(input.normal);
+float3 eye = normalize(input.eye);
+
+float3 r1 = reflect(eye, normal);
+float3 RR1 = Hit(distanceSamp, r1, input.posView);
+
+// fresnel
+float3 fresnel = saturate(g_FresnelCoeff + (1.0f - g_FresnelCoeff) * pow(1 - dot(normal, -eye), 5));
+ 
+return texCUBE(colorSamp,RR1) * float4(fresnel, 1);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 3x0
+// refractive
+
+float4 refract(PS_INPUT input): COLOR0
+{
+// return  texCUBE(colorSamp, input.normal);
+//return float4(input.normal, 1);
+
+const float3 g_FresnelCoeff = 0.0;
+const float g_Transparency = 0.3;
+const float g_RefractFactor = 0.8f;
+
+float3 normal = normalize(input.normal);
+float3 eye = normalize(input.eye);
+
+float3 r1 = reflect(eye, normal);
+float3 r2 = refract(eye, normal, g_RefractFactor);
+float3 RR1 = Hit(distanceSamp, r1, input.posView);
+float3 RR2 = Hit(distanceSamp, r2, input.posView);
+
+// fresnel
+float3 fresnel = saturate(g_FresnelCoeff + (1.0f - g_FresnelCoeff) * pow(1 - dot(normal, -eye), 5));
+ 
+//return 1;
+return texCUBE(colorSamp,RR2)*(1- g_Transparency) + texCUBE(colorSamp, RR1) * g_Transparency;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 3x0
+// metal
+float4 Fresnel;
+
+float4 metal(PS_INPUT input): COLOR0
+{
+
+//const float3 g_FresnelCoeff = 0.7;
+const float g_Transparency = 0.0;
+const float g_RefractFactor = 1.0f;
+
+float3 normal = normalize(input.normal);
+float3 eye = normalize(input.eye);
+
+float3 r1 = reflect(eye, normal);
+float3 RR1 = Hit(distanceSamp, r1, input.posView);
+
+
+// fresnel
+float4 fresnel = saturate(Fresnel + (1.0f - Fresnel) * pow(1 - dot(normal, -eye), 5));
+// fresnel = float4(0.95, 0.63, 0.54,1);
+return texCUBE(colorSamp,RR1) * fresnel;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/plain_pointcol_d3d9_hlsl_ps2x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/plain_pointcol_d3d9_hlsl_ps2x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/plain_pointcol_d3d9_hlsl_ps2x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,28 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+struct PS_INPUT
+{
+    float4 diffuse: COLOR0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+
+float4 main(PS_INPUT input): COLOR0
+{
+    return input.diffuse;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_caustic_cubemap_point_d3d9_hlsl_ps3x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_caustic_cubemap_point_d3d9_hlsl_ps3x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_caustic_cubemap_point_d3d9_hlsl_ps3x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,47 @@
+
+struct PS_INPUT
+{
+    float2 center: TEXCOORD0;
+    float radius :TEXCOORD1;
+    float4 color :TEXCOORD2;
+    float2 screenPos : VPOS;
+};
+
+
+struct PS_OUTPUT
+{
+    float4  color: COLOR0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+sampler tex0: register(s0);
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 3x0
+
+
+
+PS_OUTPUT main(PS_INPUT input)
+{
+
+float2 targetResolution = 128.0;
+
+PS_OUTPUT output;
+
+float2 screen = input.screenPos / targetResolution;
+screen *= float2(2, 2);
+screen -= float2(1, 1);
+screen.y *= -1;
+
+float d = 1.0 - saturate(length(input.center - screen) / input.radius);
+//d= d*d;
+d*=0.0035;
+output.color = float4(d, d, d, 1);
+//output.color = float4(screen.x, 0, 0, 1);
+//output.color = 1.0;
+return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/plain_point_d3d9_hlsl_ps2x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/plain_point_d3d9_hlsl_ps2x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/plain_point_d3d9_hlsl_ps2x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,28 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+struct PS_INPUT
+{
+    float4 diffuse: COLOR0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+
+float4 main(PS_INPUT input): COLOR0
+{
+    return input.diffuse;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/bloom_bright_d3d9_hlsl_vs1x1.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/bloom_bright_d3d9_hlsl_vs1x1.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/bloom_bright_d3d9_hlsl_vs1x1.s3d_shadercode	(revision 2453)
@@ -0,0 +1,59 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 pos: POSITION;
+    float2 mainTexCoord: TEXCOORD0;
+};
+
+struct VS_OUTPUT
+{
+    float4 pos :POSITION;
+    float fog: FOG;
+    float4 diffuse: COLOR0;
+    float2 mainTexCoord: TEXCOORD0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 matProjView;
+const float4x4 matView;
+const float4 mtrlEmissive;
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 1x1
+
+VS_OUTPUT main( VS_INPUT input )
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    //Transform position to clip space
+    output.pos = mul(input.pos, matProjView);
+
+    //Transform position to eye space -> pos
+    float4 pos = mul(input.pos, matView);
+
+    //fog
+    output.fog = pos.z / pos.w;
+
+    //Color
+    output.diffuse = mtrlEmissive;
+
+    output.mainTexCoord = input.mainTexCoord;
+
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/lightfilter_d3d9_hlsl_ps2x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/lightfilter_d3d9_hlsl_ps2x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/lightfilter_d3d9_hlsl_ps2x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,72 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+struct PS_INPUT
+{
+    float2 screen: TEXCOORD0;
+    float2 scale: TEXCOORD1;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+sampler brightTex: register(s0);
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float2 offsPix0 = float2( 1,  0);
+const float2 offsPix1 = float2( 0,  1);
+const float2 offsPix2 = float2( 1,  1);
+const float2 offsPix3 = float2(-1,  1);
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+
+float4 main(PS_INPUT input): COLOR0
+{
+    // Main color:
+    
+    float4 result = tex2D(brightTex, input.screen.xy);
+    
+    float full = abs(2 * result.x - 1);
+    float treshold = 0.99;
+    float delta = treshold - full;
+
+    if(delta >= 0)
+    {
+        // Lookup colors:
+        
+        float4 colA, colB;
+        float2 offs0 = offsPix0 * input.scale.xy;
+        colA.x = tex2D(brightTex, input.screen.xy + offs0).x;
+        colB.x = tex2D(brightTex, input.screen.xy - offs0).x;
+        float2 offs1 = offsPix1 * input.scale.xy;
+        colA.y = tex2D(brightTex, input.screen.xy + offs1).x;
+        colB.y = tex2D(brightTex, input.screen.xy - offs1).x;
+        float2 offs2 = offsPix2 * input.scale.xy;
+        colA.z = tex2D(brightTex, input.screen.xy + offs2).x;
+        colB.z = tex2D(brightTex, input.screen.xy - offs2).x;
+        float2 offs3 = offsPix3 * input.scale.xy;
+        colA.w = tex2D(brightTex, input.screen.xy + offs3).x;
+        colB.w = tex2D(brightTex, input.screen.xy - offs3).x;
+           
+        // Calculate average:
+        
+        float sum = result.x + dot(colA + colB, float4(1, 1, 1, 1));
+        result.xyz = sum * 0.11111111;
+    }
+        
+    return result;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gen_shvol_view_d3d9_hlsl_ps2x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gen_shvol_view_d3d9_hlsl_ps2x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gen_shvol_view_d3d9_hlsl_ps2x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,27 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+struct PS_INPUT
+{
+};
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+
+float4 main(PS_INPUT input): COLOR0
+{
+    return 0;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gen_brightclear_d3d9_hlsl_ps2x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gen_brightclear_d3d9_hlsl_ps2x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gen_brightclear_d3d9_hlsl_ps2x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,35 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_shmap_filter_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct PS_INPUT
+{
+    float4 secPosScr: TEXCOORD0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+
+float4 main(PS_INPUT input): COLOR0
+{
+    float4 outCol = 0;
+    outCol.w = frac(100 * input.secPosScr.z / input.secPosScr.w);
+    return outCol;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_envmapSimple_d3d9_hlsl_vs1x1.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_envmapSimple_d3d9_hlsl_vs1x1.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_envmapSimple_d3d9_hlsl_vs1x1.s3d_shadercode	(revision 2453)
@@ -0,0 +1,75 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+    float2 tex0:TEXCOORD0;
+   float3 normal:NORMAL;
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr : POSITION;
+    float3 eye    : TEXCOORD0;
+    float3 normal : TEXCOORD1;
+    float3 posView: TEXCOORD2;    
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 matProj;
+const float4x4 matProjView;
+const float4x4 matView;
+const float4x4 matViewInvTrans;
+S3D_MATBONE_DECL_STD(matBone)
+
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 1x1
+float4 last_Center;
+float4x4 worldMat;
+float4x4 worldMatIT;
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    float4x4 matBoneFinal;
+    S3D_BONE_TRANSF_STD(matBoneFinal, matBone, input.boneWgh, input.boneSubscr);
+    // Transform vectors by matBoneFinal
+    float4 posView = mul(input.posObj, matBoneFinal);
+    
+    output.posScr = mul(posView, matProj);
+    
+    // vector from vertex to the eye in view-space
+    //output.eye = mul(input.posObj, matView);    
+    //output.normal = mul(input.normal, matViewInvTrans);
+    //output.posView = mul(float4(input.posObj.xyz, 0), matView);
+
+    output.normal = mul(mul(input.normal, matViewInvTrans), worldMatIT);
+    output.eye = mul(posView, worldMatIT).xyz; 
+    output.posView = mul(posView, worldMat);
+    output.posView -= last_Center;   
+
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/plain_pointcol_d3d9_hlsl_vs2x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/plain_pointcol_d3d9_hlsl_vs2x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/plain_pointcol_d3d9_hlsl_vs2x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,59 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+    float4 diffuse: COLOR0;
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+    float4 diffuse: COLOR0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 projMat;
+const float4x4 matView;
+
+S3D_MATBONE_DECL_STD(matBone)
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 2x0
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    float4x4 matBoneFinal;
+    S3D_BONE_TRANSF_STD(
+            matBoneFinal, matBone, input.boneWgh, input.boneSubscr);
+    // Transform vectors by matBoneFinal
+    float4 posView = mul(input.posObj, matBoneFinal);
+
+    output.posScr = mul(posView, projMat);
+    output.diffuse = input.diffuse;
+
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_caustic_cubemap_point_d3d9_hlsl_vs3x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_caustic_cubemap_point_d3d9_hlsl_vs3x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_caustic_cubemap_point_d3d9_hlsl_vs3x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,72 @@
+
+// gametools
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+
+struct VS_INPUT
+{
+    float2 texCoord : TEXCOORD0;
+    float4 posObj: POSITION;   
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+    float2 center: TEXCOORD0;
+    float pointSize: PSIZE;
+    float radius :TEXCOORD1;
+    float4 color :TEXCOORD2;
+    
+};
+
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 3x0
+const float4x4 projMat;
+const float4x4 matView;
+const float4x4 matViewInv;
+sampler tex0: register(s0);
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    float pointSize = 20;
+    float resolution = 128;
+    
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    output.pointSize = pointSize;    
+    output.radius = pointSize / resolution;
+    
+   float4 pos = tex2Dlod(tex0, float4(input.posObj.x, input.posObj.y,0,0));
+   
+   //debug
+   //output.posScr = float4(input.posObj.xy *2.0 - 1.0, 0, 1);
+   
+  //output.posScr = pos;
+  output.center = output.posScr;  
+  
+  //output.color = float4(1,0,1,1);
+   if(pos.w == 0)
+   {
+        output.center = 0.0f;
+        output.posScr = 1000.0f; //transform out of view
+   }
+   else
+   {
+        float4 mPosition = float4(normalize(pos.xyz),1); 
+        float4 cPosition = mul(mPosition, matView);
+        float4 hPosition = mul(cPosition, projMat); 
+
+        output.posScr = hPosition;  
+        output.center = float2(hPosition.x, hPosition.y) / hPosition.w;
+   }
+   
+    
+  
+    
+   return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/plain_point_d3d9_hlsl_vs2x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/plain_point_d3d9_hlsl_vs2x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/plain_point_d3d9_hlsl_vs2x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,58 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+    float4 diffuse: COLOR0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 projMat;
+const float4x4 matView;
+const float4 mtrlEmissive;
+
+S3D_MATBONE_DECL_STD(matBone)
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 2x0
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    float4x4 matBoneFinal;
+    S3D_BONE_TRANSF_STD(
+            matBoneFinal, matBone, input.boneWgh, input.boneSubscr);
+    // Transform vectors by matBoneFinal
+    float4 posView = mul(input.posObj, matBoneFinal);
+
+    output.posScr = mul(posView, projMat);
+    output.diffuse = mtrlEmissive;
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/lightfilter_d3d9_hlsl_vs2x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/lightfilter_d3d9_hlsl_vs2x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/lightfilter_d3d9_hlsl_vs2x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,55 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    float2 screen: TEXCOORD0;
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+    float2 screen: TEXCOORD0;
+    float2 scale: TEXCOORD1;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 matProjView;
+const float4 tex0RcpSize;
+const float4 passInfo;
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 2x0
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+    output.posScr = mul(input.posObj, matProjView);
+
+    // Smoothing parameters:
+    // Go from wide to small to avoid artifacts in case of depth jumps.
+    // Use pow(2,iter) instead of pow(3,iter), 
+    // because this gives a better quality:
+    float iter = passInfo.x;
+    float smooth = exp2(iter);
+    
+    output.screen.xy = input.screen;
+    output.scale.xy = tex0RcpSize * smooth;
+    
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_reduce_cubemap_d3d9_hlsl_vs2x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_reduce_cubemap_d3d9_hlsl_vs2x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_reduce_cubemap_d3d9_hlsl_vs2x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,37 @@
+
+// gametools
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+
+struct VS_INPUT
+{
+    float2 texCoord : TEXCOORD0;
+    float4 posObj: POSITION;   
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+    float2 texCoord: TEXCOORD0;
+    float nFace: TEXCOORD1;
+};
+
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 2x0
+
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+    
+    output.nFace = input.posObj.z;
+input.posObj.z = 0;
+    output.posScr = input.posObj;
+    output.texCoord= input.texCoord;
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/include_shmap_filter_d3d9_hlsl.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/include_shmap_filter_d3d9_hlsl.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/include_shmap_filter_d3d9_hlsl.s3d_shadercode	(revision 2453)
@@ -0,0 +1,124 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef SHMAP_FILTER_D3D9_HLSL_SC
+#define SHMAP_FILTER_D3D9_HLSL_SC
+
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef S3D_SHMAP_ZBIAS
+#define S3D_SHMAP_ZBIAS 0
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+
+float s3d_shmapFilter(
+        sampler lightShmapSamp,
+        float4 lightShmapCoord,
+        float4 lightShmapSize,
+        float4 lightShmapRcpSize)
+{
+#ifdef S3D_SHMAP_FILTER16
+    float2 shmapCoordRaw 
+            = lightShmapCoord.xy * lightShmapSize / lightShmapCoord.w;
+    float2 shmapCoordFull = shmapCoordRaw + float2(0.5, 0.5);
+    float2 shmapCoordBase = floor(shmapCoordFull);
+    float2 shmapCoordFrac = shmapCoordFull - shmapCoordBase;
+    float4 shmapCoordBaseAB = lightShmapRcpSize.xyxy * (
+            shmapCoordBase.xyxy + float4(-1.5, 0, -0.5, 0));
+    float4 shmapCoordBaseCD = lightShmapRcpSize.xyxy * (
+            shmapCoordBase.xyxy + float4(+0.5, 0, +1.5, 0));
+    float4 shmapDeltaXY = lightShmapRcpSize.xyxy * float4(0, -1.5, 0, -0.5);
+    float4 shmapDeltaZW = lightShmapRcpSize.xyxy * float4(0, +0.5, 0, +1.5);
+
+    float4 shmapCoordAXY = shmapCoordBaseAB.xyxy + shmapDeltaXY.xyzw;
+    float4 shmapCoordAZW = shmapCoordBaseAB.xyxy + shmapDeltaZW.xyzw;
+    float4 shmapValA;
+    shmapValA.x = tex2D(lightShmapSamp, shmapCoordAXY.xy).x;
+    shmapValA.y = tex2D(lightShmapSamp, shmapCoordAXY.zw).x;
+    shmapValA.z = tex2D(lightShmapSamp, shmapCoordAZW.xy).x;
+    shmapValA.w = tex2D(lightShmapSamp, shmapCoordAZW.zw).x;
+    float4 shmapCoordBXY = shmapCoordBaseAB.zwzw + shmapDeltaXY.xyzw;
+    float4 shmapCoordBZW = shmapCoordBaseAB.zwzw + shmapDeltaZW.xyzw;
+    float4 shmapValB;
+    shmapValB.x = tex2D(lightShmapSamp, shmapCoordBXY.xy).x;
+    shmapValB.y = tex2D(lightShmapSamp, shmapCoordBXY.zw).x;
+    shmapValB.z = tex2D(lightShmapSamp, shmapCoordBZW.xy).x;
+    shmapValB.w = tex2D(lightShmapSamp, shmapCoordBZW.zw).x;
+    float4 shmapCoordCXY = shmapCoordBaseCD.xyxy + shmapDeltaXY.xyzw;
+    float4 shmapCoordCZW = shmapCoordBaseCD.xyxy + shmapDeltaZW.xyzw;
+    float4 shmapValC;
+    shmapValC.x = tex2D(lightShmapSamp, shmapCoordCXY.xy).x;
+    shmapValC.y = tex2D(lightShmapSamp, shmapCoordCXY.zw).x;
+    shmapValC.z = tex2D(lightShmapSamp, shmapCoordCZW.xy).x;
+    shmapValC.w = tex2D(lightShmapSamp, shmapCoordCZW.zw).x;
+    float4 shmapCoordDXY = shmapCoordBaseCD.zwzw + shmapDeltaXY.xyzw;
+    float4 shmapCoordDZW = shmapCoordBaseCD.zwzw + shmapDeltaZW.xyzw;
+    float4 shmapValD;
+    shmapValD.x = tex2D(lightShmapSamp, shmapCoordDXY.xy).x;
+    shmapValD.y = tex2D(lightShmapSamp, shmapCoordDXY.zw).x;
+    shmapValD.z = tex2D(lightShmapSamp, shmapCoordDZW.xy).x;
+    shmapValD.w = tex2D(lightShmapSamp, shmapCoordDZW.zw).x;
+    
+    float4 brightA = step(lightShmapCoord.zzzz, 
+            (shmapValA + S3D_SHMAP_ZBIAS) * lightShmapCoord.w);
+    float4 brightB = step(lightShmapCoord.zzzz, 
+            (shmapValB + S3D_SHMAP_ZBIAS) * lightShmapCoord.w);
+    float4 brightC = step(lightShmapCoord.zzzz, 
+            (shmapValC + S3D_SHMAP_ZBIAS) * lightShmapCoord.w);
+    float4 brightD = step(lightShmapCoord.zzzz, 
+            (shmapValD + S3D_SHMAP_ZBIAS) * lightShmapCoord.w);
+    float4 sumRow = brightA + brightB + brightC 
+            + shmapCoordFrac.x * (brightD - brightA);
+    float4 colWghBase = float4(1.0 / 9.0, 1.0 / 9.0, 1.0 / 9.0, 0);
+    float4 colWghDelta = float4(-1.0 / 9.0, 0, 0, 1.0 / 9.0);
+    float4 colWgh = colWghBase + shmapCoordFrac.y * colWghDelta;
+    float bright = dot(sumRow, colWgh);
+#else
+#ifdef S3D_SHMAP_FILTER4
+    float2 shmapCoordRaw 
+            = lightShmapCoord.xy * lightShmapSize / lightShmapCoord.w;
+    float2 shmapCoordFull = shmapCoordRaw + float2(0.5, 0.5);
+    float2 shmapCoordBase = floor(shmapCoordFull);
+    float2 shmapCoordFrac = shmapCoordFull - shmapCoordBase;
+    float4 shmapCoordBaseAB = lightShmapRcpSize.xyxy * (
+            shmapCoordBase.xyxy + float4(-0.5, 0, +0.5, 0));
+    float4 shmapDelta = lightShmapRcpSize.xyxy * float4(0, -0.5, 0, +0.5);
+
+    float4 shmapCoordA = shmapCoordBaseAB.xyxy + shmapDelta.xyzw;
+    float4 shmapCoordB = shmapCoordBaseAB.zwzw + shmapDelta.xyzw;
+    float4 shmapVec;
+    shmapVec.x = tex2D(lightShmapSamp, shmapCoordA.xy).x;
+    shmapVec.y = tex2D(lightShmapSamp, shmapCoordA.zw).x;
+    shmapVec.z = tex2D(lightShmapSamp, shmapCoordB.xy).x;
+    shmapVec.w = tex2D(lightShmapSamp, shmapCoordB.zw).x;
+    
+    float4 brightVec 
+        = step(lightShmapCoord.zzzz, 
+            (shmapVec + S3D_SHMAP_ZBIAS) * lightShmapCoord.w);
+    float2 sumRow = brightVec.xy 
+            + shmapCoordFrac.x * (brightVec.zw - brightVec.xy);
+    float bright = sumRow.x 
+            + shmapCoordFrac.y * (sumRow.y - sumRow.x);
+#else
+    float shmapVal = tex2Dproj(lightShmapSamp, lightShmapCoord.xyzw).x;
+    float bright = step(lightShmapCoord.z, 
+            (shmapVal + S3D_SHMAP_ZBIAS) * lightShmapCoord.w);
+#endif
+#endif
+    return bright;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gen_shvol_view_d3d9_hlsl_vs1x1.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gen_shvol_view_d3d9_hlsl_vs1x1.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gen_shvol_view_d3d9_hlsl_vs1x1.s3d_shadercode	(revision 2453)
@@ -0,0 +1,46 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posView: POSITION;
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 projMat;
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 1x1
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    // Transform:
+    output.posScr = mul(input.posView, projMat);
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gen_brightclear_d3d9_hlsl_vs1x1.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gen_brightclear_d3d9_hlsl_vs1x1.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gen_brightclear_d3d9_hlsl_vs1x1.s3d_shadercode	(revision 2453)
@@ -0,0 +1,56 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+    float4 secPosScr: TEXCOORD0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 projMat;
+
+S3D_MATBONE_DECL_STD(matBone)
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 1x1
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    float4x4 matBoneFinal;
+    S3D_BONE_TRANSF_STD(
+            matBoneFinal, matBone, input.boneWgh, input.boneSubscr);
+    float4 posView = mul(input.posObj, matBoneFinal);
+    
+    output.posScr = mul(posView, projMat);
+    output.secPosScr = output.posScr;
+
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/.sconsign
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/.sconsign	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/.sconsign	(revision 2453)
@@ -0,0 +1,11 @@
+}q(U-gen_shvol_view_d3d9_hlsl_ps2x0.s3d_shadercodeq(cSCons.Node.FS
+BuildInfo
+qoq}q(U	timestampqJÉEeFUcsigqJÉEeFubU%partic_d3d9_hlsl_vs2x0.s3d_shadercodeq(hoq	}q
+(hJÉEeFhJÉEeFubU*lightfilter_d3d9_hlsl_ps2x0.s3d_shadercodeq
+(hoq
+}q
+(hJÉEeFhJÉEeFubU'standard_d3d9_hlsl_ps2x0.s3d_shadercodeq(hoq}q(hJÉEeFhJÉEeFubU*plain_point_d3d9_hlsl_vs2x0.s3d_shadercodeq(hoq}q(hJÉEeFhJÉEeFubU"gtp_caustic_recieve.s3d_shaderprogq(hoq}q(U	timestampqJÊëmEUcsigqJÊëmEubU(gtp_caustic_cubemap_point.s3d_shaderprogq(hoq}q(hJtmEhJtmEubU0gen_shvol_extrude_d3d9_hlsl_vs1x1.s3d_shadercodeq
+(hoq
+}q
+(hJÉEeFhJÉEeFubU-plain_pointcol_d3d9_hlsl_ps2x0.s3d_shadercodeq(hoq }q!(hJÉEeFhJÉEeFubU:gen_brightmap_for_softshmap_d3d9_hlsl_vs1x1.s3d_shadercodeq"(hoq#}q$(hJÉEeFhJÉEeFubU#bump_d3d9_hlsl_vs1x1.s3d_shadercodeq%(hoq&}q'(hJÉEeFhJÉEeFubU-plain_pointtex_d3d9_hlsl_vs2x0.s3d_shadercodeq((hoq)}q*(hJÉEeFhJÉEeFubU.gen_brightclear_d3d9_hlsl_ps2x0.s3d_shadercodeq+(hoq,}q-(hJÉEeFhJÉEeFubU+bloom_bright_d3d9_hlsl_ps2x0.s3d_shadercodeq.(hoq/}q0(hJÉEeFhJÉEeFubU/gtp_envmapSimple_d3d9_hlsl_vs1x1.s3d_shadercodeq1(hoq2}q3(hJÉEeFhJÉEeFubU8gtp_caustic_cubemap_point_d3d9_hlsl_ps3x0.s3d_shadercodeq4(hoq5}q6(hJÉEeFhJÉEeFubU'standard_d3d9_hlsl_vs2x0.s3d_shadercodeq7(hoq8}q9(hJÉEeFhJÉEeFubU-plain_pointcol_d3d9_hlsl_vs2x0.s3d_shadercodeq:(hoq;}q<(hJÉEeFhJÉEeFubU'include_stddef_d3d9_hlsl.s3d_shadercodeq=(hoq>}q?(hJÉEeFhJÉEeFubU:gen_brightmap_for_softshmap_d3d9_hlsl_ps2x0.s3d_shadercodeq@(hoqA}qB(hJÉEeFhJÉEeFubU4gtp_distance_impostor_d3d9_hlsl_vs3x0.s3d_shadercodeqC(hoqD}qE(U	timestampqFJÉEeFUcsigqGJÉEeFubU$comic_d3d9_hlsl_vs2x0.s3d_shadercodeqH(hoqI}qJ(hJÉEeFhJÉEeFubU*gtp_diffuse_d3d9_hlsl_ps3x0.s3d_shadercodeqK(hoqL}qM(hJÉEeFhJÉEeFubU*plain_point_d3d9_hlsl_ps2x0.s3d_shadercodeqN(hoqO}qP(hJÉEeFhJÉEeFubU+bloom_bright_d3d9_hlsl_vs1x1.s3d_shadercodeqQ(hoqR}qS(hJÉEeFhJÉEeFubU)include_stdstate_d3d9_hlsl.s3d_shadercodeqT(hoqU}qV(hJÉEeFhJÉEeFubU1gtp_reduce_cubemap_d3d9_hlsl_vs2x0.s3d_shadercodeqW(hoqX}qY(hJÉEeFhJÉEeFubU-include_shmap_filter_d3d9_hlsl.s3d_shadercodeqZ(hoq[}q\(hJÉEeFhJÉEeFubU*lightfilter_d3d9_hlsl_vs2x0.s3d_shadercodeq](hoq^}q_(hJÉEeFhJÉEeFubU4gtp_distance_impostor_d3d9_hlsl_ps3x0.s3d_shadercodeq`(hoqa}qb(hFJÉEeFhGJÉEeFubU0gtp_cau_photonmap_d3d9_hlsl_vs3x0.s3d_shadercodeqc(hoqd}qe(hJÉEeFhJÉEeFubU0plain_pointcoltex_d3d9_hlsl_ps2x0.s3d_shadercodeqf(hoqg}qh(hJÉEeFhJÉEeFubU1gtp_reduce_cubemap_d3d9_hlsl_ps3x0.s3d_shadercodeqi(hoqj}qk(hJÉEeFhJÉEeFubU5bloom_presmooth_bright_d3d9_hlsl_vs1x1.s3d_shadercodeql(hoqm}qn(hJÉEeFhJÉEeFubU'standard_d3d9_hlsl_vs1x1.s3d_shadercodeqo(hoqp}qq(hJÉEeFhJÉEeFubU0plain_pointcoltex_d3d9_hlsl_vs2x0.s3d_shadercodeqr(hoqs}qt(hJÉEeFhJÉEeFubU!gtp_reduce_cubemap.s3d_shaderprogqu(hoqv}qw(hJäaEhJäaEubU+bloom_smooth_d3d9_hlsl_ps2x0.s3d_shadercodeqx(hoqy}qz(hJÉEeFhJÉEeFubU-gen_shvol_view_d3d9_hlsl_vs1x1.s3d_shadercodeq{(hoq|}q}(hJÉEeFhJÉEeFubUgtp_diffuse.s3d_shaderprogq~(hoq}q(hJÜbEhJÜbEubU$black_d3d9_hlsl_ps1x1.s3d_shadercodeq(hoq}q(hJÉEeFhJÉEeFubU#bump_d3d9_hlsl_ps2x0.s3d_shadercodeq(hoq
+}q(hJÉEeFhJÉEeFubU,bloom_combine_d3d9_hlsl_ps2x0.s3d_shadercodeq(hoq}q(hJÉEeFhJÉEeFubU gtp_cau_photonmap.s3d_shaderprogq(hoq}q(hJ>vÐEhJ>vÐEubU2gtp_caustic_recieve_d3d9_hlsl_ps2x0.s3d_shadercodeq(hoq}q(hJÉEeFhJÉEeFubU0gtp_cau_photonmap_d3d9_hlsl_ps3x0.s3d_shadercodeq(hoq}q(hJÉEeFhJÉEeFubU-plain_pointtex_d3d9_hlsl_ps2x0.s3d_shadercodeq(hoq}q(hJÉEeFhJÉEeFubU5bloom_presmooth_bright_d3d9_hlsl_ps2x0.s3d_shadercodeq(hoq}q(hJÉEeFhJÉEeFubUgtp_envmap.s3d_shaderprogq(hoq}q(hJí]EhJí]EubU0gen_shvol_extrude_d3d9_hlsl_ps2x0.s3d_shadercodeq(hoq}q(hJÉEeFhJÉEeFubU%partic_d3d9_hlsl_ps2x0.s3d_shadercodeq(hoq }q¡(hJÉEeFhJÉEeFubU/gtp_envmapSimple_d3d9_hlsl_ps1x1.s3d_shadercodeq¢(hoq£}q€(hJÉEeFhJÉEeFubU2gtp_caustic_recieve_d3d9_hlsl_vs2x0.s3d_shadercodeq¥(hoqŠ}q§(hJÉEeFhJÉEeFubU+bloom_smooth_d3d9_hlsl_vs1x1.s3d_shadercodeqš(hoq©}qª(hJÉEeFhJÉEeFubU(gen_shmap_d3d9_hlsl_ps2x0.s3d_shadercodeq«(hoq¬}q­(hJÉEeFhJÉEeFubU(gen_shmap_d3d9_hlsl_vs2x0.s3d_shadercodeq®(hoq¯}q°(hJÉEeFhJÉEeFubU$comic_d3d9_hlsl_ps2x0.s3d_shadercodeq±(hoq²}q³(hJÉEeFhJÉEeFubU$black_d3d9_hlsl_vs1x1.s3d_shadercodeqŽ(hoqµ}q¶(hJÉEeFhJÉEeFubU8gtp_caustic_cubemap_point_d3d9_hlsl_vs3x0.s3d_shadercodeq·(hoqž}q¹(hJÉEeFhJÉEeFubU*gtp_diffuse_d3d9_hlsl_vs2x0.s3d_shadercodeqº(hoq»}qŒ(hJÉEeFhJÉEeFubU,bloom_combine_d3d9_hlsl_vs1x1.s3d_shadercodeqœ(hoqŸ}q¿(hJÉEeFhJÉEeFubU.gen_brightclear_d3d9_hlsl_vs1x1.s3d_shadercodeqÀ(hoqÁ}qÂ(hJÉEeFhJÉEeFubu.
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/comic_d3d9_hlsl_ps2x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/comic_d3d9_hlsl_ps2x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/comic_d3d9_hlsl_ps2x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,44 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct PS_INPUT
+{
+    float2 mainTexCoord: TEXCOORD0;
+    float4 diffuse: COLOR0;
+    float fogCoord: TEXCOORD1;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4 paramFog;
+
+sampler2D tex0: register(s0);
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+
+float4 main(PS_INPUT input): COLOR0
+{
+    float4 outCol = tex2D(tex0, input.mainTexCoord) * input.diffuse;
+    outCol.rgb = s3d_calcFogExp(
+            outCol.rgb, paramFog.rgb, paramFog.a, input.fogCoord);
+    return outCol;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/standard_d3d9_hlsl_ps2x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/standard_d3d9_hlsl_ps2x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/standard_d3d9_hlsl_ps2x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,49 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct PS_INPUT
+{
+    float2 mainTexCoord: TEXCOORD0;
+    float4 diffuse: COLOR0;
+    float fogCoord: TEXCOORD2;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4 paramFog;
+
+sampler tex0: register(s0);
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+
+float4 main(PS_INPUT input): COLOR0
+{
+    float4 outCol = input.diffuse;
+    float4 texCol0 = tex2D(tex0, input.mainTexCoord);
+    outCol = outCol * texCol0;
+    // Preserve original opacity from texture.
+    outCol.a = texCol0.a;
+    
+    outCol.rgb = s3d_calcFogExp(
+        outCol.rgb, paramFog.rgb, paramFog.a, input.fogCoord);
+    return outCol;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/comic_d3d9_hlsl_vs2x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/comic_d3d9_hlsl_vs2x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/comic_d3d9_hlsl_vs2x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,81 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef S3D_LIGHT_CT
+#define S3D_LIGHT_CT 4
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    float3 normalObj: NORMAL;
+    float4 diffuse: COLOR0;
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+    float2 mainTexCoord: TEXCOORD0;
+    float4 diffuse: COLOR0;
+    float fogCoord: TEXCOORD1;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 projMat;
+const float4x4 matView;
+
+const float4 mtrlPower;
+const float4 mtrlEmissive;
+
+const s3d_StdProgLight lightArray[S3D_LIGHT_CT];
+const int activeLights;
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 2x0
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    float4 posView = mul(input.posObj, matView);
+    float3 normalView = normalize(mul(input.normalObj, matView).xyz);
+
+    output.posScr = mul(posView, projMat);
+    output.fogCoord = posView.z / posView.w;
+
+    float4 colDiffuse = mtrlEmissive;
+    float4 colSpecular = (float4)0;
+    for(int i = 0; i < activeLights; i++)
+    {
+        s3d_ColPair lightCol = s3d_calcPointLightTerm(
+                posView.xyz, normalView, mtrlPower.w, lightArray[i]);
+        colDiffuse += lightCol.diffuse;
+        colSpecular += lightCol.specular;
+    }
+
+    output.diffuse = input.diffuse;
+    output.mainTexCoord = dot(colDiffuse.xyz, float3(0.3, 0.5, 0.2));
+
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gen_brightmap_for_softshmap_d3d9_hlsl_ps2x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gen_brightmap_for_softshmap_d3d9_hlsl_ps2x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gen_brightmap_for_softshmap_d3d9_hlsl_ps2x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,57 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_shmap_filter_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct PS_INPUT
+{
+    float4 lightProjCoord: TEXCOORD0;
+    float4 lightShmapCoord: TEXCOORD1;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4 lightIntens;
+
+const float4 lightShmapSize;
+const float4 lightShmapRcpSize;
+
+sampler lightProjSamp: register(s0);
+sampler lightShmapSamp: register(s1);
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+
+float4 main(PS_INPUT input): COLOR0
+{
+    float3 clipVal = input.lightShmapCoord.www 
+            - abs(2 * input.lightShmapCoord.xyz - input.lightShmapCoord.www);
+    clip(clipVal.xyz);
+    
+    float4 outCol = lightIntens;
+
+    float4 texColProjTex = tex2Dproj(lightProjSamp, input.lightProjCoord);
+
+    float bright = s3d_shmapFilter(lightShmapSamp, input.lightShmapCoord,
+            lightShmapSize, lightShmapRcpSize);
+
+    outCol *= texColProjTex * bright;
+
+    return outCol;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_diffuse_d3d9_hlsl_vs2x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_diffuse_d3d9_hlsl_vs2x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_diffuse_d3d9_hlsl_vs2x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,70 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+    float2 tex0:TEXCOORD0;
+   float3 normal:NORMAL;
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr : POSITION;
+    float3 normal : TEXCOORD1;
+    float3 posView: TEXCOORD0;    
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 matProj;
+const float4x4 matProjView;
+const float4x4 matView;
+const float4x4 matViewInvTrans;
+S3D_MATBONE_DECL_STD(matBone)
+
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 1x1
+float4 last_Center;
+float4x4 worldMat;
+float4x4 worldMatIT;
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    float4x4 matBoneFinal;
+    S3D_BONE_TRANSF_STD(matBoneFinal, matBone, input.boneWgh, input.boneSubscr);
+    // Transform vectors by matBoneFinal
+    float4 posView = mul(input.posObj, matBoneFinal);
+    
+    output.posScr = mul(posView, matProj);
+    
+   
+    output.normal = mul(mul(input.normal, matViewInvTrans), worldMatIT);
+
+    output.posView = mul(posView, worldMat);
+    output.posView -= last_Center;   
+
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/standard_d3d9_hlsl_vs1x1.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/standard_d3d9_hlsl_vs1x1.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/standard_d3d9_hlsl_vs1x1.s3d_shadercode	(revision 2453)
@@ -0,0 +1,83 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    float3 normalObj: NORMAL;
+    S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+    float2 mainTexCoord: TEXCOORD0;
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+    float2 mainTexCoord: TEXCOORD0;
+    float4 diffuse: COLOR0;
+    float4 specular: COLOR1;
+    float fogCoord: TEXCOORD2;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 projMat;
+
+S3D_MATBONE_DECL_STD(matBone)
+
+const float4 mtrlPower;
+const float4 mtrlEmissive;
+
+const s3d_StdProgLight lightArray[S3D_LIGHT_CNT];
+const int activeLights;
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 1x1
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    float4x4 matBoneFinal;
+    S3D_BONE_TRANSF_STD(
+            matBoneFinal, matBone, input.boneWgh, input.boneSubscr);
+    // Transform vectors by matBoneFinal
+    float4 posView = mul(input.posObj, matBoneFinal);
+    float3 normalView = normalize(mul(input.normalObj, matBoneFinal).xyz);
+
+    output.posScr = mul(posView, projMat);
+    output.mainTexCoord = input.mainTexCoord;
+    output.fogCoord = posView.z / posView.w;
+
+    float4 colDiffuse = mtrlEmissive;
+    float4 colSpecular = (float4)0;
+    for(int i = 0; i < S3D_LIGHT_CNT; i++)
+    {
+        s3d_ColPair lightCol = s3d_calcPointLightTerm(
+                posView.xyz, normalView, mtrlPower.w, lightArray[i]);
+        colDiffuse += lightCol.diffuse;
+        colSpecular += lightCol.specular;
+    }
+
+    output.diffuse = colDiffuse;
+    output.specular = colSpecular;
+
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gen_brightmap_for_softshmap_d3d9_hlsl_vs1x1.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gen_brightmap_for_softshmap_d3d9_hlsl_vs1x1.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gen_brightmap_for_softshmap_d3d9_hlsl_vs1x1.s3d_shadercode	(revision 2453)
@@ -0,0 +1,64 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+    float4 lightProjCoord: TEXCOORD0;
+    float4 lightShmapCoord: TEXCOORD1;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 projMat;
+
+S3D_MATBONE_DECL_STD(matBone)
+
+const float4x4 lightProjMat;
+const float4x4 lightShmapMat;
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 1x1
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    float4x4 matBoneFinal;
+    S3D_BONE_TRANSF_STD(
+            matBoneFinal, matBone, input.boneWgh, input.boneSubscr);
+
+    // Transform vectors by matBoneFinal
+    float4 posView = mul(input.posObj, matBoneFinal);
+
+    output.posScr = mul(posView, projMat);
+
+    output.lightProjCoord = mul(posView, lightProjMat);
+    output.lightShmapCoord = mul(posView, lightShmapMat);
+
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/standard_d3d9_hlsl_vs2x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/standard_d3d9_hlsl_vs2x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/standard_d3d9_hlsl_vs2x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,83 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    float3 normalObj: NORMAL;
+    S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+    float2 mainTexCoord: TEXCOORD0;
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+    float2 mainTexCoord: TEXCOORD0;
+    float4 diffuse: COLOR0;
+    float4 specular: COLOR1;
+    float fogCoord: TEXCOORD2;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 projMat;
+
+S3D_MATBONE_DECL_STD(matBone)
+
+const float4 mtrlPower;
+const float4 mtrlEmissive;
+
+const s3d_StdProgLight lightArray[S3D_LIGHT_CNT];
+const int activeLights;
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 2x0
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    float4x4 matBoneFinal;
+    S3D_BONE_TRANSF_STD(
+            matBoneFinal, matBone, input.boneWgh, input.boneSubscr);
+    // Transform vectors by matBoneFinal
+    float4 posView = mul(input.posObj, matBoneFinal);
+    float3 normalView = normalize(mul(input.normalObj, matBoneFinal).xyz);
+
+    output.posScr = mul(posView, projMat);
+    output.mainTexCoord = input.mainTexCoord;
+    output.fogCoord = posView.z / posView.w;
+
+    float4 colDiffuse = mtrlEmissive;
+    float4 colSpecular = (float4)0;
+    for(int i = 0; i < activeLights; i++)
+    {
+        s3d_ColPair lightCol = s3d_calcPointLightTerm(
+                posView.xyz, normalView, mtrlPower.w, lightArray[i]);
+        colDiffuse += lightCol.diffuse;
+        colSpecular += lightCol.specular;
+    }
+
+    output.diffuse = colDiffuse;
+    output.specular = colSpecular;
+
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_caustic_recieve_d3d9_hlsl_ps2x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_caustic_recieve_d3d9_hlsl_ps2x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_caustic_recieve_d3d9_hlsl_ps2x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,35 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+
+#define NITERATION 5
+
+struct PS_INPUT
+{
+float3 dir     : TEXCOORD0;
+};
+
+sampler cauSamp: register(s0);
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 3x0
+
+
+float4 main(PS_INPUT input): COLOR0
+{
+//return 0.1;
+ return  texCUBE(cauSamp, input.dir); 
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/bloom_presmooth_bright_d3d9_hlsl_ps2x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/bloom_presmooth_bright_d3d9_hlsl_ps2x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/bloom_presmooth_bright_d3d9_hlsl_ps2x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,81 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+struct PS_INPUT
+{
+    float2 mainTexCoord: TEXCOORD0;
+    float2 offsScale: TEXCOORD1;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+sampler tex0: register(s0);
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+
+float4 main(PS_INPUT input): COLOR0
+{
+    float2 mainTexCoord = input.mainTexCoord;
+    float2 offsScale = input.offsScale;
+
+    // Use filtering for additional smoothing effect.
+    // The source-texture should be a filter-texture.
+    // The size (width resp. height) of the destination-texture
+    // should be 2 or 4 smaller than the size of the source-texture.
+    //
+    // Pixel in target-texture: X
+    //
+    // Source-sampling positions: S
+    //                          *---*
+    // Pixel in source-texture: |   |
+    //                          *---*
+    //              downscaling by 2 or more
+    // no downscaling
+    //                  *---*---*---*---*
+    // *---*---*---*    |   |   |   |   |
+    // | S |   | S |    *---S---*---S---*    
+    // *---*---*---*    |   |   |   |   |    
+    // |   | X |   |    *---*---X---*---*    
+    // *---*---*---*    |   |   |   |   |    
+    // | S |   | S |    *---S---*---S---*    
+    // *---*---*---*    |   |   |   |   |    
+    //                  *---*---*---*---*
+    //
+    // Note: Since this filter cannot sample more than a 4x4 neighbourhood,
+    // downscaling factor of 4 cannot be exceeded without skipping pixels.
+    // With downsampling of 1 or less filtering can't be used for smoothing
+    // because it results in an undesirable filter pattern.
+    // Thus a scaling factor of 2 or 4 is recommanded.
+    
+    const float2 offsPix0 = float2(-1.0f,-1.0f);
+    const float2 offsPix1 = float2( 1.0f,-1.0f);
+    const float2 offsPix2 = float2(-1.0f, 1.0f);
+    const float2 offsPix3 = float2( 1.0f, 1.0f);
+
+    // neighbour texture coordinates:
+    float2 neigh0 = offsScale * offsPix0 + mainTexCoord.xy;
+    float2 neigh1 = offsScale * offsPix1 + mainTexCoord.xy;
+    float2 neigh2 = offsScale * offsPix2 + mainTexCoord.xy;
+    float2 neigh3 = offsScale * offsPix3 + mainTexCoord.xy;
+
+    float4 avg =
+        (tex2D(tex0, neigh0)
+        + tex2D(tex0, neigh1)
+        + tex2D(tex0, neigh2)
+        + tex2D(tex0, neigh3)) * 0.25;
+    return clamp(avg - 0.8, 0.0, 1.0) * 5.0; // STD
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_cau_photonmap_d3d9_hlsl_ps3x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_cau_photonmap_d3d9_hlsl_ps3x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_cau_photonmap_d3d9_hlsl_ps3x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,85 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+
+#define NITERATION 5
+
+struct PS_INPUT
+{
+    float3 worldV     : TEXCOORD0;
+    float3 WNormal   : TEXCOORD1;
+    float3 CUBEPos   : TEXCOORD2;
+    float3 lastCenter :TEXCOORD3;
+};
+
+sampler distanceSamp: register(s0);
+
+
+half3 Hit(samplerCUBE tex, half3 R, half3 p0)
+{
+        float rl = texCUBE(tex, R).r;
+        float dp = rl - dot(p0, R);
+        float3 p = p0 + R * dp;
+        float ppp = length(p) / texCUBE(tex, p).r;
+        float dun = 0, dov = 0, pun = ppp, pov = ppp;
+        if (ppp < 1) dun = dp; else dov = dp;
+        float dl = max( dp + rl * (1 - ppp), 0);
+        float3 RR = p0 + R * dl;
+
+        for(int i = 0; i < NITERATION; i++) {
+                float ddl;
+                float llp = length(RR) / texCUBE(tex, RR).r;
+                if (llp < 1) {
+                        dun = dl; pun = llp;
+                        ddl = (dov == 0) ? rl * (1 - llp) :
+                                (dl - dov) * (1 - llp)/(llp - pov);
+                } else {
+                        dov = dl; pov = llp;
+                        ddl = (dun == 0) ? rl * (1 - llp) :
+                                (dl - dun) * (1 - llp)/(llp - pun);
+                }
+                dl = max(dl + ddl, 0);
+                RR = p0 + R * dl;
+        }
+        return RR;
+}
+
+
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 3x0
+
+
+float4 main(PS_INPUT input): COLOR0
+{
+ const float g_RefractFactor = 0.85;
+
+ // direction vector from light to shaded point in world space
+ float3 V = normalize(input.worldV);
+ // vertex normal in world space
+ float3 N = normalize(input.WNormal);
+ // refraction direction
+ float3 R = refract(V, N, g_RefractFactor);
+ //float3 R = reflect(V, N);
+ // vertex position in cubemap space
+ float3 X = input.CUBEPos;
+ float3 dir = Hit(distanceSamp, R, X);
+ //dir = input.lastCenter;
+ //dir = N;
+ //return float4(input.lastCenter,1);
+// return texCUBE(distanceSamp,X).r;
+ return float4(dir,1);
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/black_d3d9_hlsl_ps1x1.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/black_d3d9_hlsl_ps1x1.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/black_d3d9_hlsl_ps1x1.s3d_shadercode	(revision 2453)
@@ -0,0 +1,27 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+struct PS_INPUT
+{
+};
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 1x1
+
+float4 main(PS_INPUT input): COLOR0
+{
+    return 0;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_caustic_recieve_d3d9_hlsl_vs2x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_caustic_recieve_d3d9_hlsl_vs2x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_caustic_recieve_d3d9_hlsl_vs2x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,62 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+    float2 tex0:TEXCOORD0;
+   float3 normal:NORMAL;
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr : POSITION;
+    float3 dir: TEXCOORD0;    
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 matProj;
+const float4x4 matView;
+S3D_MATBONE_DECL_STD(matBone)
+
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 1x1
+float4 last_Center;
+float4x4 worldMat;
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    float4x4 matBoneFinal;
+    S3D_BONE_TRANSF_STD(matBoneFinal, matBone, input.boneWgh, input.boneSubscr);
+    // Transform vectors by matBoneFinal
+    float4 posView = mul(input.posObj, matBoneFinal);    
+    output.posScr = mul(posView, matProj);
+    
+    float4 wPos = mul(posView, worldMat);
+    output.dir = wPos.xyz - last_Center.xyz ;    
+
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/bloom_presmooth_bright_d3d9_hlsl_vs1x1.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/bloom_presmooth_bright_d3d9_hlsl_vs1x1.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/bloom_presmooth_bright_d3d9_hlsl_vs1x1.s3d_shadercode	(revision 2453)
@@ -0,0 +1,63 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    float2 mainTexCoord: TEXCOORD0;
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+    float fog: FOG;
+    float4 diffuse: COLOR0;
+    float2 mainTexCoord: TEXCOORD0;
+    float2 offsScale: TEXCOORD1;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 matProjView;
+const float4x4 matView;
+const float4 mtrlEmissive;
+const float4 tex0RcpSize;
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 1x1
+
+VS_OUTPUT main( VS_INPUT input )
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    //Transform position to clip space
+    output.posScr = mul(input.posObj, matProjView);
+
+    //Transform position to eye space -> pos
+    float4 posView = mul(input.posObj, matView);
+
+    //fog
+    output.fog = posView.z / posView.w;
+
+    //Color
+    output.diffuse = mtrlEmissive;
+
+    output.mainTexCoord = input.mainTexCoord;
+
+    output.offsScale = tex0RcpSize;
+
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_cau_photonmap_d3d9_hlsl_vs3x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_cau_photonmap_d3d9_hlsl_vs3x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_cau_photonmap_d3d9_hlsl_vs3x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,78 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+    float2 tex0:TEXCOORD0;
+   float3 normal:NORMAL;
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr    : POSITION;
+    float3 worldV     : TEXCOORD0;
+    float3 WNormal   : TEXCOORD1;
+    float3 CUBEPos   : TEXCOORD2;
+    float3 lastCenter :TEXCOORD3;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+S3D_MATBONE_DECL_STD(matBone)
+
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 1x1
+const float4x4 matView;
+const float4x4 modelViewInv;
+const float4x4 viewToWorld;
+const float4x4 viewToWorldInv;
+const float4x4 lightViewProj;
+const float4 lastCenter;
+const float4 lightPosView;
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    float4x4 matBoneFinal;
+    S3D_BONE_TRANSF_STD(matBoneFinal, matBone, input.boneWgh, input.boneSubscr);
+    // Transform vevertices by matBoneFinal ---> view space
+    float4 posView = mul(input.posObj, matBoneFinal);
+    // light position in world space
+    float3 lightWPos = mul(float4(lightPosView.xyz,1), viewToWorld).xyz;
+    // vertex position in world space
+    float3 WPos = mul(posView, viewToWorld).xyz;
+    // direction vector from light to shaded point in world space
+    output.worldV = WPos - lightWPos;
+    // vertex position in cubemap space
+    output.CUBEPos = WPos - lastCenter;
+    // vertex normal in world space
+    output.WNormal = mul(mul(viewToWorldInv, modelViewInv),input.normal);
+    // vertex position in light space
+    output.posScr = mul(posView, lightViewProj);
+    
+    output.lastCenter = WPos.xyz;
+    
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_reduce_cubemap_d3d9_hlsl_ps3x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_reduce_cubemap_d3d9_hlsl_ps3x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_reduce_cubemap_d3d9_hlsl_ps3x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,57 @@
+
+struct PS_INPUT
+{
+    float4 posScr: POSITION;
+    float2 texCoord: TEXCOORD0;
+    float nFace: TEXCOORD1;
+};
+
+
+struct PS_OUTPUT
+{
+    float4  color: COLOR0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+sampler tex0: register(s0);
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+const int CUBEMAP_SIZE = 128;
+const int REDUCED_CUBEMAP_SIZE = 4;
+
+PS_OUTPUT main(PS_INPUT input)
+{
+//const int RATE = CUBEMAP_SIZE / REDUCED_CUBEMAP_SIZE;
+const int RATE = 32;
+
+PS_OUTPUT output;
+float3 dir;
+ 
+float4 color = float4(0,0,0,0);
+
+   for (int i = 0; i < RATE; i++)
+     for (int j = 0; j < RATE; j++)
+   {
+float2 pos;
+pos.x = input.texCoord.x + (2*i + 1)/(float)CUBEMAP_SIZE;
+pos.y = input.texCoord.y - (2*j + 1)/(float)CUBEMAP_SIZE;// y=-u
+
+ // "scrambling"
+if (input.nFace == 0) dir = float3(1, pos.y, -pos.x);
+if (input.nFace == 1) dir = float3(-1, pos.y, pos.x);
+if (input.nFace == 2) dir = float3(pos.x, 1, -pos.y);
+if (input.nFace == 3) dir = float3(pos.x, -1, pos.y);
+if (input.nFace == 4) dir = float3(pos.x, pos.y, 1);
+if (input.nFace == 5) dir = float3(-pos.x, pos.y,-1);
+
+color += texCUBElod( tex0, float4(dir,0));
+    }
+
+ output.color = color / (RATE * RATE);
+ return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode	(revision 2453)
@@ -0,0 +1,201 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef STDDEF_D3D9_HLSL_SC
+#define STDDEF_D3D9_HLSL_SC
+
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stdstate_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+// Compression
+///////////////////////////////////////////////////////////////////////////////
+
+float3 s3d_uncomprNormal(
+        float3 comprNormal)
+{
+#ifdef S3D_COMPR_NORMAL
+    return comprNormal / 127.5 - 1.0;
+#else
+    return comprNormal;
+#endif    
+}
+
+float4 s3d_uncomprBoneWgh(
+        float4 comprBoneWgh)
+{
+#ifdef S3D_COMPR_BONEWGH
+    return  comprBoneWgh / 255.0f;
+#else
+    return comprBoneWgh;
+#endif    
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// Bones
+///////////////////////////////////////////////////////////////////////////////
+
+// default to 4 for bone transformation w/o bone subscriptions
+#ifndef S3D_MATBONE_CNT
+#define S3D_MATBONE_CNT 4
+#endif
+
+// works w/ compressed and uncompressed bone weights.
+void s3d_calcBoneTransfSubscr(
+        out float4x4 matBoneFinal, const float4x4 matBone[S3D_MATBONE_CNT],
+        const float4 boneWgh, const int4 boneSubscr)
+{
+    float4 uncomprBoneWgh = s3d_uncomprBoneWgh(boneWgh);
+
+    matBoneFinal = uncomprBoneWgh.x * matBone[boneSubscr.x];
+    matBoneFinal += uncomprBoneWgh.y * matBone[boneSubscr.y];
+    matBoneFinal += uncomprBoneWgh.z * matBone[boneSubscr.z];
+    matBoneFinal += uncomprBoneWgh.w * matBone[boneSubscr.w];
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+#ifdef S3D_USE_BONESUBSCR
+
+#define S3D_BONE_DECL_STD(boneWgh, boneSubscr) \
+        float4 boneWgh: BLENDWEIGHT; \
+        int4 boneSubscr: BLENDINDICES;
+ 
+#define S3D_MATBONE_DECL_STD(matBone) \
+        const float4x4 matBone[S3D_MATBONE_CNT];
+
+#define S3D_BONE_TRANSF_STD(matBoneFinal, matBone, boneWgh, boneSubscr) \
+        s3d_calcBoneTransfSubscr(matBoneFinal, matBone, boneWgh, boneSubscr);
+
+#else
+#ifdef S3D_USE_BONEWGH
+
+#define S3D_BONE_DECL_STD(boneWgh, boneSubscr) \
+        float4 boneWgh: BLENDWEIGHT;
+
+#define S3D_MATBONE_DECL_STD(matBone) \
+        const float4x4 matBone[S3D_MATBONE_CNT];\
+        static const int4 dummyBoneSubscr = int4(0, 1, 2, 3);
+        
+#define S3D_BONE_TRANSF_STD(matBoneFinal, matBone, boneWgh, boneSubscr) \
+        s3d_calcBoneTransfSubscr( \
+                matBoneFinal, matBone, boneWgh, dummyBoneSubscr);
+
+#else
+
+#define S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+
+#define S3D_MATBONE_DECL_STD(matBone)
+
+#define S3D_BONE_TRANSF_STD(matBoneFinal, matBone, boneWgh, boneSubscr) \
+    matBoneFinal = matView;
+
+#endif
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+// Lighting
+///////////////////////////////////////////////////////////////////////////////
+
+float s3d_calcLightRangeFac(float dist, float range)
+{
+    float lightRsqRange = 1.0 / (range * range);
+    float rangeFac = max(1.0 - dist * dist * lightRsqRange, 0.0);
+    return rangeFac;
+}
+
+float s3d_calcLightRangeFac(float dist, float4 posRange)
+{
+    return s3d_calcLightRangeFac(dist, posRange.w);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+s3d_ColPair s3d_calcPointLightTerm(
+        float3 camToVertView, float3 normalView, float mtrlPower,
+        float4 lightPos, float4 lightAmbient, float4 lightDiffuse,
+        float4 lightSpecular, float4 lightAtten)
+{
+    float3 vertToLightDirView = normalize(lightPos - camToVertView);
+    float normalDotVertToLightDir = dot(normalView, vertToLightDirView);
+    float3 camToVertDirView = normalize(camToVertView);
+    float3 HalfDirView = normalize(vertToLightDirView - camToVertDirView);
+    float normalDotHalfDir = dot(normalView, HalfDirView);
+  
+    float dist = length(lightPos - camToVertView);
+    float rangeFac = s3d_calcLightRangeFac(dist, lightAtten); 
+    float4 litVec = lit(normalDotVertToLightDir,
+            normalDotHalfDir, mtrlPower) * rangeFac;
+    float ambient = litVec.x;
+    float diffuse = litVec.y;
+    float specular = litVec.z;
+
+    s3d_ColPair result;
+    result.diffuse  = lightAmbient * ambient;
+    result.diffuse += lightDiffuse * diffuse;
+    result.specular = lightSpecular * specular;
+
+    return result;
+}
+
+s3d_ColPair s3d_calcPointLightTerm(
+        float3 camToVertView, float3 normalView,
+        float mtrlPower, s3d_StdProgLight light)
+{
+    return s3d_calcPointLightTerm(
+            camToVertView, normalView, mtrlPower, light.pos,
+            light.ambient, light.diffuse, light.specular,
+            light.atten);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+void s3d_calcBump(
+        out float3 diffuseDirSurf, out float3 specularDirSurf,
+        float3 normalView, float3 vertToLightDirView, float3 halfDirView,
+        float3 tangentUView, float3 tangentVView)
+{
+    diffuseDirSurf.x = dot(tangentUView, vertToLightDirView);
+    diffuseDirSurf.y = dot(tangentVView, vertToLightDirView);
+    diffuseDirSurf.z = dot(normalView, vertToLightDirView);
+
+    specularDirSurf.x = dot(tangentUView, halfDirView);
+    specularDirSurf.y = dot(tangentVView, halfDirView);
+    specularDirSurf.z = dot(normalView, halfDirView);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// Fog
+///////////////////////////////////////////////////////////////////////////////
+
+float3 s3d_calcFogExp(
+        float3 color, float3 fogColor, float fogDensity, float fogCoord)
+{
+    float fogFactor = exp(-clamp(fogDensity, 0, 1) * fogCoord);
+    return lerp(fogColor, color, fogFactor);
+}
+
+float3 s3d_calcFogExp2(
+        float3 color, float3 fogColor, float fogDensity, float fogCoord)
+{
+    float fogFactor = exp(-pow(clamp(fogDensity, 0, 1) * fogCoord, 2));
+    return lerp(fogColor, color, fogFactor);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// Tex
+///////////////////////////////////////////////////////////////////////////////
+
+#endif // STDDEF_D3D9_HLSL_SC
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/black_d3d9_hlsl_vs1x1.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/black_d3d9_hlsl_vs1x1.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/black_d3d9_hlsl_vs1x1.s3d_shadercode	(revision 2453)
@@ -0,0 +1,40 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 matProjView;
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 1x1
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    output.posScr = mul(input.posObj, matProjView);
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/partic_d3d9_hlsl_ps2x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/partic_d3d9_hlsl_ps2x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/partic_d3d9_hlsl_ps2x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,47 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct PS_INPUT
+{
+    float2 mainTexCoord: TEXCOORD0;
+    float4 diffuse: COLOR0;
+    float fogCoord: TEXCOORD2;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4 paramFog;
+
+sampler tex0: register(s0);
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+
+float4 main(PS_INPUT input): COLOR0
+{
+    float4 outCol = input.diffuse;
+    float4 texCol0 = tex2D(tex0, input.mainTexCoord);
+    outCol = outCol * texCol0;
+    
+    outCol.rgb = s3d_calcFogExp(
+        outCol.rgb, paramFog.rgb, paramFog.a, input.fogCoord);
+    return outCol;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gen_shvol_extrude_d3d9_hlsl_ps2x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gen_shvol_extrude_d3d9_hlsl_ps2x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gen_shvol_extrude_d3d9_hlsl_ps2x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,27 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+struct PS_INPUT
+{
+};
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+
+float4 main(PS_INPUT input): COLOR0
+{
+    return 0;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/partic_d3d9_hlsl_vs2x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/partic_d3d9_hlsl_vs2x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/partic_d3d9_hlsl_vs2x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,177 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    float3 normalObj: NORMAL;
+    S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+    float4 diffuse: COLOR0;
+    float2 mainTexCoord: TEXCOORD0;
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+    float2 mainTexCoord: TEXCOORD0;
+    float4 diffuse: COLOR0;
+    float4 specular: COLOR1;
+    float fogCoord: TEXCOORD2;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 projMat;
+
+S3D_MATBONE_DECL_STD(matBone)
+
+const float4 mtrlPower;
+const float4 mtrlEmissive;
+
+#ifdef S3D_LIGHT_CNT
+const s3d_StdProgLight lightArray[S3D_LIGHT_CNT];
+const int activeLights;
+#endif
+
+float4 anim;        // Animation time between 0 and 1
+float4 colorAlpha;  // Color and alpha factor
+float4 param;       // x=Particle radius, y=Move-along-normal-factor
+float4 moveLin;     // Linear movement vector
+float4 moveQuadr;   // Quadratic movement vector
+float4 moveVari;    // Variation amount, see below
+float4 moveJiggle;  // Jiggle amount vector, see below.
+float4 shrink;      // x=fadeIn, y=fadeOut, z=flickerAmp, w=flickerVel
+float4 other;       // x=asyncFactor, y=repeat, z=jiggleVel, w=unused
+
+///////////////////////////////////////////////////////////////////////////////
+// Seed values:
+
+float4 seedVariX = float4(8576, 6968, 8285, 1375);
+float4 seedVariY = float4(9257, 7911, 4491, 4178);
+float4 seedVariZ = float4(9621, 7416, 9166, 1405);
+float4 seedJiggleX = float4(9809, 4760, 6104, 3046);
+float4 seedJiggleY = float4(7590, 5729, 8471, 1556);
+float4 seedJiggleZ = float4(9904, 0636, 4127, 5254);
+float4 seedAnim = float4(8891, 1068, 3747, 5529);
+float4 seedRotU = float4(3147, 0722, 3324, 7158);
+float4 seedRotV = float4(7020, 4337, 7956, 1530);
+
+///////////////////////////////////////////////////////////////////////////////
+// Utility functions:
+
+float quickSin(float phase)
+{
+    float rel = frac(phase) - 0.5;
+    float val = - 16 * rel * (0.5 - abs(rel));
+    return val;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 2x0
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+    
+    float animRandom =  dot(input.posObj, seedAnim);
+    float curAnim = frac(other.x * animRandom + other.y * anim.x);
+    
+    // The movement direction is varied by a pseudo-random value.
+    float3 variRandom;
+    variRandom.x = dot(input.posObj, seedVariX);
+    variRandom.y = dot(input.posObj, seedVariY);
+    variRandom.z = dot(input.posObj, seedVariZ);
+    float3 variUnit = (2 * frac(variRandom) - 1);
+    float3 variDelta = variUnit * moveVari.xyz;
+
+    // The particles jiggle in direction of a pseudo-random value.
+    float3 jiggleRandom;
+    jiggleRandom.x = dot(input.posObj, seedJiggleX);
+    jiggleRandom.y = dot(input.posObj, seedJiggleY);
+    jiggleRandom.z = dot(input.posObj, seedJiggleZ);
+    float3 jiggleUnit = (2 * frac(jiggleRandom) - 1);
+    float3 jiggleDelta = jiggleUnit * moveJiggle 
+                    * quickSin(curAnim * other.z);
+    
+    // Move particle in object coordinates:
+    float3 moveTot = moveLin.xyz;           // Move into constant direction
+    moveTot += input.normalObj * param.y;   // Move along normal vector
+    moveTot += curAnim * moveQuadr.xyz;     // Move along a quadratic curve
+    moveTot += variDelta;                   // Move into a random direction
+    float4 posObj = input.posObj;
+    posObj.xyz += curAnim * moveTot;        // Add move
+    posObj.xyz += jiggleDelta;              // Jitter
+
+    // Transformation from object into view coordinates:
+    float4x4 matBoneFinal;
+    S3D_BONE_TRANSF_STD(
+            matBoneFinal, matBone, input.boneWgh, input.boneSubscr);
+    // Transform vectors by matBoneFinal
+    float4 posView = mul(posObj, matBoneFinal);
+    
+    // Calculate effective particle radius.
+    // This includes fading in, fading out and flickering.
+    float fadeIn = curAnim * shrink.x;
+    float fadeOut = (1 - curAnim) * shrink.y;
+    float fade = min(1, min(fadeIn, fadeOut));
+    float flicker = 1 - shrink.z * quickSin(curAnim * shrink.w); 
+    float radius = param.x * flicker * fade;
+    
+    // Until now we only have the particle center.
+    // Now we alculate the corner coordinates.
+    // The particle is rotated by a pseudo-random angle:
+    float2 rotRandom;
+    rotRandom.x = dot(input.posObj, seedRotU);
+    rotRandom.y = dot(input.posObj, seedRotV);
+    float2 rotDir = normalize(frac(rotRandom) - float2(0.5, 0.5));
+    float2 rotU = radius * 1.4142 * rotDir;
+    float2 rotV = float2(- rotU.y, rotU.x);
+    float2 coord = (input.mainTexCoord.xy - float2(0.5, 0.5));
+    posView.xy += rotU * coord.x + rotV * coord.y;
+
+    // Projection:
+    output.posScr = mul(posView, projMat);
+    output.mainTexCoord = input.mainTexCoord;
+    output.fogCoord = posView.z / posView.w;
+
+//    output.diffuse = input.diffuse;
+//    output.specular = 0;
+    
+    // Calculate vertex color:
+#ifdef S3D_LIGHT_CNT
+    float4 colDiffuse = mtrlEmissive;
+    float4 colSpecular = 0;
+    for(int i = 0; i < activeLights; i++)
+    {
+        s3d_ColPair lightCol = s3d_calcPointLightTerm(
+                posView.xyz, 0, mtrlPower.w, lightArray[i]);
+        colDiffuse.rgb += lightCol.diffuse.rgb;
+        colSpecular.rgb += lightCol.specular.rgb;
+    }
+    output.diffuse = colDiffuse * colorAlpha * input.diffuse;
+    output.specular = colSpecular;
+#else
+    output.diffuse = colorAlpha * input.diffuse;
+    output.specular = 0;
+#endif
+	
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gen_shvol_extrude_d3d9_hlsl_vs1x1.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gen_shvol_extrude_d3d9_hlsl_vs1x1.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gen_shvol_extrude_d3d9_hlsl_vs1x1.s3d_shadercode	(revision 2453)
@@ -0,0 +1,78 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+    float3 normalObj: NORMAL;
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 projMat;
+const float4x4 matView;
+
+S3D_MATBONE_DECL_STD(matBone)
+
+const float4 lightCenRange;
+const float4 lightExtrude;
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 1x1
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    float4x4 matBoneFinal;
+    S3D_BONE_TRANSF_STD(
+            matBoneFinal, matBone, input.boneWgh, input.boneSubscr);
+    // Transform vectors by matBoneFinal
+    float4 posView = mul(input.posObj, matBoneFinal);
+    float3 normalView = normalize(mul(input.normalObj, matBoneFinal).xyz);
+
+    float3 effLightCenRange = lightCenRange;
+
+#ifdef S3D_USE_BLOAT
+    // Bloat:
+    effLightCenRange.xyz -= normalView * lightExtrude.z;
+#endif
+    
+    // Calculate normalized extrusion direction vector:
+    float3 dirNrm = normalize(posView.xyz - effLightCenRange.xyz);
+
+    // Extrude:
+    float prod = dot(dirNrm, normalView) * lightExtrude.w;
+    // Important! If the product is zero, extrusion must be off.
+    float sign = (prod > 0) ? 1 : 0;
+    float move = sign * lightExtrude.x + lightExtrude.y;
+    posView.xyz = move * dirNrm + posView;
+
+    // Transform:
+    output.posScr = mul(posView, projMat);
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/plain_pointcoltex_d3d9_hlsl_ps2x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/plain_pointcoltex_d3d9_hlsl_ps2x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/plain_pointcoltex_d3d9_hlsl_ps2x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,33 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+struct PS_INPUT
+{
+    float4 diffuse: COLOR0;
+    float2 mainTexCoord: TEXCOORD0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+sampler tex0: register(s0);
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+
+float4 main(PS_INPUT input): COLOR0
+{
+    return tex2D(tex0, input.mainTexCoord) * input.diffuse;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/plain_pointtex_d3d9_hlsl_ps2x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/plain_pointtex_d3d9_hlsl_ps2x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/plain_pointtex_d3d9_hlsl_ps2x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,33 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+struct PS_INPUT
+{
+    float4 diffuse: COLOR0;
+    float2 mainTexCoord: TEXCOORD0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+sampler tex0: register(s0);
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+
+float4 main(PS_INPUT input): COLOR0
+{
+    return tex2D(tex0, input.mainTexCoord) * input.diffuse;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_diffuse_d3d9_hlsl_ps3x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_diffuse_d3d9_hlsl_ps3x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_diffuse_d3d9_hlsl_ps3x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,277 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+
+//#define Poly2Point 
+
+struct PS_INPUT
+{
+float3 normalWorld  : TEXCOORD1;
+float3 posWorld : TEXCOORD0;
+};
+
+sampler colorSamp: register(s0);
+sampler distanceSamp: register(s1);
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 3x0
+
+#ifdef Poly2Point
+
+float4 GetContibution(float3 L, float3 L1, float3 L2, float3 L3, float3 L4, float3 pos, float3 N, samplerCUBE cubemap)
+{
+float d;
+d = texCUBE(cubemap, L1).r;
+L1 = d * normalize(L1);
+d = texCUBE(cubemap, L2).r;
+L2 = d * normalize(L2);
+d = texCUBE(cubemap, L3).r;
+L3 = d * normalize(L3);
+d = texCUBE(cubemap, L4).r;
+L4 = d * normalize(L4);
+
+
+    float3 r1 = normalize(L1 - pos);    
+    float3 r2 = normalize(L2 - pos);
+    float3 r3 = normalize(L3 - pos);
+    float3 r4 = normalize(L4 - pos);
+  
+  float3 crossP = cross(r1, r2);
+  float r = length(crossP);
+  float dd = dot(r1,r2);
+  float tri1 = acos(dd) * dot(crossP/r, N);
+  
+  crossP = cross(r2, r3);
+  r = length(crossP);
+  dd = dot(r1,r2);
+  float tri2 = acos(dd) * dot(crossP/r, N);
+  
+  crossP = cross(r3, r4);
+  r = length(crossP);
+  dd = dot(r1,r2);
+  float tri3 = acos(dd) * dot(crossP/r, N);
+  
+  crossP = cross(r4, r1);
+  r = length(crossP);
+  dd = dot(r1,r2);
+  float tri4= acos(dd) * dot(crossP/r, N);
+  
+  
+   return max(tri1 + tri2 + tri3 + tri4, 0);
+}
+
+float4 main(PS_INPUT input): COLOR0
+{
+    float M = 4;
+
+    float3 N = normalize( input.normalWorld ); 
+    float3 pos = input.posWorld;
+    
+    //return texCUBE(colorSamp, N);
+      
+    float4 I = 0;
+    float3 L1, L2, L3, L4, L;
+    float4 Le;
+    float width = 1.0 / M;
+    float width2 = width * 2;
+    float d; 
+
+    for (float x = 1; x < M; x++)
+ for (float y = 1; y < M; y++)
+ {
+    float2 p, tpos; 
+    tpos.x = x * width;
+    tpos.y = y * width;
+    
+    p = tpos.xy;    
+    p = 2.0 * p - 1.0; //-1..1
+            
+L1 = float3(p.x - width, p.y - width, 1);
+L2 = float3(p.x + width, p.y - width, 1);
+L3 = float3(p.x + width, p.y + width, 1);
+L4 = float3(p.x - width, p.y + width, 1);
+L = float3(p.x, p.y, 1);
+Le = float4(texCUBE(colorSamp, L).rgb, 1);
+
+I += 0.5 * Le * GetContibution( L, L1, L2, L3, L4, pos, N, distanceSamp);
+
+}
+
+for (float x = 1; x < M; x++)
+ for (float y = 1; y < M; y++)
+ {
+float2 p, tpos; 
+    tpos.x = x * width;// 0..1
+    tpos.y = y * width;// 0..1
+    
+    p = tpos.xy;    
+    p = 2.0 * p - 1.0; //-1..1
+            
+L4 = float3(p.x - width, p.y - width, -1);
+L3 = float3(p.x + width, p.y - width, -1);
+L2 = float3(p.x + width, p.y + width, -1);
+L1 = float3(p.x - width, p.y + width, -1);
+L = float3(p.x, p.y, -1);
+Le = float4(texCUBE(colorSamp, L).rgb, 1);
+
+I += 0.5 * Le * GetContibution( L, L1, L2, L3, L4, pos, N, distanceSamp);
+ }
+ 
+for (float x = 1; x < M; x++)
+ for (float y = 1; y < M; y++)
+ {
+float2 p, tpos; 
+    tpos.x = x * width;// 0..1
+    tpos.y = y * width;// 0..1
+    
+    p = tpos.xy;    
+    p = 2.0 * p - 1.0; //-1..1
+            
+L4 = float3(p.x - width, 1, p.y - width);
+L3 = float3(p.x + width, 1, p.y - width);
+L2 = float3(p.x + width, 1, p.y + width);
+L1 = float3(p.x - width, 1, p.y + width);
+L = float3(p.x, 1, p.y);
+Le = float4(texCUBE(colorSamp, L).rgb, 1);
+
+I += 0.5 * Le * GetContibution( L, L1, L2, L3, L4, pos, N, distanceSamp);
+ }
+ 
+for (float x = 1; x < M; x++)
+ for (float y = 1; y < M; y++)
+ {
+float2 p, tpos; 
+    tpos.x = x * width;// 0..1
+    tpos.y = y * width;// 0..1
+    
+    p = tpos.xy;    
+    p = 2.0 * p - 1.0; //-1..1
+            
+L1 = float3(p.x - width, -1, p.y - width);
+L2 = float3(p.x + width, -1, p.y - width);
+L3 = float3(p.x + width, -1, p.y + width);
+L4 = float3(p.x - width, -1, p.y + width);
+L = float3(p.x, -1, p.y);
+Le = float4(texCUBE(colorSamp, L).rgb, 1);
+
+I += 0.5 * Le * GetContibution( L, L1, L2, L3, L4, pos, N, distanceSamp);
+ }
+ 
+ for (float x = 1; x < M; x++)
+ for (float y = 1; y < M; y++)
+{
+float2 p, tpos; 
+    tpos.x = x * width;// 0..1
+    tpos.y = y * width;// 0..1
+    
+    p = tpos.xy;    
+    p = 2.0 * p - 1.0; //-1..1
+            
+L1 = float3(1, p.x - width, p.y - width);
+L2 = float3(1, p.x + width, p.y - width);
+L3 = float3(1, p.x + width, p.y + width);
+L4 = float3(1, p.x - width, p.y + width);
+L = float3(1, p.x, p.y);
+Le = float4(texCUBE(colorSamp, L).rgb, 1);
+
+I += 0.5 * Le * GetContibution( L, L1, L2, L3, L4, pos, N, distanceSamp);
+}
+ 
+for (float x = 1; x < M; x++)
+ for (float y = 1; y < M; y++)
+ {
+float2 p, tpos; 
+    tpos.x = x * width;// 0..1
+    tpos.y = y * width;// 0..1
+    
+    p = tpos.xy;    
+    p = 2.0 * p - 1.0; //-1..1
+            
+L4 = float3(-1, p.x - width, p.y - width);
+L3 = float3(-1, p.x + width, p.y - width);
+L2 = float3(-1, p.x + width, p.y + width);
+L1 = float3(-1, p.x - width, p.y + width);
+L = float3(-1, p.x, p.y);
+Le = float4(texCUBE(colorSamp, L).rgb, 1);
+
+I += 0.5 * Le * GetContibution( L, L1, L2, L3, L4, pos, N, distanceSamp);
+ }
+ float kd = 0.5;
+ return 1;
+return kd * I;
+}
+
+
+
+#else
+
+float4 P2PContr(float3 N, float3 Nl, float3 pos, float3 L, samplerCUBE cubemap, samplerCUBE distmap)
+{
+Nl = normalize(Nl);
+L = normalize(L);
+float4 Le = texCUBE(cubemap, L);
+float d = texCUBE(distmap, L).r;
+float3 Lpos = L * d;
+float3 Ldir = Lpos - pos;
+float dist2 = dot(Ldir, Ldir);
+if (dist2<0.5) dist2 = 0.5;
+float dist = 4 * dist2;
+Ldir = normalize(Ldir);
+
+return Le * (max(dot(N, Ldir),0) * dot(Nl, -1 * Ldir)) / dist;
+}
+
+float4 main(PS_INPUT input): COLOR0
+{
+    float M = 4.0;
+
+    float3 N = normalize( input.normalWorld ); 
+    float3 pos = input.posWorld;
+
+    //return texCUBE(distanceSamp, N).r;
+    
+//return float4(N,1);
+
+    float4 I = 0;
+    float3 L;
+    float4 Le;
+    float width = 1.0 / M;
+    float d;
+
+    float kd = 1.0;
+
+    for (float x = 0.5; x < M; x++)
+ for (float y = 0.5; y < M; y++)
+ {
+    float2 p, tpos; 
+    tpos.x = x * width;
+    tpos.y = y * width;
+    
+    p = tpos.xy;    
+    p = 2.0 * p - 1.0; //-1..1
+            
+I += P2PContr(N, float3(0,0,-1), pos, float3(p.x, p.y, 1), colorSamp, distanceSamp);
+I += P2PContr(N, float3(0,0,1), pos, float3(-p.x, p.y, -1), colorSamp, distanceSamp);
+I += P2PContr(N, float3(-1,0,0), pos, float3(1, p.y, -p.x), colorSamp, distanceSamp);
+I += P2PContr(N, float3(1,0,0), pos, float3(-1, p.y, p.x), colorSamp, distanceSamp);
+I += P2PContr(N, float3(0,-1,0), pos, float3(p.x, 1, -p.y), colorSamp, distanceSamp);
+I += P2PContr(N, float3(0,1,0), pos, float3(p.x, -1, p.y), colorSamp, distanceSamp);
+}
+
+//return 1;
+return kd * I;
+
+}
+#endif
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gen_shmap_d3d9_hlsl_ps2x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gen_shmap_d3d9_hlsl_ps2x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gen_shmap_d3d9_hlsl_ps2x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,30 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+struct PS_INPUT
+{
+    float2 depthScr: TEXCOORD0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+
+float4 main(PS_INPUT input): COLOR0
+{
+    float2 depthScr = input.depthScr;
+    float fragDepth = clamp(depthScr.x / depthScr.y, 0, 1);
+    return fragDepth;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/bloom_smooth_d3d9_hlsl_ps2x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/bloom_smooth_d3d9_hlsl_ps2x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/bloom_smooth_d3d9_hlsl_ps2x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,54 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+struct PS_INPUT
+{
+    float2 mainTexCoord: TEXCOORD0;
+    float4 baseVec: TEXCOORD2;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+sampler tex0: register(s0);
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+
+float4 main(PS_INPUT input): COLOR0
+{
+    float2 mainTexCoord = input.mainTexCoord;
+    float2 offsPix0 = input.baseVec.xy;
+    float2 offsPix1 = input.baseVec.zw;
+    float2 offsPix2 = offsPix0 + offsPix1;
+    float2 offsPix3 = offsPix0 - offsPix1;
+
+    float4 val = tex2D(tex0, mainTexCoord);
+    float4 val0 = tex2D(tex0, mainTexCoord.xy + offsPix0);
+    float4 val1 = tex2D(tex0, mainTexCoord.xy + offsPix1);
+    float4 val2 = tex2D(tex0, mainTexCoord.xy + offsPix2);
+    float4 val3 = tex2D(tex0, mainTexCoord.xy + offsPix3);
+    float4 val4 = tex2D(tex0, mainTexCoord.xy - offsPix0);
+    float4 val5 = tex2D(tex0, mainTexCoord.xy - offsPix1);
+    float4 val6 = tex2D(tex0, mainTexCoord.xy - offsPix2);
+    float4 val7 = tex2D(tex0, mainTexCoord.xy - offsPix3);
+
+    float4 sum
+        = (val * val + val0 * val0 + val1 * val1 + val2 * val2 + val3 * val3
+        + 0.5 * (val4 * val4 + val5 * val5 + val6 * val6 + val7 * val7))
+        * 0.142857f; // = approx. 1.0 / 7.0
+
+    return sqrt(sum);
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_distance_impostor_d3d9_hlsl_ps3x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_distance_impostor_d3d9_hlsl_ps3x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/gtp_distance_impostor_d3d9_hlsl_ps3x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,29 @@
+
+struct PS_INPUT
+{
+    float3 viewVec: TEXCOORD1;
+};
+
+
+struct PS_OUTPUT
+{
+    float4  distance: COLOR0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+sampler tex0: register(s0);
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+
+PS_OUTPUT main(PS_INPUT input)
+{
+	PS_OUTPUT output;
+	output.distance = float4(length(input.viewVec), 0, 0, 0);
+	//output.distance = float4(1.0,1.0,1.0,1.0) * 4.0;
+	return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/plain_pointcoltex_d3d9_hlsl_vs2x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/plain_pointcoltex_d3d9_hlsl_vs2x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/plain_pointcoltex_d3d9_hlsl_vs2x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,62 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+    float4 diffuse: COLOR0;
+    float2 mainTexCoord: TEXCOORD0;
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+    float4 diffuse: COLOR0;
+    float2 mainTexCoord: TEXCOORD0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 projMat;
+const float4x4 matView;
+
+S3D_MATBONE_DECL_STD(matBone)
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 2x0
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    float4x4 matBoneFinal;
+    S3D_BONE_TRANSF_STD(
+            matBoneFinal, matBone, input.boneWgh, input.boneSubscr);
+    // Transform vectors by matBoneFinal
+    float4 posView = mul(input.posObj, matBoneFinal);
+
+    output.posScr = mul(posView, projMat);
+    output.diffuse = input.diffuse;
+    output.mainTexCoord.xy = input.mainTexCoord;
+
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/include_stdstate_d3d9_hlsl.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/include_stdstate_d3d9_hlsl.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/include_stdstate_d3d9_hlsl.s3d_shadercode	(revision 2453)
@@ -0,0 +1,37 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef STDSTATE_D3D9_HLSL_SC
+#define STDSTATE_D3D9_HLSL_SC
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct s3d_StdProgLight
+{
+    float4 pos;
+    float4 ambient;
+    float4 diffuse;
+    float4 specular;
+    float4 atten;
+};
+
+struct s3d_ColPair
+{
+   float4 diffuse: COLOR0;
+   float4 specular: COLOR1;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+#endif // STDSTATE_D3D9_HLSL_SC
+
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/bump_d3d9_hlsl_ps2x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/bump_d3d9_hlsl_ps2x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/bump_d3d9_hlsl_ps2x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,212 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_shmap_filter_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct PS_INPUT
+{
+    float2 mainTexCoord: TEXCOORD0;
+    float3 diffuseDirSurf: TEXCOORD1;
+    float3 specularDirSurf: TEXCOORD2;
+    float3 scaledSurfToLight: TEXCOORD3;
+#ifdef S3D_PARALLAX_MAPPING
+    float3 camToVertSurf: TEXCOORD4;
+#endif
+#ifdef S3D_LIGHT_BRIGHT
+    float4 lightBrightCoord: TEXCOORD5;
+    float4 secPosScr: TEXCOORD6;
+#endif
+#ifdef S3D_LIGHT_PROJ
+    float4 lightProjCoord: TEXCOORD5;
+#endif
+#ifdef S3D_LIGHT_SHMAP
+    float4 lightShmapCoord: TEXCOORD6;
+#endif
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+sampler mainSamp: register(s0);
+sampler normalSamp: register(s1);
+#ifdef S3D_LIGHT_BRIGHT
+sampler lightBrightSamp: register(s2);
+#endif
+#ifdef S3D_LIGHT_PROJ
+sampler lightProjSamp: register(s2);
+#endif
+#ifdef S3D_LIGHT_SHMAP
+sampler lightShmapSamp: register(s3);
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4 lightAmbient;
+const float4 lightDiffuse;
+const float4 lightSpecular;
+
+#ifdef S3D_LIGHT_BRIGHT
+const float4 lightBrightRcpSize;
+#endif
+
+#ifdef S3D_LIGHT_SHMAP
+const float4 lightShmapSize;
+const float4 lightShmapRcpSize;
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+
+#define S3D_INTENS_DISCARD_TRESHOLD 0.001
+#define S3D_BRIGHT_EPS 0.01
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+
+float4 main(PS_INPUT input): COLOR0
+{
+#ifdef S3D_GEOMETRIC_SHADOW
+    // Geometric shadow
+    //clip(input.diffuseDirSurf.z);
+    // ATI Mobility Radeon X1600 workaround:
+    clip(float4(0, 0, 1, 0) * input.diffuseDirSurf); 
+#endif
+
+#ifdef S3D_LIGHT_SHMAP
+    float3 clipVal = input.lightShmapCoord.www 
+            - abs(2 * input.lightShmapCoord.xyz - input.lightShmapCoord.www);
+    clip(clipVal.xyz);
+#endif
+
+#ifdef S3D_LIGHT_BRIGHT
+#ifdef S3D_LIGHT_BRIGHT_CARE
+    float4 brightVecMain = tex2Dproj(
+            lightBrightSamp, input.lightBrightCoord);
+    float brightIdent = frac(100.0 * input.secPosScr.z / input.secPosScr.w);
+    float brightDeltaMain = abs(brightVecMain.w - brightIdent);
+    float brightVal = brightVecMain.x;
+    if(brightDeltaMain > S3D_BRIGHT_EPS)
+    {
+        float2 brightOffs = lightBrightRcpSize.xy * input.lightBrightCoord.w;
+        float4 brightCoordX = float4(
+                input.lightBrightCoord.xy + brightOffs, 
+                input.lightBrightCoord.zw);
+        float4 brightCoordY = float4(
+                input.lightBrightCoord.xy - brightOffs, 
+                input.lightBrightCoord.zw);
+        float4 brightCoordZ = brightCoordX;
+        brightCoordZ.y = brightCoordY.y;
+        float4 brightCoordW = brightCoordY;
+        brightCoordW.y = brightCoordX.y;
+        float4 brightVecX = tex2Dproj(lightBrightSamp, brightCoordX);
+        float4 brightVecY = tex2Dproj(lightBrightSamp, brightCoordY);
+        float4 brightVecZ = tex2Dproj(lightBrightSamp, brightCoordZ);
+        float4 brightVecW = tex2Dproj(lightBrightSamp, brightCoordW);
+        brightVal = min(brightVecMain.x,
+                        min(min(brightVecX.x, brightVecY.x),
+                            min(brightVecZ.x, brightVecW.x)));
+    }
+#else    
+    // Lookup brightness:
+    float brightVal = tex2Dproj(lightBrightSamp, input.lightBrightCoord).x;
+#endif    
+    // Exit if no light:    
+    clip(brightVal - S3D_INTENS_DISCARD_TRESHOLD);
+#endif    
+#ifdef S3D_LIGHT_SHMAP
+    // Shadow map:
+    float shmapVal = s3d_shmapFilter(
+            lightShmapSamp, input.lightShmapCoord,
+            lightShmapSize, lightShmapRcpSize);
+    clip(shmapVal - S3D_INTENS_DISCARD_TRESHOLD);            
+#endif
+    
+    // Texture coordinates:
+    float2 mainTexCoord = input.mainTexCoord;
+#ifdef S3D_PARALLAX_MAPPING
+    float3 camToVertSurfNrm = normalize(input.camToVertSurf);
+    float height = tex2D(normalSamp, mainTexCoord).a;
+    float2 offset = S3D_PARALLAX_SCALE * (S3D_PARALLAX_BIAS - height) 
+            * camToVertSurfNrm.xy;
+    mainTexCoord = mainTexCoord + offset;
+#endif
+
+    // Texture lookups:
+    float4 texCol = tex2D(mainSamp, mainTexCoord);
+    float4 rawNormalView = tex2D(normalSamp, mainTexCoord);
+    float3 normalView = (rawNormalView.xyz - 0.5) * 2;
+
+    // Calculate range-factor:
+    float rangeFac =
+        max(1.0 - dot(input.scaledSurfToLight, input.scaledSurfToLight), 0.0);
+
+    // Diffuse direction:
+    float3 diffuseDirSurfNrm = normalize(input.diffuseDirSurf);
+
+    // Calculate diffuse:
+    float4 diffuse = float4(lightDiffuse.xyz * rangeFac, lightDiffuse.w);
+    diffuse += lightAmbient;
+    float diffDot = dot(normalView, diffuseDirSurfNrm);
+#ifdef S3D_MILD
+    float diffFac = diffDot * (1 - S3D_MILD) + S3D_MILD;
+#else
+    float diffFac = diffDot;
+#endif
+    diffuse *= saturate(diffFac);
+
+    // Calculate specular:
+    float4 specular = float4(lightSpecular.xyz * rangeFac, lightSpecular.w);
+    float3 specularDirSurfNrm = normalize(input.specularDirSurf);
+    float specDot = dot(normalView, specularDirSurfNrm);
+    float specFac = saturate(pow(saturate(specDot), S3D_SPECULAR_EXP));
+    specular *= specFac ;
+
+    float4 outCol;
+    outCol.rgb = saturate(diffuse * texCol 
+            + specular * texCol.a);
+    // Preserve original opacity from texture.
+    outCol.a = texCol.a;
+
+#ifdef S3D_GEOMETRIC_SHADOW
+    // Geometric shadow
+    float geomShadow = saturate(diffuseDirSurfNrm.z * 4);
+    outCol.rgb = saturate(outCol.rgb * geomShadow);
+#endif
+
+#ifdef S3D_LIGHT_BRIGHT
+    // Correct brightness:
+    // The smoothing algorithm generates higher brightness gradients 
+    // near 0 and 1 due to sticking to 0 and 1. 
+    // This is approximately compensated by using a quadratic function 
+    // near 0 and 1.
+    brightVal = 2.0 * brightVal * brightVal * (1.5 - brightVal);
+
+    // Apply brightness:
+    outCol.rgb = outCol.rgb * brightVal;
+#endif
+
+#ifdef S3D_LIGHT_PROJ
+    float4 texColProjTex = tex2Dproj(lightProjSamp, input.lightProjCoord);
+    outCol *= texColProjTex;
+#endif
+
+#ifdef S3D_LIGHT_SHMAP
+    outCol *= shmapVal;
+#endif
+
+    return outCol / dot(input.scaledSurfToLight, input.scaledSurfToLight);
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/plain_pointtex_d3d9_hlsl_vs2x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/plain_pointtex_d3d9_hlsl_vs2x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/plain_pointtex_d3d9_hlsl_vs2x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,61 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+    float2 mainTexCoord: TEXCOORD0;
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+    float4 diffuse: COLOR0;
+    float2 mainTexCoord: TEXCOORD0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 projMat;
+const float4x4 matView;
+const float4 mtrlEmissive;
+
+S3D_MATBONE_DECL_STD(matBone)
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 2x0
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    float4x4 matBoneFinal;
+    S3D_BONE_TRANSF_STD(
+            matBoneFinal, matBone, input.boneWgh, input.boneSubscr);
+    // Transform vectors by matBoneFinal
+    float4 posView = mul(input.posObj, matBoneFinal);
+
+    output.posScr = mul(posView, projMat);
+    output.diffuse = mtrlEmissive;
+    output.mainTexCoord = input.mainTexCoord;
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/bloom_combine_d3d9_hlsl_ps2x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/bloom_combine_d3d9_hlsl_ps2x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/d3d9_hlsl/bloom_combine_d3d9_hlsl_ps2x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,34 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+struct PS_INPUT
+{
+    float2 mainTexCoord: TEXCOORD0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+sampler tex0: register(s0);
+sampler tex1: register(s1);
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+
+float4 main(PS_INPUT input): COLOR0
+{
+    float2 mainTexCoord = input.mainTexCoord;
+    return tex2D(tex0, mainTexCoord) + 0.5 *tex2D(tex1, mainTexCoord);
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gtp_envmap_metal.s3d_shaderprog
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gtp_envmap_metal.s3d_shaderprog	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gtp_envmap_metal.s3d_shaderprog	(revision 2453)
@@ -0,0 +1,88 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                & "gtp_envmapSimple_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+        }
+        tracking
+        {
+            codevar "matProj"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matProjView"
+            slot 0
+            chan "projview"
+            trans "identity"
+        }
+{
+    codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+}
+{
+    codevar "matViewInvTrans"
+            slot 0
+            chan "view"
+            trans "invtransp"
+}
+
+param_array
+{
+    src_progvar "lastCenter"
+    dest_codevar "last_Center"
+    type "float4"
+}
+{
+    src_progvar "worldMat"
+    dest_codevar "worldMat"
+    type "float4x4"
+}
+{
+    src_progvar "worldMatIT"
+    dest_codevar "worldMatIT"
+    type "float4x4"
+}
+
+
+
+    }
+
+    hlsl_pixshader
+    {
+      code_variant_array
+      {
+            profile "3x0"
+            entry_point "metal"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gtp_envmapSimple_d3d9_hlsl_ps1x1.s3d_shadercode_run"
+      }
+      param_array
+	  {
+    	src_progvar "Fresnel"
+    	dest_codevar "Fresnel"
+    	type "float4"
+	  }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/partic.s3d_shaderprog
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/partic.s3d_shaderprog	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/partic.s3d_shaderprog	(revision 2453)
@@ -0,0 +1,360 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Shader program configuration.
+// Different drivers access different parameters.
+
+ogl
+{
+    glsl
+    {
+        vertshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "partic_ogl_glsl_vs1x0.s3d_shadercode_run"
+            }
+
+            tracking
+            {
+                // uniform mat4 matBone[4];
+                cnt 4
+                codevar "matBone[$]"
+                chan "bone"
+                trans "identity"
+            }
+
+            //  attribute vec4 bone_wgh;
+            bone_wgh "boneWgh"
+            //bone_subscr "boneSubscr"
+
+            predefine_array
+            {
+                name "S3D_USE_BONEWGH"
+            }
+        }
+
+        fragshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "partic_ogl_glsl_fs1x0.s3d_shadercode_run"
+            }
+        }
+        
+        sampler_array "tex0"
+        
+        param_array
+        {
+            src_progvar "prog_anim"
+            dest_codevar "anim"
+            type "float4"
+        }
+        {
+            src_progvar "prog_color_alpha"
+            dest_codevar "colorAlpha"
+            type "float4"
+        }
+        {
+            src_progvar "prog_param"
+            dest_codevar "param"
+            type "float4"
+        }
+        {
+            src_progvar "prog_move_lin"
+            dest_codevar "moveLin"
+            type "float4"
+        }
+        {
+            src_progvar "prog_move_quadr"
+            dest_codevar "moveQuadr"
+            type "float4"
+        }
+        {
+            src_progvar "prog_move_vari"
+            dest_codevar "moveVari"
+            type "float4"
+        }
+        {
+            src_progvar "prog_move_jiggle"
+            dest_codevar "moveJiggle"
+            type "float4"
+        }
+        {
+            src_progvar "prog_shrink"
+            dest_codevar "shrink"
+            type "float4"
+        }
+        {
+            src_progvar "prog_other"
+            dest_codevar "other"
+            type "float4"
+        }
+    }
+}
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "partic_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+            //debug_code_file "src/res/levelutil/shader/prog/d3d9_hlsl/"
+            //      & "partic_d3d9_hlsl_vs2x0.s3d_shadercode"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        light_array
+        {
+            cnt 5
+            pos_codevar "lightArray[$].pos"
+            dir_codevar ""
+            ambient_codevar "lightArray[$].ambient"
+            diffuse_codevar "lightArray[$].diffuse"
+            specular_codevar "lightArray[$].specular"
+            atten_codevar "lightArray[$].atten"
+        }
+        light_activecnt_codevar "activeLights"
+
+        mtl
+        {
+            power_codevar "mtrlPower"
+            emissive_codevar "mtrlEmissive"
+        }
+        
+        param_array
+        {
+            src_progvar "prog_anim"
+            dest_codevar "anim"
+            type "float4"
+        }
+        {
+            src_progvar "prog_color_alpha"
+            dest_codevar "colorAlpha"
+            type "float4"
+        }
+        {
+            src_progvar "prog_param"
+            dest_codevar "param"
+            type "float4"
+        }
+        {
+            src_progvar "prog_move_lin"
+            dest_codevar "moveLin"
+            type "float4"
+        }
+        {
+            src_progvar "prog_move_quadr"
+            dest_codevar "moveQuadr"
+            type "float4"
+        }
+        {
+            src_progvar "prog_move_vari"
+            dest_codevar "moveVari"
+            type "float4"
+        }
+        {
+            src_progvar "prog_move_jiggle"
+            dest_codevar "moveJiggle"
+            type "float4"
+        }
+        {
+            src_progvar "prog_shrink"
+            dest_codevar "shrink"
+            type "float4"
+        }
+        {
+            src_progvar "prog_other"
+            dest_codevar "other"
+            type "float4"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+        {
+            name "S3D_LIGHT_CNT"
+            val "5"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "partic_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+            
+        fog_codevar "paramFog"
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "partic_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+            //debug_code_file "src/res/levelutil/shader/prog/d3d9_hlsl/"
+            //      & "partic_d3d9_hlsl_vs2x0.s3d_shadercode"
+        }
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "partic_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+            //debug_code_file "src/res/levelutil/shader/prog/d3d9_hlsl/"
+            //      & "partic_d3d9_hlsl_vs1x1.s3d_shadercode"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        light_array
+        {
+            cnt 5
+            pos_codevar "lightArray[$].pos"
+            dir_codevar ""
+            ambient_codevar "lightArray[$].ambient"
+            diffuse_codevar "lightArray[$].diffuse"
+            specular_codevar "lightArray[$].specular"
+            atten_codevar "lightArray[$].atten"
+        }
+        light_activecnt_codevar "activeLights"
+
+        mtl
+        {
+            power_codevar "mtrlPower"
+            emissive_codevar "mtrlEmissive"
+        }
+
+        param_array
+        {
+            src_progvar "prog_anim"
+            dest_codevar "anim"
+            type "float4"
+        }
+        {
+            src_progvar "prog_color_alpha"
+            dest_codevar "colorAlpha"
+            type "float4"
+        }
+        {
+            src_progvar "prog_param"
+            dest_codevar "param"
+            type "float4"
+        }
+        {
+            src_progvar "prog_move_lin"
+            dest_codevar "moveLin"
+            type "float4"
+        }
+        {
+            src_progvar "prog_move_quadr"
+            dest_codevar "moveQuadr"
+            type "float4"
+        }
+        {
+            src_progvar "prog_move_vari"
+            dest_codevar "moveVari"
+            type "float4"
+        }
+        {
+            src_progvar "prog_move_jiggle"
+            dest_codevar "moveJiggle"
+            type "float4"
+        }
+        {
+            src_progvar "prog_shrink"
+            dest_codevar "shrink"
+            type "float4"
+        }
+        {
+            src_progvar "prog_other"
+            dest_codevar "other"
+            type "float4"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+        {
+            name "S3D_LIGHT_CNT"
+            val "5"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "partic_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+            
+        fog_codevar "paramFog"
+    }
+}
+//#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/bump_shmap.s3d_shaderprog
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/bump_shmap.s3d_shaderprog	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/bump_shmap.s3d_shaderprog	(revision 2453)
@@ -0,0 +1,425 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Shader program configuration.
+// Different drivers access different parameters.
+
+// Opengl Highlevel Shaderlanguage
+ogl
+{
+    samp_depth_test_array "" "" ""
+
+    glsl
+    {
+        vertshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "bump_ogl_glsl_vs1x0.s3d_shadercode_run"
+            }
+            tracking
+            {
+                // uniform mat4 matBone[4];
+                cnt 4
+                codevar "matBone[$]"
+                chan "bone"
+                trans "identity"
+            }
+
+            //  attribute vec4 bone_wgh;
+            bone_wgh "boneWgh"
+            //bone_subscr "boneSubscr"
+
+            predefine_array
+            {
+                name "S3D_USE_BONEWGH"
+            }
+            {
+                name "S3D_PARALLAX_MAPPING"
+            }
+            {
+                name "S3D_LIGHT_PROJ"
+            }
+            {
+                name "S3D_LIGHT_SHMAP"
+            }
+        }
+
+        fragshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "bump_ogl_glsl_fs1x0.s3d_shadercode_run"
+            }
+            predefine_array
+            {
+                name "S3D_SPECULAR_EXP"
+                val "4.0"
+            }
+            {
+                name "S3D_GEOMETRIC_SHADOW"
+            }
+            {
+                name "S3D_PARALLAX_MAPPING"
+            }
+            {
+                name "S3D_PARALLAX_SCALE"
+                val "0.07"
+            }
+            {
+                name "S3D_PARALLAX_BIAS"
+                val "0.50196078431372549" // = 128/255
+            }
+            {
+                name "S3D_LIGHT_PROJ"
+            }
+            {
+                name "S3D_LIGHT_SHMAP"
+            }
+            {
+                name "S3D_SHMAP_FILTER16"
+            }
+            {
+                name "S3D_SHMAP_ZBIAS"
+                //val "0.0003" // For no-filtering
+                val "0.0010" // For 4-filtering
+                //val "0.0010" // For 16-filtering
+            }
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_cenrange"
+            dest_codevar "lightCenRange"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_ambient"
+            dest_codevar "lightAmbient"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_diffuse"
+            dest_codevar "lightDiffuse"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_specular"
+            dest_codevar "lightSpecular"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_projmat"
+            dest_codevar "lightProjMat"
+            type "float4x4"
+        }
+        {
+            src_progvar "prog_light_shmapmat"
+            dest_codevar "lightShmapMat"
+            type "float4x4"
+        }
+
+        sampler_array "tex0" "normalSamp" "lightProjSamp" "lightShmapSamp"
+
+        tex_size_codevar_array "" "" "lightShmapSize"
+        tex_rcpsize_codevar_array "" "" "lightShmapRcpSize"
+    }
+}
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        // Code of the pixel program
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bump_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+            //debug_code_file "src/res/levelutil/shader/prog/d3d9_hlsl/"
+            //      & "bump_d3d9_hlsl_vs1x1.s3d_shadercode"
+        }
+
+
+        // Copy matrices into vertex program constants.
+        // The field "chan" can be one
+        // of "identity", "proj", "view" or "projview" "bone"
+        // The field "trans" can be one
+        // of "identity", "inv", "transp" or "invtransp"
+        // One matrix needs 4 constants.
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_cenrange"
+            dest_codevar "lightCenRange"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_projmat"
+            dest_codevar "lightProjMat"
+            type "float4x4"
+        }
+        {
+            src_progvar "prog_light_shmapmat"
+            dest_codevar "lightShmapMat"
+            type "float4x4"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+        {
+            name "S3D_PARALLAX_MAPPING"
+        }
+        {
+            name "S3D_LIGHT_PROJ"
+        }
+        {
+            name "S3D_LIGHT_SHMAP"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bump_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+        
+        param_array
+        {
+            src_progvar "prog_light_ambient"
+            dest_codevar "lightAmbient"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_diffuse"
+            dest_codevar "lightDiffuse"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_specular"
+            dest_codevar "lightSpecular"
+            type "float4"
+        }
+
+        tex_size_codevar_array "" "" "lightShmapSize"
+        tex_rcpsize_codevar_array "" "" "lightShmapRcpSize"
+
+        predefine_array
+        {
+            name "S3D_SPECULAR_EXP"
+            val "4.0"
+        }
+        {
+            name "S3D_GEOMETRIC_SHADOW"
+        }
+        {
+            name "S3D_PARALLAX_MAPPING"
+        }
+        {
+            name "S3D_PARALLAX_SCALE"
+            val "0.07"
+        }
+        {
+            name "S3D_PARALLAX_BIAS"
+            val "0.50196078431372549" // = 128/255
+        }
+        {
+            name "S3D_LIGHT_PROJ"
+        }
+        {
+            name "S3D_LIGHT_SHMAP"
+        }
+        /*
+        {
+            name "S3D_SHMAP_FILTER16"
+            val ""
+        }
+        */
+        {
+            name "S3D_SHMAP_ZBIAS"
+            //val "0.0003" // For no-filtering
+            val "0.0010" // For 4-filtering
+            //val "0.0010" // For 16-filtering
+        }
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        // Code of the pixel program
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bump_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+            //debug_code_file "src/res/levelutil/shader/prog/d3d9_hlsl/"
+            //      & "bump_d3d9_hlsl_vs1x1.s3d_shadercode"
+        }
+
+
+        // Copy matrices into vertex program constants.
+        // The field "chan" can be one
+        // of "identity", "proj", "view" or "projview" "bone"
+        // The field "trans" can be one
+        // of "identity", "inv", "transp" or "invtransp"
+        // One matrix needs 4 constants.
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_cenrange"
+            dest_codevar "lightCenRange"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_projmat"
+            dest_codevar "lightProjMat"
+            type "float4x4"
+        }
+        {
+            src_progvar "prog_light_shmapmat"
+            dest_codevar "lightShmapMat"
+            type "float4x4"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+        {
+            name "S3D_PARALLAX_MAPPING"
+        }
+        {
+            name "S3D_LIGHT_PROJ"
+        }
+        {
+            name "S3D_LIGHT_SHMAP"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bump_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_ambient"
+            dest_codevar "lightAmbient"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_diffuse"
+            dest_codevar "lightDiffuse"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_specular"
+            dest_codevar "lightSpecular"
+            type "float4"
+        }
+
+        tex_size_codevar_array "" "" "" "lightShmapSize"
+        tex_rcpsize_codevar_array "" "" "" "lightShmapRcpSize"
+
+        predefine_array
+        {
+            name "S3D_SPECULAR_EXP"
+            val "4.0"
+        }
+        {
+            name "S3D_GEOMETRIC_SHADOW"
+        }
+        {
+            name "S3D_PARALLAX_MAPPING"
+        }
+        {
+            name "S3D_PARALLAX_SCALE"
+            val "0.07"
+        }
+        {
+            name "S3D_PARALLAX_BIAS"
+            val "0.50196078431372549" // = 128/255
+        }
+        {
+            name "S3D_LIGHT_PROJ"
+        }
+        {
+            name "S3D_LIGHT_SHMAP"
+        }
+        {
+            name "S3D_SHMAP_FILTER16"
+            val ""
+        }
+        {
+            name "S3D_SHMAP_ZBIAS"
+            //val "0.0003" // For no-filtering
+            //val "0.0010" // For 4-filtering
+            val "0.0010" // For 16-filtering
+        }
+    }
+}
+//#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/plain_pointcoltex.s3d_shaderprog
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/plain_pointcoltex.s3d_shaderprog	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/plain_pointcoltex.s3d_shaderprog	(revision 2453)
@@ -0,0 +1,157 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+ogl
+{
+    glsl
+    {
+        vertshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "plain_ogl_glsl_vs1x0.s3d_shadercode_run"
+            }
+
+            tracking
+            {
+                cnt 4
+                codevar "matBone[$]"
+                chan "bone"
+                trans "identity"
+            }
+
+            //  attribute vec4 bone_wgh;
+            bone_wgh "boneWgh"
+            //bone_subscr "boneSubscr"
+
+            predefine_array
+            {
+                name "S3D_USE_BONEWGH"
+            }
+        }
+    }
+}
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "plain_pointcoltex_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "plain_pointcoltex_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "plain_pointcoltex_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "plain_pointcoltex_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+
+        //fog_codevar "paramFog"
+    }
+}
+//#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/bump_ogl_glsl_fs1x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/bump_ogl_glsl_fs1x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/bump_ogl_glsl_fs1x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,199 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+@include "levelutil/shader/prog/ogl_glsl/" \
+        "include_shmap_filter_ogl_glsl_vs1x0.s3d_shadercode_run"
+
+///////////////////////////////////////////////////////////////////////////////
+
+@define S3D_NORMALIZE(v) (v)
+
+///////////////////////////////////////////////////////////////////////////////
+
+uniform sampler2D tex0;
+uniform sampler2D normalSamp;
+
+///////////////////////////////////////////////////////////////////////////////
+
+@ifdef S3D_LIGHT_BRIGHT
+uniform sampler2D lightBrightSamp;
+@endif
+@ifdef S3D_LIGHT_PROJ
+uniform sampler2D lightProjSamp;
+@endif
+@ifdef S3D_LIGHT_SHMAP
+uniform sampler2D lightShmapSamp;
+@endif
+
+///////////////////////////////////////////////////////////////////////////////
+
+uniform vec4 lightAmbient;
+uniform vec4 lightDiffuse;
+uniform vec4 lightSpecular;
+
+@ifdef S3D_LIGHT_BRIGHT
+uniform vec4 lightBrightRcpSize;
+@endif
+
+@ifdef S3D_LIGHT_SHMAP
+uniform vec4 lightShmapSize;
+uniform vec4 lightShmapRcpSize;
+@endif
+
+///////////////////////////////////////////////////////////////////////////////
+
+@define S3D_INTENS_DISCARD_TRESHOLD 0.001
+@define S3D_BRIGHT_EPS 0.01
+
+///////////////////////////////////////////////////////////////////////////////
+
+void main(void)
+{
+@ifdef S3D_GEOMETRIC_SHADOW
+    // Geometric shadow
+    if(gl_TexCoord[1].z < 0.0)
+        discard;
+@endif
+
+@ifdef S3D_LIGHT_SHMAP
+    vec3 clipVal = gl_TexCoord[6].www 
+            - abs(2.0 * gl_TexCoord[6].xyz - gl_TexCoord[6].www);
+    if(clipVal.x < 0.0 || clipVal.y < 0.0 || clipVal.z < 0.0)
+        discard;
+@endif
+
+@ifdef S3D_LIGHT_BRIGHT
+@ifdef S3D_LIGHT_BRIGHT_CARE
+    vec4 brightVecMain = texture2DProj(
+            lightBrightSamp, gl_TexCoord[5]);
+    float brightIdent = fract(100.0 * gl_TexCoord[6].z / gl_TexCoord[6].w);
+    float brightDeltaMain = abs(brightVecMain.w - brightIdent);
+    float brightVal = brightVecMain.x;
+    if(brightDeltaMain > S3D_BRIGHT_EPS)
+    {
+        vec2 brightOffs = lightBrightRcpSize.xy * gl_TexCoord[5].w;
+        vec4 brightCoordX = vec4(
+                gl_TexCoord[5].xy + brightOffs, 
+                gl_TexCoord[5].zw);
+        vec4 brightCoordY = vec4(
+                gl_TexCoord[5].xy - brightOffs, 
+                gl_TexCoord[5].zw);
+        vec4 brightCoordZ = brightCoordX;
+        brightCoordZ.y = brightCoordY.y;
+        vec4 brightCoordW = brightCoordY;
+        brightCoordW.y = brightCoordX.y;
+        vec4 brightVecX = texture2DProj(lightBrightSamp, brightCoordX);
+        vec4 brightVecY = texture2DProj(lightBrightSamp, brightCoordY);
+        vec4 brightVecZ = texture2DProj(lightBrightSamp, brightCoordZ);
+        vec4 brightVecW = texture2DProj(lightBrightSamp, brightCoordW);
+        brightVal = min(brightVecMain.x,
+                        min(min(brightVecX.x, brightVecY.x),
+                            min(brightVecZ.x, brightVecW.x)));
+    }
+@else    
+    // Lookup brightness:
+    float brightVal = texture2DProj(lightBrightSamp, gl_TexCoord[5]).x;
+@endif    
+    // Exit if no light:
+    if(brightVal <= S3D_INTENS_DISCARD_TRESHOLD)
+        discard;
+@endif
+    
+@ifdef S3D_LIGHT_SHMAP
+    // Shadow map:
+    float shmapVal = s3d_shmapFilter(
+            lightShmapSamp, gl_TexCoord[6],
+            lightShmapSize, lightShmapRcpSize);
+    if(shmapVal <= S3D_INTENS_DISCARD_TRESHOLD)
+        discard;
+@endif
+
+    // Texture coordinates:
+    vec2 mainTexCoord = gl_TexCoord[0].xy;
+@ifdef S3D_PARALLAX_MAPPING
+    vec3 camToVertSurfNrm = normalize(gl_TexCoord[4].xyz);
+    float height = texture2D(normalSamp, mainTexCoord).a;
+    vec2 offset = S3D_PARALLAX_SCALE * (S3D_PARALLAX_BIAS - height) 
+            * camToVertSurfNrm.xy;
+    mainTexCoord = mainTexCoord + offset;
+@endif
+
+    // Texture lookups:
+    vec4 texCol = texture2D(tex0, mainTexCoord.xy);
+    vec4 rawNormalView = texture2D(normalSamp, mainTexCoord.xy);
+    vec3 normalView = (rawNormalView.xyz - 0.5) * 2.0;
+
+    // Calculate range-factor from scaled surface-to-light vector:
+    float rangeFac =
+        max(1.0 - dot(gl_TexCoord[3].xyz, gl_TexCoord[3].xyz), 0.0);
+
+    // Diffuse direction:
+    vec3 diffuseDirSurfNrm = S3D_NORMALIZE(gl_TexCoord[1].xyz);
+
+    // Calculate diffuse:    
+    vec4 diffuse = vec4(lightDiffuse.xyz * rangeFac, lightDiffuse.w);
+    diffuse += lightAmbient;
+    float diffDot = dot(normalView, diffuseDirSurfNrm);
+@ifdef S3D_MILD
+    float diffFac = diffDot * (1.0 - S3D_MILD) + S3D_MILD;
+@else
+    float diffFac = diffDot;
+@endif
+    diffuse *= clamp(diffFac, 0.0, 1.0);;
+    
+    // Calculate specular:
+    vec4 specular = vec4(lightSpecular.xyz * rangeFac, lightSpecular.w);
+    // ATI workaround: Don't use x component of gl_TexCoord[2]:
+    vec3 specularDirSurfNrm = S3D_NORMALIZE(gl_TexCoord[2].yzw);
+    float specDot = dot(normalView, specularDirSurfNrm);
+    float specFac = clamp(pow(clamp(specDot, 0.0, 1.0), 
+            S3D_SPECULAR_EXP), 0.0, 1.0);
+    specular *= specFac;
+
+    vec4 outCol;
+    outCol.rgb = clamp(diffuse.rgb * texCol.rgb 
+            + specular.rgb * texCol.a, 0.0, 1.0);
+    // Preserve original opacity from texture.
+    outCol.a = texCol.a;
+
+@ifdef S3D_GEOMETRIC_SHADOW
+    // Geometric shadow
+    float geomShadow = clamp(diffuseDirSurfNrm.z * 4.0, 0.0, 1.0);
+    outCol.rgb = clamp(outCol.rgb * geomShadow, 0.0, 1.0);
+@endif
+
+@ifdef S3D_LIGHT_BRIGHT
+    // Correct brightness:
+    // The smoothing algorithm generates higher brightness gradients 
+    // near 0 and 1 due to sticking to 0 and 1. 
+    // This is approximately compensated by using a quadratic function 
+    // near 0 and 1.
+    brightVal = 2.0 * brightVal * brightVal * (1.5 - brightVal);
+
+    // Apply brightness:
+    outCol.rgb = outCol.rgb * brightVal;
+@endif
+
+@ifdef S3D_LIGHT_PROJ
+    vec4 texColProjTex = texture2DProj(lightProjSamp, gl_TexCoord[5]);
+    outCol *= texColProjTex;
+@endif
+
+@ifdef S3D_LIGHT_SHMAP
+    outCol *= shmapVal;
+@endif
+
+    gl_FragColor = outCol;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/bloom_combine_ogl_glsl_fs1x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/bloom_combine_ogl_glsl_fs1x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/bloom_combine_ogl_glsl_fs1x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,25 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+uniform sampler2D tex0;
+uniform sampler2D tex1;
+
+void main(void)
+{
+    vec4 texCol0 = texture2D(tex0, gl_TexCoord[0].xy);
+    vec4 texCol1 = texture2D(tex1, gl_TexCoord[0].xy);
+    
+    gl_FragColor = texCol0 + 2.0 * texCol1;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/gen_shvol_extrude_ogl_glsl_vs1x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/gen_shvol_extrude_ogl_glsl_vs1x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/gen_shvol_extrude_ogl_glsl_vs1x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,54 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+@include "levelutil/shader/prog/ogl_glsl/" \
+        "include_stddef_ogl_glsl_vs1x0.s3d_shadercode_run"
+
+///////////////////////////////////////////////////////////////////////////////
+
+uniform vec4 lightCenRange;
+uniform vec4 lightExtrude;
+
+S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+S3D_MATBONE_DECL_STD(matBone)
+
+///////////////////////////////////////////////////////////////////////////////
+
+void main(void)
+{
+    S3D_BONE_TRANSF_STD(matBoneFinal, matBone, boneWgh, boneSubscr);
+    vec4 posView = matBoneFinal * gl_Vertex;
+    vec3 normalView = normalize((matBoneFinal * vec4(gl_Normal, 0.0)).xyz);
+
+    vec3 effLightCenRange = lightCenRange.xyz;
+
+@ifdef S3D_USE_BLOAT
+    // Bloat:
+    effLightCenRange.xyz -= normalView * lightExtrude.z;
+@endif    
+
+    // Calculate normalized extrusion direction vector:
+    vec3 dirNrm = normalize(posView.xyz - effLightCenRange.xyz);
+
+    // Extrude:
+    float prod = dot(dirNrm, normalView) * lightExtrude.w;
+    // Important! If the product is zero, extrusion must be off.
+    float sign = (prod > 0.0) ? 1.0 : 0.0;
+    float move = sign * lightExtrude.x + lightExtrude.y;
+    posView.xyz = move * dirNrm + posView.xyz;
+
+    // Transform:
+    gl_Position = gl_ProjectionMatrix * posView;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/bloom_bright_ogl_glsl_fs1x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/bloom_bright_ogl_glsl_fs1x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/bloom_bright_ogl_glsl_fs1x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,26 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+uniform sampler2D tex0;
+
+void main(void)
+{
+    vec2 mainTexCoord = gl_TexCoord[0].xy;
+
+    vec4 color = texture2D(tex0, mainTexCoord);
+    float intensity = max(color.x, max(color.y, color.z));
+    color = color * intensity;
+    gl_FragColor = color;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/comic_ogl_glsl_vs1x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/comic_ogl_glsl_vs1x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/comic_ogl_glsl_vs1x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,66 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+@include "levelutil/shader/prog/ogl_glsl/" \
+        "include_stddef_ogl_glsl_vs1x0.s3d_shadercode_run"
+
+///////////////////////////////////////////////////////////////////////////////
+
+void main(void)
+{
+    gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
+
+    vec4 posView = gl_ModelViewMatrix * gl_Vertex;
+    gl_FogFragCoord = posView.z / posView.w;
+
+    vec3 normalView = normalize(gl_NormalMatrix * gl_Normal);
+    vec4 diffuseOut = gl_FrontMaterial.emission;
+    vec4 specularOut = vec4(0);
+//!!! hack to detect nvidia
+#ifdef __GLSL_CG_DATA_TYPES
+    for(int i = 0; i < gl_MaxLights; i++)
+    {
+        s3d_ColPair result;
+        s3d_calcPointLightTerm(
+                result, posView.xyz, normalView, gl_FrontMaterial.shininess, 
+                gl_LightSource[i], gl_FrontLightProduct[i]);
+        diffuseOut += result.diffuse;    
+        specularOut += result.specular;    
+    }
+#else
+    s3d_ColPair result;
+    s3d_calcPointLightTerm(
+            result, posView.xyz, normalView, gl_FrontMaterial.shininess, 
+            gl_LightSource[0], gl_FrontLightProduct[0]);
+    diffuseOut += result.diffuse;    
+    specularOut += result.specular;    
+    
+    s3d_calcPointLightTerm(
+            result, posView.xyz, normalView, gl_FrontMaterial.shininess, 
+            gl_LightSource[1], gl_FrontLightProduct[1]);
+    diffuseOut += result.diffuse;    
+    specularOut += result.specular;    
+    
+    s3d_calcPointLightTerm(
+            result, posView.xyz, normalView, gl_FrontMaterial.shininess, 
+            gl_LightSource[2], gl_FrontLightProduct[2]);
+    diffuseOut += result.diffuse;    
+    specularOut += result.specular;    
+#endif
+         
+    gl_FrontColor = vec4(0,1,0,0);//gl_Color;
+    gl_TexCoord[0].x = dot(diffuseOut.xyz, vec3(0.3, 0.5, 0.2));
+    gl_TexCoord[0].y = 0.0;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/shvol_ogl_glsl_vs1x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/shvol_ogl_glsl_vs1x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/shvol_ogl_glsl_vs1x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,47 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+@include "levelutil/shader/prog/ogl_glsl/" \
+        "stddef_ogl_glsl_vs1x0.s3d_shadercode_run"
+
+///////////////////////////////////////////////////////////////////////////////
+
+uniform vec4 lightCenRange;
+uniform vec4 lightExtrude;
+
+S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+S3D_MATBONE_DECL_STD(matBone)
+
+///////////////////////////////////////////////////////////////////////////////
+
+void main(void)
+{
+    S3D_BONE_TRANSF_STD(matBoneFinal, matBone, boneWgh, boneSubscr);
+    vec4 posView = matBoneFinal * gl_Vertex;
+    vec3 normalView = normalize((matBoneFinal * vec4(gl_Normal, 0.0)).xyz);
+
+    // Calculate normalized extrusion direction vector:
+    vec3 dirNrm = normalize(posView.xyz - lightCenRange.xyz);
+
+    // Extrude:
+    float prod = dot(dirNrm, normalView) * lightExtrude.z;
+    // Important! If the product is zero, extrusion must be off.
+    float sign = (prod > 0.0) ? 1.0 : 0.0;
+    float move = sign * lightExtrude.x + lightExtrude.y;
+    posView.xyz = move * dirNrm + posView.xyz;
+
+    // Transform:
+    gl_Position = gl_ProjectionMatrix * posView;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/black_ogl_glsl_fs1x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/black_ogl_glsl_fs1x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/black_ogl_glsl_fs1x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,19 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+void main(void)
+{
+    gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/lightfilter_ogl_glsl_fs1x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/lightfilter_ogl_glsl_fs1x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/lightfilter_ogl_glsl_fs1x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,74 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+uniform sampler2D brightTex;
+
+uniform vec4 filterInfo;
+
+varying vec2 screen;
+varying vec2 scale;
+
+///////////////////////////////////////////////////////////////////////////////
+
+const vec2 offsPix0 = vec2( 1,  0);
+const vec2 offsPix1 = vec2(-1,  0);
+const vec2 offsPix2 = vec2( 0,  1);
+const vec2 offsPix3 = vec2( 0, -1);
+const vec2 offsPix4 = vec2( 1,  1);
+const vec2 offsPix5 = vec2(-1,  1);
+const vec2 offsPix6 = vec2( 1, -1);
+const vec2 offsPix7 = vec2(-1, -1);
+
+///////////////////////////////////////////////////////////////////////////////
+
+void main(void)
+{
+    // Main depth and color:
+
+    gl_FragColor = texture2D(brightTex, screen.xy);
+
+    float full = 2.0 * abs(gl_FragColor.x - 0.5);
+    float treshold = 0.99;
+    float delta = treshold - full;
+
+    if(delta >= 0.0)
+    {
+        // neightbor texture coordinates:
+        vec2 neigh0 = offsPix0 * scale.xy + screen.xy;
+        vec2 neigh1 = offsPix1 * scale.xy + screen.xy;
+        vec2 neigh2 = offsPix2 * scale.xy + screen.xy;
+        vec2 neigh3 = offsPix3 * scale.xy + screen.xy;
+        vec2 neigh4 = offsPix4 * scale.xy + screen.xy;
+        vec2 neigh5 = offsPix5 * scale.xy + screen.xy;
+        vec2 neigh6 = offsPix6 * scale.xy + screen.xy;
+        vec2 neigh7 = offsPix7 * scale.xy + screen.xy;
+
+        // Lookup colors:
+        
+        vec4 colA, colB;
+        colA.x = texture2D(brightTex, neigh0).x;
+        colA.y = texture2D(brightTex, neigh1).x;
+        colA.z = texture2D(brightTex, neigh2).x;
+        colA.w = texture2D(brightTex, neigh3).x;
+        colB.x = texture2D(brightTex, neigh4).x;
+        colB.y = texture2D(brightTex, neigh5).x;
+        colB.z = texture2D(brightTex, neigh6).x;
+        colB.w = texture2D(brightTex, neigh7).x;
+
+        float sum = gl_FragColor.x 
+                + dot(colA + colB, vec4(1.0, 1.0, 1.0, 1.0));
+        gl_FragColor = vec4(sum * 0.11111111);
+    }
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/gen_brightclear_ogl_glsl_fs1x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/gen_brightclear_ogl_glsl_fs1x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/gen_brightclear_ogl_glsl_fs1x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,19 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+void main (void)
+{
+    vec4 outCol = 0.0;
+    outCol.w = frac(100 * mainTexCoord[0].z / mainTexCoord[0].w);
+    gl_FragColor = outCol;
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/standard_ogl_glsl_vs1x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/standard_ogl_glsl_vs1x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/standard_ogl_glsl_vs1x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,76 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+@include "levelutil/shader/prog/ogl_glsl/" \
+        "include_stddef_ogl_glsl_vs1x0.s3d_shadercode_run"
+
+///////////////////////////////////////////////////////////////////////////////
+
+S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+S3D_MATBONE_DECL_STD(matBone)
+
+///////////////////////////////////////////////////////////////////////////////
+
+
+void main(void)
+{
+    S3D_BONE_TRANSF_STD(matBoneFinal, matBone, boneWgh, boneSubscr);
+    vec4 posView = matBoneFinal * gl_Vertex;
+    vec3 normalView = normalize((matBoneFinal * vec4(gl_Normal, 0.0)).xyz);
+
+    gl_Position = gl_ProjectionMatrix * posView; //
+    gl_FogFragCoord = posView.z / posView.w;
+
+    vec4 diffuseOut = gl_FrontMaterial.emission;
+    vec4 specularOut = vec4(0);
+
+//!!! hack to detect nvidia
+#ifdef __GLSL_CG_DATA_TYPES
+    for(int i = 0; i < gl_MaxLights; i++)
+    {
+        s3d_ColPair result;
+        s3d_calcPointLightTerm(
+                result, posView.xyz, normalView, gl_FrontMaterial.shininess, 
+                gl_LightSource[i], gl_FrontLightProduct[i]);
+        diffuseOut += result.diffuse;    
+        specularOut += result.specular;    
+    }
+#else
+    s3d_ColPair result;
+    s3d_calcPointLightTerm(
+            result, posView.xyz, normalView, gl_FrontMaterial.shininess, 
+            gl_LightSource[0], gl_FrontLightProduct[0]);
+    diffuseOut += result.diffuse;    
+    specularOut += result.specular;    
+    
+    s3d_calcPointLightTerm(
+            result, posView.xyz, normalView, gl_FrontMaterial.shininess, 
+            gl_LightSource[1], gl_FrontLightProduct[1]);
+    diffuseOut += result.diffuse;    
+    specularOut += result.specular;    
+    
+    s3d_calcPointLightTerm(
+            result, posView.xyz, normalView, gl_FrontMaterial.shininess, 
+            gl_LightSource[2], gl_FrontLightProduct[2]);
+    diffuseOut += result.diffuse;    
+    specularOut += result.specular;    
+         
+#endif
+
+    gl_FrontColor = diffuseOut;
+    gl_FrontSecondaryColor = specularOut;
+    gl_TexCoord[0] = gl_MultiTexCoord0;
+    gl_TexCoord[1] = gl_MultiTexCoord1;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/bloom_smooth_ogl_glsl_vs1x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/bloom_smooth_ogl_glsl_vs1x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/bloom_smooth_ogl_glsl_vs1x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,55 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+uniform vec4 passInfo;
+uniform vec4 tex0RcpSize;
+
+varying vec4 baseVec;
+
+void main(void)
+{
+    gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
+
+    vec4 posView = gl_ModelViewMatrix * gl_Vertex;
+    gl_FogFragCoord = posView.z / posView.w;
+
+    gl_FrontColor = gl_Color;
+    gl_TexCoord[0].xy = gl_MultiTexCoord0.xy;
+
+    // Scaling offset
+    float iter = passInfo.x;
+
+    // Use fractional basis value to reduce banding:
+    vec2 offsScale = tex0RcpSize.xy * pow(2.1, iter) * 0.5;
+
+    vec4 dirVec;
+    float fiter = mod(iter, 4.0);
+    if(fiter < 2.0)
+    {
+        if(fiter < 1.0)
+            dirVec = vec4(1.0, 0.0, 0.0, 1.0); // Vectors (1, 0) and (0, 1)
+        else
+            dirVec = vec4(1.0, 1.0,-1.0, 1.0); // Vectors (1, 1) and (-1, 1)
+    }
+    else
+    {
+        if(fiter < 3.0)
+            dirVec = vec4(2.0, 1.0, -1.0, 2.0); // Vectors (2, 1) and (-1, 2)
+        else
+            dirVec = vec4(1.0, 2.0, -2.0, 1.0); // Vectors (1, 2) and (-2, 1)
+    }
+
+    baseVec = dirVec * offsScale.xyxy;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/partic_ogl_glsl_fs1x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/partic_ogl_glsl_fs1x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/partic_ogl_glsl_fs1x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+uniform sampler2D tex0;
+
+void main (void)
+{
+    vec4 outCol = gl_Color;
+    vec4 texCol = texture2D(tex0, vec2(gl_TexCoord[0]));
+    gl_FragColor = texCol * outCol;
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/plain_ogl_glsl_vs1x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/plain_ogl_glsl_vs1x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/plain_ogl_glsl_vs1x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,36 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+@include "levelutil/shader/prog/ogl_glsl/" \
+    "include_stddef_ogl_glsl_vs1x0.s3d_shadercode_run"
+
+///////////////////////////////////////////////////////////////////////////////
+
+S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+S3D_MATBONE_DECL_STD(matBone)
+
+///////////////////////////////////////////////////////////////////////////////
+
+void main(void)
+{
+    S3D_BONE_TRANSF_STD(matBoneFinal, matBone, boneWgh, boneSubscr);
+
+    vec4 posView = matBoneFinal * gl_Vertex;
+
+    gl_Position = gl_ProjectionMatrix * posView;
+    gl_FrontColor = gl_Color;
+    gl_TexCoord[0] = gl_MultiTexCoord0;
+
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/bump_ogl_glsl_vs1x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/bump_ogl_glsl_vs1x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/bump_ogl_glsl_vs1x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,87 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+@include "levelutil/shader/prog/ogl_glsl/" \
+    "include_stddef_ogl_glsl_vs1x0.s3d_shadercode_run"
+
+///////////////////////////////////////////////////////////////////////////////
+
+S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+S3D_MATBONE_DECL_STD(matBone)
+
+uniform vec4 lightCenRange;
+@ifdef S3D_LIGHT_BRIGHT
+uniform mat4 lightBrightMat;
+@endif
+@ifdef S3D_LIGHT_PROJ
+uniform mat4 lightProjMat;
+@endif
+@ifdef S3D_LIGHT_SHMAP
+uniform mat4 lightShmapMat;
+@endif
+
+///////////////////////////////////////////////////////////////////////////////
+
+@define S3D_NORMALIZE(v) normalize(v)
+//@define S3D_NORMALIZE(v) (v)
+
+///////////////////////////////////////////////////////////////////////////////
+
+void main(void)
+{
+    S3D_BONE_TRANSF_STD(matBoneFinal, matBone, boneWgh, boneSubscr);
+
+    vec4 posView = matBoneFinal * gl_Vertex;
+    vec3 normalView = (matBoneFinal * vec4(gl_Normal, 0.0)).xyz;
+    vec3 tangentUObj = S3D_NORMALIZE(gl_MultiTexCoord1.xyz);
+    vec3 tangentVObj = S3D_NORMALIZE(gl_MultiTexCoord2.xyz);
+    vec3 tangentUView = (matBoneFinal * vec4(tangentUObj, 0)).xyz;
+    vec3 tangentVView = (matBoneFinal * vec4(tangentVObj, 0)).xyz;
+
+    gl_Position = gl_ProjectionMatrix * posView;
+    gl_TexCoord[0] = gl_MultiTexCoord0;
+
+    gl_FogFragCoord = posView.z / posView.w;
+
+    vec3 camToVertView = posView.xyz;
+    vec3 vertToLightView = lightCenRange.xyz - camToVertView;    
+    vec3 vertToLightDirView = S3D_NORMALIZE(vertToLightView);
+    vec3 halfDirView = S3D_NORMALIZE(vertToLightDirView - camToVertView);
+    // ATI workaround: Don't use x component of gl_TexCoord[2]:
+    s3d_calcBump(
+            gl_TexCoord[1].xyz, gl_TexCoord[2].yzw,
+            normalView, vertToLightDirView, halfDirView,
+            tangentUView, tangentVView);
+    // Lightrange-factor: 1 - (lightpos - surfacepos)^2 / range^2
+    gl_TexCoord[3].xyz = vertToLightView / lightCenRange.w;
+
+@ifdef S3D_PARALLAX_MAPPING
+    gl_TexCoord[4].x = dot(tangentUView, camToVertView);
+    gl_TexCoord[4].y = dot(tangentVView, camToVertView);
+    gl_TexCoord[4].z = dot(normalView, camToVertView);
+@endif
+
+@ifdef S3D_LIGHT_BRIGHT
+    gl_TexCoord[5] = lightBrightMat * posView;
+    gl_TexCoord[6] = gl_Position;
+@endif
+
+@ifdef S3D_LIGHT_PROJ
+    gl_TexCoord[5] = lightProjMat * posView;
+@endif    
+@ifdef S3D_LIGHT_SHMAP
+    gl_TexCoord[6] = lightShmapMat * posView;
+@endif
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/bloom_combine_ogl_glsl_vs1x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/bloom_combine_ogl_glsl_vs1x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/bloom_combine_ogl_glsl_vs1x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,25 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+void main(void)
+{
+    gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
+
+    vec4 posView = gl_ModelViewMatrix * gl_Vertex;
+    gl_FogFragCoord = posView.z / posView.w;
+
+    gl_FrontColor = gl_Color;
+    gl_TexCoord[0].xy = gl_MultiTexCoord0.xy;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/.sconsign
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/.sconsign	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/.sconsign	(revision 2453)
@@ -0,0 +1,10 @@
+}q(U*bloom_smooth_ogl_glsl_vs1x0.s3d_shadercodeq(cSCons.Node.FS
+BuildInfo
+qoq}q(U	timestampqJÉEeFUcsigqJÉEeFubU)lightfilter_ogl_glsl_vs1x0.s3d_shadercodeq(hoq	}q
+(hJÉEeFhJÉEeFubU#black_ogl_glsl_vs1x0.s3d_shadercodeq
+(hoq
+}q
+(hJÉEeFhJÉEeFubU$partic_ogl_glsl_vs1x0.s3d_shadercodeq(hoq}q(hJÉEeFhJÉEeFubU*bloom_bright_ogl_glsl_vs1x0.s3d_shadercodeq(hoq}q(hJÉEeFhJÉEeFubU2include_shmap_filter_ogl_glsl_vs1x0.s3d_shadercodeq(hoq}q(hJÉEeFhJÉEeFubU+bloom_combine_ogl_glsl_vs1x0.s3d_shadercodeq(hoq}q(hJÉEeFhJÉEeFubU-gen_brightclear_ogl_glsl_fs1x0.s3d_shadercodeq(hoq}q
+(hJÉEeFhJÉEeFubU&standard_ogl_glsl_vs1x0.s3d_shadercodeq
+(hoq
+}q(hJÉEeFhJÉEeFubU"bump_ogl_glsl_vs1x0.s3d_shadercodeq (hoq!}q"(hJÉEeFhJÉEeFubU+bloom_combine_ogl_glsl_fs1x0.s3d_shadercodeq#(hoq$}q%(hJÉEeFhJÉEeFubU*bloom_bright_ogl_glsl_fs1x0.s3d_shadercodeq&(hoq'}q((hJÉEeFhJÉEeFubU"bump_ogl_glsl_fs1x0.s3d_shadercodeq)(hoq*}q+(hJÉEeFhJÉEeFubU$partic_ogl_glsl_fs1x0.s3d_shadercodeq,(hoq-}q.(hJÉEeFhJÉEeFubU*bloom_smooth_ogl_glsl_fs1x0.s3d_shadercodeq/(hoq0}q1(hJÉEeFhJÉEeFubU#plain_ogl_glsl_vs1x0.s3d_shadercodeq2(hoq3}q4(hJÉEeFhJÉEeFubU/gen_shvol_extrude_ogl_glsl_vs1x0.s3d_shadercodeq5(hoq6}q7(hJÉEeFhJÉEeFubU#comic_ogl_glsl_vs1x0.s3d_shadercodeq8(hoq9}q:(hJÉEeFhJÉEeFubU#shvol_ogl_glsl_vs1x0.s3d_shadercodeq;(hoq<}q=(hJÉEeFhJÉEeFubU-gen_brightclear_ogl_glsl_vs1x0.s3d_shadercodeq>(hoq?}q@(hJÉEeFhJÉEeFubU)lightfilter_ogl_glsl_fs1x0.s3d_shadercodeqA(hoqB}qC(hJÉEeFhJÉEeFubU#comic_ogl_glsl_fs1x0.s3d_shadercodeqD(hoqE}qF(hJÉEeFhJÉEeFubU&standard_ogl_glsl_fs1x0.s3d_shadercodeqG(hoqH}qI(hJÉEeFhJÉEeFubU,gen_shvol_view_ogl_glsl_vs1x0.s3d_shadercodeqJ(hoqK}qL(hJÉEeFhJÉEeFubU#black_ogl_glsl_fs1x0.s3d_shadercodeqM(hoqN}qO(hJÉEeFhJÉEeFubU,include_shmap_filter_ogl_glsl.s3d_shadercodeqP(hoqQ}qR(hJÉEeFhJÉEeFubU,include_stddef_ogl_glsl_vs1x0.s3d_shadercodeqS(hoqT}qU(hJÉEeFhJÉEeFubu.
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/bloom_bright_ogl_glsl_vs1x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/bloom_bright_ogl_glsl_vs1x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/bloom_bright_ogl_glsl_vs1x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,25 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+void main(void)
+{
+    gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
+
+    vec4 posView = gl_ModelViewMatrix * gl_Vertex;
+    gl_FogFragCoord = posView.z / posView.w;
+
+    gl_FrontColor = gl_Color;
+    gl_TexCoord[0].xy = gl_MultiTexCoord0.xy;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/comic_ogl_glsl_fs1x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/comic_ogl_glsl_fs1x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/comic_ogl_glsl_fs1x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,20 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+uniform sampler2D tex0;
+
+void main (void)
+{
+    vec4 texCol = texture2D(tex0, vec2(gl_TexCoord[0]));
+    gl_FragColor = texCol * gl_Color;
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/black_ogl_glsl_vs1x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/black_ogl_glsl_vs1x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/black_ogl_glsl_vs1x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,19 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+void main(void)
+{
+    gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/include_stddef_ogl_glsl_vs1x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/include_stddef_ogl_glsl_vs1x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/include_stddef_ogl_glsl_vs1x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,160 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+@ifndef STDDEF_OGL_GLSL_SC
+@define STDDEF_OGL_GLSL_SC
+
+///////////////////////////////////////////////////////////////////////////////
+
+// default to 4 for bone transformation w/o bone subcriptions
+@ifndef S3D_MATBONE_CNT
+@define S3D_MATBONE_CNT 4
+@endif
+
+@ifdef S3D_USE_BONESUBSCR    
+
+@define S3D_BONE_TRANSF_SUBSCR(matBoneFinal, matBone, boneWgh, boneSubscr) \
+    matBoneFinal \
+        = boneWgh.x * matBone[int(boneSubscr.x)] \
+        + boneWgh.y * matBone[int(boneSubscr.y)] \
+        + boneWgh.z * matBone[int(boneSubscr.z)] \
+        + boneWgh.w * matBone[int(boneSubscr.w)];
+
+@define S3D_BONE_DECL_STD(boneWgh, boneSubscr) \
+        attribute vec4 boneWgh; \
+        attribute vec4 boneSubscr;
+
+@define S3D_MATBONE_DECL_STD(matBone) \
+        uniform mat4 matBone[S3D_MATBONE_CNT];
+
+@define S3D_BONE_TRANSF_STD(matBoneFinal, matBone, boneWgh, boneSubscr) \
+        mat4 matBoneFinal; \
+        S3D_BONE_TRANSF_SUBSCR(matBoneFinal, matBone, boneWgh, boneSubscr)
+        
+@else
+
+@ifdef S3D_USE_BONEWGH
+
+@define S3D_BONE_TRANSF_WGH(matBoneFinal, matBone, boneWgh) \
+    matBoneFinal \
+        = boneWgh.x * matBone[0] \
+        + boneWgh.y * matBone[1] \
+        + boneWgh.z * matBone[2] \
+        + boneWgh.w * matBone[3];
+
+@define S3D_BONE_DECL_STD(boneWgh, boneSubscr) \
+        attribute vec4 boneWgh;
+
+@define S3D_MATBONE_DECL_STD(matBone) \
+        uniform mat4 matBone[S3D_MATBONE_CNT];
+
+@define S3D_BONE_TRANSF_STD(matBoneFinal, matBone, boneWgh, boneSubscr) \
+        mat4 matBoneFinal; \
+        S3D_BONE_TRANSF_WGH(matBoneFinal, matBone, boneWgh)
+        
+@else
+
+@define S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+
+@define S3D_MATBONE_DECL_STD(matBone)
+
+@define S3D_BONE_TRANSF_STD(matBoneFinal, matBone, boneWgh, boneSubscr) \
+        mat4 matBoneFinal = gl_ModelViewMatrix
+
+@endif
+
+@endif
+
+///////////////////////////////////////////////////////////////////////////////
+
+float s3d_calcLightRangeFac(float dist, vec4 posRange)
+{
+    float lightRsqRange = 1.0 / (posRange.w * posRange.w);
+    float rangeFac = max(1.0 - dist * dist * lightRsqRange, 0.0);
+    return rangeFac;
+}
+
+float s3d_calcLightRangeFac(float dist, float quadraticAtten)
+{
+    float lightRsqRange = quadraticAtten * 0.25;
+    float rangeFac = max(1.0 - dist * dist * lightRsqRange, 0.0);
+    return rangeFac;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct s3d_ColPair
+{
+   vec4 diffuse;
+   vec4 specular;
+};
+
+@define s3d_calcPointLightTermImpl( \
+        result, camToVertView, normalView, mtrlPower, \
+        lightPos, lightAmbient, lightDiffuse, lightSpecular, quadraticAtten) \
+{ \
+    vec3 vertToLightDirView = normalize(lightPos.xyz - camToVertView.xyz); \
+    float normalDotVertToLightDir = dot(normalView, vertToLightDirView); \
+    vec3 camToVertDirView = normalize(camToVertView.xyz); \
+    vec3 HalfDirView = normalize(vertToLightDirView - camToVertDirView); \
+    float normalDotHalfDir= dot(normalView, HalfDirView); \
+\
+    float dist = length(lightPos.xyz - camToVertView.xyz); \
+    float rangeFac = s3d_calcLightRangeFac(dist, quadraticAtten); \
+    float specular = pow(max(0.0, normalDotHalfDir), mtrlPower) * rangeFac; \
+\
+    result.diffuse = lightAmbient * rangeFac; \
+    float diffuse = normalDotVertToLightDir * rangeFac; \
+    result.diffuse += lightDiffuse * diffuse; \
+    result.specular = lightSpecular * specular; \
+}
+
+@define s3d_calcPointLightTerm( \
+        result, camToVertView, normalView, mtrlPower, light, lightProd) \
+{ \
+    s3d_calcPointLightTermImpl( \
+            result, camToVertView, normalView, mtrlPower, light.position, \
+            lightProd.ambient, lightProd.diffuse, \
+            lightProd.specular, light.quadraticAttenuation); \
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+void s3d_calcBump(
+    out vec3 diffuseDirSurf, out vec3 specularDirSurf,
+    vec3 normalView, vec3 vertToLightDirView, vec3 halfDirView,
+    vec3 tangentUView, vec3 tangentVView)
+{
+    diffuseDirSurf.x = dot(tangentUView, vertToLightDirView);
+    diffuseDirSurf.y = dot(tangentVView, vertToLightDirView);
+    diffuseDirSurf.z = dot(normalView, vertToLightDirView);
+
+    specularDirSurf.x = dot(tangentUView, halfDirView);
+    specularDirSurf.y = dot(tangentVView, halfDirView);
+    specularDirSurf.z = dot(normalView, halfDirView);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+vec3 s3d_uncomprNormal(vec3 comprNormal)
+{
+@ifdef S3D_COMPR_NORMAL
+    return comprNormal / 127.5 - 1;
+@else
+    return comprNormal;
+@endif    
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+@endif // STDDEF_OGL_GLSL_SC
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/lightfilter_ogl_glsl_vs1x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/lightfilter_ogl_glsl_vs1x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/lightfilter_ogl_glsl_vs1x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,38 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+uniform vec4 tex0RcpSize;
+uniform vec4 passInfo;
+
+varying vec2 screen;
+varying vec2 scale;
+
+///////////////////////////////////////////////////////////////////////////////
+
+void main(void)
+{
+    // Transform position to clip space
+    gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
+
+    // Smoothing parameters:
+    // Go from wide to small to avoid artifacts in case of depth jumps.
+    // Use pow(2,iter) instead of pow(3,iter), 
+    // because this gives a better quality:
+    float iter = passInfo.x;
+    float smooth = exp2(iter);
+    
+    screen.xy = gl_MultiTexCoord0.xy;
+    scale.xy = tex0RcpSize.xy * smooth;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/gen_shvol_view_ogl_glsl_vs1x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/gen_shvol_view_ogl_glsl_vs1x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/gen_shvol_view_ogl_glsl_vs1x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,29 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+@include "levelutil/shader/prog/ogl_glsl/" \
+        "include_stddef_ogl_glsl_vs1x0.s3d_shadercode_run"
+
+///////////////////////////////////////////////////////////////////////////////
+
+void main(void)
+{
+    // Transform:
+    gl_Position = gl_ProjectionMatrix * gl_Vertex;
+
+    // Colors for inspecting:    
+    gl_FrontColor = vec4(1.0);
+    gl_BackColor = vec4(1.0);
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/gen_brightclear_ogl_glsl_vs1x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/gen_brightclear_ogl_glsl_vs1x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/gen_brightclear_ogl_glsl_vs1x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,33 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+@include "levelutil/shader/prog/ogl_glsl/" \
+        "include_stddef_ogl_glsl_vs1x0.s3d_shadercode_run"
+
+///////////////////////////////////////////////////////////////////////////////
+
+S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+S3D_MATBONE_DECL_STD(matBone)
+
+///////////////////////////////////////////////////////////////////////////////
+
+void main(void)
+{
+    S3D_BONE_TRANSF_STD(matBoneFinal, matBone, boneWgh, boneSubscr);
+    vec4 posView = matBoneFinal * gl_Vertex;
+
+    gl_Position = gl_ProjectionMatrix * posView;
+    gl_TexCoord[0] = gl_Position;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/include_shmap_filter_ogl_glsl.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/include_shmap_filter_ogl_glsl.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/include_shmap_filter_ogl_glsl.s3d_shadercode	(revision 2453)
@@ -0,0 +1,123 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef SHMAP_FILTER_D3D9_HLSL_SC
+#define SHMAP_FILTER_D3D9_HLSL_SC
+
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef S3D_SHMAP_ZBIAS
+#define S3D_SHMAP_ZBIAS 0
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+
+float s3d_shmapFilter(
+        sampler lightShmapSamp,
+        float4 lightShmapCoord,
+        float4 lightShmapSize,
+        float4 lightShmapRcpSize)
+{
+@ifdef S3D_LIGHT_SHMAP
+    float shmapVal = s3d_shmapFilter(
+            lightShmapSamp, lightShmapCoord,
+            lightShmapSize, lightShmapRcpSize);
+@ifdef S3D_SHMAP_FILTER16
+    vec2 shmapCoordRaw 
+            = lightShmapCoord.xy * lightShmapSize.xy / lightShmapCoord.w;
+    vec2 shmapCoordFull = shmapCoordRaw + vec2(0.5, 0.5);
+    vec2 shmapCoordBase = floor(shmapCoordFull);
+    vec2 shmapCoordFrac = shmapCoordFull - shmapCoordBase;
+    vec4 shmapCoordBaseAB = lightShmapRcpSize.xyxy * (
+            shmapCoordBase.xyxy + vec4(-1.5, 0, -0.5, 0));
+    vec4 shmapCoordBaseCD = lightShmapRcpSize.xyxy * (
+            shmapCoordBase.xyxy + vec4(+0.5, 0, +1.5, 0));
+    vec4 shmapDeltaXY = lightShmapRcpSize.xyxy * vec4(0, -1.5, 0, -0.5);
+    vec4 shmapDeltaZW = lightShmapRcpSize.xyxy * vec4(0, +0.5, 0, +1.5);
+
+    vec4 shmapCoordAXY = shmapCoordBaseAB.xyxy + shmapDeltaXY.xyzw;
+    vec4 shmapCoordAZW = shmapCoordBaseAB.xyxy + shmapDeltaZW.xyzw;
+    vec4 shmapValA;
+    shmapValA.x = texture2D(lightShmapSamp, shmapCoordAXY.xy).x;
+    shmapValA.y = texture2D(lightShmapSamp, shmapCoordAXY.zw).x;
+    shmapValA.z = texture2D(lightShmapSamp, shmapCoordAZW.xy).x;
+    shmapValA.w = texture2D(lightShmapSamp, shmapCoordAZW.zw).x;
+    vec4 shmapCoordBXY = shmapCoordBaseAB.zwzw + shmapDeltaXY.xyzw;
+    vec4 shmapCoordBZW = shmapCoordBaseAB.zwzw + shmapDeltaZW.xyzw;
+    vec4 shmapValB;
+    shmapValB.x = texture2D(lightShmapSamp, shmapCoordBXY.xy).x;
+    shmapValB.y = texture2D(lightShmapSamp, shmapCoordBXY.zw).x;
+    shmapValB.z = texture2D(lightShmapSamp, shmapCoordBZW.xy).x;
+    shmapValB.w = texture2D(lightShmapSamp, shmapCoordBZW.zw).x;
+    vec4 shmapCoordCXY = shmapCoordBaseCD.xyxy + shmapDeltaXY.xyzw;
+    vec4 shmapCoordCZW = shmapCoordBaseCD.xyxy + shmapDeltaZW.xyzw;
+    vec4 shmapValC;
+    shmapValC.x = texture2D(lightShmapSamp, shmapCoordCXY.xy).x;
+    shmapValC.y = texture2D(lightShmapSamp, shmapCoordCXY.zw).x;
+    shmapValC.z = texture2D(lightShmapSamp, shmapCoordCZW.xy).x;
+    shmapValC.w = texture2D(lightShmapSamp, shmapCoordCZW.zw).x;
+    vec4 shmapCoordDXY = shmapCoordBaseCD.zwzw + shmapDeltaXY.xyzw;
+    vec4 shmapCoordDZW = shmapCoordBaseCD.zwzw + shmapDeltaZW.xyzw;
+    vec4 shmapValD;
+    shmapValD.x = texture2D(lightShmapSamp, shmapCoordDXY.xy).x;
+    shmapValD.y = texture2D(lightShmapSamp, shmapCoordDXY.zw).x;
+    shmapValD.z = texture2D(lightShmapSamp, shmapCoordDZW.xy).x;
+    shmapValD.w = texture2D(lightShmapSamp, shmapCoordDZW.zw).x;
+    
+    vec4 brightA = step(lightShmapCoord.zzzz, shmapValA * lightShmapCoord.w);
+    vec4 brightB = step(lightShmapCoord.zzzz, shmapValB * lightShmapCoord.w);
+    vec4 brightC = step(lightShmapCoord.zzzz, shmapValC * lightShmapCoord.w);
+    vec4 brightD = step(lightShmapCoord.zzzz, shmapValD * lightShmapCoord.w);
+    vec4 sumRow = brightA + brightB + brightC 
+            + shmapCoordFrac.x * (brightD - brightA);
+    vec4 colWgh = vec4(1, 1, 1, 0) 
+            + shmapCoordFrac.y * vec4(-1, 0, 0, 1);
+    float sum = dot(sumRow, colWgh);
+    float shmapVal = sum * (1.0 / 9.0);
+@else
+@ifdef S3D_SHMAP_FILTER4
+    vec2 shmapCoordRaw
+            = lightShmapCoord.xy * lightShmapSize.xy / lightShmapCoord.w;
+    vec2 shmapCoordFull = shmapCoordRaw + vec2(0.5, 0.5);
+    vec2 shmapCoordBase = floor(shmapCoordFull);
+    vec2 shmapCoordFrac = shmapCoordFull - shmapCoordBase;
+    vec4 shmapCoordBaseAB = lightShmapRcpSize.xyxy * (
+            shmapCoordBase.xyxy + vec4(-0.5, 0, +0.5, 0));
+    vec4 shmapDelta = lightShmapRcpSize.xyxy * vec4(0, -0.5, 0, +0.5);
+
+    vec4 shmapCoordA = shmapCoordBaseAB.xyxy + shmapDelta.xyzw;
+    vec4 shmapCoordB = shmapCoordBaseAB.zwzw + shmapDelta.xyzw;
+    vec4 shmapVec;
+    shmapVec.x = texture2D(lightShmapSamp, shmapCoordA.xy).x;
+    shmapVec.y = texture2D(lightShmapSamp, shmapCoordA.zw).x;
+    shmapVec.z = texture2D(lightShmapSamp, shmapCoordB.xy).x;
+    shmapVec.w = texture2D(lightShmapSamp, shmapCoordB.zw).x;
+    
+    vec4 brightVec 
+        = step(lightShmapCoord.zzzz, shmapVec * lightShmapCoord.w);
+    vec2 sumRow = brightVec.xy 
+            + shmapCoordFrac.x * (brightVec.zw - brightVec.xy);
+    float shmapVal = sumRow.x 
+            + shmapCoordFrac.y * (sumRow.y - sumRow.x);
+@else
+    float shmapVal = texture2DProj(lightShmapSamp, lightShmapCoord.xyw).x;
+    float shmapVal = step(lightShmapCoord.z, 
+            shmapVal * lightShmapCoord.w);
+@endif
+@endif
+@endif
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/include_shmap_filter_ogl_glsl_vs1x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/include_shmap_filter_ogl_glsl_vs1x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/include_shmap_filter_ogl_glsl_vs1x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,124 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+@ifndef SHMAP_FILTER_OGL_GLSL_SC
+@define SHMAP_FILTER_OGL_GLSL_SC
+
+///////////////////////////////////////////////////////////////////////////////
+
+@ifndef S3D_SHMAP_ZBIAS
+@define S3D_SHMAP_ZBIAS 0.0
+@endif
+
+///////////////////////////////////////////////////////////////////////////////
+
+float s3d_shmapFilter(
+        sampler2D lightShmapSamp,
+        vec4 lightShmapCoord,
+        vec4 lightShmapSize,
+        vec4 lightShmapRcpSize)
+{
+@ifdef S3D_SHMAP_FILTER16
+    vec2 shmapCoordRaw 
+            = lightShmapCoord.xy * lightShmapSize.xy / lightShmapCoord.w;
+    vec2 shmapCoordFull = shmapCoordRaw + vec2(0.5, 0.5);
+    vec2 shmapCoordBase = floor(shmapCoordFull);
+    vec2 shmapCoordFrac = shmapCoordFull - shmapCoordBase;
+    vec4 shmapCoordBaseAB = lightShmapRcpSize.xyxy * (
+            shmapCoordBase.xyxy + vec4(-1.5, 0, -0.5, 0));
+    vec4 shmapCoordBaseCD = lightShmapRcpSize.xyxy * (
+            shmapCoordBase.xyxy + vec4(+0.5, 0, +1.5, 0));
+    vec4 shmapDeltaXY = lightShmapRcpSize.xyxy * vec4(0, -1.5, 0, -0.5);
+    vec4 shmapDeltaZW = lightShmapRcpSize.xyxy * vec4(0, +0.5, 0, +1.5);
+
+    vec4 shmapCoordAXY = shmapCoordBaseAB.xyxy + shmapDeltaXY.xyzw;
+    vec4 shmapCoordAZW = shmapCoordBaseAB.xyxy + shmapDeltaZW.xyzw;
+    vec4 shmapValA;
+    shmapValA.x = texture2D(lightShmapSamp, shmapCoordAXY.xy).x;
+    shmapValA.y = texture2D(lightShmapSamp, shmapCoordAXY.zw).x;
+    shmapValA.z = texture2D(lightShmapSamp, shmapCoordAZW.xy).x;
+    shmapValA.w = texture2D(lightShmapSamp, shmapCoordAZW.zw).x;
+    vec4 shmapCoordBXY = shmapCoordBaseAB.zwzw + shmapDeltaXY.xyzw;
+    vec4 shmapCoordBZW = shmapCoordBaseAB.zwzw + shmapDeltaZW.xyzw;
+    vec4 shmapValB;
+    shmapValB.x = texture2D(lightShmapSamp, shmapCoordBXY.xy).x;
+    shmapValB.y = texture2D(lightShmapSamp, shmapCoordBXY.zw).x;
+    shmapValB.z = texture2D(lightShmapSamp, shmapCoordBZW.xy).x;
+    shmapValB.w = texture2D(lightShmapSamp, shmapCoordBZW.zw).x;
+    vec4 shmapCoordCXY = shmapCoordBaseCD.xyxy + shmapDeltaXY.xyzw;
+    vec4 shmapCoordCZW = shmapCoordBaseCD.xyxy + shmapDeltaZW.xyzw;
+    vec4 shmapValC;
+    shmapValC.x = texture2D(lightShmapSamp, shmapCoordCXY.xy).x;
+    shmapValC.y = texture2D(lightShmapSamp, shmapCoordCXY.zw).x;
+    shmapValC.z = texture2D(lightShmapSamp, shmapCoordCZW.xy).x;
+    shmapValC.w = texture2D(lightShmapSamp, shmapCoordCZW.zw).x;
+    vec4 shmapCoordDXY = shmapCoordBaseCD.zwzw + shmapDeltaXY.xyzw;
+    vec4 shmapCoordDZW = shmapCoordBaseCD.zwzw + shmapDeltaZW.xyzw;
+    vec4 shmapValD;
+    shmapValD.x = texture2D(lightShmapSamp, shmapCoordDXY.xy).x;
+    shmapValD.y = texture2D(lightShmapSamp, shmapCoordDXY.zw).x;
+    shmapValD.z = texture2D(lightShmapSamp, shmapCoordDZW.xy).x;
+    shmapValD.w = texture2D(lightShmapSamp, shmapCoordDZW.zw).x;
+    
+    vec4 brightA = step(lightShmapCoord.zzzz, 
+            (shmapValA + S3D_SHMAP_ZBIAS) * lightShmapCoord.w);
+    vec4 brightB = step(lightShmapCoord.zzzz, 
+            (shmapValB + S3D_SHMAP_ZBIAS) * lightShmapCoord.w);
+    vec4 brightC = step(lightShmapCoord.zzzz, 
+            (shmapValC + S3D_SHMAP_ZBIAS) * lightShmapCoord.w);
+    vec4 brightD = step(lightShmapCoord.zzzz, 
+            (shmapValD + S3D_SHMAP_ZBIAS) * lightShmapCoord.w);
+    vec4 sumRow = brightA + brightB + brightC 
+            + shmapCoordFrac.x * (brightD - brightA);
+    vec4 colWghBase = vec4(1.0 / 9.0, 1.0 / 9.0, 1.0 / 9.0, 0);
+    vec4 colWghDelta = vec4(-1.0 / 9.0, 0, 0, 1.0 / 9.0);
+    vec4 colWgh = colWghBase + shmapCoordFrac.y * colWghDelta;
+    float bright = dot(sumRow, colWgh);
+@else
+@ifdef S3D_SHMAP_FILTER4
+    vec4 shmapCoordRaw 
+            = lightShmapCoord.xy * lightShmapSize / lightShmapCoord.w;
+    vec4 shmapCoordFull = shmapCoordRaw + vec4(0.5, 0.5);
+    vec4 shmapCoordBase = floor(shmapCoordFull);
+    vec4 shmapCoordFrac = shmapCoordFull - shmapCoordBase;
+    vec4 shmapCoordBaseAB = lightShmapRcpSize.xyxy * (
+            shmapCoordBase.xyxy + vec4(-0.5, 0, +0.5, 0));
+    vec4 shmapDelta = lightShmapRcpSize.xyxy * vec4(0, -0.5, 0, +0.5);
+
+    vec4 shmapCoordA = shmapCoordBaseAB.xyxy + shmapDelta.xyzw;
+    vec4 shmapCoordB = shmapCoordBaseAB.zwzw + shmapDelta.xyzw;
+    vec4 shmapVec;
+    shmapVec.x = texture2D(lightShmapSamp, shmapCoordA.xy).x;
+    shmapVec.y = texture2D(lightShmapSamp, shmapCoordA.zw).x;
+    shmapVec.z = texture2D(lightShmapSamp, shmapCoordB.xy).x;
+    shmapVec.w = texture2D(lightShmapSamp, shmapCoordB.zw).x;
+    
+    vec4 brightVec 
+        = step(lightShmapCoord.zzzz, 
+            (shmapVec + S3D_SHMAP_ZBIAS) * lightShmapCoord.w);
+    vec4 sumRow = brightVec.xy 
+            + shmapCoordFrac.x * (brightVec.zw - brightVec.xy);
+    float bright = sumRow.x 
+            + shmapCoordFrac.y * (sumRow.y - sumRow.x);
+@else
+    float shmapVal = texture2DProj(lightShmapSamp, lightShmapCoord.xyzw).x;
+    float bright = step(lightShmapCoord.z, 
+            (shmapVal + S3D_SHMAP_ZBIAS) * lightShmapCoord.w);
+@endif
+@endif
+    return bright;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+@endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/standard_ogl_glsl_fs1x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/standard_ogl_glsl_fs1x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/standard_ogl_glsl_fs1x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,20 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+uniform sampler2D tex0;
+
+void main (void)
+{
+    vec4 texCol = texture2D(tex0, vec2(gl_TexCoord[0]));
+    gl_FragColor = texCol * gl_Color;
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/bloom_smooth_ogl_glsl_fs1x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/bloom_smooth_ogl_glsl_fs1x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/bloom_smooth_ogl_glsl_fs1x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,46 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+uniform sampler2D tex0;
+
+uniform vec4 passInfo;
+
+varying vec4 baseVec;
+
+void main(void)
+{
+    vec2 mainTexCoord = gl_TexCoord[0].xy;
+    vec2 offsPix0 = baseVec.xy;
+    vec2 offsPix1 = baseVec.zw;
+    vec2 offsPix2 = offsPix0 + offsPix1;
+    vec2 offsPix3 = offsPix0 - offsPix1;
+
+    vec4 val = texture2D(tex0, mainTexCoord);
+    vec4 val0 = texture2D(tex0, mainTexCoord.xy + offsPix0);
+    vec4 val1 = texture2D(tex0, mainTexCoord.xy + offsPix1);
+    vec4 val2 = texture2D(tex0, mainTexCoord.xy + offsPix2);
+    vec4 val3 = texture2D(tex0, mainTexCoord.xy + offsPix3);
+    vec4 val4 = texture2D(tex0, mainTexCoord.xy - offsPix0);
+    vec4 val5 = texture2D(tex0, mainTexCoord.xy - offsPix1);
+    vec4 val6 = texture2D(tex0, mainTexCoord.xy - offsPix2);
+    vec4 val7 = texture2D(tex0, mainTexCoord.xy - offsPix3);
+
+    vec4 sum
+        = (val * val + val0 * val0 + val1 * val1 + val2 * val2 + val3 * val3
+        + 0.5 * (val4 * val4 + val5 * val5 + val6 * val6 + val7 * val7))
+        * 0.142857; // = approx. 1.0 / 7.0
+
+   gl_FragColor = sqrt(sum);
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/partic_ogl_glsl_vs1x0.s3d_shadercode
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/partic_ogl_glsl_vs1x0.s3d_shadercode	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/ogl_glsl/partic_ogl_glsl_vs1x0.s3d_shadercode	(revision 2453)
@@ -0,0 +1,163 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+@include "levelutil/shader/prog/ogl_glsl/" \
+        "include_stddef_ogl_glsl_vs1x0.s3d_shadercode_run"
+
+///////////////////////////////////////////////////////////////////////////////
+
+S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+S3D_MATBONE_DECL_STD(matBone)
+
+uniform vec4 anim;        // Animation time between 0 and 1
+uniform vec4 colorAlpha;  // Color and alpha factor
+uniform vec4 param;       // x=Particle radius, y=Move-along-normal-factor
+uniform vec4 moveLin;     // Linear movement vector
+uniform vec4 moveQuadr;   // Quadratic movement vector
+uniform vec4 moveVari;    // Variation amount, see below
+uniform vec4 moveJiggle;  // Jiggle amount vector, see below.
+uniform vec4 shrink;      // x=fadeIn, y=fadeOut, z=flickerAmp, w=flickerVel
+uniform vec4 other;       // x=asyncFactor, y=repeat, z=jiggleVel, w=unused
+
+///////////////////////////////////////////////////////////////////////////////
+// Seed values:
+
+vec4 seedVariX = vec4(8576, 6968, 8285, 1375);
+vec4 seedVariY = vec4(9257, 7911, 4491, 4178);
+vec4 seedVariZ = vec4(9621, 7416, 9166, 1405);
+vec4 seedJiggleX = vec4(9809, 4760, 6104, 3046);
+vec4 seedJiggleY = vec4(7590, 5729, 8471, 1556);
+vec4 seedJiggleZ = vec4(9904, 0636, 4127, 5254);
+vec4 seedAnim = vec4(8891, 1068, 3747, 5529);
+vec4 seedRotU = vec4(3147, 0722, 3324, 7158);
+vec4 seedRotV = vec4(7020, 4337, 7956, 1530);
+
+///////////////////////////////////////////////////////////////////////////////
+// Utility functions:
+
+float quickSin(float phase)
+{
+    float rel = fract(phase) - 0.5;
+    float val = - 16.0 * rel * (0.5 - abs(rel));
+    return val;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+void main(void)
+{
+    float animRandom =  dot(gl_Vertex, seedAnim);
+    float curAnim = fract(other.x * animRandom + other.y * anim.x);
+    
+    // The movement direction is varied by a pseudo-random value.
+    vec3 variRandom;
+    variRandom.x = dot(gl_Vertex, seedVariX);
+    variRandom.y = dot(gl_Vertex, seedVariY);
+    variRandom.z = dot(gl_Vertex, seedVariZ);
+    vec3 variUnit = (2.0 * fract(variRandom) - 1.0);
+    vec3 variDelta = variUnit * moveVari.xyz;
+
+    // The particles jiggle in direction of a pseudo-random value.
+    vec3 jiggleRandom;
+    jiggleRandom.x = dot(gl_Vertex, seedJiggleX);
+    jiggleRandom.y = dot(gl_Vertex, seedJiggleY);
+    jiggleRandom.z = dot(gl_Vertex, seedJiggleZ);
+    vec3 jiggleUnit = (2.0 * fract(jiggleRandom) - 1.0);
+    vec3 jiggleDelta = jiggleUnit * moveJiggle.xyz 
+                    * quickSin(curAnim * other.z);
+    
+    // Move particle in object coordinates:
+    vec3 moveTot = moveLin.xyz;             // Move into constant direction
+    moveTot += gl_Normal * param.y;         // Move along normal vector
+    moveTot += curAnim * moveQuadr.xyz;     // Move along a quadratic curve
+    moveTot += variDelta;                   // Move into a random direction
+    vec4 posObj = gl_Vertex;
+    posObj.xyz += curAnim * moveTot;           // Add move
+    posObj.xyz += jiggleDelta;              // Jitter
+
+    // Transformation from object into view coordinates:
+    S3D_BONE_TRANSF_STD(matBoneFinal, matBone, boneWgh, boneSubscr);
+    vec4 posView = matBoneFinal * posObj;
+    
+    // Calculate effective particle radius.
+    // This includes fading in, fading out and flickering.
+    float fadeIn = curAnim * shrink.x;
+    float fadeOut = (1.0 - curAnim) * shrink.y;
+    float fade = min(1.0, min(fadeIn, fadeOut));
+    float flicker = 1.0 - shrink.z * quickSin(curAnim * shrink.w); 
+    float radius = param.x * flicker * fade;
+    
+    // Until now we only have the particle center.
+    // Now we alculate the corner coordinates.
+    // The particle is rotated by a pseudo-random angle:
+    vec2 rotRandom;
+    rotRandom.x = dot(gl_Vertex, seedRotU);
+    rotRandom.y = dot(gl_Vertex, seedRotV);
+    vec2 rotDir = normalize(fract(rotRandom) - vec2(0.5, 0.5));
+    vec2 rotU = radius * 1.4142 * rotDir;
+    vec2 rotV = vec2(- rotU.y, rotU.x);
+    vec2 coord = (gl_MultiTexCoord0.xy - vec2(0.5, 0.5));
+    posView.xy += rotU * coord.x + rotV * coord.y;
+
+    // Projection:
+    gl_Position = gl_ProjectionMatrix * posView; //
+    gl_TexCoord[0] = gl_MultiTexCoord0;
+    gl_FogFragCoord = posView.z / posView.w;
+
+    vec4 diffuseOut = gl_FrontMaterial.emission;
+    vec4 specularOut = vec4(0);
+
+@ifdef S3D_LIGHT_CNT
+// Work-around to detect nvidia:
+#ifdef __GLSL_CG_DATA_TYPES
+    for(int i = 0; i < gl_MaxLights; i++)
+    {
+        s3d_ColPair result;
+        s3d_calcPointLightTerm(
+                result, posView.xyz, normalView, gl_FrontMaterial.shininess, 
+                gl_LightSource[i], gl_FrontLightProduct[i]);
+        diffuseOut.rgb += result.diffuse.rgb;
+        specularOut.rgb += result.specular.rgb;
+    }
+#else
+    s3d_ColPair result;
+    s3d_calcPointLightTerm(
+            result, posView.xyz, vec3(0.0, 0.0, 0.0), 
+            gl_FrontMaterial.shininess, 
+            gl_LightSource[0], gl_FrontLightProduct[0]);
+    diffuseOut.rgb += result.diffuse.rgb;
+    specularOut.rgb += result.specular.rgb;
+    
+    s3d_calcPointLightTerm(
+            result, posView.xyz, vec3(0.0, 0.0, 0.0), 
+            gl_FrontMaterial.shininess, 
+            gl_LightSource[1], gl_FrontLightProduct[1]);
+    diffuseOut.rgb += result.diffuse.rgb;
+    specularOut.rgb += result.specular.rgb;
+    
+    s3d_calcPointLightTerm(
+            result, posView.xyz, vec3(0.0, 0.0, 0.0), 
+            gl_FrontMaterial.shininess, 
+            gl_LightSource[2], gl_FrontLightProduct[2]);
+    diffuseOut.rgb += result.diffuse.rgb;
+    specularOut.rgb += result.specular.rgb;         
+#endif
+    gl_FrontColor = diffuseOut * colorAlpha * gl_Color;
+    gl_FrontSecondaryColor = specularOut;
+@else
+    gl_FrontColor = colorAlpha * gl_Color;
+    gl_FrontSecondaryColor = vec4(0.0);
+@endif
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/plain_pointtex.s3d_shaderprog
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/plain_pointtex.s3d_shaderprog	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/plain_pointtex.s3d_shaderprog	(revision 2453)
@@ -0,0 +1,174 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Shader program configuration.
+// Different drivers access different parameters.
+
+ogl
+{
+    glsl
+    {
+        vertshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "plain_ogl_glsl_vs1x0.s3d_shadercode_run"
+            }
+
+            tracking
+            {
+                cnt 4
+                codevar "matBone[$]"
+                chan "bone"
+                trans "identity"
+            }
+
+            //  attribute vec4 bone_wgh;
+            bone_wgh "boneWgh"
+            //bone_subscr "boneSubscr"
+
+            predefine_array
+            {
+                name "S3D_USE_BONEWGH"
+            }
+        }
+    }
+}
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "plain_pointtex_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+
+        mtl
+        {
+            power_codevar ""
+            emissive_codevar "mtrlEmissive"
+        }
+
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "plain_pointtex_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "plain_pointtex_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+
+        mtl
+        {
+            power_codevar ""
+            emissive_codevar "mtrlEmissive"
+        }
+
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "plain_pointtex_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+
+        //fog_codevar "paramFog"
+    }
+}
+//#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gen_shmap.s3d_shaderprog
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gen_shmap.s3d_shaderprog	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gen_shmap.s3d_shaderprog	(revision 2453)
@@ -0,0 +1,108 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                & "gen_shmap_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            chan "bone"
+            trans "identity"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                & "gen_shmap_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                & "gen_shmap_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            chan "proj"
+            trans "identity"
+            slot 0
+        }
+        {
+            codevar "matBone"
+            chan "bone"
+            trans "identity"
+            slot 0
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                & "gen_shmap_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+    }
+}
+//#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/bloom_smooth.s3d_shaderprog
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/bloom_smooth.s3d_shaderprog	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/bloom_smooth.s3d_shaderprog	(revision 2453)
@@ -0,0 +1,148 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+ogl
+{
+    glsl
+    {
+        vertshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "bloom_smooth_ogl_glsl_vs1x0.s3d_shadercode_run"
+            }
+        }
+        fragshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "bloom_smooth_ogl_glsl_fs1x0.s3d_shadercode_run"
+            }
+        }
+
+        sampler_array "tex0"
+        tex_rcpsize_codevar_array "tex0RcpSize"
+
+        param_array
+        {
+            src_progvar "prog_passinfo"
+            dest_codevar "passInfo"
+            type "float4"
+        }
+    }
+}
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bloom_smooth_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+        }
+        tracking
+        {
+            codevar "matProjView"
+            slot 0
+            chan "projview"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+        param_array
+        {
+            src_progvar "prog_passinfo"
+            dest_codevar "passInfo"
+            type "float4"
+        }
+        mtl
+        {
+            emissive_codevar "mtrlEmissive"
+        }
+        tex_rcpsize_codevar_array "tex0RcpSize"
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bloom_smooth_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bloom_smooth_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+        }
+        tracking
+        {
+            codevar "matProjView"
+            slot 0
+            chan "projview"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+        param_array
+        {
+            src_progvar "prog_passinfo"
+            dest_codevar "passInfo"
+            type "float4"
+        }
+        mtl
+        {
+            emissive_codevar "mtrlEmissive"
+        }
+        tex_rcpsize_codevar_array "tex0RcpSize"
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bloom_smooth_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+    }
+}
+//#endif
+
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/bump.s3d_shaderprog
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/bump.s3d_shaderprog	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/bump.s3d_shaderprog	(revision 2453)
@@ -0,0 +1,328 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Shader program configuration.
+// Different drivers access different parameters.
+
+// Opengl Highlevel Shaderlanguage
+ogl
+{
+    glsl
+    {
+        vertshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "bump_ogl_glsl_vs1x0.s3d_shadercode_run"
+            }
+            tracking
+            {
+                cnt 4
+                codevar "matBone[$]"
+                chan "bone"
+                trans "identity"
+            }
+
+            //  attribute vec4 bone_wgh;
+            bone_wgh "boneWgh"
+            //bone_subscr "boneSubscr"
+
+            predefine_array
+            {
+                name "S3D_USE_BONEWGH"
+            }
+            {
+                name "S3D_PARALLAX_MAPPING"
+            }
+        }
+
+        fragshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "bump_ogl_glsl_fs1x0.s3d_shadercode_run"
+            }
+            predefine_array
+            {
+                name "S3D_SPECULAR_EXP"
+                val "4.0"
+            }
+            {
+                name "S3D_GEOMETRIC_SHADOW"
+            }
+            {
+                name "S3D_PARALLAX_MAPPING"
+            }
+            {
+                name "S3D_PARALLAX_SCALE"
+                val "0.07"
+            }
+            {
+                name "S3D_PARALLAX_BIAS"
+                val "0.50196078431372549" // = 128/255
+            }
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_cenrange"
+            dest_codevar "lightCenRange"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_ambient"
+            dest_codevar "lightAmbient"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_diffuse"
+            dest_codevar "lightDiffuse"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_specular"
+            dest_codevar "lightSpecular"
+            type "float4"
+        }
+
+        sampler_array "tex0" "normalSamp"
+    }
+}
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        // Code of the pixel program
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bump_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+            //debug_code_file "src/res/levelutil/shader/prog/d3d9_hlsl/"
+            //      & "bump_d3d9_hlsl_vs1x1.s3d_shadercode"
+        }
+
+
+        // Copy matrices into vertex program constants.
+        // The field "chan" can be one
+        // of "identity", "proj", "view" or "projview" "bone"
+        // The field "trans" can be one
+        // of "identity", "inv", "transp" or "invtransp"
+        // One matrix needs 4 constants.
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_cenrange"
+            dest_codevar "lightCenRange"
+            type "float4"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+        {
+            name "S3D_PARALLAX_MAPPING"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bump_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+        
+        param_array
+        {
+            src_progvar "prog_light_ambient"
+            dest_codevar "lightAmbient"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_diffuse"
+            dest_codevar "lightDiffuse"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_specular"
+            dest_codevar "lightSpecular"
+            type "float4"
+        }
+
+        predefine_array
+        {
+            name "S3D_SPECULAR_EXP"
+            val "4.0"
+        }
+        {
+            name "S3D_GEOMETRIC_SHADOW"
+        }
+        {
+            name "S3D_PARALLAX_MAPPING"
+        }
+        {
+            name "S3D_PARALLAX_SCALE"
+            val "0.07"
+        }
+        {
+            name "S3D_PARALLAX_BIAS"
+            val "0.50196078431372549" // = 128/255
+        }
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        // Code of the pixel program
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bump_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+            //debug_code_file "src/res/levelutil/shader/prog/d3d9_hlsl/"
+            //      & "bump_d3d9_hlsl_vs1x1.s3d_shadercode"
+        }
+
+
+        // Copy matrices into vertex program constants.
+        // The field "chan" can be one
+        // of "identity", "proj", "view" or "projview" "bone"
+        // The field "trans" can be one
+        // of "identity", "inv", "transp" or "invtransp"
+        // One matrix needs 4 constants.
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_cenrange"
+            dest_codevar "lightCenRange"
+            type "float4"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+        {
+            name "S3D_PARALLAX_MAPPING"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bump_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_ambient"
+            dest_codevar "lightAmbient"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_diffuse"
+            dest_codevar "lightDiffuse"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_specular"
+            dest_codevar "lightSpecular"
+            type "float4"
+        }
+
+        predefine_array
+        {
+            name "S3D_SPECULAR_EXP"
+            val "4.0"
+        }
+        {
+            name "S3D_GEOMETRIC_SHADOW"
+        }
+        {
+            name "S3D_PARALLAX_MAPPING"
+        }
+        {
+            name "S3D_PARALLAX_SCALE"
+            val "0.07"
+        }
+        {
+            name "S3D_PARALLAX_BIAS"
+            val "0.50196078431372549" // = 128/255
+        }
+    }
+}
+//#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/bloom_combine.s3d_shaderprog
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/bloom_combine.s3d_shaderprog	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/bloom_combine.s3d_shaderprog	(revision 2453)
@@ -0,0 +1,130 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+ogl
+{
+    glsl
+    {
+        vertshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "bloom_combine_ogl_glsl_vs1x0.s3d_shadercode_run"
+            }
+        }
+        fragshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "bloom_combine_ogl_glsl_fs1x0.s3d_shadercode_run"
+            }
+        }
+
+        sampler_array "tex0" "tex1"
+    }
+}
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bloom_combine_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+        }
+        tracking
+        {
+            codevar "matProjView"
+            slot 0
+            chan "projview"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+        mtl
+        {
+            emissive_codevar "mtrlEmissive"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bloom_combine_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+
+        param_array
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bloom_combine_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+        }
+        tracking
+        {
+            codevar "matProjView"
+            slot 0
+            chan "projview"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+        mtl
+        {
+            emissive_codevar "mtrlEmissive"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bloom_combine_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+
+        param_array
+    }
+}
+//#endif
+
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gtp_envmap_refract.s3d_shaderprog
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gtp_envmap_refract.s3d_shaderprog	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gtp_envmap_refract.s3d_shaderprog	(revision 2453)
@@ -0,0 +1,82 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                & "gtp_envmapSimple_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+        }
+        tracking
+        {
+            codevar "matProj"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matProjView"
+            slot 0
+            chan "projview"
+            trans "identity"
+        }
+{
+    codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+}
+{
+    codevar "matViewInvTrans"
+            slot 0
+            chan "view"
+            trans "invtransp"
+}
+
+param_array
+{
+    src_progvar "lastCenter"
+    dest_codevar "last_Center"
+    type "float4"
+}
+{
+    src_progvar "worldMat"
+    dest_codevar "worldMat"
+    type "float4x4"
+}
+{
+    src_progvar "worldMatIT"
+    dest_codevar "worldMatIT"
+    type "float4x4"
+}
+
+
+
+    }
+
+    hlsl_pixshader
+    {
+      code_variant_array
+      {
+            profile "3x0"
+            entry_point "refract"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gtp_envmapSimple_d3d9_hlsl_ps1x1.s3d_shadercode_run"
+      }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gtp_cau_photonmap.s3d_shaderprog
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gtp_cau_photonmap.s3d_shaderprog	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/gtp_cau_photonmap.s3d_shaderprog	(revision 2453)
@@ -0,0 +1,85 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "3x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                & "gtp_cau_photonmap_d3d9_hlsl_vs3x0.s3d_shadercode_run"
+        }
+        tracking
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+           // trans "invtransp"
+            trans "identity"
+        }       
+         {
+            codevar "modelViewInv"
+            slot 0
+            chan "view"
+           // trans "invtransp"
+            trans "inv"
+        }
+         param_array
+        //transforms from world space to light space
+        {
+            src_progvar "lightViewProj"
+            dest_codevar "lightViewProj"
+            type "float4x4"
+        }
+        //transforms from camera view to world space
+        {
+            src_progvar "viewToWorld"
+            dest_codevar "viewToWorld"
+            type "float4x4"
+        }
+        //inverse transpose of camera view to world space
+        {
+            src_progvar "viewToWorldInv"
+            dest_codevar "viewToWorldInv"
+            type "float4x4"
+        }
+        //light posiion in camera view space
+        {
+            src_progvar "lightPosView"
+            dest_codevar "lightPosView"
+            type "float4"
+        }
+        //center point of the distance cubemap in world space
+        {
+            src_progvar "lastCenter"
+            dest_codevar "lastCenter"
+            type "float4"
+        }
+        
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "3x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gtp_cau_photonmap_d3d9_hlsl_ps3x0.s3d_shadercode_run"
+        }
+        
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/bloom_bright.s3d_shaderprog
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/bloom_bright.s3d_shaderprog	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/bloom_bright.s3d_shaderprog	(revision 2453)
@@ -0,0 +1,126 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+ogl
+{
+    glsl
+    {
+        vertshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "bloom_bright_ogl_glsl_vs1x0.s3d_shadercode_run"
+            }
+        }
+        fragshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "bloom_bright_ogl_glsl_fs1x0.s3d_shadercode_run"
+            }
+        }
+
+        sampler_array "tex0"
+    }
+}
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile"1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bloom_bright_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+        }
+        tracking
+        {
+            codevar "matProjView"
+            slot 0
+            chan "projview"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+        mtl
+        {
+            emissive_codevar "mtrlEmissive"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bloom_bright_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile"1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bloom_bright_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+        }
+        tracking
+        {
+            codevar "matProjView"
+            slot 0
+            chan "projview"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+        mtl
+        {
+            emissive_codevar "mtrlEmissive"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bloom_bright_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+    }
+}
+//#endif
+
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/bump_mild.s3d_shaderprog
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/bump_mild.s3d_shaderprog	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/prog/bump_mild.s3d_shaderprog	(revision 2453)
@@ -0,0 +1,320 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Shader program configuration.
+// Different drivers access different parameters.
+
+// Opengl Highlevel Shaderlanguage
+ogl
+{
+    glsl
+    {
+        vertshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "bump_ogl_glsl_vs1x0.s3d_shadercode_run"
+            }
+            tracking
+            {
+                // uniform mat4 matBone[4];
+                cnt 4
+                codevar "matBone[$]"
+                chan "bone"
+                trans "identity"
+            }
+
+            //  attribute vec4 bone_wgh;
+            bone_wgh "boneWgh"
+            //bone_subscr "boneSubscr"
+
+            predefine_array
+            {
+                name "S3D_USE_BONEWGH"
+            }
+            {
+                name "S3D_PARALLAX_MAPPING"
+            }
+        }
+
+        fragshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "bump_ogl_glsl_fs1x0.s3d_shadercode_run"
+            }
+            predefine_array
+            {
+                name "S3D_SPECULAR_EXP"
+                val "4.0"
+            }
+            {
+                name "S3D_PARALLAX_MAPPING"
+            }
+            {
+                name "S3D_PARALLAX_SCALE"
+                val "0.07"
+            }
+            {
+                name "S3D_PARALLAX_BIAS"
+                val "0.50196078431372549" // = 128/255
+            }
+            {
+                name "S3D_MILD"
+                val "0.66666666"
+            }
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_cenrange"
+            dest_codevar "lightCenRange"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_ambient"
+            dest_codevar "lightAmbient"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_diffuse"
+            dest_codevar "lightDiffuse"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_specular"
+            dest_codevar "lightSpecular"
+            type "float4"
+        }
+
+        sampler_array "tex0" "normalSamp"
+    }
+}
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        // Code of the pixel program
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bump_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+            //debug_code_file "src/res/levelutil/shader/prog/d3d9_hlsl/"
+            //      & "bump_d3d9_hlsl_vs1x1.s3d_shadercode"
+        }
+
+
+        // Copy matrices into vertex program constants.
+        // The field "chan" can be one
+        // of "identity", "proj", "view" or "projview" "bone"
+        // The field "trans" can be one
+        // of "identity", "inv", "transp" or "invtransp"
+        // One matrix needs 4 constants.
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_cenrange"
+            dest_codevar "lightCenRange"
+            type "float4"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+        {
+            name "S3D_PARALLAX_MAPPING"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bump_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+        
+        param_array
+        {
+            src_progvar "prog_light_ambient"
+            dest_codevar "lightAmbient"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_diffuse"
+            dest_codevar "lightDiffuse"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_specular"
+            dest_codevar "lightSpecular"
+            type "float4"
+        }
+
+        predefine_array
+        {
+            name "S3D_SPECULAR_EXP"
+            val "4.0"
+        }
+        {
+            name "S3D_PARALLAX_MAPPING"
+        }
+        {
+            name "S3D_PARALLAX_SCALE"
+            val "0.07"
+        }
+        {
+            name "S3D_PARALLAX_BIAS"
+            val "0.50196078431372549" // = 128/255
+        }
+        {
+            name "S3D_MILD"
+            val "0.66666666"
+        }
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        // Code of the pixel program
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bump_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+            //debug_code_file "src/res/levelutil/shader/prog/d3d9_hlsl/"
+            //      & "bump_d3d9_hlsl_vs1x1.s3d_shadercode"
+        }
+
+
+        // Copy matrices into vertex program constants.
+        // The field "chan" can be one
+        // of "identity", "proj", "view" or "projview" "bone"
+        // The field "trans" can be one
+        // of "identity", "inv", "transp" or "invtransp"
+        // One matrix needs 4 constants.
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_cenrange"
+            dest_codevar "lightCenRange"
+            type "float4"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+        {
+            name "S3D_PARALLAX_MAPPING"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bump_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_ambient"
+            dest_codevar "lightAmbient"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_diffuse"
+            dest_codevar "lightDiffuse"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_specular"
+            dest_codevar "lightSpecular"
+            type "float4"
+        }
+
+        predefine_array
+        {
+            name "S3D_SPECULAR_EXP"
+            val "4.0"
+        }
+        {
+            name "S3D_PARALLAX_MAPPING"
+        }
+        {
+            name "S3D_PARALLAX_SCALE"
+            val "0.07"
+        }
+        {
+            name "S3D_PARALLAX_BIAS"
+            val "0.50196078431372549" // = 128/255
+        }
+        {
+            name "S3D_MILD"
+            val "0.66666666"
+        }
+    }
+}
+//#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/comic.s3d_shader
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/comic.s3d_shader	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/comic.s3d_shader	(revision 2453)
@@ -0,0 +1,168 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Definition of the shaders.
+// A shader is an object responsible for drawing objects.
+
+shader_array
+{
+    // Shader for a comic-like look
+    name "comic"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                usage "render"
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                insp_ident "showmesh"
+                insp_rank 80000
+                insp_color 1.0 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+                {
+                    triggers "drvlight_trigger"
+                    method "drvlight_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.drvlightcoll"
+            param
+            {
+                env "shaderenv"
+                reset_methods "main_method"
+                append_methods "drvlight_method"
+                
+                lightarray_var "lightarray"
+                diffuse_var "light_diffuse"
+                ambient_var "light_ambient"
+                specular_var "light_specular"
+                cenrange_var "light_cenrange"
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                // outline
+                methods "main_method"
+                rank 12000
+                insp_ident "showwire"
+
+                cull_mode "front"
+                depth_test "less_equal"
+                depth_write 1
+
+                fog_enabled 1
+                paint_mode "line"
+                paint_ext  3.0
+
+                shaderprog_ident "levelutil/shader/prog/"
+                        & "black.s3d_shaderprog_run"
+                shaderprog_param_array
+
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array
+                attrmat_var_array
+                
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+            }
+         }
+         {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                // fill interiour
+                methods "main_method"
+                rank 12000
+                insp_ident "showwire"
+
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+                use_vertex_coloralpha 1
+                fog_enabled 1
+                paint_mode "fill"
+                depth_bias_overlay 1.0
+                depth_bias_offs 1.0
+
+                mtl
+                {
+                    enabled 1
+                    diffuse 1. 1. 1.
+                }
+
+                lightarray_var "lightarray"
+
+                shaderprog_ident "levelutil/shader/prog/"
+                        & "comic.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/ordinary_transp.s3d_shader
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/ordinary_transp.s3d_shader	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/shader/ordinary_transp.s3d_shader	(revision 2453)
@@ -0,0 +1,144 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Triggers:
+// 1 - Main
+// 2 - Mark shadow volume
+// 4 - Unmark shadow volume
+// 8 - Render light.
+
+shader_array
+{
+    name "ordinary_transp"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                // mesh used for normal rendering
+                methods "init_method"
+                usage "render"
+                mesh_var "mesh"
+                texchan_var_array "tex0" "normalmap"
+                tex_attr_var_array "attr0"
+                tangentu_attr_var "tangentu"
+                tangentv_attr_var "tangentv"
+                insp_ident "showmesh"
+                insp_rank 80000
+                insp_color 1.0 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+                {
+                    triggers "drvlight_trigger" "light_trigger"
+                    method "drvlight_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                }
+            }
+        }
+        {
+            // collect 'basic' lights
+            ident "eng_shader_std.drvlightcoll"
+            param
+            {
+                env "shaderenv"
+                reset_methods "main_method"
+                append_methods "drvlight_method"
+
+                lightarray_var "lightarray"
+                diffuse_var "light_diffuse"
+                ambient_var "light_ambient"
+                specular_var "light_specular"
+                cenrange_var "light_cenrange"
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 34000
+                back_to_front 1
+                insp_ident "showwire"
+
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 0
+
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+
+                blend_col_src_fac "src_alpha"
+                blend_col_dest_fac "inv_src_alpha"
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+
+                mtl
+                {
+                    enabled 1
+                    ambient 0. 0. 0.
+                    diffuse 1. 1. 1.
+                    specular 0. 0. 0.
+                    emissive 0. 0. 0.
+                    specexp 0.
+                }
+
+                lightarray_var "lightarray"
+                shaderprog_ident "levelutil/shader/prog/"
+                        & "standard.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+    }
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/actor/.sconsign
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/actor/.sconsign	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/actor/.sconsign	(revision 2453)
@@ -0,0 +1,3 @@
+}qUdoor.s3d_perchq(cSCons.Node.FS
+BuildInfo
+qoq}q(U	timestampqJÊEeFUcsigqJÊEeFubs.
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/actor/door.s3d_perch
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/actor/door.s3d_perch	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/levelutil/actor/door.s3d_perch	(revision 2453)
@@ -0,0 +1,64 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+var int m_inside;       // Number of characters inside the sensor volume.
+var actor m_actu;       // Actuator to send the animation commands to.
+var actor m_speaker;    // Speaker used for playing the sound.
+
+func public void initActor()
+    m_inside = 0;
+    m_actu = findActor( getParamStr( "actu" ) );
+    m_speaker = findActor( getParamStr( "speaker" ) );
+end
+
+func public void finishActor()
+end
+
+// Open the door:
+func void open()
+    m_actu ^ play_to_end();
+    m_speaker ^ start();
+    var float duration = m_actu ^ float get_duration();
+    evtAppoint( "soundOff", duration );
+end
+
+// Close the door:
+func void close()
+    m_actu ^ play_to_start();
+    m_speaker ^ start();
+    var float duration = m_actu ^ float get_duration();
+    evtAppoint( "soundOff", duration );
+end
+
+// A character enters the sensor volume:
+func public void enter( actor sender )
+    if m_inside == 0 then
+        open();
+    end
+    m_inside = m_inside + 1;
+end
+
+// A character leaves the sensor volume:
+func public void leave( actor sender )
+    m_inside = m_inside - 1;
+    if m_inside == 0 then
+        close();
+    end
+end
+
+// Disable the sound:
+func public void soundOff()
+    m_speaker ^ stop();
+end
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/server/actor/.sconsign
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/server/actor/.sconsign	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/server/actor/.sconsign	(revision 2453)
@@ -0,0 +1,4 @@
+}q(Userverlink.s3d_actorq(cSCons.Node.FS
+BuildInfo
+qoq}q(U	timestampqJÊEeFUcsigqJÊEeFubUserver.s3d_actorq(hoq	}q
+(hJÊEeFhJÊEeFubu.
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/server/actor/serverlink.s3d_actor
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/server/actor/serverlink.s3d_actor	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/server/actor/serverlink.s3d_actor	(revision 2453)
@@ -0,0 +1,69 @@
+// Automatically generated Shark 3D Snake 1x0 Text Stream. Format: ascii.
+actor_ident "kit_base.group"
+actor_param
+{
+    // Delegate action calls to the children.
+    active 1
+    child_array
+    {
+        ident "kit_base.producer"
+        param
+        {
+            active 1
+            name "link_producer"
+            deleg_name "link_set"
+            ident "kit_base.capsule"
+            param
+            {
+                active 1
+                scope "serverlink"
+                local_name "capsule"
+                local_deleg_name "capsule_deleg"
+                deleg_target "dispatch_export"
+                child_ident "kit_base.group"
+                child_param
+                {
+                    active 1
+                    child_array
+                    {
+                        ident "kit_base.dispatch"
+                        param
+                        {
+                            name "dispatch_export"
+                            entry_array
+                            {
+                                cmds "destroy"
+                                targets "capsule"
+                            }
+                            {
+                                cmds "connect_net"
+                                    "poll_recv" "poll_send"
+                                targets "plug"
+                            }
+                        }
+                    }
+                    {
+                        ident "kit_engbase.plug"
+                        param
+                        {
+                            name "plug"
+                            deleg_name "plug_root"
+                            netlink_suppl "^^envcompsuppl"
+                            netlink_ident "eng_base.netlink"
+                            netlink_param
+                            {
+                                env "^^env"
+                            }
+                            netroot_target "^universe"
+                            lost_target "dispatch_export"
+                            lost_cmd "destroy"
+                            nettraverse_target "^universe_extern"
+                            nettraverse_cmd "traverse"
+                        }
+                    }
+                }
+            }
+        }
+    }
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/server/actor/server.s3d_actor
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/server/actor/server.s3d_actor	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/server/actor/server.s3d_actor	(revision 2453)
@@ -0,0 +1,231 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// This file describes the server.
+
+// The server has an own namespace:
+actor_ident "kit_base.capsule"
+actor_param
+{
+    active 1
+    scope "server"
+    local_name "capsule"
+    deleg_target "dispatch_export"
+    child_ident "kit_base.group"
+    child_param
+    {
+        active 1
+        child_array
+        {
+            // Dispatcher handling messages from outside the server.
+            ident "kit_base.dispatch"
+            param
+            {
+                name "dispatch_export"
+                entry_array
+                {
+                    // Create local player (not via networking):
+                    cmds "produce_player"
+                    targets "universe"
+                }
+            }
+        }
+        {
+            ident "kit_base.dispatch"
+            param
+            {
+                name "dispatch"
+                entry_array
+            }
+        }
+        {
+            // Dispatcher handling messages from the universe.
+            ident "kit_base.dispatch"
+            param
+            {
+                name "dispatch_universe"
+                entry_array
+                {
+                    cmds "get_basesuppl"
+                    targets "sersuppl"
+                    newcmd "get_obj"
+                }
+                {
+                    cmds "ignore_frmtime"
+                    targets "^root"
+                }
+                {
+                    cmds "cfg_access_int_info"
+                    targets "^cfg"
+                    newcmd "access_int_info"
+                }
+                {
+                    cmds "cfg_access_float_info"
+                    targets "^cfg"
+                    newcmd "access_float_info"
+                }
+                {
+                    cmds "cfg_access_str_info"
+                    targets "^cfg"
+                    newcmd "access_str_info"
+                }
+                {
+                    cmds "cfg_access_chunk_info"
+                    targets "^cfg"
+                    newcmd "access_chunk_info"
+                }
+                {
+                    cmds "universe_cfg_access_int_info"
+                    targets "universe_cfg"
+                    newcmd "access_int_info"
+                }
+                {
+                    cmds "universe_cfg_access_float_info"
+                    targets "universe_cfg"
+                    newcmd "access_float_info"
+                }
+                {
+                    cmds "universe_cfg_access_str_info"
+                    targets "universe_cfg"
+                    newcmd "access_str_info"
+                }
+                {
+                    cmds "universe_cfg_access_chunk_info"
+                    targets "universe_cfg"
+                    newcmd "access_chunk_info"
+                }
+            }
+        }
+        {
+            ident "kit_perch.mgr"
+            param
+            {
+                name "perchmgr"
+            }
+        }
+        {
+            ident "kit_snk.data"
+            param
+            {
+                name "universe_cfg"
+                val
+                {
+                    server 1
+                }
+            }
+        }
+        {
+            ident "kit_base.sersuppl"
+            param
+            {
+                name "sersuppl"
+                child "^basesuppl"
+            }
+        }
+        {
+            ident "kit_base.onaction"
+            param
+            {
+                active 1
+                name "poll_recv_onaction"
+                target "link_set"
+                cmd "poll_recv"
+            }
+        }
+        {
+            // Event queue
+            ident "kit_base.evtmgr"
+            param
+            {
+                active 1
+                name "evtmgr"
+                extcfg_actor "^cfg"
+                extcfg_entry_log "log.evtmgr"
+            }
+        }
+        {
+            // Include the universe definition:
+            ident "kit_engbase.extern"
+            param
+            {
+                active 1
+                name "universe_extern"
+                deleg_name "universe"
+                allow_no_target 1
+                res "universe/actor/universe.s3d_actor_run"
+                net_imprint 1
+            }
+        }
+        {
+            // External file describing the structure of each link:
+            ident "kit_base.extern"
+            param
+            {
+                // Delegate action calls to the child:
+                active 1
+                res "server/actor/serverlink.s3d_actor_run"
+            }
+        }
+        {
+            // Create a network engine.
+            ident "kit_io.neteng"
+            param
+            {
+                active 1
+                name "neteng"
+                // Get parameters from the actor "cfg", 
+                // which is defined above.
+                extcfg_actor "^cfg"
+                // Get the parameters from the "network" entry.
+                extcfg_entry_param "network"
+                given_array
+                {
+                    item "^env"
+                    given_ident "env"
+                }
+            }
+        }
+        {
+            // Actor waiting for connections from clients:
+            ident "kit_engbase.pluglisten"
+            param
+            {
+                name "pluglisten"
+                neteng "neteng"
+                link_producer "link_producer"
+                extcfg_actor "^cfg"
+                extcfg_entry_addr "server.addr"
+            }
+        }
+        {
+            ident "kit_base.onaction"
+            param
+            {
+                active 1
+                name "check_pluglisten_onaction"
+                target "pluglisten"
+                cmd "check"
+            }
+        }
+        {
+            ident "kit_base.onaction"
+            param
+            {
+                active 1
+                name "poll_send_onaction"
+                target "link_set"
+                cmd "poll_send"
+            }
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/bloom.s3d_bonepath
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/bloom.s3d_bonepath	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/bloom.s3d_bonepath	(revision 2453)
@@ -0,0 +1,14 @@
+// Machine-made Shark 3D Snake Text 2x0 Stream. Format: ascii.
+producer
+    "Shark 3D Exporter for Max v7000, Spinor GmbH (www.spinor.com), Copyright "
+    & "1996-2006 Spinor GmbH, shark3d_v5x0x6_t164x12u_c164x12u_enterpr_win32_v"
+    & "c7x1_release_fwin32vc7x1release"
+source
+    "C:\\Shark3D\\v5x0x6_t164x12u\\shark3_labour\\src\\res\\level\\model\\bloo"
+    & "m.max"
+format "shark3d_path_5"
+data
+{
+    path_array
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/bloom.s3d_model
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/bloom.s3d_model	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/bloom.s3d_model	(revision 2453)
@@ -0,0 +1,247 @@
+// Machine-made Shark 3D Snake Text 2x0 Stream. Format: ascii.
+producer
+    "Shark 3D Exporter for Max v7000, Spinor GmbH (www.spinor.com), Copyright "
+    & "1996-2006 Spinor GmbH, shark3d_v5x0x6_t164x12u_c164x12u_enterpr_win32_v"
+    & "c7x1_release_fwin32vc7x1release"
+source
+    "C:\\Shark3D\\v5x0x6_t164x12u\\shark3_labour\\src\\res\\level\\model\\bloo"
+    & "m.max"
+format "shark3d_model_5"
+data
+{
+    model_array
+    {
+        name "bloom"
+        range 0.0 3.33333
+        model_variant_array
+        {
+            kind_set "geo" "linehit" "render" "shvolstrict"
+            prec 0.0
+            family_array
+            {
+            }
+            vertex_array
+            {
+                frame_array
+                {
+                    point -321.867 -321.867 0.0
+                    normal 0.0 0.0 -1.0
+                }
+            }
+            {
+                frame_array
+                {
+                    point -321.867 321.867 0.0
+                    normal 0.0 0.0 -1.0
+                }
+            }
+            {
+                frame_array
+                {
+                    point 321.867 321.867 0.0
+                    normal 0.0 0.0 -1.0
+                }
+            }
+            {
+                frame_array
+                {
+                    point 321.867 -321.867 0.0
+                    normal 0.0 0.0 -1.0
+                }
+            }
+            {
+                frame_array
+                {
+                    point -321.867 -321.867 643.735
+                    normal 0.0 0.0 1.0
+                }
+            }
+            {
+                frame_array
+                {
+                    point 321.867 -321.867 643.735
+                    normal 0.0 0.0 1.0
+                }
+            }
+            {
+                frame_array
+                {
+                    point 321.867 321.867 643.735
+                    normal 0.0 0.0 1.0
+                }
+            }
+            {
+                frame_array
+                {
+                    point -321.867 321.867 643.735
+                    normal 0.0 0.0 1.0
+                }
+            }
+            {
+                frame_array
+                {
+                    point -321.867 -321.867 0.0
+                    normal 0.0 -1.0 0.0
+                }
+            }
+            {
+                frame_array
+                {
+                    point 321.867 -321.867 0.0
+                    normal 0.0 -1.0 0.0
+                }
+            }
+            {
+                frame_array
+                {
+                    point 321.867 -321.867 643.735
+                    normal 0.0 -1.0 0.0
+                }
+            }
+            {
+                frame_array
+                {
+                    point -321.867 -321.867 643.735
+                    normal 0.0 -1.0 0.0
+                }
+            }
+            {
+                frame_array
+                {
+                    point 321.867 -321.867 0.0
+                    normal 1.0 0.0 0.0
+                }
+            }
+            {
+                frame_array
+                {
+                    point 321.867 321.867 0.0
+                    normal 1.0 0.0 0.0
+                }
+            }
+            {
+                frame_array
+                {
+                    point 321.867 321.867 643.735
+                    normal 1.0 0.0 0.0
+                }
+            }
+            {
+                frame_array
+                {
+                    point 321.867 -321.867 643.735
+                    normal 1.0 0.0 0.0
+                }
+            }
+            {
+                frame_array
+                {
+                    point 321.867 321.867 0.0
+                    normal 0.0 1.0 0.0
+                }
+            }
+            {
+                frame_array
+                {
+                    point -321.867 321.867 0.0
+                    normal 0.0 1.0 0.0
+                }
+            }
+            {
+                frame_array
+                {
+                    point -321.867 321.867 643.735
+                    normal 0.0 1.0 0.0
+                }
+            }
+            {
+                frame_array
+                {
+                    point 321.867 321.867 643.735
+                    normal 0.0 1.0 0.0
+                }
+            }
+            {
+                frame_array
+                {
+                    point -321.867 321.867 0.0
+                    normal -1.0 0.0 0.0
+                }
+            }
+            {
+                frame_array
+                {
+                    point -321.867 -321.867 0.0
+                    normal -1.0 0.0 0.0
+                }
+            }
+            {
+                frame_array
+                {
+                    point -321.867 -321.867 643.735
+                    normal -1.0 0.0 0.0
+                }
+            }
+            {
+                frame_array
+                {
+                    point -321.867 321.867 643.735
+                    normal -1.0 0.0 0.0
+                }
+            }
+            face_array
+            {
+                family_idx 0
+                vertex_idx_array 0 1 2
+            }
+            {
+                family_idx 0
+                vertex_idx_array 2 3 0
+            }
+            {
+                family_idx 0
+                vertex_idx_array 4 5 6
+            }
+            {
+                family_idx 0
+                vertex_idx_array 6 7 4
+            }
+            {
+                family_idx 0
+                vertex_idx_array 8 9 10
+            }
+            {
+                family_idx 0
+                vertex_idx_array 10 11 8
+            }
+            {
+                family_idx 0
+                vertex_idx_array 12 13 14
+            }
+            {
+                family_idx 0
+                vertex_idx_array 14 15 12
+            }
+            {
+                family_idx 0
+                vertex_idx_array 16 17 18
+            }
+            {
+                family_idx 0
+                vertex_idx_array 18 19 16
+            }
+            {
+                family_idx 0
+                vertex_idx_array 20 21 22
+            }
+            {
+                family_idx 0
+                vertex_idx_array 22 23 20
+            }
+            prim_sphere_array
+            prim_capsule_array
+            prim_box_array
+        }
+    }
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/playermodel.s3d_bonepath
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/playermodel.s3d_bonepath	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/playermodel.s3d_bonepath	(revision 2453)
@@ -0,0 +1,13 @@
+// Machine-made Shark 3D Snake Text 2x0 Stream. Format: ascii.
+producer
+    "Shark 3D Exporter for Max v6000, Spinor GmbH (www.spinor.com), shark3d_v5"
+    & "x0x1_t153_c153_enterpr_win32_vc7x1_release_fwin32vc7x1release"
+source
+    "C:\\develop\\svn\\shark3d\\samples\\kit_empty_walk\\src\\res\\level\\mode"
+    & "l\\playermodel.max"
+format "shark3d_path_5"
+data
+{
+    path_array
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/playermodel.s3d_model
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/playermodel.s3d_model	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/playermodel.s3d_model	(revision 2453)
@@ -0,0 +1,37 @@
+// Machine-made Shark 3D Snake Text 2x0 Stream. Format: ascii.
+producer
+    "Shark 3D Exporter for Max v6000, Spinor GmbH (www.spinor.com), shark3d_v5"
+    & "x0x1_t153_c153_enterpr_win32_vc7x1_release_fwin32vc7x1release"
+source
+    "C:\\develop\\svn\\shark3d\\samples\\kit_empty_walk\\src\\res\\level\\mode"
+    & "l\\playermodel.max"
+format "shark3d_model_5"
+data
+{
+    model_array
+    {
+        name "scene_root"
+        range 0.0 3.33333
+        model_variant_array
+        {
+            kind_set "geo"
+            prec 0.0
+            family_array
+            {
+                mtl "character"
+            }
+            vertex_array
+            face_array
+            prim_sphere_array
+            prim_capsule_array
+            {
+                family_idx 0
+                start 0.0 0.0 0.7
+                end 0.0 0.0 1.3
+                radius 0.7
+            }
+            prim_box_array
+        }
+    }
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/pillar.obj
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/pillar.obj	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/pillar.obj	(revision 2453)
@@ -0,0 +1,3581 @@
+# This file uses centimeters as units for non-parametric coordinates.
+
+mtllib pillar.mtl
+g default
+v 0.276044 -1.151253 -0.114341
+v 0.211275 -1.151253 -0.211274
+v 0.114342 -1.151253 -0.276044
+v -0.000000 -1.151253 -0.298789
+v -0.114341 -1.151253 -0.276044
+v -0.211275 -1.151253 -0.211275
+v -0.276045 -1.151253 -0.114341
+v -0.298788 -1.151253 0.000000
+v -0.276045 -1.151253 0.114343
+v -0.211275 -1.151253 0.211275
+v -0.114342 -1.151253 0.276045
+v -0.000000 -1.151253 0.298789
+v 0.114342 -1.151253 0.276045
+v 0.211275 -1.151253 0.211277
+v 0.276044 -1.151253 0.114343
+v 0.298789 -1.151253 0.000000
+v 0.255292 1.231203 -0.105771
+v 0.195392 1.231203 -0.195417
+v 0.105745 1.231203 -0.255316
+v -0.000000 1.231203 -0.276351
+v -0.105745 1.231203 -0.255316
+v -0.195392 1.231203 -0.195418
+v -0.255292 1.231203 -0.105771
+v -0.276325 1.231203 -0.000025
+v -0.255292 1.231203 0.105720
+v -0.195392 1.231203 0.195366
+v -0.105745 1.231203 0.255266
+v -0.000000 1.231203 0.276300
+v 0.105745 1.231203 0.255266
+v 0.195392 1.231203 0.195367
+v 0.255292 1.231203 0.105720
+v 0.276326 1.231203 -0.000025
+v -0.000000 -1.151253 0.000000
+v -0.000000 1.231203 -0.000025
+v 0.146312 0.926071 -0.060630
+v 0.111982 0.926071 -0.112007
+v 0.060604 0.926071 -0.146337
+v -0.000000 0.926071 -0.158392
+v -0.060604 0.926071 -0.146337
+v -0.111982 0.926071 -0.112008
+v -0.146312 0.926071 -0.060630
+v -0.158367 0.926071 -0.000025
+v -0.146312 0.926071 0.060579
+v -0.111982 0.926071 0.111957
+v -0.060605 0.926071 0.146287
+v -0.000000 0.926071 0.158342
+v 0.060604 0.926071 0.146287
+v 0.111982 0.926071 0.111957
+v 0.146312 0.926071 0.060579
+v 0.158367 0.926071 -0.000025
+v 0.155880 0.936229 -0.062262
+v 0.119306 0.936229 -0.115023
+v 0.064567 0.936229 -0.150277
+v -0.000000 0.936229 -0.162657
+v -0.064567 0.936229 -0.150277
+v -0.119306 0.936229 -0.115023
+v -0.155881 0.936229 -0.062262
+v -0.168723 0.936229 -0.000025
+v -0.155881 0.936229 0.062211
+v -0.119306 0.936229 0.114972
+v -0.064568 0.936229 0.150226
+v -0.000000 0.936229 0.162607
+v 0.064567 0.936229 0.150226
+v 0.119306 0.936229 0.114973
+v 0.155880 0.936229 0.062211
+v 0.168724 0.936229 -0.000025
+v 0.155463 0.944459 -0.064420
+v 0.118986 0.944459 -0.119011
+v 0.064395 0.944459 -0.155489
+v -0.000000 0.944459 -0.168298
+v -0.064395 0.944459 -0.155489
+v -0.118986 0.944459 -0.119012
+v -0.155463 0.944459 -0.064420
+v -0.168272 0.944459 -0.000025
+v -0.155463 0.944459 0.064370
+v -0.118986 0.944459 0.118961
+v -0.064395 0.944459 0.155438
+v -0.000000 0.944459 0.168248
+v 0.064395 0.944459 0.155438
+v 0.118986 0.944459 0.118961
+v 0.155463 0.944459 0.064370
+v 0.168273 0.944459 -0.000025
+v 0.151170 0.957706 -0.064555
+v 0.115701 0.957706 -0.119261
+v 0.062616 0.957706 -0.155815
+v -0.000000 0.957706 -0.168652
+v -0.062616 0.957706 -0.155815
+v -0.115700 0.957706 -0.119261
+v -0.151170 0.957706 -0.064555
+v -0.163625 0.957706 -0.000025
+v -0.151170 0.957706 0.064505
+v -0.115700 0.957706 0.119211
+v -0.062617 0.957706 0.155763
+v -0.000000 0.957706 0.168601
+v 0.062616 0.957706 0.155763
+v 0.115701 0.957706 0.119211
+v 0.151170 0.957706 0.064505
+v 0.163625 0.957706 -0.000025
+v 0.169258 0.969440 -0.072189
+v 0.129544 0.969440 -0.133366
+v 0.070108 0.969440 -0.174244
+v -0.000000 0.969440 -0.188598
+v -0.070109 0.969440 -0.174244
+v -0.129544 0.969440 -0.133367
+v -0.169258 0.969440 -0.072189
+v -0.183203 0.969440 -0.000025
+v -0.169258 0.969440 0.072138
+v -0.129544 0.969440 0.133315
+v -0.070109 0.969440 0.174192
+v -0.000000 0.969440 0.188548
+v 0.070108 0.969440 0.174192
+v 0.129544 0.969440 0.133316
+v 0.169258 0.969440 0.072138
+v 0.183204 0.969440 -0.000025
+v 0.276044 -1.093104 -0.114341
+v 0.211275 -1.093104 -0.211274
+v 0.114341 -1.093104 -0.276044
+v -0.000001 -1.093104 -0.298789
+v -0.114341 -1.093104 -0.276044
+v -0.211275 -1.093104 -0.211275
+v -0.276045 -1.093104 -0.114341
+v -0.298788 -1.093104 0.000000
+v -0.276045 -1.093104 0.114343
+v -0.211275 -1.093104 0.211275
+v -0.114342 -1.093104 0.276045
+v -0.000001 -1.093104 0.298789
+v 0.114341 -1.093104 0.276045
+v 0.211275 -1.093104 0.211277
+v 0.276044 -1.093104 0.114343
+v 0.298789 -1.093104 0.000000
+v 0.169068 0.980934 -0.072040
+v 0.129399 0.980934 -0.133092
+v 0.070030 0.980934 -0.173885
+v -0.000000 0.980934 -0.188210
+v -0.070030 0.980934 -0.173885
+v -0.129398 0.980934 -0.133093
+v -0.169068 0.980934 -0.072040
+v -0.182997 0.980934 -0.000025
+v -0.169068 0.980934 0.071990
+v -0.129398 0.980934 0.133040
+v -0.070030 0.980934 0.173833
+v -0.000000 0.980934 0.188158
+v 0.070030 0.980934 0.173833
+v 0.129399 0.980934 0.133040
+v 0.169068 0.980934 0.071990
+v 0.182998 0.980934 -0.000025
+v 0.153825 0.985727 -0.070139
+v 0.117733 0.985727 -0.129578
+v 0.063716 0.985727 -0.169294
+v -0.000000 0.985727 -0.183241
+v -0.063717 0.985727 -0.169294
+v -0.117732 0.985727 -0.129578
+v -0.153825 0.985727 -0.070139
+v -0.166498 0.985727 -0.000025
+v -0.153825 0.985727 0.070088
+v -0.117732 0.985727 0.129526
+v -0.063717 0.985727 0.169242
+v -0.000000 0.985727 0.183189
+v 0.063716 0.985727 0.169242
+v 0.117733 0.985727 0.129526
+v 0.153825 0.985727 0.070088
+v 0.166500 0.985727 -0.000025
+v 0.138444 0.987369 -0.060450
+v 0.105961 0.987369 -0.111676
+v 0.057345 0.987369 -0.145905
+v -0.000000 0.987369 -0.157924
+v -0.057345 0.987369 -0.145905
+v -0.105960 0.987369 -0.111677
+v -0.138444 0.987369 -0.060450
+v -0.149850 0.987369 -0.000025
+v -0.138444 0.987369 0.060400
+v -0.105960 0.987369 0.111625
+v -0.057346 0.987369 0.145854
+v -0.000000 0.987369 0.157873
+v 0.057345 0.987369 0.145854
+v 0.105961 0.987369 0.111626
+v 0.138444 0.987369 0.060400
+v 0.149851 0.987369 -0.000025
+v 0.141173 1.041242 -0.060512
+v 0.108049 1.041242 -0.111791
+v 0.058476 1.041242 -0.146055
+v -0.000000 1.041242 -0.158087
+v -0.058476 1.041242 -0.146055
+v -0.108049 1.041242 -0.111792
+v -0.141173 1.041242 -0.060512
+v -0.152804 1.041242 -0.000025
+v -0.141173 1.041242 0.060462
+v -0.108049 1.041242 0.111741
+v -0.058476 1.041242 0.146004
+v -0.000000 1.041242 0.158036
+v 0.058476 1.041242 0.146004
+v 0.108049 1.041242 0.111741
+v 0.141173 1.041242 0.060462
+v 0.152805 1.041242 -0.000025
+v 0.143978 1.042170 -0.061645
+v 0.110196 1.042170 -0.113884
+v 0.059638 1.042170 -0.148790
+v -0.000000 1.042170 -0.161046
+v -0.059638 1.042170 -0.148790
+v -0.110196 1.042170 -0.113884
+v -0.143978 1.042170 -0.061645
+v -0.155840 1.042170 -0.000025
+v -0.143978 1.042170 0.061595
+v -0.110196 1.042170 0.113833
+v -0.059638 1.042170 0.148737
+v -0.000000 1.042170 0.160996
+v 0.059638 1.042170 0.148737
+v 0.110196 1.042170 0.113833
+v 0.143978 1.042170 0.061595
+v 0.155841 1.042170 -0.000025
+v 0.146298 1.052249 -0.062523
+v 0.111971 1.052249 -0.115506
+v 0.060599 1.052249 -0.150908
+v -0.000000 1.052249 -0.163340
+v -0.060598 1.052249 -0.150908
+v -0.111971 1.052249 -0.115506
+v -0.146297 1.052249 -0.062523
+v -0.158350 1.052249 -0.000025
+v -0.146297 1.052249 0.062472
+v -0.111971 1.052249 0.115454
+v -0.060599 1.052249 0.150856
+v -0.000000 1.052249 0.163288
+v 0.060599 1.052249 0.150856
+v 0.111971 1.052249 0.115455
+v 0.146298 1.052249 0.062472
+v 0.158351 1.052249 -0.000025
+v 0.149845 1.060290 -0.063881
+v 0.114686 1.060290 -0.118016
+v 0.062068 1.060290 -0.154187
+v -0.000000 1.060290 -0.166890
+v -0.062068 1.060290 -0.154187
+v -0.114685 1.060290 -0.118016
+v -0.149844 1.060290 -0.063881
+v -0.162190 1.060290 -0.000025
+v -0.149844 1.060290 0.063830
+v -0.114685 1.060290 0.117964
+v -0.062068 1.060290 0.154136
+v -0.000000 1.060290 0.166839
+v 0.062068 1.060290 0.154136
+v 0.114686 1.060290 0.117964
+v 0.149845 1.060290 0.063830
+v 0.162191 1.060290 -0.000025
+v 0.157297 1.068667 -0.066911
+v 0.120389 1.068667 -0.123615
+v 0.065155 1.068667 -0.161502
+v -0.000000 1.068667 -0.174806
+v -0.065155 1.068667 -0.161502
+v -0.120389 1.068667 -0.123615
+v -0.157296 1.068667 -0.066911
+v -0.170256 1.068667 -0.000024
+v -0.157296 1.068667 0.066861
+v -0.120389 1.068667 0.123563
+v -0.065155 1.068667 0.161451
+v -0.000000 1.068667 0.174755
+v 0.065155 1.068667 0.161451
+v 0.120389 1.068667 0.123563
+v 0.157297 1.068667 0.066861
+v 0.170256 1.068667 -0.000024
+v 0.165447 1.070702 -0.070263
+v 0.126627 1.070702 -0.129807
+v 0.068530 1.070702 -0.169592
+v -0.000000 1.070702 -0.183563
+v -0.068530 1.070702 -0.169592
+v -0.126627 1.070702 -0.129807
+v -0.165446 1.070702 -0.070263
+v -0.179078 1.070702 -0.000024
+v -0.165446 1.070702 0.070212
+v -0.126627 1.070702 0.129754
+v -0.068531 1.070702 0.169542
+v -0.000000 1.070702 0.183513
+v 0.068530 1.070702 0.169542
+v 0.126627 1.070702 0.129754
+v 0.165447 1.070702 0.070212
+v 0.179078 1.070702 -0.000024
+v 0.165888 1.080797 -0.070326
+v 0.126965 1.080797 -0.129925
+v 0.068713 1.080797 -0.169747
+v -0.000000 1.080797 -0.183730
+v -0.068713 1.080797 -0.169747
+v -0.126964 1.080797 -0.129925
+v -0.165887 1.080797 -0.070326
+v -0.179555 1.080797 -0.000024
+v -0.165887 1.080797 0.070276
+v -0.126964 1.080797 0.129872
+v -0.068713 1.080797 0.169695
+v -0.000000 1.080797 0.183680
+v 0.068713 1.080797 0.169695
+v 0.126965 1.080797 0.129872
+v 0.165888 1.080797 0.070276
+v 0.179556 1.080797 -0.000024
+v 0.185345 1.084089 -0.078376
+v 0.141856 1.084089 -0.144799
+v 0.076772 1.084089 -0.189181
+v -0.000000 1.084089 -0.204765
+v -0.076772 1.084089 -0.189181
+v -0.141856 1.084089 -0.144799
+v -0.185344 1.084089 -0.078376
+v -0.200615 1.084089 -0.000024
+v -0.185344 1.084089 0.078325
+v -0.141856 1.084089 0.144746
+v -0.076773 1.084089 0.189129
+v -0.000000 1.084089 0.204715
+v 0.076772 1.084089 0.189129
+v 0.141856 1.084089 0.144747
+v 0.185345 1.084089 0.078325
+v 0.200615 1.084089 -0.000024
+v 0.200074 1.097562 -0.084413
+v 0.153129 1.097562 -0.155955
+v 0.082873 1.097562 -0.203757
+v -0.000000 1.097562 -0.220543
+v -0.082873 1.097562 -0.203757
+v -0.153129 1.097562 -0.155955
+v -0.200073 1.097562 -0.084413
+v -0.216558 1.097562 -0.000024
+v -0.200073 1.097562 0.084363
+v -0.153129 1.097562 0.155902
+v -0.082874 1.097562 0.203706
+v -0.000000 1.097562 0.220492
+v 0.082873 1.097562 0.203706
+v 0.153129 1.097562 0.155903
+v 0.200074 1.097562 0.084363
+v 0.216558 1.097562 -0.000024
+v 0.212258 1.119769 -0.089195
+v 0.162454 1.119769 -0.164790
+v 0.087920 1.119761 -0.215241
+v -0.000000 1.119769 -0.233038
+v -0.093260 1.119761 -0.215265
+v -0.162454 1.119769 -0.164790
+v -0.212257 1.119769 -0.089195
+v -0.229745 1.119769 -0.000024
+v -0.212257 1.119769 0.089144
+v -0.162454 1.119769 0.164738
+v -0.087920 1.119769 0.215249
+v -0.000000 1.119769 0.232987
+v 0.087920 1.119769 0.215249
+v 0.162454 1.119769 0.164738
+v 0.212258 1.119769 0.089144
+v 0.229746 1.119769 -0.000024
+v 0.216333 1.140483 -0.090601
+v 0.165573 1.140483 -0.167388
+v 0.089608 1.140483 -0.219027
+v -0.000000 1.140483 -0.236714
+v -0.095050 1.140482 -0.219034
+v -0.165574 1.140483 -0.167390
+v -0.216332 1.140483 -0.090601
+v -0.234156 1.140483 -0.000024
+v -0.216332 1.140483 0.090551
+v -0.165574 1.140483 0.167338
+v -0.089608 1.140483 0.218645
+v -0.000000 1.140483 0.236663
+v 0.089608 1.140483 0.218645
+v 0.165573 1.140483 0.167338
+v 0.216333 1.140483 0.090551
+v 0.234157 1.140483 -0.000024
+v 0.221193 1.142381 -0.092425
+v 0.169294 1.142381 -0.170757
+v 0.091621 1.142381 -0.223364
+v -0.000000 1.142381 -0.241478
+v -0.095996 1.142381 -0.223369
+v -0.169294 1.142381 -0.170759
+v -0.221193 1.142381 -0.092425
+v -0.239417 1.142381 -0.000024
+v -0.221193 1.142381 0.092375
+v -0.169294 1.142381 0.170707
+v -0.091622 1.142381 0.223047
+v -0.000000 1.142381 0.241428
+v 0.091621 1.142381 0.223047
+v 0.169294 1.142381 0.170707
+v 0.221193 1.142381 0.092375
+v 0.239417 1.142381 -0.000024
+v 0.221963 1.188152 -0.092492
+v 0.169883 1.188152 -0.170881
+v 0.091940 1.188152 -0.223440
+v -0.000000 1.188152 -0.241654
+v -0.094900 1.188152 -0.223444
+v -0.169883 1.188152 -0.170882
+v -0.221963 1.188152 -0.092492
+v -0.240251 1.188152 -0.000024
+v -0.221963 1.188152 0.092442
+v -0.169883 1.188152 0.170831
+v -0.091940 1.188152 0.223209
+v -0.000000 1.188152 0.241603
+v 0.091940 1.188152 0.223209
+v 0.169883 1.188152 0.170831
+v 0.221963 1.188152 0.092442
+v 0.240251 1.188152 -0.000024
+v 0.229340 1.189849 -0.094963
+v 0.175823 1.189838 -0.176073
+v 0.095261 1.189831 -0.230541
+v -0.000000 1.189829 -0.249542
+v -0.097126 1.189831 -0.230542
+v -0.175823 1.189838 -0.176074
+v -0.229340 1.189849 -0.094963
+v -0.247748 1.189862 0.000357
+v -0.228441 1.189874 0.095290
+v -0.174551 1.189885 0.175470
+v -0.094362 1.189892 0.228892
+v -0.000000 1.189894 0.247624
+v 0.094361 1.189892 0.228892
+v 0.174550 1.189885 0.175470
+v 0.228440 1.189874 0.095290
+v 0.247748 1.189862 0.000357
+v 0.232198 1.200292 -0.096176
+v 0.177929 1.200292 -0.178128
+v 0.096372 1.200292 -0.233081
+v -0.000000 1.200292 -0.252290
+v -0.097702 1.200292 -0.233083
+v -0.177929 1.200292 -0.178129
+v -0.232198 1.200292 -0.096176
+v -0.250975 1.200292 0.000235
+v -0.231545 1.200292 0.096365
+v -0.177006 1.200292 0.177643
+v -0.095719 1.200292 0.231840
+v -0.000000 1.200292 0.250852
+v 0.095719 1.200292 0.231840
+v 0.177006 1.200292 0.177643
+v 0.231545 1.200292 0.096365
+v 0.250975 1.200292 0.000235
+v 0.237337 1.208623 -0.098303
+v 0.181832 1.208623 -0.182001
+v 0.098473 1.208623 -0.238092
+v -0.000000 1.208623 -0.257714
+v -0.099615 1.208623 -0.238094
+v -0.181832 1.208623 -0.182001
+v -0.237337 1.208623 -0.098303
+v -0.256587 1.208623 0.000204
+v -0.236776 1.208623 0.098470
+v -0.181039 1.208623 0.181589
+v -0.097913 1.208623 0.237032
+v -0.000000 1.208623 0.256484
+v 0.097912 1.208623 0.237032
+v 0.181039 1.208623 0.181589
+v 0.236776 1.208623 0.098470
+v 0.256587 1.208623 0.000204
+v 0.247278 1.213994 -0.102434
+v 0.189351 1.213994 -0.189445
+v 0.102510 1.213994 -0.247669
+v -0.000000 1.213994 -0.268077
+v -0.103085 1.213994 -0.247671
+v -0.189351 1.213994 -0.189446
+v -0.247279 1.213994 -0.102434
+v -0.267499 1.213994 0.000093
+v -0.246996 1.213994 0.102498
+v -0.188951 1.213994 0.189218
+v -0.102227 1.213994 0.247114
+v -0.000000 1.213994 0.267437
+v 0.102227 1.213994 0.247114
+v 0.188951 1.213994 0.189219
+v 0.246996 1.213994 0.102498
+v 0.267499 1.213994 0.000093
+v 0.255461 1.222303 -0.105829
+v 0.195568 1.222303 -0.195627
+v 0.105858 1.222303 -0.255669
+v -0.000000 1.222303 -0.276734
+v -0.106150 1.222303 -0.255670
+v -0.195568 1.222303 -0.195627
+v -0.255461 1.222303 -0.105829
+v -0.276431 1.222303 0.000037
+v -0.255317 1.222303 0.105841
+v -0.195365 1.222303 0.195491
+v -0.105714 1.222303 0.255368
+v -0.000000 1.222303 0.276390
+v 0.105714 1.222303 0.255368
+v 0.195365 1.222303 0.195491
+v 0.255317 1.222303 0.105841
+v 0.276431 1.222303 0.000037
+v 0.171765 -0.837723 -0.071148
+v 0.131463 -0.837723 -0.131463
+v 0.071147 -0.837723 -0.171765
+v -0.000001 -0.837723 -0.185918
+v -0.071147 -0.837723 -0.171765
+v -0.131464 -0.837723 -0.131464
+v -0.171765 -0.837723 -0.071148
+v -0.185917 -0.837723 0.000000
+v -0.171765 -0.837723 0.071148
+v -0.131464 -0.837723 0.131463
+v -0.071148 -0.837723 0.171766
+v -0.000001 -0.837723 0.185918
+v 0.071147 -0.837723 0.171766
+v 0.131463 -0.837723 0.131464
+v 0.171765 -0.837723 0.071148
+v 0.185918 -0.837723 0.000000
+v 0.210709 -0.839581 -0.087278
+v 0.161269 -0.839581 -0.161268
+v 0.087278 -0.839581 -0.210708
+v -0.000001 -0.839581 -0.228069
+v -0.087278 -0.839581 -0.210708
+v -0.161269 -0.839581 -0.161269
+v -0.210709 -0.839581 -0.087278
+v -0.228070 -0.839581 0.000000
+v -0.210709 -0.839581 0.087280
+v -0.161269 -0.839581 0.161270
+v -0.087279 -0.839581 0.210709
+v -0.000001 -0.839581 0.228071
+v 0.087278 -0.839581 0.210709
+v 0.161269 -0.839581 0.161270
+v 0.210709 -0.839581 0.087280
+v 0.228070 -0.839581 0.000000
+v 0.215036 -0.845911 -0.089070
+v 0.164581 -0.845911 -0.164579
+v 0.089071 -0.845911 -0.215036
+v -0.000001 -0.845911 -0.232752
+v -0.089071 -0.845911 -0.215036
+v -0.164581 -0.845911 -0.164581
+v -0.215036 -0.845911 -0.089070
+v -0.232753 -0.845911 0.000000
+v -0.215036 -0.845911 0.089073
+v -0.164581 -0.845911 0.164582
+v -0.089071 -0.845911 0.215036
+v -0.000001 -0.845911 0.232753
+v 0.089071 -0.845911 0.215036
+v 0.164581 -0.845911 0.164583
+v 0.215036 -0.845911 0.089073
+v 0.232753 -0.845911 0.000000
+v 0.215755 -0.855288 -0.089369
+v 0.165132 -0.855288 -0.165129
+v 0.089368 -0.855288 -0.215754
+v -0.000001 -0.855288 -0.233531
+v -0.089369 -0.855288 -0.215754
+v -0.165132 -0.855288 -0.165131
+v -0.215755 -0.855288 -0.089369
+v -0.233532 -0.855288 0.000000
+v -0.215755 -0.855288 0.089370
+v -0.165132 -0.855288 0.165132
+v -0.089369 -0.855288 0.215754
+v -0.000001 -0.855288 0.233531
+v 0.089368 -0.855288 0.215754
+v 0.165132 -0.855288 0.165133
+v 0.215755 -0.855288 0.089370
+v 0.233532 -0.855288 0.000000
+v 0.181205 -0.932236 -0.075058
+v 0.138689 -0.932236 -0.138687
+v 0.075057 -0.932236 -0.181205
+v -0.000001 -0.932236 -0.196135
+v -0.075058 -0.932236 -0.181205
+v -0.138689 -0.932236 -0.138689
+v -0.181205 -0.932236 -0.075058
+v -0.196135 -0.932236 0.000000
+v -0.181205 -0.932236 0.075059
+v -0.138689 -0.932236 0.138688
+v -0.075058 -0.932236 0.181205
+v -0.000001 -0.932236 0.196136
+v 0.075057 -0.932236 0.181205
+v 0.138689 -0.932236 0.138690
+v 0.181205 -0.932236 0.075059
+v 0.196136 -0.932236 0.000000
+v 0.187005 -1.088634 -0.077459
+v 0.143127 -1.088634 -0.143126
+v 0.077460 -1.088634 -0.187005
+v -0.000000 -1.088634 -0.202413
+v -0.077460 -1.088634 -0.187005
+v -0.143128 -1.088634 -0.143127
+v -0.187006 -1.088634 -0.077459
+v -0.202412 -1.088634 0.000000
+v -0.187006 -1.088634 0.077461
+v -0.143128 -1.088634 0.143128
+v -0.077461 -1.088634 0.187005
+v -0.000000 -1.088634 0.202415
+v 0.077460 -1.088634 0.187005
+v 0.143127 -1.088634 0.143129
+v 0.187005 -1.088634 0.077461
+v 0.202413 -1.088634 0.000000
+v 0.262241 -1.051359 -0.112828
+v 0.200710 -1.051359 -0.208477
+v 0.108623 -1.051359 -0.272392
+v -0.000001 -1.051359 -0.294835
+v -0.108623 -1.051359 -0.272392
+v -0.200710 -1.051359 -0.208478
+v -0.262241 -1.051359 -0.112828
+v -0.283847 -1.051359 0.000000
+v -0.262241 -1.051359 0.112829
+v -0.200710 -1.051359 0.208480
+v -0.108624 -1.051359 0.272392
+v -0.000001 -1.051359 0.294836
+v 0.108623 -1.051359 0.272392
+v 0.200710 -1.051359 0.208482
+v 0.262241 -1.051359 0.112829
+v 0.283848 -1.051359 0.000000
+v 0.226634 -1.072635 -0.101206
+v 0.173458 -1.072635 -0.187004
+v 0.093875 -1.072635 -0.244335
+v -0.000001 -1.072635 -0.264466
+v -0.093875 -1.072635 -0.244335
+v -0.173458 -1.072635 -0.187005
+v -0.226634 -1.072635 -0.101206
+v -0.245306 -1.072635 0.000000
+v -0.226634 -1.072635 0.101208
+v -0.173458 -1.072635 0.187006
+v -0.093876 -1.072635 0.244336
+v -0.000001 -1.072635 0.264468
+v 0.093875 -1.072635 0.244336
+v 0.173458 -1.072635 0.187008
+v 0.226634 -1.072635 0.101208
+v 0.245307 -1.072635 0.000000
+v 0.199057 -0.860965 -0.082452
+v 0.152351 -0.860965 -0.152348
+v 0.082452 -0.860965 -0.199055
+v -0.000001 -0.860965 -0.215457
+v -0.082451 -0.860965 -0.199055
+v -0.152351 -0.860965 -0.152350
+v -0.199056 -0.860965 -0.082452
+v -0.215457 -0.860965 0.000000
+v -0.199056 -0.860965 0.082453
+v -0.152351 -0.860965 0.152352
+v -0.082452 -0.860965 0.199056
+v -0.000001 -0.860965 0.215457
+v 0.082452 -0.860965 0.199056
+v 0.152351 -0.860965 0.152353
+v 0.199057 -0.860965 0.082453
+v 0.215457 -0.860965 0.000000
+v 0.200097 -0.896163 -0.082883
+v 0.153147 -0.896163 -0.153145
+v 0.082883 -0.896163 -0.200096
+v -0.000001 -0.896163 -0.216583
+v -0.082883 -0.896163 -0.200096
+v -0.153147 -0.896163 -0.153146
+v -0.200096 -0.896163 -0.082883
+v -0.216583 -0.896163 0.000000
+v -0.200096 -0.896163 0.082884
+v -0.153147 -0.896163 0.153148
+v -0.082883 -0.896163 0.200096
+v -0.000001 -0.896163 0.216584
+v 0.082883 -0.896163 0.200096
+v 0.153147 -0.896163 0.153149
+v 0.200097 -0.896163 0.082884
+v 0.216583 -0.896163 0.000000
+v 0.218353 -0.898070 -0.090444
+v 0.167120 -0.898070 -0.167118
+v 0.090445 -0.898070 -0.218352
+v -0.000001 -0.898070 -0.236343
+v -0.090445 -0.898070 -0.218352
+v -0.167120 -0.898070 -0.167119
+v -0.218352 -0.898070 -0.090444
+v -0.236344 -0.898070 0.000000
+v -0.218352 -0.898070 0.090447
+v -0.167120 -0.898070 0.167120
+v -0.090445 -0.898070 0.218353
+v -0.000001 -0.898070 0.236345
+v 0.090445 -0.898070 0.218353
+v 0.167120 -0.898070 0.167122
+v 0.218353 -0.898070 0.090447
+v 0.236344 -0.898070 0.000000
+v 0.195610 -0.909998 -0.081024
+v 0.149713 -0.909998 -0.149711
+v 0.081024 -0.909998 -0.195610
+v -0.000001 -0.909998 -0.211727
+v -0.081024 -0.909998 -0.195610
+v -0.149714 -0.909998 -0.149713
+v -0.195610 -0.909998 -0.081024
+v -0.211727 -0.909998 0.000000
+v -0.195610 -0.909998 0.081026
+v -0.149714 -0.909998 0.149714
+v -0.081025 -0.909998 0.195610
+v -0.000001 -0.909998 0.211728
+v 0.081024 -0.909998 0.195610
+v 0.149713 -0.909998 0.149716
+v 0.195610 -0.909998 0.081026
+v 0.211727 -0.909998 0.000000
+v 0.185611 -0.922811 -0.076883
+v 0.142060 -0.922811 -0.142059
+v 0.076882 -0.922811 -0.185610
+v -0.000001 -0.922811 -0.200904
+v -0.076882 -0.922811 -0.185610
+v -0.142060 -0.922811 -0.142060
+v -0.185611 -0.922811 -0.076883
+v -0.200903 -0.922811 0.000000
+v -0.185611 -0.922811 0.076884
+v -0.142060 -0.922811 0.142061
+v -0.076883 -0.922811 0.185610
+v -0.000001 -0.922811 0.200904
+v 0.076882 -0.922811 0.185610
+v 0.142060 -0.922811 0.142063
+v 0.185611 -0.922811 0.076884
+v 0.200904 -0.922811 0.000000
+v 0.173263 -0.934166 -0.071767
+v 0.132609 -0.934166 -0.132607
+v 0.071767 -0.934166 -0.173262
+v -0.000001 -0.934166 -0.187538
+v -0.071767 -0.934166 -0.173262
+v -0.132609 -0.934166 -0.132609
+v -0.173262 -0.934166 -0.071767
+v -0.187537 -0.934166 0.000000
+v -0.173262 -0.934166 0.071769
+v -0.132609 -0.934166 0.132609
+v -0.071768 -0.934166 0.173262
+v -0.000001 -0.934166 0.187538
+v 0.071767 -0.934166 0.173262
+v 0.132609 -0.934166 0.132612
+v 0.173263 -0.934166 0.071769
+v 0.187538 -0.934166 0.000000
+v 0.252420 -1.012644 -0.108603
+v 0.193193 -1.012644 -0.200671
+v 0.104555 -1.012644 -0.262192
+v -0.000001 -1.012644 -0.283794
+v -0.104555 -1.012644 -0.262192
+v -0.193194 -1.012644 -0.200673
+v -0.252420 -1.012644 -0.108603
+v -0.273217 -1.012644 0.000000
+v -0.252420 -1.012644 0.108605
+v -0.193194 -1.012644 0.200674
+v -0.104556 -1.012644 0.262191
+v -0.000001 -1.012644 0.283796
+v 0.104555 -1.012644 0.262191
+v 0.193193 -1.012644 0.200676
+v 0.252420 -1.012644 0.108605
+v 0.273217 -1.012644 0.000000
+v 0.207585 -0.975872 -0.085983
+v 0.158878 -0.975872 -0.158876
+v 0.085984 -0.975872 -0.207584
+v -0.000001 -0.975872 -0.224688
+v -0.085984 -0.975872 -0.207584
+v -0.158878 -0.975872 -0.158877
+v -0.207584 -0.975872 -0.085983
+v -0.224687 -0.975872 0.000000
+v -0.207584 -0.975872 0.085986
+v -0.158878 -0.975872 0.158878
+v -0.085985 -0.975872 0.207583
+v -0.000001 -0.975872 0.224690
+v 0.085984 -0.975872 0.207583
+v 0.158878 -0.975872 0.158881
+v 0.207585 -0.975872 0.085986
+v 0.224688 -0.975872 0.000000
+v 0.226020 -0.978329 -0.093620
+v 0.172987 -0.978329 -0.172986
+v 0.093620 -0.978329 -0.226019
+v -0.000001 -0.978329 -0.244642
+v -0.093620 -0.978329 -0.226019
+v -0.172988 -0.978329 -0.172987
+v -0.226019 -0.978329 -0.093620
+v -0.244641 -0.978329 0.000000
+v -0.226019 -0.978329 0.093622
+v -0.172988 -0.978329 0.172988
+v -0.093621 -0.978329 0.226018
+v -0.000001 -0.978329 0.244644
+v 0.093620 -0.978329 0.226018
+v 0.172987 -0.978329 0.172991
+v 0.226020 -0.978329 0.093622
+v 0.244642 -0.978329 0.000000
+vt 0.000000 -0.588736
+vt 0.062497 -0.588736
+vt 0.062497 -0.544496
+vt 0.000000 -0.544496
+vt 0.124759 -0.588736
+vt 0.124759 -0.544496
+vt 0.187021 -0.588736
+vt 0.187021 -0.544496
+vt 0.249283 -0.588736
+vt 0.249283 -0.544496
+vt 0.311545 -0.588736
+vt 0.311545 -0.544496
+vt 0.373807 -0.588736
+vt 0.373806 -0.544496
+vt 0.436068 -0.588736
+vt 0.436068 -0.544496
+vt 0.498330 -0.588736
+vt 0.498330 -0.544496
+vt 0.560592 -0.588736
+vt 0.560592 -0.544496
+vt 0.622854 -0.588736
+vt 0.622854 -0.544496
+vt 0.685115 -0.588736
+vt 0.685115 -0.544496
+vt 0.747377 -0.588736
+vt 0.747377 -0.544496
+vt 0.809639 -0.588736
+vt 0.809639 -0.544496
+vt 0.871901 -0.588736
+vt 0.871901 -0.544496
+vt 0.934163 -0.588736
+vt 0.934163 -0.544496
+vt 1.000000 -0.588736
+vt 1.000000 -0.544496
+vt 0.498330 -0.609458
+vt 0.000000 1.381325
+vt 0.062497 1.381325
+vt 0.498330 1.388302
+vt 0.124759 1.381325
+vt 0.187021 1.381325
+vt 0.249283 1.381325
+vt 0.311545 1.381325
+vt 0.373807 1.381325
+vt 0.436068 1.381325
+vt 0.498330 1.381325
+vt 0.560592 1.381325
+vt 0.622854 1.381325
+vt 0.685115 1.381325
+vt 0.747377 1.381325
+vt 0.809639 1.381325
+vt 0.871901 1.381325
+vt 0.934163 1.381325
+vt 1.000000 1.381325
+vt 0.000000 0.993111
+vt 0.062497 0.993111
+vt 0.062497 1.008969
+vt 0.000000 1.008969
+vt 0.124759 0.993111
+vt 0.124759 1.008969
+vt 0.187021 0.993111
+vt 0.187021 1.008969
+vt 0.249283 0.993111
+vt 0.249283 1.008969
+vt 0.311545 0.993111
+vt 0.311545 1.008969
+vt 0.373806 0.993111
+vt 0.373806 1.008969
+vt 0.436068 0.993111
+vt 0.436068 1.008969
+vt 0.498330 0.993111
+vt 0.498330 1.008969
+vt 0.560592 0.993111
+vt 0.560592 1.008969
+vt 0.622854 0.993111
+vt 0.622854 1.008969
+vt 0.685115 0.993111
+vt 0.685115 1.008969
+vt 0.747377 0.993111
+vt 0.747377 1.008969
+vt 0.809639 0.993111
+vt 0.809639 1.008969
+vt 0.871901 0.993111
+vt 0.871901 1.008969
+vt 0.934163 0.993111
+vt 0.934163 1.008969
+vt 1.000000 0.993111
+vt 1.000000 1.008969
+vt 0.062497 1.024350
+vt 0.000000 1.024350
+vt 0.124759 1.024350
+vt 0.187021 1.024350
+vt 0.249283 1.024350
+vt 0.311545 1.024350
+vt 0.373806 1.024350
+vt 0.436068 1.024350
+vt 0.498330 1.024350
+vt 0.560592 1.024350
+vt 0.622854 1.024350
+vt 0.685115 1.024350
+vt 0.747377 1.024350
+vt 0.809639 1.024350
+vt 0.871901 1.024350
+vt 0.934163 1.024350
+vt 1.000000 1.024350
+vt 0.062497 1.047737
+vt 0.000000 1.047737
+vt 0.124759 1.047737
+vt 0.187021 1.047737
+vt 0.249283 1.047737
+vt 0.311545 1.047737
+vt 0.373806 1.047737
+vt 0.436068 1.047737
+vt 0.498330 1.047737
+vt 0.560592 1.047737
+vt 0.622854 1.047737
+vt 0.685115 1.047737
+vt 0.747377 1.047737
+vt 0.809639 1.047737
+vt 0.871901 1.047737
+vt 0.934163 1.047737
+vt 1.000000 1.047737
+vt 0.062497 1.063946
+vt 0.000000 1.063946
+vt 0.124759 1.063946
+vt 0.187021 1.063946
+vt 0.249283 1.063946
+vt 0.311545 1.063946
+vt 0.373806 1.063946
+vt 0.436068 1.063946
+vt 0.498330 1.063946
+vt 0.560592 1.063946
+vt 0.622854 1.063946
+vt 0.685115 1.063946
+vt 0.747377 1.063946
+vt 0.809639 1.063946
+vt 0.871901 1.063946
+vt 0.934163 1.063946
+vt 1.000000 1.063946
+vt 0.062497 1.076212
+vt 0.000000 1.076212
+vt 0.124759 1.076212
+vt 0.187021 1.076212
+vt 0.249283 1.076212
+vt 0.311545 1.076212
+vt 0.373806 1.076212
+vt 0.436068 1.076212
+vt 0.498330 1.076212
+vt 0.560592 1.076212
+vt 0.622854 1.076212
+vt 0.685115 1.076212
+vt 0.747377 1.076212
+vt 0.809639 1.076212
+vt 0.871901 1.076212
+vt 0.934163 1.076212
+vt 1.000000 1.076212
+vt 0.062497 -0.415317
+vt 0.000000 -0.415317
+vt 0.124759 -0.415317
+vt 0.187021 -0.415317
+vt 0.249283 -0.415317
+vt 0.311545 -0.415317
+vt 0.373806 -0.415317
+vt 0.436068 -0.415317
+vt 0.498330 -0.415317
+vt 0.560592 -0.415317
+vt 0.622854 -0.415317
+vt 0.685116 -0.415317
+vt 0.747377 -0.415317
+vt 0.809639 -0.415317
+vt 0.871901 -0.415317
+vt 0.934163 -0.415317
+vt 1.000000 -0.415317
+vt 0.062497 1.085412
+vt 0.000000 1.085412
+vt 0.124759 1.085412
+vt 0.187021 1.085412
+vt 0.249283 1.085412
+vt 0.311545 1.085412
+vt 0.373806 1.085412
+vt 0.436068 1.085412
+vt 0.498330 1.085412
+vt 0.560592 1.085412
+vt 0.622854 1.085412
+vt 0.685115 1.085412
+vt 0.747377 1.085412
+vt 0.809639 1.085412
+vt 0.871901 1.085412
+vt 0.934163 1.085412
+vt 1.000000 1.085412
+vt 0.062497 1.097678
+vt 0.000000 1.097678
+vt 0.124759 1.097678
+vt 0.187021 1.097678
+vt 0.249283 1.097678
+vt 0.311545 1.097678
+vt 0.373806 1.097678
+vt 0.436068 1.097678
+vt 0.498330 1.097678
+vt 0.560592 1.097678
+vt 0.622854 1.097678
+vt 0.685115 1.097678
+vt 0.747377 1.097678
+vt 0.809639 1.097678
+vt 0.871901 1.097678
+vt 0.934163 1.097678
+vt 1.000000 1.097678
+vt 0.062497 1.180287
+vt 0.000000 1.180287
+vt 0.124759 1.180287
+vt 0.187021 1.180287
+vt 0.249283 1.180287
+vt 0.311545 1.180287
+vt 0.373807 1.180287
+vt 0.436068 1.180287
+vt 0.498330 1.180287
+vt 0.560592 1.180287
+vt 0.622854 1.180287
+vt 0.685115 1.180287
+vt 0.747377 1.180287
+vt 0.809639 1.180287
+vt 0.871901 1.180287
+vt 0.934163 1.180287
+vt 1.000000 1.180287
+vt 0.062497 1.186009
+vt 0.000000 1.186009
+vt 0.124759 1.186009
+vt 0.187021 1.186009
+vt 0.249283 1.186009
+vt 0.311545 1.186009
+vt 0.373807 1.186009
+vt 0.436068 1.186009
+vt 0.498330 1.186009
+vt 0.560592 1.186009
+vt 0.622854 1.186009
+vt 0.685116 1.186009
+vt 0.747377 1.186009
+vt 0.809639 1.186009
+vt 0.871901 1.186009
+vt 0.934163 1.186009
+vt 1.000000 1.186009
+vt 0.062497 1.196509
+vt 0.000000 1.196509
+vt 0.124759 1.196509
+vt 0.187021 1.196509
+vt 0.249283 1.196509
+vt 0.311545 1.196509
+vt 0.373807 1.196509
+vt 0.436068 1.196509
+vt 0.498330 1.196509
+vt 0.560592 1.196509
+vt 0.622854 1.196509
+vt 0.685116 1.196509
+vt 0.747377 1.196509
+vt 0.809639 1.196509
+vt 0.871901 1.196509
+vt 0.934163 1.196509
+vt 1.000000 1.196509
+vt 0.062497 1.210356
+vt 0.000000 1.210356
+vt 0.124759 1.210356
+vt 0.187021 1.210356
+vt 0.249283 1.210356
+vt 0.311545 1.210356
+vt 0.373807 1.210356
+vt 0.436068 1.210356
+vt 0.498330 1.210356
+vt 0.560592 1.210356
+vt 0.622854 1.210356
+vt 0.685116 1.210356
+vt 0.747377 1.210356
+vt 0.809639 1.210356
+vt 0.871901 1.210356
+vt 0.934163 1.210356
+vt 1.000000 1.210356
+vt 0.062497 1.222426
+vt 0.000000 1.222426
+vt 0.124759 1.222426
+vt 0.187021 1.222426
+vt 0.249283 1.222426
+vt 0.311545 1.222426
+vt 0.373807 1.222426
+vt 0.436068 1.222426
+vt 0.498330 1.222426
+vt 0.560592 1.222426
+vt 0.622854 1.222426
+vt 0.685116 1.222426
+vt 0.747377 1.222426
+vt 0.809639 1.222426
+vt 0.871901 1.222426
+vt 0.934163 1.222426
+vt 1.000000 1.222426
+vt 0.062497 1.233277
+vt 0.000000 1.233277
+vt 0.124759 1.233277
+vt 0.187021 1.233277
+vt 0.249283 1.233277
+vt 0.311545 1.233277
+vt 0.373807 1.233277
+vt 0.436068 1.233277
+vt 0.498330 1.233277
+vt 0.560592 1.233277
+vt 0.622854 1.233277
+vt 0.685116 1.233277
+vt 0.747377 1.233277
+vt 0.809639 1.233277
+vt 0.871901 1.233277
+vt 0.934163 1.233277
+vt 1.000000 1.233277
+vt 0.062497 1.244485
+vt 0.000000 1.244485
+vt 0.124759 1.244485
+vt 0.187021 1.244485
+vt 0.249283 1.244485
+vt 0.311545 1.244485
+vt 0.373807 1.244485
+vt 0.436068 1.244485
+vt 0.498330 1.244485
+vt 0.560592 1.244485
+vt 0.622854 1.244485
+vt 0.685116 1.244485
+vt 0.747377 1.244485
+vt 0.809639 1.244485
+vt 0.871901 1.244485
+vt 0.934163 1.244485
+vt 1.000000 1.244485
+vt 0.062497 1.259615
+vt 0.000000 1.259615
+vt 0.124759 1.259615
+vt 0.187021 1.259615
+vt 0.249283 1.259615
+vt 0.311545 1.259615
+vt 0.373807 1.259615
+vt 0.436068 1.259615
+vt 0.498330 1.259615
+vt 0.560592 1.259615
+vt 0.622854 1.259615
+vt 0.685116 1.259615
+vt 0.747377 1.259615
+vt 0.809639 1.259615
+vt 0.871901 1.259615
+vt 0.934163 1.259615
+vt 1.000000 1.259615
+vt 0.062497 1.275586
+vt 0.000000 1.275586
+vt 0.124759 1.275586
+vt 0.187021 1.275586
+vt 0.249283 1.275586
+vt 0.311545 1.275586
+vt 0.373807 1.275586
+vt 0.436068 1.275586
+vt 0.498330 1.275586
+vt 0.560592 1.275586
+vt 0.622854 1.275586
+vt 0.685116 1.275586
+vt 0.747377 1.275586
+vt 0.809639 1.275586
+vt 0.871901 1.275586
+vt 0.934163 1.275586
+vt 1.000000 1.275586
+vt 0.062497 1.289955
+vt 0.000000 1.289955
+vt 0.124759 1.289955
+vt 0.187021 1.289955
+vt 0.249283 1.289955
+vt 0.311545 1.289955
+vt 0.373807 1.289955
+vt 0.436068 1.289955
+vt 0.498330 1.289955
+vt 0.560592 1.289955
+vt 0.622854 1.289955
+vt 0.685116 1.289955
+vt 0.747377 1.289955
+vt 0.809639 1.289955
+vt 0.871901 1.289955
+vt 0.934163 1.289955
+vt 1.000000 1.289955
+vt 0.062497 1.304292
+vt 0.000000 1.304292
+vt 0.124759 1.304292
+vt 0.187021 1.304292
+vt 0.249283 1.304292
+vt 0.311545 1.304292
+vt 0.373807 1.304292
+vt 0.436068 1.304292
+vt 0.498330 1.304292
+vt 0.560592 1.304292
+vt 0.622854 1.304292
+vt 0.685115 1.304292
+vt 0.747377 1.304292
+vt 0.809639 1.304292
+vt 0.871901 1.304292
+vt 0.934163 1.304292
+vt 1.000000 1.304292
+vt 0.062497 1.314661
+vt 0.000000 1.314661
+vt 0.124759 1.314661
+vt 0.187021 1.314661
+vt 0.249283 1.314662
+vt 0.311545 1.314661
+vt 0.373807 1.314661
+vt 0.436068 1.314661
+vt 0.498330 1.314661
+vt 0.560592 1.314661
+vt 0.622854 1.314661
+vt 0.685115 1.314661
+vt 0.747377 1.314661
+vt 0.809639 1.314661
+vt 0.871901 1.314661
+vt 0.934163 1.314661
+vt 1.000000 1.314661
+vt 0.062497 1.327632
+vt 0.000000 1.327632
+vt 0.124759 1.327632
+vt 0.187021 1.327632
+vt 0.249283 1.327632
+vt 0.311545 1.327632
+vt 0.373807 1.327632
+vt 0.436068 1.327632
+vt 0.498330 1.327632
+vt 0.560592 1.327632
+vt 0.622854 1.327632
+vt 0.685115 1.327632
+vt 0.747377 1.327632
+vt 0.809639 1.327632
+vt 0.871901 1.327632
+vt 0.934163 1.327632
+vt 1.000000 1.327632
+vt 0.062497 1.371818
+vt 0.000000 1.371971
+vt 0.124759 1.371715
+vt 0.187021 1.371678
+vt 0.249283 1.371715
+vt 0.311545 1.371818
+vt 0.373807 1.371971
+vt 0.436068 1.372151
+vt 0.498330 1.372331
+vt 0.560592 1.372483
+vt 0.622854 1.372584
+vt 0.685115 1.372620
+vt 0.747377 1.372584
+vt 0.809639 1.372483
+vt 0.871901 1.372331
+vt 0.934163 1.372151
+vt 1.000000 1.371971
+vt 0.062497 1.374420
+vt 0.000000 1.374531
+vt 0.124759 1.374347
+vt 0.187021 1.374321
+vt 0.249283 1.374347
+vt 0.311545 1.374420
+vt 0.373807 1.374531
+vt 0.436068 1.374660
+vt 0.498330 1.374788
+vt 0.560592 1.374897
+vt 0.622854 1.374969
+vt 0.685115 1.374995
+vt 0.747377 1.374969
+vt 0.809639 1.374897
+vt 0.871901 1.374788
+vt 0.934163 1.374660
+vt 1.000000 1.374531
+vt 0.062497 1.375455
+vt 0.000000 1.375548
+vt 0.124759 1.375392
+vt 0.187021 1.375370
+vt 0.249283 1.375392
+vt 0.311545 1.375455
+vt 0.373807 1.375548
+vt 0.436068 1.375658
+vt 0.498330 1.375767
+vt 0.560592 1.375860
+vt 0.622854 1.375922
+vt 0.685116 1.375943
+vt 0.747377 1.375922
+vt 0.809639 1.375860
+vt 0.871901 1.375767
+vt 0.934163 1.375658
+vt 1.000000 1.375548
+vt 0.062497 1.378390
+vt 0.000000 1.378437
+vt 0.124759 1.378359
+vt 0.187021 1.378348
+vt 0.249283 1.378359
+vt 0.311545 1.378390
+vt 0.373807 1.378437
+vt 0.436068 1.378492
+vt 0.498330 1.378546
+vt 0.560592 1.378592
+vt 0.622854 1.378623
+vt 0.685116 1.378634
+vt 0.747377 1.378623
+vt 0.809639 1.378592
+vt 0.871901 1.378546
+vt 0.934163 1.378492
+vt 1.000000 1.378437
+vt 0.062497 1.379857
+vt 0.000000 1.379881
+vt 0.124759 1.379842
+vt 0.187021 1.379836
+vt 0.249283 1.379842
+vt 0.311545 1.379857
+vt 0.373807 1.379881
+vt 0.436068 1.379908
+vt 0.498330 1.379936
+vt 0.560592 1.379959
+vt 0.622854 1.379974
+vt 0.685116 1.379979
+vt 0.747377 1.379974
+vt 0.809639 1.379959
+vt 0.871901 1.379936
+vt 0.934163 1.379908
+vt 1.000000 1.379881
+vt 0.000000 0.004030
+vt 0.062497 0.004030
+vt 0.124759 0.004030
+vt 0.187021 0.004030
+vt 0.249283 0.004030
+vt 0.311545 0.004030
+vt 0.373806 0.004030
+vt 0.436068 0.004030
+vt 0.498330 0.004030
+vt 0.560592 0.004030
+vt 0.622854 0.004030
+vt 0.685115 0.004030
+vt 0.747377 0.004030
+vt 0.809639 0.004030
+vt 0.871901 0.004030
+vt 0.934163 0.004030
+vt 1.000000 0.004030
+vt 0.000000 -0.000792
+vt 0.062497 -0.000792
+vt 0.124759 -0.000792
+vt 0.187021 -0.000792
+vt 0.249283 -0.000792
+vt 0.311545 -0.000792
+vt 0.373806 -0.000792
+vt 0.436068 -0.000792
+vt 0.498330 -0.000792
+vt 0.560592 -0.000792
+vt 0.622854 -0.000792
+vt 0.685115 -0.000792
+vt 0.747377 -0.000792
+vt 0.809639 -0.000792
+vt 0.871901 -0.000792
+vt 0.934163 -0.000792
+vt 1.000000 -0.000792
+vt 0.000000 -0.013674
+vt 0.062497 -0.013674
+vt 0.124759 -0.013674
+vt 0.187021 -0.013674
+vt 0.249283 -0.013674
+vt 0.311545 -0.013674
+vt 0.373806 -0.013674
+vt 0.436068 -0.013674
+vt 0.498330 -0.013674
+vt 0.560592 -0.013674
+vt 0.622854 -0.013674
+vt 0.685115 -0.013674
+vt 0.747377 -0.013674
+vt 0.809639 -0.013674
+vt 0.871901 -0.013674
+vt 0.934163 -0.013674
+vt 1.000000 -0.013674
+vt 0.000000 -0.028207
+vt 0.062497 -0.028207
+vt 0.124759 -0.028207
+vt 0.187021 -0.028207
+vt 0.249283 -0.028207
+vt 0.311545 -0.028207
+vt 0.373806 -0.028207
+vt 0.436068 -0.028207
+vt 0.498330 -0.028207
+vt 0.560592 -0.028207
+vt 0.622854 -0.028207
+vt 0.685115 -0.028207
+vt 0.747377 -0.028207
+vt 0.809639 -0.028207
+vt 0.871901 -0.028207
+vt 0.934163 -0.028207
+vt 1.000000 -0.028207
+vt 0.000000 -0.129491
+vt 0.062497 -0.129491
+vt 0.062497 -0.110220
+vt 0.000000 -0.110220
+vt 0.124759 -0.129491
+vt 0.124759 -0.110220
+vt 0.187021 -0.129491
+vt 0.187021 -0.110220
+vt 0.249283 -0.129491
+vt 0.249283 -0.110220
+vt 0.311545 -0.129491
+vt 0.311545 -0.110220
+vt 0.373806 -0.129491
+vt 0.373806 -0.110220
+vt 0.436068 -0.129491
+vt 0.436068 -0.110220
+vt 0.498330 -0.129491
+vt 0.498330 -0.110220
+vt 0.560592 -0.129491
+vt 0.560592 -0.110220
+vt 0.622854 -0.129491
+vt 0.622854 -0.110220
+vt 0.685115 -0.129491
+vt 0.685115 -0.110220
+vt 0.747377 -0.129491
+vt 0.747377 -0.110220
+vt 0.809639 -0.129491
+vt 0.809639 -0.110220
+vt 0.871901 -0.129491
+vt 0.871901 -0.110220
+vt 0.934163 -0.129491
+vt 0.934163 -0.110220
+vt 1.000000 -0.129491
+vt 1.000000 -0.110220
+vt 0.062497 -0.374518
+vt 0.000000 -0.374518
+vt 0.124759 -0.374518
+vt 0.187021 -0.374518
+vt 0.249283 -0.374518
+vt 0.311545 -0.374518
+vt 0.373806 -0.374518
+vt 0.436068 -0.374518
+vt 0.498330 -0.374518
+vt 0.560592 -0.374518
+vt 0.622854 -0.374518
+vt 0.685116 -0.374518
+vt 0.747377 -0.374518
+vt 0.809639 -0.374518
+vt 0.871901 -0.374518
+vt 0.934163 -0.374518
+vt 1.000000 -0.374518
+vt 0.000000 -0.352467
+vt 0.062497 -0.352467
+vt 0.062497 -0.314850
+vt 0.000000 -0.314850
+vt 0.124759 -0.352467
+vt 0.124759 -0.314850
+vt 0.187021 -0.352467
+vt 0.187021 -0.314850
+vt 0.249283 -0.352467
+vt 0.249283 -0.314850
+vt 0.311545 -0.352467
+vt 0.311545 -0.314850
+vt 0.373806 -0.352467
+vt 0.373806 -0.314850
+vt 0.436068 -0.352467
+vt 0.436068 -0.314850
+vt 0.498330 -0.352467
+vt 0.498330 -0.314850
+vt 0.560592 -0.352467
+vt 0.560592 -0.314850
+vt 0.622854 -0.352467
+vt 0.622854 -0.314850
+vt 0.685116 -0.352467
+vt 0.685116 -0.314850
+vt 0.747377 -0.352467
+vt 0.747377 -0.314850
+vt 0.809639 -0.352467
+vt 0.809639 -0.314850
+vt 0.871901 -0.352467
+vt 0.871901 -0.314850
+vt 0.934163 -0.352467
+vt 0.934163 -0.314850
+vt 1.000000 -0.352467
+vt 1.000000 -0.314850
+vt 0.000000 -0.041166
+vt 0.062497 -0.041166
+vt 0.124759 -0.041166
+vt 0.187021 -0.041166
+vt 0.249283 -0.041166
+vt 0.311545 -0.041166
+vt 0.373806 -0.041166
+vt 0.436068 -0.041166
+vt 0.498330 -0.041166
+vt 0.560592 -0.041166
+vt 0.622854 -0.041166
+vt 0.685115 -0.041166
+vt 0.747377 -0.041166
+vt 0.809639 -0.041166
+vt 0.871901 -0.041166
+vt 0.934163 -0.041166
+vt 1.000000 -0.041166
+vt 0.000000 -0.063663
+vt 0.062497 -0.063663
+vt 0.124759 -0.063663
+vt 0.187021 -0.063663
+vt 0.249283 -0.063663
+vt 0.311545 -0.063663
+vt 0.373806 -0.063663
+vt 0.436068 -0.063663
+vt 0.498330 -0.063663
+vt 0.560592 -0.063663
+vt 0.622854 -0.063663
+vt 0.685115 -0.063663
+vt 0.747377 -0.063663
+vt 0.809639 -0.063663
+vt 0.871901 -0.063663
+vt 0.934163 -0.063663
+vt 1.000000 -0.063663
+vt 0.000000 -0.073290
+vt 0.062497 -0.073290
+vt 0.124759 -0.073290
+vt 0.187021 -0.073290
+vt 0.249283 -0.073290
+vt 0.311545 -0.073290
+vt 0.373806 -0.073290
+vt 0.436068 -0.073290
+vt 0.498330 -0.073290
+vt 0.560592 -0.073290
+vt 0.622854 -0.073290
+vt 0.685115 -0.073290
+vt 0.747377 -0.073290
+vt 0.809639 -0.073290
+vt 0.871901 -0.073290
+vt 0.934163 -0.073290
+vt 1.000000 -0.073290
+vt 0.000000 -0.090948
+vt 0.062497 -0.090948
+vt 0.124759 -0.090948
+vt 0.187021 -0.090948
+vt 0.249283 -0.090948
+vt 0.311545 -0.090948
+vt 0.373806 -0.090948
+vt 0.436068 -0.090948
+vt 0.498330 -0.090948
+vt 0.560592 -0.090948
+vt 0.622854 -0.090948
+vt 0.685115 -0.090948
+vt 0.747377 -0.090948
+vt 0.809639 -0.090948
+vt 0.871901 -0.090948
+vt 0.934163 -0.090948
+vt 1.000000 -0.090948
+vt 0.000000 -0.137622
+vt 0.062497 -0.137622
+vt 0.124759 -0.137622
+vt 0.187021 -0.137622
+vt 0.249283 -0.137622
+vt 0.311545 -0.137622
+vt 0.373806 -0.137622
+vt 0.436068 -0.137622
+vt 0.498330 -0.137622
+vt 0.560592 -0.137622
+vt 0.622854 -0.137622
+vt 0.685116 -0.137622
+vt 0.747377 -0.137622
+vt 0.809639 -0.137622
+vt 0.871901 -0.137622
+vt 0.934163 -0.137622
+vt 1.000000 -0.137622
+vt 0.062497 -0.182001
+vt 0.000000 -0.182001
+vt 0.124759 -0.182001
+vt 0.187021 -0.182001
+vt 0.249283 -0.182001
+vt 0.311545 -0.182001
+vt 0.373806 -0.182001
+vt 0.436068 -0.182001
+vt 0.498330 -0.182001
+vt 0.560592 -0.182001
+vt 0.622854 -0.182001
+vt 0.685116 -0.182001
+vt 0.747377 -0.182001
+vt 0.809639 -0.182001
+vt 0.871901 -0.182001
+vt 0.934163 -0.182001
+vt 1.000000 -0.182001
+vt 0.000000 -0.174308
+vt 0.062497 -0.174308
+vt 0.124759 -0.174308
+vt 0.187021 -0.174308
+vt 0.249283 -0.174308
+vt 0.311545 -0.174308
+vt 0.373806 -0.174308
+vt 0.436068 -0.174308
+vt 0.498330 -0.174308
+vt 0.560592 -0.174308
+vt 0.622854 -0.174308
+vt 0.685116 -0.174308
+vt 0.747377 -0.174308
+vt 0.809639 -0.174308
+vt 0.871901 -0.174308
+vt 0.934163 -0.174308
+vt 1.000000 -0.174308
+vn 0.923877 0.000000 -0.382688
+vn 0.707105 0.000002 -0.707108
+vn 0.707105 0.000002 -0.707108
+vn 0.923877 0.000000 -0.382688
+vn 0.382690 0.000003 -0.923877
+vn 0.382690 0.000003 -0.923877
+vn -0.000001 0.000001 -1.000000
+vn -0.000001 0.000001 -1.000000
+vn -0.382686 -0.000001 -0.923879
+vn -0.382686 -0.000001 -0.923879
+vn -0.707103 0.000000 -0.707110
+vn -0.707103 0.000000 -0.707110
+vn -0.923880 -0.000000 -0.382683
+vn -0.923880 -0.000000 -0.382683
+vn -1.000000 0.000000 -0.000001
+vn -1.000000 0.000000 -0.000001
+vn -0.923879 0.000000 0.382685
+vn -0.923879 0.000000 0.382685
+vn -0.707106 0.000000 0.707107
+vn -0.707106 0.000000 0.707107
+vn -0.382689 -0.000001 0.923877
+vn -0.382689 -0.000001 0.923877
+vn -0.000000 0.000001 1.000000
+vn -0.000000 0.000001 1.000000
+vn 0.382682 0.000003 0.923880
+vn 0.382682 0.000003 0.923880
+vn 0.707105 0.000002 0.707109
+vn 0.707105 0.000002 0.707109
+vn 0.923879 0.000000 0.382685
+vn 0.923879 0.000000 0.382685
+vn 1.000000 0.000000 -0.000001
+vn 1.000000 0.000000 -0.000001
+vn 0.000000 -1.000000 -0.000000
+vn 0.000000 -1.000000 -0.000000
+vn 0.000000 -1.000000 0.000000
+vn 0.000000 -1.000000 -0.000000
+vn 0.000000 -1.000000 0.000000
+vn 0.000000 -1.000000 0.000000
+vn 0.000000 -1.000000 0.000000
+vn 0.000000 -1.000000 0.000000
+vn 0.000000 -1.000000 0.000000
+vn 0.000000 -1.000000 0.000000
+vn 0.000000 -1.000000 0.000000
+vn 0.000000 -1.000000 -0.000000
+vn 0.000000 -1.000000 -0.000000
+vn 0.000000 -1.000000 -0.000000
+vn 0.000000 -1.000000 -0.000000
+vn 0.000000 -1.000000 -0.000000
+vn 0.000000 -1.000000 -0.000000
+vn 0.000000 1.000000 -0.000001
+vn 0.000000 1.000000 -0.000001
+vn 0.000000 1.000000 -0.000001
+vn 0.000000 1.000000 -0.000000
+vn 0.000000 1.000000 -0.000000
+vn 0.000000 1.000000 -0.000000
+vn 0.000000 1.000000 0.000000
+vn 0.000000 1.000000 0.000000
+vn 0.000000 1.000000 0.000000
+vn 0.000000 1.000000 0.000000
+vn 0.000000 1.000000 0.000000
+vn 0.000000 1.000000 0.000000
+vn 0.000000 1.000000 -0.000000
+vn 0.000000 1.000000 -0.000000
+vn 0.000000 1.000000 -0.000000
+vn 0.000000 1.000000 0.000000
+vn 0.000000 1.000000 0.000000
+vn 0.000000 1.000000 0.000000
+vn 0.000000 1.000000 -0.000000
+vn 0.000000 1.000000 -0.000000
+vn 0.000000 1.000000 -0.000000
+vn 0.000000 1.000000 0.000001
+vn 0.000000 1.000000 0.000001
+vn 0.000000 1.000000 0.000001
+vn 0.000000 1.000000 -0.000000
+vn 0.000000 1.000000 -0.000000
+vn 0.000000 1.000000 -0.000000
+vn 0.000000 1.000000 0.000000
+vn 0.000000 1.000000 0.000000
+vn 0.000000 1.000000 0.000000
+vn 0.000000 1.000000 -0.000000
+vn 0.000000 1.000000 -0.000000
+vn 0.000000 1.000000 -0.000000
+vn 0.000000 1.000000 -0.000000
+vn 0.000000 1.000000 -0.000000
+vn 0.000000 1.000000 -0.000000
+vn 0.000000 1.000000 0.000000
+vn 0.000000 1.000000 0.000000
+vn 0.000000 1.000000 0.000000
+vn 0.000000 1.000000 -0.000000
+vn 0.000000 1.000000 -0.000000
+vn 0.000000 1.000000 -0.000000
+vn 0.000000 1.000000 -0.000001
+vn 0.000000 1.000000 -0.000001
+vn 0.000000 1.000000 -0.000001
+vn 0.000000 1.000000 -0.000000
+vn 0.000000 1.000000 -0.000000
+vn 0.000000 1.000000 -0.000000
+vn 0.873238 -0.318817 -0.368526
+vn 0.673290 -0.272866 -0.687186
+vn 0.631957 -0.434997 -0.641411
+vn 0.856255 -0.367204 -0.363303
+vn 0.366846 -0.217072 -0.904601
+vn 0.333558 -0.471460 -0.816373
+vn -0.000000 -0.190902 -0.981609
+vn -0.000000 -0.476338 -0.879262
+vn -0.366844 -0.217067 -0.904603
+vn -0.333555 -0.471462 -0.816373
+vn -0.673290 -0.272859 -0.687189
+vn -0.631954 -0.435005 -0.641409
+vn -0.873240 -0.318815 -0.368522
+vn -0.856255 -0.367209 -0.363298
+vn -0.942163 -0.335155 -0.000000
+vn -0.944063 -0.329766 0.000000
+vn -0.873241 -0.318809 0.368526
+vn -0.856253 -0.367210 0.363301
+vn -0.673295 -0.272848 0.687188
+vn -0.631958 -0.434997 0.641410
+vn -0.366851 -0.217055 0.904603
+vn -0.333563 -0.471448 0.816378
+vn 0.000000 -0.190888 0.981612
+vn 0.000001 -0.476324 0.879270
+vn 0.366845 -0.217054 0.904606
+vn 0.333558 -0.471447 0.816381
+vn 0.673292 -0.272848 0.687191
+vn 0.631955 -0.434997 0.641413
+vn 0.873241 -0.318809 0.368525
+vn 0.856253 -0.367209 0.363301
+vn 0.942163 -0.335155 0.000000
+vn 0.944063 -0.329767 -0.000000
+vn 0.679890 -0.294157 -0.671731
+vn 0.920222 -0.073494 -0.384435
+vn 0.340981 -0.483093 -0.806444
+vn 0.000000 -0.549266 -0.835647
+vn -0.340973 -0.483109 -0.806439
+vn -0.679883 -0.294186 -0.671724
+vn -0.920223 -0.073506 -0.384429
+vn -0.999657 0.026186 0.000000
+vn -0.920222 -0.073507 0.384432
+vn -0.679886 -0.294172 0.671728
+vn -0.340985 -0.483079 0.806451
+vn 0.000001 -0.549237 0.835667
+vn 0.340979 -0.483078 0.806455
+vn 0.679883 -0.294172 0.671731
+vn 0.920222 -0.073507 0.384433
+vn 0.999657 0.026184 -0.000000
+vn 0.888572 0.273809 -0.368060
+vn 0.699794 0.159586 -0.696291
+vn 0.699794 0.159586 -0.696291
+vn 0.888572 0.273809 -0.368060
+vn 0.386171 0.039262 -0.921591
+vn 0.386171 0.039262 -0.921591
+vn -0.000000 -0.012081 -0.999927
+vn -0.000000 -0.012081 -0.999927
+vn -0.386169 0.039283 -0.921591
+vn -0.386169 0.039283 -0.921591
+vn -0.699787 0.159633 -0.696287
+vn -0.699787 0.159633 -0.696287
+vn -0.888563 0.273847 -0.368053
+vn -0.888563 0.273847 -0.368053
+vn -0.947785 0.318911 0.000000
+vn -0.947785 0.318911 0.000000
+vn -0.888564 0.273839 0.368057
+vn -0.888564 0.273839 0.368057
+vn -0.699787 0.159611 0.696292
+vn -0.699787 0.159611 0.696292
+vn -0.386173 0.039271 0.921590
+vn -0.386173 0.039271 0.921590
+vn 0.000001 -0.012080 0.999927
+vn 0.000001 -0.012080 0.999927
+vn 0.386169 0.039274 0.921592
+vn 0.386169 0.039274 0.921592
+vn 0.699787 0.159606 0.696293
+vn 0.699787 0.159606 0.696293
+vn 0.888571 0.273817 0.368058
+vn 0.888571 0.273817 0.368058
+vn 0.947793 0.318886 -0.000000
+vn 0.947793 0.318886 -0.000000
+vn 0.476076 -0.858262 -0.191669
+vn 0.366174 -0.859792 -0.355913
+vn 0.366174 -0.859792 -0.355913
+vn 0.476076 -0.858262 -0.191669
+vn 0.199161 -0.861350 -0.467345
+vn 0.199161 -0.861350 -0.467345
+vn 0.000000 -0.862005 -0.506900
+vn 0.000000 -0.862005 -0.506900
+vn -0.199158 -0.861353 -0.467340
+vn -0.199158 -0.861353 -0.467340
+vn -0.366166 -0.859798 -0.355906
+vn -0.366166 -0.859798 -0.355906
+vn -0.476068 -0.858268 -0.191665
+vn -0.476068 -0.858268 -0.191665
+vn -0.514247 -0.857642 0.000000
+vn -0.514247 -0.857642 0.000000
+vn -0.476071 -0.858265 0.191669
+vn -0.476071 -0.858265 0.191669
+vn -0.366174 -0.859790 0.355918
+vn -0.366174 -0.859790 0.355918
+vn -0.199168 -0.861345 0.467350
+vn -0.199168 -0.861345 0.467350
+vn 0.000001 -0.862001 0.506907
+vn 0.000001 -0.862001 0.506907
+vn 0.199165 -0.861345 0.467352
+vn 0.199165 -0.861345 0.467352
+vn 0.366173 -0.859790 0.355918
+vn 0.366173 -0.859790 0.355918
+vn 0.476076 -0.858262 0.191669
+vn 0.476076 -0.858262 0.191669
+vn 0.514255 -0.857638 -0.000000
+vn 0.514255 -0.857638 -0.000000
+vn 0.927176 0.020580 -0.374061
+vn 0.716111 0.025734 -0.697512
+vn 0.716111 0.025734 -0.697512
+vn 0.927176 0.020580 -0.374061
+vn 0.391145 0.030986 -0.919807
+vn 0.391145 0.030986 -0.919807
+vn 0.000000 0.033192 -0.999449
+vn 0.000000 0.033192 -0.999449
+vn -0.391144 0.030998 -0.919807
+vn -0.391144 0.030998 -0.919807
+vn -0.716109 0.025752 -0.697514
+vn -0.716109 0.025752 -0.697514
+vn -0.927176 0.020588 -0.374061
+vn -0.927176 0.020588 -0.374061
+vn -0.999829 0.018475 -0.000000
+vn -0.999829 0.018475 -0.000000
+vn -0.927174 0.020588 0.374066
+vn -0.927174 0.020588 0.374066
+vn -0.716107 0.025737 0.697516
+vn -0.716107 0.025737 0.697516
+vn -0.391151 0.030984 0.919805
+vn -0.391151 0.030984 0.919805
+vn 0.000001 0.033194 0.999449
+vn 0.000001 0.033194 0.999449
+vn 0.391146 0.030987 0.919807
+vn 0.391146 0.030987 0.919807
+vn 0.716106 0.025745 0.697517
+vn 0.716106 0.025745 0.697517
+vn 0.927175 0.020590 0.374063
+vn 0.927175 0.020590 0.374063
+vn 0.999829 0.018474 0.000000
+vn 0.999829 0.018474 0.000000
+vn 0.042807 0.998926 -0.017731
+vn 0.032763 0.998926 -0.032763
+vn 0.032763 0.998926 -0.032763
+vn 0.042807 0.998926 -0.017731
+vn 0.017732 0.998926 -0.042807
+vn 0.017732 0.998926 -0.042807
+vn -0.000000 0.998926 -0.046334
+vn -0.000000 0.998926 -0.046334
+vn -0.017731 0.998926 -0.042807
+vn -0.017731 0.998926 -0.042807
+vn -0.032763 0.998926 -0.032763
+vn -0.032763 0.998926 -0.032763
+vn -0.042807 0.998926 -0.017731
+vn -0.042807 0.998926 -0.017731
+vn -0.046334 0.998926 0.000000
+vn -0.046334 0.998926 0.000000
+vn -0.042807 0.998926 0.017732
+vn -0.042807 0.998926 0.017732
+vn -0.032763 0.998926 0.032763
+vn -0.032763 0.998926 0.032763
+vn -0.017732 0.998926 0.042807
+vn -0.017732 0.998926 0.042807
+vn -0.000000 0.998926 0.046334
+vn -0.000000 0.998926 0.046334
+vn 0.017731 0.998926 0.042807
+vn 0.017731 0.998926 0.042807
+vn 0.032763 0.998926 0.032763
+vn 0.032763 0.998926 0.032763
+vn 0.042807 0.998926 0.017731
+vn 0.042807 0.998926 0.017731
+vn 0.046334 0.998926 -0.000000
+vn 0.046334 0.998926 -0.000000
+vn 0.291681 0.948896 -0.120493
+vn 0.291920 0.909194 -0.296899
+vn 0.291920 0.909194 -0.296899
+vn 0.291681 0.948896 -0.120493
+vn 0.211562 0.815802 -0.538246
+vn 0.211562 0.815802 -0.538246
+vn -0.000000 0.750754 -0.660582
+vn -0.000000 0.750754 -0.660582
+vn -0.211561 0.815806 -0.538240
+vn -0.211561 0.815806 -0.538240
+vn -0.291914 0.909199 -0.296888
+vn -0.291914 0.909199 -0.296888
+vn -0.291672 0.948900 -0.120487
+vn -0.291672 0.948900 -0.120487
+vn -0.286155 0.958183 0.000000
+vn -0.286155 0.958183 0.000000
+vn -0.291672 0.948899 0.120490
+vn -0.291672 0.948899 0.120490
+vn -0.291908 0.909203 0.296882
+vn -0.291908 0.909203 0.296882
+vn -0.211554 0.815824 0.538216
+vn -0.211554 0.815824 0.538216
+vn 0.000000 0.750781 0.660551
+vn 0.000000 0.750781 0.660551
+vn 0.211553 0.815824 0.538216
+vn 0.211553 0.815824 0.538216
+vn 0.291909 0.909202 0.296884
+vn 0.291909 0.909202 0.296884
+vn 0.291679 0.948897 0.120492
+vn 0.291679 0.948897 0.120492
+vn 0.286165 0.958180 0.000000
+vn 0.286165 0.958180 0.000000
+vn 0.085324 0.995845 -0.031829
+vn 0.058694 0.996866 -0.053045
+vn 0.058694 0.996866 -0.053045
+vn 0.085324 0.995845 -0.031829
+vn 0.028731 0.997609 -0.062860
+vn 0.028731 0.997609 -0.062860
+vn 0.000000 0.997855 -0.065457
+vn 0.000000 0.997855 -0.065457
+vn -0.028731 0.997609 -0.062860
+vn -0.028731 0.997609 -0.062860
+vn -0.058696 0.996866 -0.053047
+vn -0.058696 0.996866 -0.053047
+vn -0.085326 0.995844 -0.031830
+vn -0.085326 0.995844 -0.031830
+vn -0.096681 0.995315 0.000000
+vn -0.096681 0.995315 0.000000
+vn -0.085326 0.995844 0.031832
+vn -0.085326 0.995844 0.031832
+vn -0.058696 0.996865 0.053050
+vn -0.058696 0.996865 0.053050
+vn -0.028732 0.997608 0.062863
+vn -0.028732 0.997608 0.062863
+vn 0.000000 0.997855 0.065460
+vn 0.000000 0.997855 0.065460
+vn 0.028732 0.997608 0.062863
+vn 0.028732 0.997608 0.062863
+vn 0.058696 0.996865 0.053049
+vn 0.058696 0.996865 0.053049
+vn 0.085325 0.995845 0.031831
+vn 0.085325 0.995845 0.031831
+vn 0.096679 0.995316 0.000000
+vn 0.096679 0.995316 0.000000
+vn 0.928075 -0.046010 -0.369539
+vn 0.720628 -0.029372 -0.692700
+vn 0.720628 -0.029372 -0.692700
+vn 0.928075 -0.046010 -0.369539
+vn 0.395715 -0.012295 -0.918291
+vn 0.395715 -0.012295 -0.918291
+vn -0.000001 -0.005089 -0.999987
+vn -0.000001 -0.005089 -0.999987
+vn -0.395712 -0.012295 -0.918293
+vn -0.395712 -0.012295 -0.918293
+vn -0.720625 -0.029372 -0.692703
+vn -0.720625 -0.029372 -0.692703
+vn -0.928079 -0.046013 -0.369530
+vn -0.928079 -0.046013 -0.369530
+vn -0.998606 -0.052782 0.000000
+vn -0.998606 -0.052782 0.000000
+vn -0.928077 -0.046015 0.369535
+vn -0.928077 -0.046015 0.369535
+vn -0.720623 -0.029376 0.692704
+vn -0.720623 -0.029376 0.692704
+vn -0.395721 -0.012297 0.918289
+vn -0.395721 -0.012297 0.918289
+vn -0.000001 -0.005089 0.999987
+vn -0.000001 -0.005089 0.999987
+vn 0.395716 -0.012295 0.918290
+vn 0.395716 -0.012295 0.918290
+vn 0.720624 -0.029371 0.692704
+vn 0.720624 -0.029371 0.692704
+vn 0.928076 -0.046011 0.369539
+vn 0.928076 -0.046011 0.369539
+vn 0.998606 -0.052778 -0.000000
+vn 0.998606 -0.052778 -0.000000
+vn 0.272443 -0.955906 -0.109627
+vn 0.212068 -0.955288 -0.206038
+vn 0.212068 -0.955288 -0.206038
+vn 0.272443 -0.955906 -0.109627
+vn 0.116747 -0.954658 -0.273858
+vn 0.116747 -0.954658 -0.273858
+vn -0.000001 -0.954395 -0.298548
+vn -0.000001 -0.954395 -0.298548
+vn -0.116747 -0.954657 -0.273861
+vn -0.116747 -0.954657 -0.273861
+vn -0.212075 -0.955285 -0.206044
+vn -0.212075 -0.955285 -0.206044
+vn -0.272461 -0.955900 -0.109635
+vn -0.272461 -0.955900 -0.109635
+vn -0.292879 -0.956149 -0.000002
+vn -0.292879 -0.956149 -0.000002
+vn -0.272460 -0.955901 0.109632
+vn -0.272460 -0.955901 0.109632
+vn -0.212083 -0.955282 0.206053
+vn -0.212083 -0.955282 0.206053
+vn -0.116762 -0.954648 0.273885
+vn -0.116762 -0.954648 0.273885
+vn -0.000001 -0.954386 0.298575
+vn -0.000001 -0.954386 0.298575
+vn 0.116762 -0.954650 0.273879
+vn 0.116762 -0.954650 0.273879
+vn 0.212076 -0.955286 0.206041
+vn 0.212076 -0.955286 0.206041
+vn 0.272444 -0.955906 0.109624
+vn 0.272444 -0.955906 0.109624
+vn 0.292859 -0.956156 -0.000001
+vn 0.292859 -0.956156 -0.000001
+vn 0.900990 -0.238136 -0.362642
+vn 0.697612 -0.231919 -0.677902
+vn 0.678046 -0.323831 -0.659839
+vn 0.875162 -0.331144 -0.352753
+vn 0.381998 -0.225571 -0.896212
+vn 0.371511 -0.316360 -0.872866
+vn -0.000002 -0.222898 -0.974842
+vn -0.000002 -0.313216 -0.949682
+vn -0.382000 -0.225555 -0.896215
+vn -0.371513 -0.316352 -0.872869
+vn -0.697615 -0.231894 -0.677907
+vn -0.678048 -0.323818 -0.659843
+vn -0.900993 -0.238126 -0.362640
+vn -0.875165 -0.331140 -0.352750
+vn -0.970606 -0.240675 -0.000001
+vn -0.942527 -0.334130 -0.000000
+vn -0.900993 -0.238116 0.362647
+vn -0.875164 -0.331135 0.352757
+vn -0.697614 -0.231873 0.677916
+vn -0.678047 -0.323813 0.659847
+vn -0.382010 -0.225528 0.896217
+vn -0.371521 -0.316361 0.872862
+vn -0.000002 -0.222862 0.974850
+vn -0.000002 -0.313235 0.949676
+vn 0.382003 -0.225535 0.896219
+vn 0.371517 -0.316361 0.872864
+vn 0.697610 -0.231893 0.677913
+vn 0.678045 -0.323813 0.659848
+vn 0.900991 -0.238126 0.362645
+vn 0.875164 -0.331135 0.352758
+vn 0.970606 -0.240676 0.000001
+vn 0.942527 -0.334129 0.000000
+vn 0.596131 -0.553735 -0.581382
+vn 0.768809 -0.559006 -0.310555
+vn 0.326897 -0.548348 -0.769710
+vn -0.000001 -0.546082 -0.837732
+vn -0.326898 -0.548350 -0.769708
+vn -0.596131 -0.553736 -0.581381
+vn -0.768808 -0.559009 -0.310553
+vn -0.827705 -0.561163 -0.000000
+vn -0.768804 -0.559011 0.310559
+vn -0.596127 -0.553741 0.581380
+vn -0.326901 -0.548373 0.769690
+vn -0.000001 -0.546121 0.837706
+vn 0.326901 -0.548367 0.769694
+vn 0.596132 -0.553729 0.581387
+vn 0.768808 -0.559004 0.310562
+vn 0.827709 -0.561158 -0.000000
+vn 0.517799 -0.690280 -0.505368
+vn 0.669110 -0.692193 -0.270483
+vn 0.283378 -0.688335 -0.667752
+vn -0.000001 -0.687521 -0.726165
+vn -0.283378 -0.688339 -0.667747
+vn -0.517798 -0.690283 -0.505366
+vn -0.669105 -0.692197 -0.270483
+vn -0.720948 -0.692989 -0.000000
+vn -0.669099 -0.692201 0.270489
+vn -0.517797 -0.690281 0.505370
+vn -0.283385 -0.688338 0.667745
+vn -0.000001 -0.687521 0.726164
+vn 0.283385 -0.688334 0.667749
+vn 0.517799 -0.690279 0.505370
+vn 0.669104 -0.692197 0.270487
+vn 0.720957 -0.692980 -0.000000
+vn 0.208747 -0.974312 -0.084504
+vn 0.161322 -0.974225 -0.157674
+vn 0.161322 -0.974225 -0.157674
+vn 0.208747 -0.974312 -0.084504
+vn 0.088164 -0.974140 -0.208034
+vn 0.088164 -0.974140 -0.208034
+vn -0.000000 -0.974106 -0.226091
+vn -0.000000 -0.974106 -0.226091
+vn -0.088165 -0.974140 -0.208033
+vn -0.088165 -0.974140 -0.208033
+vn -0.161327 -0.974224 -0.157672
+vn -0.161327 -0.974224 -0.157672
+vn -0.208753 -0.974311 -0.084506
+vn -0.208753 -0.974311 -0.084506
+vn -0.225052 -0.974347 0.000000
+vn -0.225052 -0.974347 0.000000
+vn -0.208754 -0.974310 0.084510
+vn -0.208754 -0.974310 0.084510
+vn -0.161330 -0.974224 0.157674
+vn -0.161330 -0.974224 0.157674
+vn -0.088166 -0.974141 0.208028
+vn -0.088166 -0.974141 0.208028
+vn -0.000000 -0.974108 0.226084
+vn -0.000000 -0.974108 0.226084
+vn 0.088165 -0.974141 0.208028
+vn 0.088165 -0.974141 0.208028
+vn 0.161326 -0.974225 0.157672
+vn 0.161326 -0.974225 0.157672
+vn 0.208748 -0.974312 0.084506
+vn 0.208748 -0.974312 0.084506
+vn 0.225048 -0.974348 0.000000
+vn 0.225048 -0.974348 0.000000
+vn 0.925959 -0.041959 -0.375286
+vn 0.714391 -0.032027 -0.699014
+vn 0.714391 -0.032027 -0.699014
+vn 0.925959 -0.041959 -0.375286
+vn 0.389741 -0.021978 -0.920662
+vn 0.389741 -0.021978 -0.920662
+vn -0.000001 -0.017774 -0.999842
+vn -0.000001 -0.017774 -0.999842
+vn -0.389746 -0.021984 -0.920660
+vn -0.389746 -0.021984 -0.920660
+vn -0.714391 -0.032049 -0.699013
+vn -0.714391 -0.032049 -0.699013
+vn -0.925957 -0.041975 -0.375289
+vn -0.925957 -0.041975 -0.375289
+vn -0.998939 -0.046044 0.000002
+vn -0.998939 -0.046044 0.000002
+vn -0.925954 -0.041974 0.375297
+vn -0.925954 -0.041974 0.375297
+vn -0.714394 -0.032027 0.699010
+vn -0.714394 -0.032027 0.699010
+vn -0.389761 -0.021939 0.920655
+vn -0.389761 -0.021939 0.920655
+vn -0.000002 -0.017732 0.999843
+vn -0.000002 -0.017732 0.999843
+vn 0.389755 -0.021941 0.920657
+vn 0.389755 -0.021941 0.920657
+vn 0.714392 -0.032010 0.699013
+vn 0.714392 -0.032010 0.699013
+vn 0.925954 -0.041960 0.375297
+vn 0.925954 -0.041960 0.375297
+vn 0.998939 -0.046046 0.000002
+vn 0.998939 -0.046046 0.000002
+vn 0.143214 -0.987982 -0.058156
+vn 0.110358 -0.987985 -0.108195
+vn 0.307262 -0.902468 -0.301896
+vn 0.398322 -0.902808 -0.162104
+vn 0.060133 -0.987990 -0.142333
+vn 0.167603 -0.902133 -0.397575
+vn -0.000000 -0.987993 -0.154498
+vn -0.000001 -0.901995 -0.431747
+vn -0.060134 -0.987990 -0.142334
+vn -0.167603 -0.902133 -0.397575
+vn -0.110358 -0.987985 -0.108194
+vn -0.307261 -0.902469 -0.301895
+vn -0.143214 -0.987982 -0.058156
+vn -0.398320 -0.902809 -0.162103
+vn -0.154580 -0.987980 0.000000
+vn -0.429744 -0.902951 0.000001
+vn -0.143214 -0.987982 0.058158
+vn -0.398318 -0.902809 0.162108
+vn -0.110358 -0.987985 0.108194
+vn -0.307263 -0.902469 0.301894
+vn -0.060135 -0.987991 0.142329
+vn -0.167609 -0.902134 0.397569
+vn -0.000000 -0.987993 0.154496
+vn -0.000000 -0.901996 0.431745
+vn 0.060134 -0.987991 0.142330
+vn 0.167606 -0.902133 0.397572
+vn 0.110356 -0.987986 0.108193
+vn 0.307261 -0.902468 0.301896
+vn 0.143213 -0.987982 0.058159
+vn 0.398320 -0.902808 0.162108
+vn 0.154580 -0.987980 0.000001
+vn 0.429747 -0.902949 0.000001
+vn 0.551487 -0.632803 -0.543529
+vn 0.713981 -0.636648 -0.291394
+vn 0.301317 -0.628840 -0.716776
+vn 0.002178 -0.631069 -0.775723
+vn -0.297285 -0.644442 -0.704497
+vn -0.549484 -0.643542 -0.532842
+vn -0.713982 -0.636648 -0.291392
+vn -0.769909 -0.638154 0.000002
+vn -0.713978 -0.636650 0.291397
+vn -0.551457 -0.632968 0.543366
+vn -0.301199 -0.629227 0.716486
+vn -0.000000 -0.627659 0.778488
+vn 0.301195 -0.629226 0.716489
+vn 0.551454 -0.632968 0.543369
+vn 0.713978 -0.636649 0.291398
+vn 0.769908 -0.638155 0.000002
+vn 0.667736 -0.345381 -0.659424
+vn 0.866108 -0.352318 -0.354584
+vn 0.363641 -0.338734 -0.867770
+vn 0.004879 -0.338840 -0.940831
+vn -0.367922 -0.354844 -0.859488
+vn -0.675325 -0.355678 -0.646087
+vn -0.866108 -0.352322 -0.354578
+vn -0.934531 -0.355880 0.000001
+vn -0.866104 -0.352327 0.354583
+vn -0.667917 -0.343646 0.660147
+vn -0.364219 -0.334833 0.869040
+vn -0.000001 -0.331144 0.943580
+vn 0.364216 -0.334830 0.869043
+vn 0.667915 -0.343641 0.660152
+vn 0.866104 -0.352325 0.354586
+vn 0.934530 -0.355883 0.000001
+vn 0.697734 -0.195381 -0.689198
+vn 0.906118 -0.202483 -0.371419
+vn 0.379109 -0.188957 -0.905854
+vn 0.005496 -0.184777 -0.982765
+vn -0.389720 -0.190509 -0.901013
+vn -0.709769 -0.195422 -0.676785
+vn -0.906118 -0.202493 -0.371411
+vn -0.978354 -0.206938 0.000001
+vn -0.906115 -0.202499 0.371417
+vn -0.697628 -0.191679 0.690343
+vn -0.379785 -0.180713 0.907252
+vn -0.000001 -0.176126 0.984368
+vn 0.379781 -0.180708 0.907255
+vn 0.697626 -0.191669 0.690348
+vn 0.906114 -0.202495 0.371421
+vn 0.978354 -0.206938 0.000001
+vn 0.318267 -0.938829 -0.131556
+vn 0.251496 -0.934849 -0.250613
+vn 0.251496 -0.934849 -0.250613
+vn 0.318267 -0.938829 -0.131556
+vn 0.140126 -0.930597 -0.338163
+vn 0.140126 -0.930597 -0.338163
+vn 0.001111 -0.927067 -0.374895
+vn 0.001111 -0.927067 -0.374895
+vn -0.150287 -0.925431 -0.347839
+vn -0.150287 -0.925431 -0.347839
+vn -0.262491 -0.930286 -0.256253
+vn -0.262491 -0.930286 -0.256253
+vn -0.318248 -0.938837 -0.131540
+vn -0.318248 -0.938837 -0.131540
+vn -0.340474 -0.940254 0.000000
+vn -0.340474 -0.940254 0.000000
+vn -0.318246 -0.938837 0.131543
+vn -0.318246 -0.938837 0.131543
+vn -0.250599 -0.935216 0.250141
+vn -0.250599 -0.935216 0.250141
+vn -0.139585 -0.931296 0.336458
+vn -0.139585 -0.931296 0.336458
+vn 0.000000 -0.929581 0.368618
+vn 0.000000 -0.929581 0.368618
+vn 0.139583 -0.931297 0.336455
+vn 0.139583 -0.931297 0.336455
+vn 0.250599 -0.935215 0.250145
+vn 0.250599 -0.935215 0.250145
+vn 0.318261 -0.938831 0.131552
+vn 0.318261 -0.938831 0.131552
+vn 0.340498 -0.940245 0.000001
+vn 0.340498 -0.940245 0.000001
+vn 0.924642 -0.015731 -0.380512
+vn 0.710062 -0.010653 -0.704058
+vn 0.710062 -0.010653 -0.704058
+vn 0.924642 -0.015731 -0.380512
+vn 0.384650 -0.005474 -0.923046
+vn 0.384650 -0.005474 -0.923046
+vn 0.003685 -0.001942 -0.999991
+vn 0.003685 -0.001942 -0.999991
+vn -0.391686 0.000507 -0.920099
+vn -0.391686 0.000507 -0.920099
+vn -0.718007 -0.006148 -0.696009
+vn -0.718007 -0.006148 -0.696009
+vn -0.924644 -0.015729 -0.380507
+vn -0.924644 -0.015729 -0.380507
+vn -0.999844 -0.017669 0.000001
+vn -0.999844 -0.017669 0.000001
+vn -0.924642 -0.015732 0.380513
+vn -0.924642 -0.015732 0.380513
+vn -0.709364 -0.011043 0.704756
+vn -0.709364 -0.011043 0.704756
+vn -0.384818 -0.006336 0.922971
+vn -0.384818 -0.006336 0.922971
+vn -0.000000 -0.004381 0.999990
+vn -0.000000 -0.004381 0.999990
+vn 0.384816 -0.006333 0.922972
+vn 0.384816 -0.006333 0.922972
+vn 0.709363 -0.011040 0.704757
+vn 0.709363 -0.011040 0.704757
+vn 0.924641 -0.015729 0.380514
+vn 0.924641 -0.015729 0.380514
+vn 0.999844 -0.017664 0.000001
+vn 0.999844 -0.017664 0.000001
+vn 0.198740 -0.976722 -0.080723
+vn 0.149844 -0.977540 -0.148198
+vn 0.149844 -0.977540 -0.148198
+vn 0.198740 -0.976722 -0.080723
+vn 0.080758 -0.977768 -0.193517
+vn 0.080758 -0.977768 -0.193517
+vn 0.000229 -0.977457 -0.211134
+vn 0.000229 -0.977457 -0.211134
+vn -0.084260 -0.976641 -0.197666
+vn -0.084260 -0.976641 -0.197666
+vn -0.153536 -0.976564 -0.150831
+vn -0.153536 -0.976564 -0.150831
+vn -0.198739 -0.976723 -0.080719
+vn -0.198739 -0.976723 -0.080719
+vn -0.223050 -0.974805 0.001750
+vn -0.223050 -0.974805 0.001750
+vn -0.217946 -0.971583 0.092340
+vn -0.217946 -0.971583 0.092340
+vn -0.178076 -0.967299 0.180614
+vn -0.178076 -0.967299 0.180614
+vn -0.101722 -0.963247 0.248612
+vn -0.101722 -0.963247 0.248612
+vn -0.000000 -0.961520 0.274737
+vn -0.000000 -0.961520 0.274737
+vn 0.101725 -0.963246 0.248616
+vn 0.101725 -0.963246 0.248616
+vn 0.178085 -0.967296 0.180620
+vn 0.178085 -0.967296 0.180620
+vn 0.217956 -0.971580 0.092345
+vn 0.217956 -0.971580 0.092345
+vn 0.223053 -0.974805 0.001751
+vn 0.223053 -0.974805 0.001751
+vn 0.887153 -0.284770 -0.363133
+vn 0.683359 -0.271121 -0.677875
+vn 0.647561 -0.409122 -0.642871
+vn 0.840499 -0.418239 -0.344437
+vn 0.371464 -0.259253 -0.891517
+vn 0.352116 -0.401270 -0.845575
+vn 0.001313 -0.252265 -0.967657
+vn 0.001123 -0.396538 -0.918018
+vn -0.375470 -0.250649 -0.892299
+vn -0.355672 -0.395781 -0.846673
+vn -0.687419 -0.264251 -0.676480
+vn -0.651340 -0.404473 -0.641995
+vn -0.887150 -0.284788 -0.363128
+vn -0.840501 -0.418237 -0.344436
+vn -0.955568 -0.294748 0.003648
+vn -0.905203 -0.424968 0.003103
+vn -0.880462 -0.299276 0.367724
+vn -0.834013 -0.428148 0.348012
+vn -0.673453 -0.299143 0.675999
+vn -0.637923 -0.428235 0.640053
+vn -0.364613 -0.297094 0.882492
+vn -0.345385 -0.427010 0.835686
+vn 0.000000 -0.295999 0.955188
+vn -0.000000 -0.426340 0.904563
+vn 0.364614 -0.297093 0.882492
+vn 0.345384 -0.427013 0.835685
+vn 0.673449 -0.299158 0.675997
+vn 0.637918 -0.428244 0.640052
+vn 0.880455 -0.299298 0.367723
+vn 0.834007 -0.428159 0.348013
+vn 0.955568 -0.294747 0.003646
+vn 0.905201 -0.424972 0.003103
+vn 0.591977 -0.550900 -0.588279
+vn 0.769460 -0.555164 -0.315791
+vn 0.321526 -0.547331 -0.772690
+vn 0.000882 -0.545071 -0.838389
+vn -0.324108 -0.545091 -0.773195
+vn -0.594826 -0.548679 -0.587481
+vn -0.769475 -0.555140 -0.315796
+vn -0.829553 -0.558423 0.002435
+vn -0.764627 -0.560158 0.318697
+vn -0.584792 -0.560474 0.586419
+vn -0.316526 -0.560123 0.765554
+vn -0.000000 -0.559905 0.828557
+vn 0.316524 -0.560129 0.765551
+vn 0.584788 -0.560476 0.586421
+vn 0.764626 -0.560157 0.318702
+vn 0.829548 -0.558431 0.002437
+vn 0.412704 -0.894784 -0.170400
+vn 0.320288 -0.891737 -0.319720
+vn 0.411062 -0.813925 -0.410554
+vn 0.532460 -0.817349 -0.220064
+vn 0.175318 -0.889076 -0.422855
+vn 0.224038 -0.810960 -0.540511
+vn 0.000159 -0.887462 -0.460880
+vn 0.000142 -0.809180 -0.587561
+vn -0.177720 -0.887231 -0.425719
+vn -0.226012 -0.808913 -0.542750
+vn -0.322737 -0.890211 -0.321505
+vn -0.413025 -0.812235 -0.411928
+vn -0.412692 -0.894791 -0.170392
+vn -0.532465 -0.817344 -0.220066
+vn -0.441962 -0.897034 0.000588
+vn -0.572514 -0.819895 0.000520
+vn -0.406029 -0.898135 0.168802
+vn -0.527067 -0.821156 0.218866
+vn -0.310430 -0.898254 0.311085
+vn -0.403118 -0.821297 0.403692
+vn -0.168190 -0.897940 0.406714
+vn -0.218311 -0.820938 0.527637
+vn -0.000000 -0.897760 0.440485
+vn -0.000000 -0.820727 0.571320
+vn 0.168185 -0.897945 0.406705
+vn 0.218310 -0.820939 0.527636
+vn 0.310422 -0.898261 0.311072
+vn 0.403117 -0.821298 0.403691
+vn 0.406026 -0.898137 0.168799
+vn 0.527067 -0.821157 0.218866
+vn 0.441969 -0.897030 0.000585
+vn 0.572512 -0.819896 0.000519
+vn 0.486588 -0.725877 -0.486144
+vn 0.632186 -0.729378 -0.261436
+vn 0.264546 -0.722862 -0.638346
+vn 0.000124 -0.721072 -0.692860
+vn -0.266116 -0.720788 -0.640037
+vn -0.488107 -0.724176 -0.487156
+vn -0.632204 -0.729358 -0.261447
+vn -0.681309 -0.731996 0.000446
+vn -0.627976 -0.733308 0.260588
+vn -0.480400 -0.733459 0.480888
+vn -0.260099 -0.733088 0.628435
+vn -0.000001 -0.732862 0.680377
+vn 0.260100 -0.733083 0.628441
+vn 0.480403 -0.733453 0.480895
+vn 0.627977 -0.733306 0.260589
+vn 0.681300 -0.732004 0.000447
+vn 0.923862 0.020182 -0.382193
+vn 0.707109 0.030462 -0.706448
+vn 0.707109 0.030462 -0.706448
+vn 0.923862 0.020182 -0.382193
+vn 0.382634 0.039252 -0.923066
+vn 0.382634 0.039252 -0.923066
+vn 0.000163 0.044218 -0.999022
+vn 0.000163 0.044218 -0.999022
+vn -0.382712 0.045568 -0.922743
+vn -0.382712 0.045568 -0.922743
+vn -0.707321 0.035089 -0.706021
+vn -0.707321 0.035089 -0.706021
+vn -0.923864 0.020157 -0.382191
+vn -0.923864 0.020157 -0.382191
+vn -0.999923 0.012389 0.000369
+vn -0.999923 0.012389 0.000369
+vn -0.923749 0.008567 0.382901
+vn -0.923749 0.008567 0.382901
+vn -0.706981 0.008320 0.707183
+vn -0.706981 0.008320 0.707183
+vn -0.382610 0.009644 0.923860
+vn -0.382610 0.009644 0.923860
+vn 0.000001 0.010376 0.999946
+vn 0.000001 0.010376 0.999946
+vn 0.382610 0.009621 0.923860
+vn 0.382610 0.009621 0.923860
+vn 0.706980 0.008298 0.707185
+vn 0.706980 0.008298 0.707185
+vn 0.923749 0.008564 0.382904
+vn 0.923749 0.008564 0.382904
+vn 0.999923 0.012390 0.000369
+vn 0.999923 0.012390 0.000369
+vn 0.923765 0.015613 -0.382642
+vn 0.707020 0.015608 -0.707021
+vn 0.382641 0.015605 -0.923765
+vn -0.000001 0.015604 -0.999878
+vn -0.382637 0.015605 -0.923767
+vn -0.707019 0.015608 -0.707023
+vn -0.923768 0.015613 -0.382635
+vn -0.999878 0.015618 -0.000000
+vn -0.923766 0.015624 0.382639
+vn -0.707021 0.015628 0.707020
+vn -0.382643 0.015632 0.923764
+vn -0.000000 0.015633 0.999878
+vn 0.382636 0.015632 0.923767
+vn 0.707018 0.015629 0.707022
+vn 0.923766 0.015624 0.382638
+vn 0.999878 0.015618 -0.000000
+vn 0.040675 0.999030 -0.016848
+vn 0.031131 0.999030 -0.031132
+vn 0.031131 0.999030 -0.031132
+vn 0.040675 0.999030 -0.016848
+vn 0.016848 0.999030 -0.040675
+vn 0.016848 0.999030 -0.040675
+vn -0.000000 0.999030 -0.044026
+vn -0.000000 0.999030 -0.044026
+vn -0.016848 0.999030 -0.040674
+vn -0.016848 0.999030 -0.040674
+vn -0.031131 0.999030 -0.031131
+vn -0.031131 0.999030 -0.031131
+vn -0.040674 0.999030 -0.016848
+vn -0.040674 0.999030 -0.016848
+vn -0.044025 0.999030 -0.000000
+vn -0.044025 0.999030 -0.000000
+vn -0.040674 0.999030 0.016848
+vn -0.040674 0.999030 0.016848
+vn -0.031131 0.999030 0.031131
+vn -0.031131 0.999030 0.031131
+vn -0.016848 0.999030 0.040674
+vn -0.016848 0.999030 0.040674
+vn -0.000000 0.999030 0.044026
+vn -0.000000 0.999030 0.044026
+vn 0.016848 0.999030 0.040675
+vn 0.016848 0.999030 0.040675
+vn 0.031131 0.999030 0.031131
+vn 0.031131 0.999030 0.031131
+vn 0.040674 0.999030 0.016848
+vn 0.040674 0.999030 0.016848
+vn 0.044026 0.999030 0.000000
+vn 0.044026 0.999030 0.000000
+vn 0.871297 0.332540 -0.360913
+vn 0.666872 0.332520 -0.666868
+vn 0.568457 0.594744 -0.568451
+vn 0.742715 0.594747 -0.307653
+vn 0.360916 0.332508 -0.871308
+vn 0.307645 0.594770 -0.742700
+vn -0.000000 0.332510 -0.943100
+vn -0.000001 0.594782 -0.803887
+vn -0.360905 0.332520 -0.871308
+vn -0.307630 0.594793 -0.742688
+vn -0.666867 0.332535 -0.666865
+vn -0.568435 0.594787 -0.568428
+vn -0.871302 0.332538 -0.360904
+vn -0.742714 0.594755 -0.307639
+vn -0.943092 0.332532 -0.000002
+vn -0.803917 0.594742 -0.000002
+vn -0.871302 0.332536 0.360905
+vn -0.742703 0.594772 0.307635
+vn -0.666864 0.332525 0.666873
+vn -0.568430 0.594781 0.568439
+vn -0.360909 0.332492 0.871317
+vn -0.307644 0.594736 0.742728
+vn 0.000000 0.332474 0.943112
+vn -0.000000 0.594705 0.803944
+vn 0.360906 0.332488 0.871320
+vn 0.307643 0.594730 0.742733
+vn 0.666861 0.332524 0.666877
+vn 0.568435 0.594767 0.568448
+vn 0.871299 0.332542 0.360907
+vn 0.742700 0.594772 0.307639
+vn 0.943088 0.332542 -0.000001
+vn 0.803901 0.594763 -0.000001
+vn 0.825348 -0.449356 -0.341878
+vn 0.631691 -0.449374 -0.631688
+vn 0.341869 -0.449402 -0.825326
+vn -0.000000 -0.449403 -0.893329
+vn -0.341861 -0.449400 -0.825331
+vn -0.631685 -0.449382 -0.631688
+vn -0.825347 -0.449364 -0.341870
+vn -0.893350 -0.449363 -0.000001
+vn -0.825341 -0.449373 0.341870
+vn -0.631680 -0.449387 0.631689
+vn -0.341864 -0.449396 0.825332
+vn 0.000000 -0.449401 0.893330
+vn 0.341859 -0.449397 0.825333
+vn 0.631679 -0.449381 0.631694
+vn 0.825345 -0.449366 0.341872
+vn 0.893350 -0.449361 -0.000001
+vn 0.824374 -0.451446 -0.341473
+vn 0.630955 -0.451433 -0.630955
+vn 0.591412 -0.548145 -0.591413
+vn 0.772708 -0.548156 -0.320074
+vn 0.341480 -0.451422 -0.824384
+vn 0.320078 -0.548143 -0.772715
+vn -0.000001 -0.451424 -0.892310
+vn -0.000001 -0.548147 -0.836382
+vn -0.341476 -0.451413 -0.824391
+vn -0.320072 -0.548142 -0.772719
+vn -0.630959 -0.451413 -0.630965
+vn -0.591412 -0.548142 -0.591416
+vn -0.824381 -0.451437 -0.341469
+vn -0.772712 -0.548153 -0.320069
+vn -0.892300 -0.451443 0.000000
+vn -0.836374 -0.548159 -0.000001
+vn -0.824382 -0.451433 0.341471
+vn -0.772709 -0.548158 0.320068
+vn -0.630955 -0.451428 0.630958
+vn -0.591405 -0.548157 0.591408
+vn -0.341476 -0.451428 0.824383
+vn -0.320071 -0.548161 0.772705
+vn 0.000000 -0.451425 0.892309
+vn 0.000000 -0.548164 0.836371
+vn 0.341467 -0.451420 0.824391
+vn 0.320063 -0.548157 0.772712
+vn 0.630951 -0.451425 0.630965
+vn 0.591400 -0.548156 0.591414
+vn 0.824383 -0.451432 0.341470
+vn 0.772710 -0.548158 0.320067
+vn 0.892301 -0.451441 0.000000
+vn 0.836374 -0.548159 -0.000001
+vn 0.306778 -0.944348 -0.118717
+vn 0.214451 -0.955854 -0.200883
+vn 0.214451 -0.955854 -0.200883
+vn 0.306778 -0.944348 -0.118717
+vn 0.106363 -0.964664 -0.241062
+vn 0.106363 -0.964664 -0.241062
+vn -0.000000 -0.967686 -0.252159
+vn -0.000000 -0.967686 -0.252159
+vn -0.106362 -0.964664 -0.241063
+vn -0.106362 -0.964664 -0.241063
+vn -0.214449 -0.955854 -0.200883
+vn -0.214449 -0.955854 -0.200883
+vn -0.306777 -0.944349 -0.118714
+vn -0.306777 -0.944349 -0.118714
+vn -0.344986 -0.938608 -0.000001
+vn -0.344986 -0.938608 -0.000001
+vn -0.306775 -0.944350 0.118715
+vn -0.306775 -0.944350 0.118715
+vn -0.214449 -0.955854 0.200884
+vn -0.214449 -0.955854 0.200884
+vn -0.106363 -0.964664 0.241061
+vn -0.106363 -0.964664 0.241061
+vn -0.000000 -0.967686 0.252157
+vn -0.000000 -0.967686 0.252157
+vn 0.106359 -0.964664 0.241061
+vn 0.106359 -0.964664 0.241061
+vn 0.214446 -0.955856 0.200881
+vn 0.214446 -0.955856 0.200881
+vn 0.306777 -0.944349 0.118715
+vn 0.306777 -0.944349 0.118715
+vn 0.344988 -0.938607 -0.000000
+vn 0.344988 -0.938607 -0.000000
+vn 0.888319 -0.291420 -0.354912
+vn 0.690737 -0.280382 -0.666535
+vn 0.630046 0.482657 -0.608345
+vn 0.823802 0.461327 -0.329434
+vn 0.379850 -0.267982 -0.885381
+vn 0.340852 0.502325 -0.794663
+vn -0.000001 -0.262415 -0.964955
+vn -0.000001 0.510012 -0.860167
+vn -0.379846 -0.267986 -0.885382
+vn -0.340848 0.502323 -0.794666
+vn -0.690733 -0.280390 -0.666535
+vn -0.630046 0.482656 -0.608346
+vn -0.888323 -0.291421 -0.354904
+vn -0.823804 0.461332 -0.329425
+vn -0.955305 -0.295623 -0.000001
+vn -0.892025 0.451985 -0.000001
+vn -0.888323 -0.291421 0.354904
+vn -0.823804 0.461332 0.329425
+vn -0.690732 -0.280388 0.666537
+vn -0.630042 0.482661 0.608347
+vn -0.379846 -0.267981 0.885383
+vn -0.340849 0.502326 0.794664
+vn -0.000000 -0.262411 0.964956
+vn -0.000000 0.510010 0.860169
+vn 0.379836 -0.267978 0.885388
+vn 0.340840 0.502324 0.794669
+vn 0.690730 -0.280384 0.666541
+vn 0.630038 0.482660 0.608351
+vn 0.888322 -0.291421 0.354904
+vn 0.823807 0.461324 0.329427
+vn 0.955303 -0.295628 -0.000001
+vn 0.892030 0.451977 -0.000001
+vn 0.462140 -0.867428 -0.184376
+vn 0.377984 -0.851003 -0.364584
+vn 0.218878 -0.831536 -0.510529
+vn -0.000001 -0.822461 -0.568821
+vn -0.218876 -0.831536 -0.510529
+vn -0.377982 -0.851004 -0.364585
+vn -0.462142 -0.867428 -0.184372
+vn -0.486903 -0.873456 -0.000000
+vn -0.462141 -0.867428 0.184373
+vn -0.377981 -0.851004 0.364585
+vn -0.218878 -0.831533 0.510535
+vn -0.000000 -0.822451 0.568836
+vn 0.218873 -0.831530 0.510542
+vn 0.377981 -0.851003 0.364587
+vn 0.462143 -0.867428 0.184373
+vn 0.486900 -0.873458 -0.000000
+vn 0.276816 -0.954057 -0.114664
+vn 0.211866 -0.954058 -0.211865
+vn 0.114663 -0.954058 -0.276814
+vn -0.000000 -0.954057 -0.299625
+vn -0.114660 -0.954058 -0.276815
+vn -0.211862 -0.954059 -0.211864
+vn -0.276812 -0.954059 -0.114660
+vn -0.299620 -0.954059 0.000000
+vn -0.276814 -0.954058 0.114662
+vn -0.211867 -0.954056 0.211871
+vn -0.114665 -0.954055 0.276825
+vn -0.000000 -0.954054 0.299634
+vn 0.114664 -0.954054 0.276826
+vn 0.211868 -0.954056 0.211872
+vn 0.276819 -0.954056 0.114663
+vn 0.299627 -0.954057 -0.000000
+vn 0.923403 0.031977 -0.382498
+vn 0.706745 0.031980 -0.706746
+vn 0.706745 0.031980 -0.706746
+vn 0.923403 0.031977 -0.382498
+vn 0.382500 0.031981 -0.923402
+vn 0.382500 0.031981 -0.923402
+vn -0.000001 0.031982 -0.999488
+vn -0.000001 0.031982 -0.999488
+vn -0.382492 0.031983 -0.923405
+vn -0.382492 0.031983 -0.923405
+vn -0.706744 0.031979 -0.706746
+vn -0.706744 0.031979 -0.706746
+vn -0.923407 0.031974 -0.382489
+vn -0.923407 0.031974 -0.382489
+vn -0.999489 0.031975 -0.000001
+vn -0.999489 0.031975 -0.000001
+vn -0.923407 0.031975 0.382488
+vn -0.923407 0.031975 0.382488
+vn -0.706743 0.031977 0.706747
+vn -0.706743 0.031977 0.706747
+vn -0.382489 0.031981 0.923406
+vn -0.382489 0.031981 0.923406
+vn -0.000001 0.031982 0.999488
+vn -0.000001 0.031982 0.999488
+vn 0.382483 0.031981 0.923409
+vn 0.382483 0.031981 0.923409
+vn 0.706738 0.031980 0.706752
+vn 0.706738 0.031980 0.706752
+vn 0.923407 0.031978 0.382488
+vn 0.923407 0.031978 0.382488
+vn 0.999489 0.031975 -0.000001
+vn 0.999489 0.031975 -0.000001
+vn 0.088753 0.995375 -0.036764
+vn 0.067929 0.995375 -0.067929
+vn 0.067929 0.995375 -0.067929
+vn 0.088753 0.995375 -0.036764
+vn 0.036764 0.995375 -0.088752
+vn 0.036764 0.995375 -0.088752
+vn -0.000000 0.995375 -0.096065
+vn -0.000000 0.995375 -0.096065
+vn -0.036764 0.995375 -0.088753
+vn -0.036764 0.995375 -0.088753
+vn -0.067930 0.995375 -0.067930
+vn -0.067930 0.995375 -0.067930
+vn -0.088753 0.995375 -0.036764
+vn -0.088753 0.995375 -0.036764
+vn -0.096065 0.995375 -0.000000
+vn -0.096065 0.995375 -0.000000
+vn -0.088752 0.995375 0.036763
+vn -0.088752 0.995375 0.036763
+vn -0.067929 0.995375 0.067929
+vn -0.067929 0.995375 0.067929
+vn -0.036764 0.995375 0.088754
+vn -0.036764 0.995375 0.088754
+vn -0.000000 0.995375 0.096064
+vn -0.000000 0.995375 0.096064
+vn 0.036763 0.995375 0.088752
+vn 0.036763 0.995375 0.088752
+vn 0.067928 0.995375 0.067930
+vn 0.067928 0.995375 0.067930
+vn 0.088753 0.995375 0.036763
+vn 0.088753 0.995375 0.036763
+vn 0.096066 0.995375 -0.000000
+vn 0.096066 0.995375 -0.000000
+vn 0.576060 -0.781803 -0.238619
+vn 0.440903 -0.781798 -0.440905
+vn 0.308341 -0.899917 -0.308342
+vn 0.402863 -0.899919 -0.166875
+vn 0.238620 -0.781801 -0.576063
+vn 0.166878 -0.899916 -0.402868
+vn -0.000001 -0.781802 -0.623526
+vn -0.000000 -0.899915 -0.436065
+vn -0.238614 -0.781802 -0.576063
+vn -0.166877 -0.899914 -0.402874
+vn -0.440900 -0.781801 -0.440901
+vn -0.308347 -0.899914 -0.308347
+vn -0.576063 -0.781802 -0.238615
+vn -0.402871 -0.899915 -0.166876
+vn -0.623522 -0.781806 -0.000001
+vn -0.436062 -0.899917 -0.000001
+vn -0.576055 -0.781809 0.238612
+vn -0.402869 -0.899916 0.166876
+vn -0.440891 -0.781810 0.440895
+vn -0.308343 -0.899916 0.308345
+vn -0.238613 -0.781813 0.576049
+vn -0.166878 -0.899915 0.402872
+vn -0.000000 -0.781818 0.623507
+vn -0.000000 -0.899916 0.436064
+vn 0.238606 -0.781814 0.576050
+vn 0.166873 -0.899916 0.402870
+vn 0.440885 -0.781812 0.440897
+vn 0.308336 -0.899918 0.308344
+vn 0.576054 -0.781811 0.238609
+vn 0.402865 -0.899919 0.166872
+vn 0.623520 -0.781807 -0.000001
+vn 0.436059 -0.899918 -0.000001
+vn 0.202340 -0.975722 -0.083811
+vn 0.154862 -0.975724 -0.154858
+vn 0.154862 -0.975724 -0.154858
+vn 0.202340 -0.975722 -0.083811
+vn 0.083812 -0.975723 -0.202335
+vn 0.083812 -0.975723 -0.202335
+vn -0.000000 -0.975722 -0.219012
+vn -0.000000 -0.975722 -0.219012
+vn -0.083810 -0.975723 -0.202339
+vn -0.083810 -0.975723 -0.202339
+vn -0.154859 -0.975724 -0.154861
+vn -0.154859 -0.975724 -0.154861
+vn -0.202334 -0.975724 -0.083811
+vn -0.202334 -0.975724 -0.083811
+vn -0.219005 -0.975724 -0.000001
+vn -0.219005 -0.975724 -0.000001
+vn -0.202333 -0.975724 0.083810
+vn -0.202333 -0.975724 0.083810
+vn -0.154859 -0.975724 0.154859
+vn -0.154859 -0.975724 0.154859
+vn -0.083811 -0.975723 0.202335
+vn -0.083811 -0.975723 0.202335
+vn 0.000000 -0.975723 0.219010
+vn 0.000000 -0.975723 0.219010
+vn 0.083811 -0.975722 0.202342
+vn 0.083811 -0.975722 0.202342
+vn 0.154864 -0.975722 0.154868
+vn 0.154864 -0.975722 0.154868
+vn 0.202344 -0.975721 0.083813
+vn 0.202344 -0.975721 0.083813
+vn 0.219016 -0.975721 0.000000
+vn 0.219016 -0.975721 0.000000
+vn 0.512825 0.701062 -0.495502
+vn 0.695713 0.662198 -0.278348
+vn 0.266789 0.735684 -0.622569
+vn -0.000001 0.748844 -0.662746
+vn -0.266782 0.735688 -0.622567
+vn -0.512819 0.701073 -0.495493
+vn -0.695708 0.662207 -0.278337
+vn -0.764341 0.644812 -0.000001
+vn -0.695708 0.662208 0.278337
+vn -0.512812 0.701078 0.495494
+vn -0.266785 0.735689 0.622565
+vn -0.000000 0.748842 0.662749
+vn 0.266781 0.735683 0.622574
+vn 0.512816 0.701067 0.495505
+vn 0.695718 0.662195 0.278343
+vn 0.764349 0.644802 -0.000001
+vn 0.689872 0.665144 -0.285763
+vn 0.528009 0.665141 -0.528009
+vn 0.528009 0.665141 -0.528009
+vn 0.689872 0.665144 -0.285763
+vn 0.285763 0.665144 -0.689871
+vn 0.285763 0.665144 -0.689871
+vn -0.000001 0.665144 -0.746715
+vn -0.000001 0.665144 -0.746715
+vn -0.285760 0.665141 -0.689876
+vn -0.285760 0.665141 -0.689876
+vn -0.528013 0.665138 -0.528010
+vn -0.528013 0.665138 -0.528010
+vn -0.689881 0.665138 -0.285754
+vn -0.689881 0.665138 -0.285754
+vn -0.746720 0.665139 -0.000002
+vn -0.746720 0.665139 -0.000002
+vn -0.689876 0.665142 0.285756
+vn -0.689876 0.665142 0.285756
+vn -0.528007 0.665141 0.528011
+vn -0.528007 0.665141 0.528011
+vn -0.285765 0.665143 0.689872
+vn -0.285765 0.665143 0.689872
+vn -0.000000 0.665148 0.746711
+vn -0.000000 0.665148 0.746711
+vn 0.285752 0.665143 0.689877
+vn 0.285752 0.665143 0.689877
+vn 0.527996 0.665147 0.528015
+vn 0.527996 0.665147 0.528015
+vn 0.689873 0.665146 0.285753
+vn 0.689873 0.665146 0.285753
+vn 0.746715 0.665145 -0.000002
+vn 0.746715 0.665145 -0.000002
+vn 0.112915 0.992503 -0.046772
+vn 0.086422 0.992503 -0.086421
+vn 0.086422 0.992503 -0.086421
+vn 0.112915 0.992503 -0.046772
+vn 0.046773 0.992503 -0.112917
+vn 0.046773 0.992503 -0.112917
+vn -0.000000 0.992503 -0.122224
+vn -0.000000 0.992503 -0.122224
+vn -0.046772 0.992503 -0.112919
+vn -0.046772 0.992503 -0.112919
+vn -0.086422 0.992503 -0.086422
+vn -0.086422 0.992503 -0.086422
+vn -0.112916 0.992503 -0.046770
+vn -0.112916 0.992503 -0.046770
+vn -0.122219 0.992503 -0.000001
+vn -0.122219 0.992503 -0.000001
+vn -0.112915 0.992503 0.046770
+vn -0.112915 0.992503 0.046770
+vn -0.086422 0.992503 0.086423
+vn -0.086422 0.992503 0.086423
+vn -0.046774 0.992503 0.112916
+vn -0.046774 0.992503 0.112916
+vn -0.000000 0.992503 0.122220
+vn -0.000000 0.992503 0.122220
+vn 0.046772 0.992503 0.112918
+vn 0.046772 0.992503 0.112918
+vn 0.086420 0.992503 0.086422
+vn 0.086420 0.992503 0.086422
+vn 0.112916 0.992503 0.046770
+vn 0.112916 0.992503 0.046770
+vn 0.122219 0.992503 -0.000001
+vn 0.122219 0.992503 -0.000001
+s 1
+g pCylinder1
+usemtl lambertsg
+f 1/1/1 2/2/2 116/3/3 115/4/4
+f 2/2/2 3/5/5 117/6/6 116/3/3
+f 3/5/5 4/7/7 118/8/8 117/6/6
+f 4/7/7 5/9/9 119/10/10 118/8/8
+f 5/9/9 6/11/11 120/12/12 119/10/10
+f 6/11/11 7/13/13 121/14/14 120/12/12
+f 7/13/13 8/15/15 122/16/16 121/14/14
+f 8/15/15 9/17/17 123/18/18 122/16/16
+f 9/17/17 10/19/19 124/20/20 123/18/18
+f 10/19/19 11/21/21 125/22/22 124/20/20
+f 11/21/21 12/23/23 126/24/24 125/22/22
+f 12/23/23 13/25/25 127/26/26 126/24/24
+f 13/25/25 14/27/27 128/28/28 127/26/26
+f 14/27/27 15/29/29 129/30/30 128/28/28
+f 15/29/29 16/31/31 130/32/32 129/30/30
+f 16/31/31 1/33/1 115/34/4 130/32/32
+s 2
+f 2/2/33 1/1/34 33/35/35
+f 3/5/36 2/2/33 33/35/35
+f 4/7/37 3/5/36 33/35/35
+f 5/9/38 4/7/37 33/35/35
+f 6/11/39 5/9/38 33/35/35
+f 7/13/40 6/11/39 33/35/35
+f 8/15/41 7/13/40 33/35/35
+f 9/17/42 8/15/41 33/35/35
+f 10/19/43 9/17/42 33/35/35
+f 11/21/44 10/19/43 33/35/35
+f 12/23/45 11/21/44 33/35/35
+f 13/25/46 12/23/45 33/35/35
+f 14/27/47 13/25/46 33/35/35
+f 15/29/48 14/27/47 33/35/35
+f 16/31/49 15/29/48 33/35/35
+f 1/33/34 16/31/49 33/35/35
+s off
+f 17/36/50 18/37/51 34/38/52
+f 18/37/53 19/39/54 34/38/55
+f 19/39/56 20/40/57 34/38/58
+f 20/40/59 21/41/60 34/38/61
+f 21/41/62 22/42/63 34/38/64
+f 22/42/65 23/43/66 34/38/67
+f 23/43/68 24/44/69 34/38/70
+f 24/44/71 25/45/72 34/38/73
+f 25/45/74 26/46/75 34/38/76
+f 26/46/77 27/47/78 34/38/79
+f 27/47/80 28/48/81 34/38/82
+f 28/48/83 29/49/84 34/38/85
+f 29/49/86 30/50/87 34/38/88
+f 30/50/89 31/51/90 34/38/91
+f 31/51/92 32/52/93 34/38/94
+f 32/52/95 17/53/96 34/38/97
+s 19
+f 35/54/98 36/55/99 52/56/100 51/57/101
+f 36/55/99 37/58/102 53/59/103 52/56/100
+f 37/58/102 38/60/104 54/61/105 53/59/103
+f 38/60/104 39/62/106 55/63/107 54/61/105
+f 39/62/106 40/64/108 56/65/109 55/63/107
+f 40/64/108 41/66/110 57/67/111 56/65/109
+f 41/66/110 42/68/112 58/69/113 57/67/111
+f 42/68/112 43/70/114 59/71/115 58/69/113
+f 43/70/114 44/72/116 60/73/117 59/71/115
+f 44/72/116 45/74/118 61/75/119 60/73/117
+f 45/74/118 46/76/120 62/77/121 61/75/119
+f 46/76/120 47/78/122 63/79/123 62/77/121
+f 47/78/122 48/80/124 64/81/125 63/79/123
+f 48/80/124 49/82/126 65/83/127 64/81/125
+f 49/82/126 50/84/128 66/85/129 65/83/127
+f 50/84/128 35/86/98 51/87/101 66/85/129
+f 51/57/101 52/56/100 68/88/130 67/89/131
+f 52/56/100 53/59/103 69/90/132 68/88/130
+f 53/59/103 54/61/105 70/91/133 69/90/132
+f 54/61/105 55/63/107 71/92/134 70/91/133
+f 55/63/107 56/65/109 72/93/135 71/92/134
+f 56/65/109 57/67/111 73/94/136 72/93/135
+f 57/67/111 58/69/113 74/95/137 73/94/136
+f 58/69/113 59/71/115 75/96/138 74/95/137
+f 59/71/115 60/73/117 76/97/139 75/96/138
+f 60/73/117 61/75/119 77/98/140 76/97/139
+f 61/75/119 62/77/121 78/99/141 77/98/140
+f 62/77/121 63/79/123 79/100/142 78/99/141
+f 63/79/123 64/81/125 80/101/143 79/100/142
+f 64/81/125 65/83/127 81/102/144 80/101/143
+f 65/83/127 66/85/129 82/103/145 81/102/144
+f 66/85/129 51/87/101 67/104/131 82/103/145
+s 20
+f 67/89/146 68/88/147 84/105/148 83/106/149
+f 68/88/147 69/90/150 85/107/151 84/105/148
+f 69/90/150 70/91/152 86/108/153 85/107/151
+f 70/91/152 71/92/154 87/109/155 86/108/153
+f 71/92/154 72/93/156 88/110/157 87/109/155
+f 72/93/156 73/94/158 89/111/159 88/110/157
+f 73/94/158 74/95/160 90/112/161 89/111/159
+f 74/95/160 75/96/162 91/113/163 90/112/161
+f 75/96/162 76/97/164 92/114/165 91/113/163
+f 76/97/164 77/98/166 93/115/167 92/114/165
+f 77/98/166 78/99/168 94/116/169 93/115/167
+f 78/99/168 79/100/170 95/117/171 94/116/169
+f 79/100/170 80/101/172 96/118/173 95/117/171
+f 80/101/172 81/102/174 97/119/175 96/118/173
+f 81/102/174 82/103/176 98/120/177 97/119/175
+f 82/103/176 67/104/146 83/121/149 98/120/177
+s 21
+f 83/106/178 84/105/179 100/122/180 99/123/181
+f 84/105/179 85/107/182 101/124/183 100/122/180
+f 85/107/182 86/108/184 102/125/185 101/124/183
+f 86/108/184 87/109/186 103/126/187 102/125/185
+f 87/109/186 88/110/188 104/127/189 103/126/187
+f 88/110/188 89/111/190 105/128/191 104/127/189
+f 89/111/190 90/112/192 106/129/193 105/128/191
+f 90/112/192 91/113/194 107/130/195 106/129/193
+f 91/113/194 92/114/196 108/131/197 107/130/195
+f 92/114/196 93/115/198 109/132/199 108/131/197
+f 93/115/198 94/116/200 110/133/201 109/132/199
+f 94/116/200 95/117/202 111/134/203 110/133/201
+f 95/117/202 96/118/204 112/135/205 111/134/203
+f 96/118/204 97/119/206 113/136/207 112/135/205
+f 97/119/206 98/120/208 114/137/209 113/136/207
+f 98/120/208 83/121/178 99/138/181 114/137/209
+s 22
+f 99/123/210 100/122/211 132/139/212 131/140/213
+f 100/122/211 101/124/214 133/141/215 132/139/212
+f 101/124/214 102/125/216 134/142/217 133/141/215
+f 102/125/216 103/126/218 135/143/219 134/142/217
+f 103/126/218 104/127/220 136/144/221 135/143/219
+f 104/127/220 105/128/222 137/145/223 136/144/221
+f 105/128/222 106/129/224 138/146/225 137/145/223
+f 106/129/224 107/130/226 139/147/227 138/146/225
+f 107/130/226 108/131/228 140/148/229 139/147/227
+f 108/131/228 109/132/230 141/149/231 140/148/229
+f 109/132/230 110/133/232 142/150/233 141/149/231
+f 110/133/232 111/134/234 143/151/235 142/150/233
+f 111/134/234 112/135/236 144/152/237 143/151/235
+f 112/135/236 113/136/238 145/153/239 144/152/237
+f 113/136/238 114/137/240 146/154/241 145/153/239
+f 114/137/240 99/138/210 131/155/213 146/154/241
+s 23
+f 115/4/242 116/3/243 548/156/244 547/157/245
+f 116/3/243 117/6/246 549/158/247 548/156/244
+f 117/6/246 118/8/248 550/159/249 549/158/247
+f 118/8/248 119/10/250 551/160/251 550/159/249
+f 119/10/250 120/12/252 552/161/253 551/160/251
+f 120/12/252 121/14/254 553/162/255 552/161/253
+f 121/14/254 122/16/256 554/163/257 553/162/255
+f 122/16/256 123/18/258 555/164/259 554/163/257
+f 123/18/258 124/20/260 556/165/261 555/164/259
+f 124/20/260 125/22/262 557/166/263 556/165/261
+f 125/22/262 126/24/264 558/167/265 557/166/263
+f 126/24/264 127/26/266 559/168/267 558/167/265
+f 127/26/266 128/28/268 560/169/269 559/168/267
+f 128/28/268 129/30/270 561/170/271 560/169/269
+f 129/30/270 130/32/272 562/171/273 561/170/271
+f 130/32/272 115/34/242 547/172/245 562/171/273
+s 24
+f 131/140/274 132/139/275 148/173/276 147/174/277
+f 132/139/275 133/141/278 149/175/279 148/173/276
+f 133/141/278 134/142/280 150/176/281 149/175/279
+f 134/142/280 135/143/282 151/177/283 150/176/281
+f 135/143/282 136/144/284 152/178/285 151/177/283
+f 136/144/284 137/145/286 153/179/287 152/178/285
+f 137/145/286 138/146/288 154/180/289 153/179/287
+f 138/146/288 139/147/290 155/181/291 154/180/289
+f 139/147/290 140/148/292 156/182/293 155/181/291
+f 140/148/292 141/149/294 157/183/295 156/182/293
+f 141/149/294 142/150/296 158/184/297 157/183/295
+f 142/150/296 143/151/298 159/185/299 158/184/297
+f 143/151/298 144/152/300 160/186/301 159/185/299
+f 144/152/300 145/153/302 161/187/303 160/186/301
+f 145/153/302 146/154/304 162/188/305 161/187/303
+f 146/154/304 131/155/274 147/189/277 162/188/305
+s 25
+f 147/174/306 148/173/307 164/190/308 163/191/309
+f 148/173/307 149/175/310 165/192/311 164/190/308
+f 149/175/310 150/176/312 166/193/313 165/192/311
+f 150/176/312 151/177/314 167/194/315 166/193/313
+f 151/177/314 152/178/316 168/195/317 167/194/315
+f 152/178/316 153/179/318 169/196/319 168/195/317
+f 153/179/318 154/180/320 170/197/321 169/196/319
+f 154/180/320 155/181/322 171/198/323 170/197/321
+f 155/181/322 156/182/324 172/199/325 171/198/323
+f 156/182/324 157/183/326 173/200/327 172/199/325
+f 157/183/326 158/184/328 174/201/329 173/200/327
+f 158/184/328 159/185/330 175/202/331 174/201/329
+f 159/185/330 160/186/332 176/203/333 175/202/331
+f 160/186/332 161/187/334 177/204/335 176/203/333
+f 161/187/334 162/188/336 178/205/337 177/204/335
+f 162/188/336 147/189/306 163/206/309 178/205/337
+s 26
+f 163/191/338 164/190/339 180/207/340 179/208/341
+f 164/190/339 165/192/342 181/209/343 180/207/340
+f 165/192/342 166/193/344 182/210/345 181/209/343
+f 166/193/344 167/194/346 183/211/347 182/210/345
+f 167/194/346 168/195/348 184/212/349 183/211/347
+f 168/195/348 169/196/350 185/213/351 184/212/349
+f 169/196/350 170/197/352 186/214/353 185/213/351
+f 170/197/352 171/198/354 187/215/355 186/214/353
+f 171/198/354 172/199/356 188/216/357 187/215/355
+f 172/199/356 173/200/358 189/217/359 188/216/357
+f 173/200/358 174/201/360 190/218/361 189/217/359
+f 174/201/360 175/202/362 191/219/363 190/218/361
+f 175/202/362 176/203/364 192/220/365 191/219/363
+f 176/203/364 177/204/366 193/221/367 192/220/365
+f 177/204/366 178/205/368 194/222/369 193/221/367
+f 178/205/368 163/206/338 179/223/341 194/222/369
+s 27
+f 179/208/370 180/207/371 196/224/372 195/225/373
+f 180/207/371 181/209/374 197/226/375 196/224/372
+f 181/209/374 182/210/376 198/227/377 197/226/375
+f 182/210/376 183/211/378 199/228/379 198/227/377
+f 183/211/378 184/212/380 200/229/381 199/228/379
+f 184/212/380 185/213/382 201/230/383 200/229/381
+f 185/213/382 186/214/384 202/231/385 201/230/383
+f 186/214/384 187/215/386 203/232/387 202/231/385
+f 187/215/386 188/216/388 204/233/389 203/232/387
+f 188/216/388 189/217/390 205/234/391 204/233/389
+f 189/217/390 190/218/392 206/235/393 205/234/391
+f 190/218/392 191/219/394 207/236/395 206/235/393
+f 191/219/394 192/220/396 208/237/397 207/236/395
+f 192/220/396 193/221/398 209/238/399 208/237/397
+f 193/221/398 194/222/400 210/239/401 209/238/399
+f 194/222/400 179/223/370 195/240/373 210/239/401
+s 28
+f 195/225/402 196/224/403 212/241/404 211/242/405
+f 196/224/403 197/226/406 213/243/407 212/241/404
+f 197/226/406 198/227/408 214/244/409 213/243/407
+f 198/227/408 199/228/410 215/245/411 214/244/409
+f 199/228/410 200/229/412 216/246/413 215/245/411
+f 200/229/412 201/230/414 217/247/415 216/246/413
+f 201/230/414 202/231/416 218/248/417 217/247/415
+f 202/231/416 203/232/418 219/249/419 218/248/417
+f 203/232/418 204/233/420 220/250/421 219/249/419
+f 204/233/420 205/234/422 221/251/423 220/250/421
+f 205/234/422 206/235/424 222/252/425 221/251/423
+f 206/235/424 207/236/426 223/253/427 222/252/425
+f 207/236/426 208/237/428 224/254/429 223/253/427
+f 208/237/428 209/238/430 225/255/431 224/254/429
+f 209/238/430 210/239/432 226/256/433 225/255/431
+f 210/239/432 195/240/402 211/257/405 226/256/433
+f 211/242/405 212/241/404 228/258/434 227/259/435
+f 212/241/404 213/243/407 229/260/436 228/258/434
+f 213/243/407 214/244/409 230/261/437 229/260/436
+f 214/244/409 215/245/411 231/262/438 230/261/437
+f 215/245/411 216/246/413 232/263/439 231/262/438
+f 216/246/413 217/247/415 233/264/440 232/263/439
+f 217/247/415 218/248/417 234/265/441 233/264/440
+f 218/248/417 219/249/419 235/266/442 234/265/441
+f 219/249/419 220/250/421 236/267/443 235/266/442
+f 220/250/421 221/251/423 237/268/444 236/267/443
+f 221/251/423 222/252/425 238/269/445 237/268/444
+f 222/252/425 223/253/427 239/270/446 238/269/445
+f 223/253/427 224/254/429 240/271/447 239/270/446
+f 224/254/429 225/255/431 241/272/448 240/271/447
+f 225/255/431 226/256/433 242/273/449 241/272/448
+f 226/256/433 211/257/405 227/274/435 242/273/449
+f 227/259/435 228/258/434 244/275/450 243/276/451
+f 228/258/434 229/260/436 245/277/452 244/275/450
+f 229/260/436 230/261/437 246/278/453 245/277/452
+f 230/261/437 231/262/438 247/279/454 246/278/453
+f 231/262/438 232/263/439 248/280/455 247/279/454
+f 232/263/439 233/264/440 249/281/456 248/280/455
+f 233/264/440 234/265/441 250/282/457 249/281/456
+f 234/265/441 235/266/442 251/283/458 250/282/457
+f 235/266/442 236/267/443 252/284/459 251/283/458
+f 236/267/443 237/268/444 253/285/460 252/284/459
+f 237/268/444 238/269/445 254/286/461 253/285/460
+f 238/269/445 239/270/446 255/287/462 254/286/461
+f 239/270/446 240/271/447 256/288/463 255/287/462
+f 240/271/447 241/272/448 257/289/464 256/288/463
+f 241/272/448 242/273/449 258/290/465 257/289/464
+f 242/273/449 227/274/435 243/291/451 258/290/465
+s 29
+f 243/276/466 244/275/467 260/292/468 259/293/469
+f 244/275/467 245/277/470 261/294/471 260/292/468
+f 245/277/470 246/278/472 262/295/473 261/294/471
+f 246/278/472 247/279/474 263/296/475 262/295/473
+f 247/279/474 248/280/476 264/297/477 263/296/475
+f 248/280/476 249/281/478 265/298/479 264/297/477
+f 249/281/478 250/282/480 266/299/481 265/298/479
+f 250/282/480 251/283/482 267/300/483 266/299/481
+f 251/283/482 252/284/484 268/301/485 267/300/483
+f 252/284/484 253/285/486 269/302/487 268/301/485
+f 253/285/486 254/286/488 270/303/489 269/302/487
+f 254/286/488 255/287/490 271/304/491 270/303/489
+f 255/287/490 256/288/492 272/305/493 271/304/491
+f 256/288/492 257/289/494 273/306/495 272/305/493
+f 257/289/494 258/290/496 274/307/497 273/306/495
+f 258/290/496 243/291/466 259/308/469 274/307/497
+s 30
+f 259/293/498 260/292/499 276/309/500 275/310/501
+f 260/292/499 261/294/502 277/311/503 276/309/500
+f 261/294/502 262/295/504 278/312/505 277/311/503
+f 262/295/504 263/296/506 279/313/507 278/312/505
+f 263/296/506 264/297/508 280/314/509 279/313/507
+f 264/297/508 265/298/510 281/315/511 280/314/509
+f 265/298/510 266/299/512 282/316/513 281/315/511
+f 266/299/512 267/300/514 283/317/515 282/316/513
+f 267/300/514 268/301/516 284/318/517 283/317/515
+f 268/301/516 269/302/518 285/319/519 284/318/517
+f 269/302/518 270/303/520 286/320/521 285/319/519
+f 270/303/520 271/304/522 287/321/523 286/320/521
+f 271/304/522 272/305/524 288/322/525 287/321/523
+f 272/305/524 273/306/526 289/323/527 288/322/525
+f 273/306/526 274/307/528 290/324/529 289/323/527
+f 274/307/528 259/308/498 275/325/501 290/324/529
+s 31
+f 275/310/530 276/309/531 292/326/532 291/327/533
+f 276/309/531 277/311/534 293/328/535 292/326/532
+f 277/311/534 278/312/536 294/329/537 293/328/535
+f 278/312/536 279/313/538 295/330/539 294/329/537
+f 279/313/538 280/314/540 296/331/541 295/330/539
+f 280/314/540 281/315/542 297/332/543 296/331/541
+f 281/315/542 282/316/544 298/333/545 297/332/543
+f 282/316/544 283/317/546 299/334/547 298/333/545
+f 283/317/546 284/318/548 300/335/549 299/334/547
+f 284/318/548 285/319/550 301/336/551 300/335/549
+f 285/319/550 286/320/552 302/337/553 301/336/551
+f 286/320/552 287/321/554 303/338/555 302/337/553
+f 287/321/554 288/322/556 304/339/557 303/338/555
+f 288/322/556 289/323/558 305/340/559 304/339/557
+f 289/323/558 290/324/560 306/341/561 305/340/559
+f 290/324/560 275/325/530 291/342/533 306/341/561
+f 291/327/533 292/326/532 308/343/562 307/344/563
+f 292/326/532 293/328/535 309/345/564 308/343/562
+f 293/328/535 294/329/537 310/346/565 309/345/564
+f 294/329/537 295/330/539 311/347/566 310/346/565
+f 295/330/539 296/331/541 312/348/567 311/347/566
+f 296/331/541 297/332/543 313/349/568 312/348/567
+f 297/332/543 298/333/545 314/350/569 313/349/568
+f 298/333/545 299/334/547 315/351/570 314/350/569
+f 299/334/547 300/335/549 316/352/571 315/351/570
+f 300/335/549 301/336/551 317/353/572 316/352/571
+f 301/336/551 302/337/553 318/354/573 317/353/572
+f 302/337/553 303/338/555 319/355/574 318/354/573
+f 303/338/555 304/339/557 320/356/575 319/355/574
+f 304/339/557 305/340/559 321/357/576 320/356/575
+f 305/340/559 306/341/561 322/358/577 321/357/576
+f 306/341/561 291/342/533 307/359/563 322/358/577
+f 307/344/563 308/343/562 324/360/578 323/361/579
+f 308/343/562 309/345/564 325/362/580 324/360/578
+f 309/345/564 310/346/565 326/363/581 325/362/580
+f 310/346/565 311/347/566 327/364/582 326/363/581
+f 311/347/566 312/348/567 328/365/583 327/364/582
+f 312/348/567 313/349/568 329/366/584 328/365/583
+f 313/349/568 314/350/569 330/367/585 329/366/584
+f 314/350/569 315/351/570 331/368/586 330/367/585
+f 315/351/570 316/352/571 332/369/587 331/368/586
+f 316/352/571 317/353/572 333/370/588 332/369/587
+f 317/353/572 318/354/573 334/371/589 333/370/588
+f 318/354/573 319/355/574 335/372/590 334/371/589
+f 319/355/574 320/356/575 336/373/591 335/372/590
+f 320/356/575 321/357/576 337/374/592 336/373/591
+f 321/357/576 322/358/577 338/375/593 337/374/592
+f 322/358/577 307/359/563 323/376/579 338/375/593
+f 323/361/579 324/360/578 340/377/594 339/378/595
+f 324/360/578 325/362/580 341/379/596 340/377/594
+f 325/362/580 326/363/581 342/380/597 341/379/596
+f 326/363/581 327/364/582 343/381/598 342/380/597
+f 327/364/582 328/365/583 344/382/599 343/381/598
+f 328/365/583 329/366/584 345/383/600 344/382/599
+f 329/366/584 330/367/585 346/384/601 345/383/600
+f 330/367/585 331/368/586 347/385/602 346/384/601
+f 331/368/586 332/369/587 348/386/603 347/385/602
+f 332/369/587 333/370/588 349/387/604 348/386/603
+f 333/370/588 334/371/589 350/388/605 349/387/604
+f 334/371/589 335/372/590 351/389/606 350/388/605
+f 335/372/590 336/373/591 352/390/607 351/389/606
+f 336/373/591 337/374/592 353/391/608 352/390/607
+f 337/374/592 338/375/593 354/392/609 353/391/608
+f 338/375/593 323/376/579 339/393/595 354/392/609
+s 32
+f 339/378/610 340/377/611 356/394/612 355/395/613
+f 340/377/611 341/379/614 357/396/615 356/394/612
+f 341/379/614 342/380/616 358/397/617 357/396/615
+f 342/380/616 343/381/618 359/398/619 358/397/617
+f 343/381/618 344/382/620 360/399/621 359/398/619
+f 344/382/620 345/383/622 361/400/623 360/399/621
+f 345/383/622 346/384/624 362/401/625 361/400/623
+f 346/384/624 347/385/626 363/402/627 362/401/625
+f 347/385/626 348/386/628 364/403/629 363/402/627
+f 348/386/628 349/387/630 365/404/631 364/403/629
+f 349/387/630 350/388/632 366/405/633 365/404/631
+f 350/388/632 351/389/634 367/406/635 366/405/633
+f 351/389/634 352/390/636 368/407/637 367/406/635
+f 352/390/636 353/391/638 369/408/639 368/407/637
+f 353/391/638 354/392/640 370/409/641 369/408/639
+f 354/392/640 339/393/610 355/410/613 370/409/641
+s 33
+f 355/395/642 356/394/643 372/411/644 371/412/645
+f 356/394/643 357/396/646 373/413/647 372/411/644
+f 357/396/646 358/397/648 374/414/649 373/413/647
+f 358/397/648 359/398/650 375/415/651 374/414/649
+f 359/398/650 360/399/652 376/416/653 375/415/651
+f 360/399/652 361/400/654 377/417/655 376/416/653
+f 361/400/654 362/401/656 378/418/657 377/417/655
+f 362/401/656 363/402/658 379/419/659 378/418/657
+f 363/402/658 364/403/660 380/420/661 379/419/659
+f 364/403/660 365/404/662 381/421/663 380/420/661
+f 365/404/662 366/405/664 382/422/665 381/421/663
+f 366/405/664 367/406/666 383/423/667 382/422/665
+f 367/406/666 368/407/668 384/424/669 383/423/667
+f 368/407/668 369/408/670 385/425/671 384/424/669
+f 369/408/670 370/409/672 386/426/673 385/425/671
+f 370/409/672 355/410/642 371/427/645 386/426/673
+s 34
+f 371/412/674 372/411/675 388/428/676 387/429/677
+f 372/411/675 373/413/678 389/430/679 388/428/676
+f 373/413/678 374/414/680 390/431/681 389/430/679
+f 374/414/680 375/415/682 391/432/683 390/431/681
+f 375/415/682 376/416/684 392/433/685 391/432/683
+f 376/416/684 377/417/686 393/434/687 392/433/685
+f 377/417/686 378/418/688 394/435/689 393/434/687
+f 378/418/688 379/419/690 395/436/691 394/435/689
+f 379/419/690 380/420/692 396/437/693 395/436/691
+f 380/420/692 381/421/694 397/438/695 396/437/693
+f 381/421/694 382/422/696 398/439/697 397/438/695
+f 382/422/696 383/423/698 399/440/699 398/439/697
+f 383/423/698 384/424/700 400/441/701 399/440/699
+f 384/424/700 385/425/702 401/442/703 400/441/701
+f 385/425/702 386/426/704 402/443/705 401/442/703
+f 386/426/704 371/427/674 387/444/677 402/443/705
+s 35
+f 387/429/706 388/428/707 404/445/708 403/446/709
+f 388/428/707 389/430/710 405/447/711 404/445/708
+f 389/430/710 390/431/712 406/448/713 405/447/711
+f 390/431/712 391/432/714 407/449/715 406/448/713
+f 391/432/714 392/433/716 408/450/717 407/449/715
+f 392/433/716 393/434/718 409/451/719 408/450/717
+f 393/434/718 394/435/720 410/452/721 409/451/719
+f 394/435/720 395/436/722 411/453/723 410/452/721
+f 395/436/722 396/437/724 412/454/725 411/453/723
+f 396/437/724 397/438/726 413/455/727 412/454/725
+f 397/438/726 398/439/728 414/456/729 413/455/727
+f 398/439/728 399/440/730 415/457/731 414/456/729
+f 399/440/730 400/441/732 416/458/733 415/457/731
+f 400/441/732 401/442/734 417/459/735 416/458/733
+f 401/442/734 402/443/736 418/460/737 417/459/735
+f 402/443/736 387/444/706 403/461/709 418/460/737
+f 403/446/709 404/445/708 420/462/738 419/463/739
+f 404/445/708 405/447/711 421/464/740 420/462/738
+f 405/447/711 406/448/713 422/465/741 421/464/740
+f 406/448/713 407/449/715 423/466/742 422/465/741
+f 407/449/715 408/450/717 424/467/743 423/466/742
+f 408/450/717 409/451/719 425/468/744 424/467/743
+f 409/451/719 410/452/721 426/469/745 425/468/744
+f 410/452/721 411/453/723 427/470/746 426/469/745
+f 411/453/723 412/454/725 428/471/747 427/470/746
+f 412/454/725 413/455/727 429/472/748 428/471/747
+f 413/455/727 414/456/729 430/473/749 429/472/748
+f 414/456/729 415/457/731 431/474/750 430/473/749
+f 415/457/731 416/458/733 432/475/751 431/474/750
+f 416/458/733 417/459/735 433/476/752 432/475/751
+f 417/459/735 418/460/737 434/477/753 433/476/752
+f 418/460/737 403/461/709 419/478/739 434/477/753
+s 36
+f 419/463/754 420/462/755 436/479/756 435/480/757
+f 420/462/755 421/464/758 437/481/759 436/479/756
+f 421/464/758 422/465/760 438/482/761 437/481/759
+f 422/465/760 423/466/762 439/483/763 438/482/761
+f 423/466/762 424/467/764 440/484/765 439/483/763
+f 424/467/764 425/468/766 441/485/767 440/484/765
+f 425/468/766 426/469/768 442/486/769 441/485/767
+f 426/469/768 427/470/770 443/487/771 442/486/769
+f 427/470/770 428/471/772 444/488/773 443/487/771
+f 428/471/772 429/472/774 445/489/775 444/488/773
+f 429/472/774 430/473/776 446/490/777 445/489/775
+f 430/473/776 431/474/778 447/491/779 446/490/777
+f 431/474/778 432/475/780 448/492/781 447/491/779
+f 432/475/780 433/476/782 449/493/783 448/492/781
+f 433/476/782 434/477/784 450/494/785 449/493/783
+f 434/477/784 419/478/754 435/495/757 450/494/785
+f 435/480/757 436/479/756 452/496/786 451/497/787
+f 436/479/756 437/481/759 453/498/788 452/496/786
+f 437/481/759 438/482/761 454/499/789 453/498/788
+f 438/482/761 439/483/763 455/500/790 454/499/789
+f 439/483/763 440/484/765 456/501/791 455/500/790
+f 440/484/765 441/485/767 457/502/792 456/501/791
+f 441/485/767 442/486/769 458/503/793 457/502/792
+f 442/486/769 443/487/771 459/504/794 458/503/793
+f 443/487/771 444/488/773 460/505/795 459/504/794
+f 444/488/773 445/489/775 461/506/796 460/505/795
+f 445/489/775 446/490/777 462/507/797 461/506/796
+f 446/490/777 447/491/779 463/508/798 462/507/797
+f 447/491/779 448/492/781 464/509/799 463/508/798
+f 448/492/781 449/493/783 465/510/800 464/509/799
+f 449/493/783 450/494/785 466/511/801 465/510/800
+f 450/494/785 435/495/757 451/512/787 466/511/801
+s 37
+f 451/497/802 452/496/803 18/37/804 17/36/805
+f 452/496/803 453/498/806 19/39/807 18/37/804
+f 453/498/806 454/499/808 20/40/809 19/39/807
+f 454/499/808 455/500/810 21/41/811 20/40/809
+f 455/500/810 456/501/812 22/42/813 21/41/811
+f 456/501/812 457/502/814 23/43/815 22/42/813
+f 457/502/814 458/503/816 24/44/817 23/43/815
+f 458/503/816 459/504/818 25/45/819 24/44/817
+f 459/504/818 460/505/820 26/46/821 25/45/819
+f 460/505/820 461/506/822 27/47/823 26/46/821
+f 461/506/822 462/507/824 28/48/825 27/47/823
+f 462/507/824 463/508/826 29/49/827 28/48/825
+f 463/508/826 464/509/828 30/50/829 29/49/827
+f 464/509/828 465/510/830 31/51/831 30/50/829
+f 465/510/830 466/511/832 32/52/833 31/51/831
+f 466/511/832 451/512/802 17/53/805 32/52/833
+s 19
+f 467/513/834 468/514/835 36/55/99 35/54/98
+f 468/514/835 469/515/836 37/58/102 36/55/99
+f 469/515/836 470/516/837 38/60/104 37/58/102
+f 470/516/837 471/517/838 39/62/106 38/60/104
+f 471/517/838 472/518/839 40/64/108 39/62/106
+f 472/518/839 473/519/840 41/66/110 40/64/108
+f 473/519/840 474/520/841 42/68/112 41/66/110
+f 474/520/841 475/521/842 43/70/114 42/68/112
+f 475/521/842 476/522/843 44/72/116 43/70/114
+f 476/522/843 477/523/844 45/74/118 44/72/116
+f 477/523/844 478/524/845 46/76/120 45/74/118
+f 478/524/845 479/525/846 47/78/122 46/76/120
+f 479/525/846 480/526/847 48/80/124 47/78/122
+f 480/526/847 481/527/848 49/82/126 48/80/124
+f 481/527/848 482/528/849 50/84/128 49/82/126
+f 482/528/849 467/529/834 35/86/98 50/84/128
+s 38
+f 483/530/850 484/531/851 468/514/852 467/513/853
+f 484/531/851 485/532/854 469/515/855 468/514/852
+f 485/532/854 486/533/856 470/516/857 469/515/855
+f 486/533/856 487/534/858 471/517/859 470/516/857
+f 487/534/858 488/535/860 472/518/861 471/517/859
+f 488/535/860 489/536/862 473/519/863 472/518/861
+f 489/536/862 490/537/864 474/520/865 473/519/863
+f 490/537/864 491/538/866 475/521/867 474/520/865
+f 491/538/866 492/539/868 476/522/869 475/521/867
+f 492/539/868 493/540/870 477/523/871 476/522/869
+f 493/540/870 494/541/872 478/524/873 477/523/871
+f 494/541/872 495/542/874 479/525/875 478/524/873
+f 495/542/874 496/543/876 480/526/877 479/525/875
+f 496/543/876 497/544/878 481/527/879 480/526/877
+f 497/544/878 498/545/880 482/528/881 481/527/879
+f 498/545/880 483/546/850 467/529/853 482/528/881
+s 39
+f 499/547/882 500/548/883 484/531/884 483/530/885
+f 500/548/883 501/549/886 485/532/887 484/531/884
+f 501/549/886 502/550/888 486/533/889 485/532/887
+f 502/550/888 503/551/890 487/534/891 486/533/889
+f 503/551/890 504/552/892 488/535/893 487/534/891
+f 504/552/892 505/553/894 489/536/895 488/535/893
+f 505/553/894 506/554/896 490/537/897 489/536/895
+f 506/554/896 507/555/898 491/538/899 490/537/897
+f 507/555/898 508/556/900 492/539/901 491/538/899
+f 508/556/900 509/557/902 493/540/903 492/539/901
+f 509/557/902 510/558/904 494/541/905 493/540/903
+f 510/558/904 511/559/906 495/542/907 494/541/905
+f 511/559/906 512/560/908 496/543/909 495/542/907
+f 512/560/908 513/561/910 497/544/911 496/543/909
+f 513/561/910 514/562/912 498/545/913 497/544/911
+f 514/562/912 499/563/882 483/546/885 498/545/913
+f 515/564/914 516/565/915 500/548/883 499/547/882
+f 516/565/915 517/566/916 501/549/886 500/548/883
+f 517/566/916 518/567/917 502/550/888 501/549/886
+f 518/567/917 519/568/918 503/551/890 502/550/888
+f 519/568/918 520/569/919 504/552/892 503/551/890
+f 520/569/919 521/570/920 505/553/894 504/552/892
+f 521/570/920 522/571/921 506/554/896 505/553/894
+f 522/571/921 523/572/922 507/555/898 506/554/896
+f 523/572/922 524/573/923 508/556/900 507/555/898
+f 524/573/923 525/574/924 509/557/902 508/556/900
+f 525/574/924 526/575/925 510/558/904 509/557/902
+f 526/575/925 527/576/926 511/559/906 510/558/904
+f 527/576/926 528/577/927 512/560/908 511/559/906
+f 528/577/927 529/578/928 513/561/910 512/560/908
+f 529/578/928 530/579/929 514/562/912 513/561/910
+f 530/579/929 515/580/914 499/563/882 514/562/912
+s 40
+f 531/581/930 532/582/931 660/583/932 659/584/933
+f 532/582/931 533/585/934 661/586/935 660/583/932
+f 533/585/934 534/587/936 662/588/937 661/586/935
+f 534/587/936 535/589/938 663/590/939 662/588/937
+f 535/589/938 536/591/940 664/592/941 663/590/939
+f 536/591/940 537/593/942 665/594/943 664/592/941
+f 537/593/942 538/595/944 666/596/945 665/594/943
+f 538/595/944 539/597/946 667/598/947 666/596/945
+f 539/597/946 540/599/948 668/600/949 667/598/947
+f 540/599/948 541/601/950 669/602/951 668/600/949
+f 541/601/950 542/603/952 670/604/953 669/602/951
+f 542/603/952 543/605/954 671/606/955 670/604/953
+f 543/605/954 544/607/956 672/608/957 671/606/955
+f 544/607/956 545/609/958 673/610/959 672/608/957
+f 545/609/958 546/611/960 674/612/961 673/610/959
+f 546/611/960 531/613/930 659/614/933 674/612/961
+s 41
+f 547/157/962 548/156/963 580/615/964 579/616/965
+f 548/156/963 549/158/966 581/617/967 580/615/964
+f 549/158/966 550/159/968 582/618/969 581/617/967
+f 550/159/968 551/160/970 583/619/971 582/618/969
+f 551/160/970 552/161/972 584/620/973 583/619/971
+f 552/161/972 553/162/974 585/621/975 584/620/973
+f 553/162/974 554/163/976 586/622/977 585/621/975
+f 554/163/976 555/164/978 587/623/979 586/622/977
+f 555/164/978 556/165/980 588/624/981 587/623/979
+f 556/165/980 557/166/982 589/625/983 588/624/981
+f 557/166/982 558/167/984 590/626/985 589/625/983
+f 558/167/984 559/168/986 591/627/987 590/626/985
+f 559/168/986 560/169/988 592/628/989 591/627/987
+f 560/169/988 561/170/990 593/629/991 592/628/989
+f 561/170/990 562/171/992 594/630/993 593/629/991
+f 562/171/992 547/172/962 579/631/965 594/630/993
+s 42
+f 563/632/994 564/633/995 692/634/996 691/635/997
+f 564/633/995 565/636/998 693/637/999 692/634/996
+f 565/636/998 566/638/1000 694/639/1001 693/637/999
+f 566/638/1000 567/640/1002 695/641/1003 694/639/1001
+f 567/640/1002 568/642/1004 696/643/1005 695/641/1003
+f 568/642/1004 569/644/1006 697/645/1007 696/643/1005
+f 569/644/1006 570/646/1008 698/647/1009 697/645/1007
+f 570/646/1008 571/648/1010 699/649/1011 698/647/1009
+f 571/648/1010 572/650/1012 700/651/1013 699/649/1011
+f 572/650/1012 573/652/1014 701/653/1015 700/651/1013
+f 573/652/1014 574/654/1016 702/655/1017 701/653/1015
+f 574/654/1016 575/656/1018 703/657/1019 702/655/1017
+f 575/656/1018 576/658/1020 704/659/1021 703/657/1019
+f 576/658/1020 577/660/1022 705/661/1023 704/659/1021
+f 577/660/1022 578/662/1024 706/663/1025 705/661/1023
+f 578/662/1024 563/664/994 691/665/997 706/663/1025
+f 579/616/1026 580/615/1027 564/633/995 563/632/994
+f 580/615/1027 581/617/1028 565/636/998 564/633/995
+f 581/617/1028 582/618/1029 566/638/1000 565/636/998
+f 582/618/1029 583/619/1030 567/640/1002 566/638/1000
+f 583/619/1030 584/620/1031 568/642/1004 567/640/1002
+f 584/620/1031 585/621/1032 569/644/1006 568/642/1004
+f 585/621/1032 586/622/1033 570/646/1008 569/644/1006
+f 586/622/1033 587/623/1034 571/648/1010 570/646/1008
+f 587/623/1034 588/624/1035 572/650/1012 571/648/1010
+f 588/624/1035 589/625/1036 573/652/1014 572/650/1012
+f 589/625/1036 590/626/1037 574/654/1016 573/652/1014
+f 590/626/1037 591/627/1038 575/656/1018 574/654/1016
+f 591/627/1038 592/628/1039 576/658/1020 575/656/1018
+f 592/628/1039 593/629/1040 577/660/1022 576/658/1020
+f 593/629/1040 594/630/1041 578/662/1024 577/660/1022
+f 594/630/1041 579/631/1026 563/664/994 578/662/1024
+s 39
+f 595/666/1042 596/667/1043 516/565/915 515/564/914
+f 596/667/1043 597/668/1044 517/566/916 516/565/915
+f 597/668/1044 598/669/1045 518/567/917 517/566/916
+f 598/669/1045 599/670/1046 519/568/918 518/567/917
+f 599/670/1046 600/671/1047 520/569/919 519/568/918
+f 600/671/1047 601/672/1048 521/570/920 520/569/919
+f 601/672/1048 602/673/1049 522/571/921 521/570/920
+f 602/673/1049 603/674/1050 523/572/922 522/571/921
+f 603/674/1050 604/675/1051 524/573/923 523/572/922
+f 604/675/1051 605/676/1052 525/574/924 524/573/923
+f 605/676/1052 606/677/1053 526/575/925 525/574/924
+f 606/677/1053 607/678/1054 527/576/926 526/575/925
+f 607/678/1054 608/679/1055 528/577/927 527/576/926
+f 608/679/1055 609/680/1056 529/578/928 528/577/927
+f 609/680/1056 610/681/1057 530/579/929 529/578/928
+f 610/681/1057 595/682/1042 515/580/914 530/579/929
+s 43
+f 611/683/1058 612/684/1059 596/667/1060 595/666/1061
+f 612/684/1059 613/685/1062 597/668/1063 596/667/1060
+f 613/685/1062 614/686/1064 598/669/1065 597/668/1063
+f 614/686/1064 615/687/1066 599/670/1067 598/669/1065
+f 615/687/1066 616/688/1068 600/671/1069 599/670/1067
+f 616/688/1068 617/689/1070 601/672/1071 600/671/1069
+f 617/689/1070 618/690/1072 602/673/1073 601/672/1071
+f 618/690/1072 619/691/1074 603/674/1075 602/673/1073
+f 619/691/1074 620/692/1076 604/675/1077 603/674/1075
+f 620/692/1076 621/693/1078 605/676/1079 604/675/1077
+f 621/693/1078 622/694/1080 606/677/1081 605/676/1079
+f 622/694/1080 623/695/1082 607/678/1083 606/677/1081
+f 623/695/1082 624/696/1084 608/679/1085 607/678/1083
+f 624/696/1084 625/697/1086 609/680/1087 608/679/1085
+f 625/697/1086 626/698/1088 610/681/1089 609/680/1087
+f 626/698/1088 611/699/1058 595/682/1061 610/681/1089
+s 44
+f 627/700/1090 628/701/1091 612/684/1092 611/683/1093
+f 628/701/1091 629/702/1094 613/685/1095 612/684/1092
+f 629/702/1094 630/703/1096 614/686/1097 613/685/1095
+f 630/703/1096 631/704/1098 615/687/1099 614/686/1097
+f 631/704/1098 632/705/1100 616/688/1101 615/687/1099
+f 632/705/1100 633/706/1102 617/689/1103 616/688/1101
+f 633/706/1102 634/707/1104 618/690/1105 617/689/1103
+f 634/707/1104 635/708/1106 619/691/1107 618/690/1105
+f 635/708/1106 636/709/1108 620/692/1109 619/691/1107
+f 636/709/1108 637/710/1110 621/693/1111 620/692/1109
+f 637/710/1110 638/711/1112 622/694/1113 621/693/1111
+f 638/711/1112 639/712/1114 623/695/1115 622/694/1113
+f 639/712/1114 640/713/1116 624/696/1117 623/695/1115
+f 640/713/1116 641/714/1118 625/697/1119 624/696/1117
+f 641/714/1118 642/715/1120 626/698/1121 625/697/1119
+f 642/715/1120 627/716/1090 611/699/1093 626/698/1121
+s 40
+f 643/717/1122 644/718/1123 628/701/1124 627/700/1125
+f 644/718/1123 645/719/1126 629/702/1127 628/701/1124
+f 645/719/1126 646/720/1128 630/703/1129 629/702/1127
+f 646/720/1128 647/721/1130 631/704/1131 630/703/1129
+f 647/721/1130 648/722/1132 632/705/1133 631/704/1131
+f 648/722/1132 649/723/1134 633/706/1135 632/705/1133
+f 649/723/1134 650/724/1136 634/707/1137 633/706/1135
+f 650/724/1136 651/725/1138 635/708/1139 634/707/1137
+f 651/725/1138 652/726/1140 636/709/1141 635/708/1139
+f 652/726/1140 653/727/1142 637/710/1143 636/709/1141
+f 653/727/1142 654/728/1144 638/711/1145 637/710/1143
+f 654/728/1144 655/729/1146 639/712/1147 638/711/1145
+f 655/729/1146 656/730/1148 640/713/1149 639/712/1147
+f 656/730/1148 657/731/1150 641/714/1151 640/713/1149
+f 657/731/1150 658/732/1152 642/715/1153 641/714/1151
+f 658/732/1152 643/733/1122 627/716/1125 642/715/1153
+f 659/584/933 660/583/932 644/718/1123 643/717/1122
+f 660/583/932 661/586/935 645/719/1126 644/718/1123
+f 661/586/935 662/588/937 646/720/1128 645/719/1126
+f 662/588/937 663/590/939 647/721/1130 646/720/1128
+f 663/590/939 664/592/941 648/722/1132 647/721/1130
+f 664/592/941 665/594/943 649/723/1134 648/722/1132
+f 665/594/943 666/596/945 650/724/1136 649/723/1134
+f 666/596/945 667/598/947 651/725/1138 650/724/1136
+f 667/598/947 668/600/949 652/726/1140 651/725/1138
+f 668/600/949 669/602/951 653/727/1142 652/726/1140
+f 669/602/951 670/604/953 654/728/1144 653/727/1142
+f 670/604/953 671/606/955 655/729/1146 654/728/1144
+f 671/606/955 672/608/957 656/730/1148 655/729/1146
+f 672/608/957 673/610/959 657/731/1150 656/730/1148
+f 673/610/959 674/612/961 658/732/1152 657/731/1150
+f 674/612/961 659/614/933 643/733/1122 658/732/1152
+s 45
+f 675/734/1154 676/735/1155 532/582/1156 531/581/1157
+f 676/735/1155 677/736/1158 533/585/1159 532/582/1156
+f 677/736/1158 678/737/1160 534/587/1161 533/585/1159
+f 678/737/1160 679/738/1162 535/589/1163 534/587/1161
+f 679/738/1162 680/739/1164 536/591/1165 535/589/1163
+f 680/739/1164 681/740/1166 537/593/1167 536/591/1165
+f 681/740/1166 682/741/1168 538/595/1169 537/593/1167
+f 682/741/1168 683/742/1170 539/597/1171 538/595/1169
+f 683/742/1170 684/743/1172 540/599/1173 539/597/1171
+f 684/743/1172 685/744/1174 541/601/1175 540/599/1173
+f 685/744/1174 686/745/1176 542/603/1177 541/601/1175
+f 686/745/1176 687/746/1178 543/605/1179 542/603/1177
+f 687/746/1178 688/747/1180 544/607/1181 543/605/1179
+f 688/747/1180 689/748/1182 545/609/1183 544/607/1181
+f 689/748/1182 690/749/1184 546/611/1185 545/609/1183
+f 690/749/1184 675/750/1154 531/613/1157 546/611/1185
+s 42
+f 691/635/997 692/634/996 724/751/1186 723/752/1187
+f 692/634/996 693/637/999 725/753/1188 724/751/1186
+f 693/637/999 694/639/1001 726/754/1189 725/753/1188
+f 694/639/1001 695/641/1003 727/755/1190 726/754/1189
+f 695/641/1003 696/643/1005 728/756/1191 727/755/1190
+f 696/643/1005 697/645/1007 729/757/1192 728/756/1191
+f 697/645/1007 698/647/1009 730/758/1193 729/757/1192
+f 698/647/1009 699/649/1011 731/759/1194 730/758/1193
+f 699/649/1011 700/651/1013 732/760/1195 731/759/1194
+f 700/651/1013 701/653/1015 733/761/1196 732/760/1195
+f 701/653/1015 702/655/1017 734/762/1197 733/761/1196
+f 702/655/1017 703/657/1019 735/763/1198 734/762/1197
+f 703/657/1019 704/659/1021 736/764/1199 735/763/1198
+f 704/659/1021 705/661/1023 737/765/1200 736/764/1199
+f 705/661/1023 706/663/1025 738/766/1201 737/765/1200
+f 706/663/1025 691/665/997 723/767/1187 738/766/1201
+s 46
+f 707/768/1202 708/769/1203 676/735/1204 675/734/1205
+f 708/769/1203 709/770/1206 677/736/1207 676/735/1204
+f 709/770/1206 710/771/1208 678/737/1209 677/736/1207
+f 710/771/1208 711/772/1210 679/738/1211 678/737/1209
+f 711/772/1210 712/773/1212 680/739/1213 679/738/1211
+f 712/773/1212 713/774/1214 681/740/1215 680/739/1213
+f 713/774/1214 714/775/1216 682/741/1217 681/740/1215
+f 714/775/1216 715/776/1218 683/742/1219 682/741/1217
+f 715/776/1218 716/777/1220 684/743/1221 683/742/1219
+f 716/777/1220 717/778/1222 685/744/1223 684/743/1221
+f 717/778/1222 718/779/1224 686/745/1225 685/744/1223
+f 718/779/1224 719/780/1226 687/746/1227 686/745/1225
+f 719/780/1226 720/781/1228 688/747/1229 687/746/1227
+f 720/781/1228 721/782/1230 689/748/1231 688/747/1229
+f 721/782/1230 722/783/1232 690/749/1233 689/748/1231
+f 722/783/1232 707/784/1202 675/750/1205 690/749/1233
+s 47
+f 723/752/1234 724/751/1235 708/769/1236 707/768/1237
+f 724/751/1235 725/753/1238 709/770/1239 708/769/1236
+f 725/753/1238 726/754/1240 710/771/1241 709/770/1239
+f 726/754/1240 727/755/1242 711/772/1243 710/771/1241
+f 727/755/1242 728/756/1244 712/773/1245 711/772/1243
+f 728/756/1244 729/757/1246 713/774/1247 712/773/1245
+f 729/757/1246 730/758/1248 714/775/1249 713/774/1247
+f 730/758/1248 731/759/1250 715/776/1251 714/775/1249
+f 731/759/1250 732/760/1252 716/777/1253 715/776/1251
+f 732/760/1252 733/761/1254 717/778/1255 716/777/1253
+f 733/761/1254 734/762/1256 718/779/1257 717/778/1255
+f 734/762/1256 735/763/1258 719/780/1259 718/779/1257
+f 735/763/1258 736/764/1260 720/781/1261 719/780/1259
+f 736/764/1260 737/765/1262 721/782/1263 720/781/1261
+f 737/765/1262 738/766/1264 722/783/1265 721/782/1263
+f 738/766/1264 723/767/1234 707/784/1237 722/783/1265
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/bloom.s3d_inst
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/bloom.s3d_inst	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/bloom.s3d_inst	(revision 2453)
@@ -0,0 +1,56 @@
+// Machine-made Shark 3D Snake Text 2x0 Stream. Format: ascii.
+producer
+    "Shark 3D Exporter for Max v7000, Spinor GmbH (www.spinor.com), Copyright "
+    & "1996-2006 Spinor GmbH, shark3d_v5x0x6_t164x12u_c164x12u_enterpr_win32_v"
+    & "c7x1_release_fwin32vc7x1release"
+source
+    "C:\\Shark3D\\v5x0x6_t164x12u\\shark3_labour\\src\\res\\level\\model\\bloo"
+    & "m.max"
+format "shark3d_inst_5"
+data
+{
+    elem_array
+    {
+        ident "stdsimplepos:scene_root"
+        name "simplepos:scene_root"
+        param
+        {
+            env "env"
+            parent "hook"
+            transl 0.0 0.0 0.0
+            quat 0.0 0.0 0.0 1.0
+        }
+    }
+    {
+        ident "stdsimplepos:bloom"
+        name "simplepos:bloom"
+        param
+        {
+            env "env"
+            parent "simplepos:scene_root"
+            transl -0.00760216 0.00501502 -261.14
+            quat 0.0 0.0 0.0 1.0
+        }
+    }
+    {
+        ident "stdinst:bloom"
+        name "inst:bloom"
+        param
+        {
+            env "env"
+            gensuppl "gensuppl"
+            state "state"
+            model_ident "stdmodel:level/model/bloom.s3d_model_run#bloom"
+            model_param
+            {
+            }
+            shader_ident
+                "stdshader:levelutil/shader/posteffects.s3d_shader_run#bloom"
+            shader_param
+            {
+            }
+            pos "simplepos:bloom"
+        }
+    }
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/bloom.s3d_pospath
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/bloom.s3d_pospath	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/bloom.s3d_pospath	(revision 2453)
@@ -0,0 +1,14 @@
+// Machine-made Shark 3D Snake Text 2x0 Stream. Format: ascii.
+producer
+    "Shark 3D Exporter for Max v7000, Spinor GmbH (www.spinor.com), Copyright "
+    & "1996-2006 Spinor GmbH, shark3d_v5x0x6_t164x12u_c164x12u_enterpr_win32_v"
+    & "c7x1_release_fwin32vc7x1release"
+source
+    "C:\\Shark3D\\v5x0x6_t164x12u\\shark3_labour\\src\\res\\level\\model\\bloo"
+    & "m.max"
+format "shark3d_path_5"
+data
+{
+    path_array
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/skymodel.s3d_bonepath
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/skymodel.s3d_bonepath	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/skymodel.s3d_bonepath	(revision 2453)
@@ -0,0 +1,13 @@
+// Machine-made Shark 3D Snake Text 2x0 Stream. Format: ascii.
+producer
+    "Shark 3D Exporter for Max v6000, Spinor GmbH (www.spinor.com), shark3d_v5"
+    & "x0x1_t153_c153_enterpr_win32_vc7x1_release_fwin32vc7x1release"
+source
+    "C:\\develop\\svn\\shark3d\\samples\\kit_empty_walk\\src\\res\\level\\mode"
+    & "l\\skymodel.max"
+format "shark3d_path_5"
+data
+{
+    path_array
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/skymodel.s3d_model
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/skymodel.s3d_model	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/skymodel.s3d_model	(revision 2453)
@@ -0,0 +1,328 @@
+// Machine-made Shark 3D Snake Text 2x0 Stream. Format: ascii.
+producer
+    "Shark 3D Exporter for Max v6000, Spinor GmbH (www.spinor.com), shark3d_v5"
+    & "x0x1_t153_c153_enterpr_win32_vc7x1_release_fwin32vc7x1release"
+source
+    "C:\\develop\\svn\\shark3d\\samples\\kit_empty_walk\\src\\res\\level\\mode"
+    & "l\\skymodel.max"
+format "shark3d_model_5"
+data
+{
+    model_array
+    {
+        name "box"
+        range 0.0 3.33333
+        model_variant_array
+        {
+            kind_set "render"
+            prec 0.0
+            family_array
+            {
+                layer_array
+                {
+                    tex_name "stdtex:level/texture/sky_bottom_clamp.tga"
+                    wrap_x "repeat"
+                    wrap_y "repeat"
+                    wrap_z ""
+                    filter "std"
+                }
+            }
+            {
+                layer_array
+                {
+                    tex_name "stdtex:level/texture/sky_top_clamp.tga"
+                    wrap_x "repeat"
+                    wrap_y "repeat"
+                    wrap_z ""
+                    filter "std"
+                }
+            }
+            {
+                layer_array
+                {
+                    tex_name "stdtex:level/texture/sky_back_clamp.tga"
+                    wrap_x "repeat"
+                    wrap_y "repeat"
+                    wrap_z ""
+                    filter "std"
+                }
+            }
+            {
+                layer_array
+                {
+                    tex_name "stdtex:level/texture/sky_left_clamp.tga"
+                    wrap_x "repeat"
+                    wrap_y "repeat"
+                    wrap_z ""
+                    filter "std"
+                }
+            }
+            {
+                layer_array
+                {
+                    tex_name "stdtex:level/texture/sky_front_clamp.tga"
+                    wrap_x "repeat"
+                    wrap_y "repeat"
+                    wrap_z ""
+                    filter "std"
+                }
+            }
+            {
+                layer_array
+                {
+                    tex_name "stdtex:level/texture/sky_right_clamp.tga"
+                    wrap_x "clamp"
+                    wrap_y "clamp"
+                    wrap_z ""
+                    filter "std"
+                }
+            }
+            vertex_array
+            {
+                frame_array
+                {
+                    point 50.0 -50.0 0.0
+                    normal 0.0 0.0 1.0
+                    tex_coord_array 0.998 0.998
+                }
+            }
+            {
+                frame_array
+                {
+                    point 50.0 50.0 0.0
+                    normal 0.0 0.0 1.0
+                    tex_coord_array 0.998 0.00199997
+                }
+            }
+            {
+                frame_array
+                {
+                    point -50.0 50.0 0.0
+                    normal 0.0 0.0 1.0
+                    tex_coord_array 0.002 0.00199997
+                }
+            }
+            {
+                frame_array
+                {
+                    point -50.0 -50.0 0.0
+                    normal 0.0 0.0 1.0
+                    tex_coord_array 0.002 0.998
+                }
+            }
+            {
+                frame_array
+                {
+                    point 50.0 -50.0 100.0
+                    normal 0.0 0.0 -1.0
+                    tex_coord_array 0.002 0.998
+                }
+            }
+            {
+                frame_array
+                {
+                    point -50.0 -50.0 100.0
+                    normal 0.0 0.0 -1.0
+                    tex_coord_array 0.998 0.998
+                }
+            }
+            {
+                frame_array
+                {
+                    point -50.0 50.0 100.0
+                    normal 0.0 0.0 -1.0
+                    tex_coord_array 0.998 0.00199997
+                }
+            }
+            {
+                frame_array
+                {
+                    point 50.0 50.0 100.0
+                    normal 0.0 0.0 -1.0
+                    tex_coord_array 0.002 0.00199997
+                }
+            }
+            {
+                frame_array
+                {
+                    point 50.0 -50.0 0.0
+                    normal 0.0 1.0 0.0
+                    tex_coord_array 0.002 0.998
+                }
+            }
+            {
+                frame_array
+                {
+                    point -50.0 -50.0 0.0
+                    normal 0.0 1.0 0.0
+                    tex_coord_array 0.998 0.998
+                }
+            }
+            {
+                frame_array
+                {
+                    point -50.0 -50.0 100.0
+                    normal 0.0 1.0 0.0
+                    tex_coord_array 0.998 0.00199997
+                }
+            }
+            {
+                frame_array
+                {
+                    point 50.0 -50.0 100.0
+                    normal 0.0 1.0 0.0
+                    tex_coord_array 0.002 0.00199997
+                }
+            }
+            {
+                frame_array
+                {
+                    point -50.0 -50.0 0.0
+                    normal 1.0 0.0 0.0
+                    tex_coord_array 0.002 0.998
+                }
+            }
+            {
+                frame_array
+                {
+                    point -50.0 50.0 0.0
+                    normal 1.0 0.0 0.0
+                    tex_coord_array 0.998 0.998
+                }
+            }
+            {
+                frame_array
+                {
+                    point -50.0 50.0 100.0
+                    normal 1.0 0.0 0.0
+                    tex_coord_array 0.998 0.00199997
+                }
+            }
+            {
+                frame_array
+                {
+                    point -50.0 -50.0 100.0
+                    normal 1.0 0.0 0.0
+                    tex_coord_array 0.002 0.00199997
+                }
+            }
+            {
+                frame_array
+                {
+                    point -50.0 50.0 0.0
+                    normal 0.0 -1.0 0.0
+                    tex_coord_array 0.002 0.998
+                }
+            }
+            {
+                frame_array
+                {
+                    point 50.0 50.0 0.0
+                    normal 0.0 -1.0 0.0
+                    tex_coord_array 0.998 0.998
+                }
+            }
+            {
+                frame_array
+                {
+                    point 50.0 50.0 100.0
+                    normal 0.0 -1.0 0.0
+                    tex_coord_array 0.998 0.00199997
+                }
+            }
+            {
+                frame_array
+                {
+                    point -50.0 50.0 100.0
+                    normal 0.0 -1.0 0.0
+                    tex_coord_array 0.002 0.00199997
+                }
+            }
+            {
+                frame_array
+                {
+                    point 50.0 50.0 0.0
+                    normal -1.0 0.0 0.0
+                    tex_coord_array 0.002 0.998
+                }
+            }
+            {
+                frame_array
+                {
+                    point 50.0 -50.0 0.0
+                    normal -1.0 0.0 0.0
+                    tex_coord_array 0.998 0.998
+                }
+            }
+            {
+                frame_array
+                {
+                    point 50.0 -50.0 100.0
+                    normal -1.0 0.0 0.0
+                    tex_coord_array 0.998 0.00199997
+                }
+            }
+            {
+                frame_array
+                {
+                    point 50.0 50.0 100.0
+                    normal -1.0 0.0 0.0
+                    tex_coord_array 0.002 0.00199997
+                }
+            }
+            face_array
+            {
+                family_idx 0
+                vertex_idx_array 0 1 2
+            }
+            {
+                family_idx 0
+                vertex_idx_array 2 3 0
+            }
+            {
+                family_idx 1
+                vertex_idx_array 4 5 6
+            }
+            {
+                family_idx 1
+                vertex_idx_array 6 7 4
+            }
+            {
+                family_idx 2
+                vertex_idx_array 8 9 10
+            }
+            {
+                family_idx 2
+                vertex_idx_array 10 11 8
+            }
+            {
+                family_idx 3
+                vertex_idx_array 12 13 14
+            }
+            {
+                family_idx 3
+                vertex_idx_array 14 15 12
+            }
+            {
+                family_idx 4
+                vertex_idx_array 16 17 18
+            }
+            {
+                family_idx 4
+                vertex_idx_array 18 19 16
+            }
+            {
+                family_idx 5
+                vertex_idx_array 20 21 22
+            }
+            {
+                family_idx 5
+                vertex_idx_array 22 23 20
+            }
+            prim_sphere_array
+            prim_capsule_array
+            prim_box_array
+        }
+    }
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/.sconsign
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/.sconsign	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/.sconsign	(revision 2453)
@@ -0,0 +1,10 @@
+}q(Uworldmodel.s3d_modelq(cSCons.Node.FS
+BuildInfo
+qoq}q(U	timestampqJÐ+ðEUcsigqJÐ+ðEubUplayermodel.s3d_modelq(hoq	}q
+(hJÎEeFhJÎEeFubUskymodel.s3d_pospathq
+(hoq
+}q
+(hJÏEeFhJÏEeFubUplayermodel.s3d_instq(hoq}q(hJÏEeFhJÏEeFubUskymodel.s3d_instq(hoq}q(hJÏEeFhJÏEeFubUworldmodel.s3d_instq(hoq}q(hJzT:EhJzT:EubUworldmodel.s3d_pospathq(hoq}q(hJSMíEhJSMíEubUskymodel.s3d_modelq(hoq}q
+(hJÏEeFhJÏEeFubUplayermodel.s3d_pospathq
+(hoq
+}q(hJÏEeFhJÏEeFubu.
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/playermodel.s3d_inst
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/playermodel.s3d_inst	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/playermodel.s3d_inst	(revision 2453)
@@ -0,0 +1,88 @@
+// Machine-made Shark 3D Snake Text 2x0 Stream. Format: ascii.
+producer
+    "Shark 3D Exporter for Max v6000, Spinor GmbH (www.spinor.com), shark3d_v5"
+    & "x0x1_t153_c153_enterpr_win32_vc7x1_release_fwin32vc7x1release"
+source
+    "C:\\develop\\svn\\shark3d\\samples\\kit_empty_walk\\src\\res\\level\\mode"
+    & "l\\playermodel.max"
+format "shark3d_inst_5"
+data
+{
+    elem_array
+    {
+        ident "stdbody:scene_root"
+        name "body:scene_root"
+        param
+        {
+            env "env"
+            ref "hook"
+            sim "sim"
+            geo_suppl "gensuppl"
+            geo_ident "stdgeo:level/model/playermodel.s3d_model_run#scene_root"
+            geo_param
+            {
+            }
+            total_mass 1.0
+            active 1
+            net_deploy 1
+            transl 0.0 0.0 0.0
+            quat 0.0 0.0 0.0 1.0
+        }
+    }
+    {
+        ident "stdsimplepos:camera"
+        name "simplepos:camera"
+        param
+        {
+            env "env"
+            parent "body:scene_root"
+            transl 0.0 -7.86805e-008 1.8
+            quat -0.707107 0.0 0.0 0.707107
+        }
+    }
+    {
+        ident "stdsimplepos:sensortrig"
+        name "simplepos:sensortrig"
+        param
+        {
+            env "env"
+            parent "body:scene_root"
+            transl 4.37114e-009 0.0 1.0
+            quat 0.0 2.18557e-008 -2.18557e-008 1.0
+        }
+    }
+    {
+        ident "stdconstrstand:stand"
+        name "constrstand:stand"
+        param
+        {
+            env "env"
+            sim "sim"
+            ref "hook"
+            item_a "body:scene_root"
+            item_b ""
+            can_coll 0
+            axis 0.0 0.0 1.0
+        }
+    }
+    {
+        ident "stdgear:gear"
+        name "gear:gear"
+        param
+        {
+            env "env"
+            sim "sim"
+            item "body:scene_root"
+            rel_transl 3.49691e-008 0.0 1.0
+            rel_quat 0.0 0.0 -2.38419e-007 1.0
+            len 2.0
+            radius 0.3
+            ground_force 100.0
+            ground_torque 100000.0
+            air_force 1.0
+            air_torque 10000.0
+            net_deploy 1
+        }
+    }
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/playermodel.s3d_pospath
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/playermodel.s3d_pospath	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/playermodel.s3d_pospath	(revision 2453)
@@ -0,0 +1,13 @@
+// Machine-made Shark 3D Snake Text 2x0 Stream. Format: ascii.
+producer
+    "Shark 3D Exporter for Max v6000, Spinor GmbH (www.spinor.com), shark3d_v5"
+    & "x0x1_t153_c153_enterpr_win32_vc7x1_release_fwin32vc7x1release"
+source
+    "C:\\develop\\svn\\shark3d\\samples\\kit_empty_walk\\src\\res\\level\\mode"
+    & "l\\playermodel.max"
+format "shark3d_path_5"
+data
+{
+    path_array
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/skymodel.s3d_inst
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/skymodel.s3d_inst	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/skymodel.s3d_inst	(revision 2453)
@@ -0,0 +1,54 @@
+// Machine-made Shark 3D Snake Text 2x0 Stream. Format: ascii.
+producer
+    "Shark 3D Exporter for Max v6000, Spinor GmbH (www.spinor.com), shark3d_v5"
+    & "x0x1_t153_c153_enterpr_win32_vc7x1_release_fwin32vc7x1release"
+source
+    "C:\\develop\\svn\\shark3d\\samples\\kit_empty_walk\\src\\res\\level\\mode"
+    & "l\\skymodel.max"
+format "shark3d_inst_5"
+data
+{
+    elem_array
+    {
+        ident "stdsimplepos:scene_root"
+        name "simplepos:scene_root"
+        param
+        {
+            env "env"
+            parent "hook"
+            transl 0.0 0.0 0.0
+            quat 0.0 0.0 0.0 1.0
+        }
+    }
+    {
+        ident "stdsimplepos:box"
+        name "simplepos:box"
+        param
+        {
+            env "env"
+            parent "simplepos:scene_root"
+            transl 0.0 0.0 -50.0
+            quat 0.0 0.0 0.0 1.0
+        }
+    }
+    {
+        ident "stdinst:box"
+        name "inst:box"
+        param
+        {
+            env "env"
+            gensuppl "gensuppl"
+            state "state"
+            model_ident "stdmodel:level/model/skymodel.s3d_model_run#box"
+            model_param
+            {
+            }
+            shader_ident "stdshader:levelutil/shader/sky.s3d_shader_run#plain"
+            shader_param
+            {
+            }
+            pos "simplepos:box"
+        }
+    }
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/skymodel.s3d_pospath
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/skymodel.s3d_pospath	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/model/skymodel.s3d_pospath	(revision 2453)
@@ -0,0 +1,13 @@
+// Machine-made Shark 3D Snake Text 2x0 Stream. Format: ascii.
+producer
+    "Shark 3D Exporter for Max v6000, Spinor GmbH (www.spinor.com), shark3d_v5"
+    & "x0x1_t153_c153_enterpr_win32_vc7x1_release_fwin32vc7x1release"
+source
+    "C:\\develop\\svn\\shark3d\\samples\\kit_empty_walk\\src\\res\\level\\mode"
+    & "l\\skymodel.max"
+format "shark3d_path_5"
+data
+{
+    path_array
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/texture/.sconsign
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/texture/.sconsign	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/texture/.sconsign	(revision 2453)
@@ -0,0 +1,34 @@
+}q(Utexdiffuse.tgaq(cSCons.Node.FS
+BuildInfo
+qoq}q(U	timestampqJÕEeFUcsigqJÕEeFubU
+blueside.tgaq(hoq	}q
+(U	timestampq
+JÕEeFUcsigq
+JÕEeFubUsky_bottom_clamp.tgaq
+(hoq}q(U	timestampqJÕEeFUcsigqJÕEeFubU
+GOLDFOIL.tgaq(hoq}q(U	timestampqJÕEeFUcsigqJÕEeFubU
+dummy1to2.tgaq(hoq}q(hJÕEeFhJÕEeFubUsky_front_clamp.tgaq(hoq}q
+(hJÕEeFhJÕEeFubU
+dummy1to1.tgaq
+(hoq
+}q(hJÕEeFhJÕEeFubUlamp.jpgq (hoq!}q"(h
+J¢ÞµEh
+J¢ÞµEubUpillarbump2.ddsq#(hoq$}q%(U	timestampq&JÕEeFUcsigq'JÕEeFubU
+texnormal.tgaq((hoq)}q*(hJÕEeFhJÕEeFubUsky_left_clamp.tgaq+(hoq,}q-(hJÕEeFhJÕEeFubU
+STEELPLT.jpgq.(hoq/}q0(U	timestampq1Jz8>Ucsigq2Jz8>ubU
+dummy2to1.tgaq3(hoq4}q5(hJÕEeFhJÕEeFubU
+firecolor.tgaq6(hoq7}q8(U	timestampq9JÕEeFUcsigq:JÕEeFubUpillarcolor.tgaq;(hoq<}q=(h&JÕEeFh'JÕEeFubUMtlPlat2_Bump.jpgq>(hoq?}q@(U	timestampqAJz8>UcsigqBJz8>ubUsima.tgaqC(hoqD}qE(U	timestampqFJÕEeFUcsigqGJÕEeFubUsky_right_clamp.tgaqH(hoqI}qJ(hJÕEeFhJÕEeFubU
+BENEDETI.tgaqK(hoqL}qM(hFJÕEeFhGJÕEeFubU
+laborwall.jpgqN(hoqO}qP(h
+J ÞµEh
+J ÞµEubUpillarcolor.bmpqQ(hoqR}qS(U	timestampqTJUãEUcsigqUJUãEubUredbackground.tgaqV(hoqW}qX(h
+JÕEeFh
+JÕEeFubU
+dummy4to1.tgaqY(hoqZ}q[(hJÕEeFhJÕEeFubUsky_top_clamp.tgaq\(hoq]}q^(hJÕEeFhJÕEeFubU
+particle.tgaq_(hoq`}qa(U	timestampqbJÕEeFUcsigqcJÕEeFubUszar.pngqd(hoqe}qf(U	timestampqgJÀpmFUcsigqhJÀpmFubU
+steelplt.jpgqi(hoqj}qk(U	timestampqlJz8>UcsigqmJz8>ubU
+greenside.tgaqn(hoqo}qp(h
+JÕEeFh
+JÕEeFubU
+MtlPlat2.jpgqq(hoqr}qs(hAJz8>hBJz8>ubU
+dummy1to4.tgaqt(hoqu}qv(hJÕEeFhJÕEeFubUpillarbump3.tgaqw(hoqx}qy(U	timestampqzJÕEeFUcsigq{JÕEeFubUsky_back_clamp.tgaq|(hoq}}q~(hJÕEeFhJÕEeFubu.
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/shader/.sconsign
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/shader/.sconsign	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/shader/.sconsign	(revision 2453)
@@ -0,0 +1,6 @@
+}q(Uworld.s3d_shaderq(cSCons.Node.FS
+BuildInfo
+qoq}q(U	timestampqJÕEeFUcsigqJÕEeFubUfire.s3d_shaderq(hoq	}q
+(U	timestampq
+JÕEeFUcsigq
+JÕEeFubu.
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/shader/fire.s3d_shader
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/shader/fire.s3d_shader	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/shader/fire.s3d_shader	(revision 2453)
@@ -0,0 +1,180 @@
+// Machine-made Shark 3D Snake Text 2x0 Stream. Format: ascii.
+shader_array
+{
+    name "fire"
+    sort "partic"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                usage "render"
+                mesh_var "mesh"
+                texchan_var_array "texpartic"
+                tex_attr_var_array "attrpartic"
+                insp_ident "showmesh"
+                insp_rank 80000
+                insp_color 1.0 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_special.particenter"
+            param
+            {
+                env "shaderenv"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+                mesh_var_array "mesh"
+                radius 0.12
+                move_lin 0.0 0.0 1.0
+                move_quadr 0.0 0.0 0.0
+                move_vari 0.0 0.0 0.0
+                move_jiggle 0.15 0.15 0.15
+                move_normal 0.0
+                param_var "param"
+                move_lin_var "move_lin"
+                move_quadr_var "move_quadr"
+                move_vari_var "move_vari"
+                move_jiggle_var "move_jiggle"
+            }
+        }
+        {
+            ident "eng_shader_std.animgen"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                anim_vel 0.01
+                anim_var "anim"
+            }
+        }
+        {
+            ident "eng_shader_std.directtexchan"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                tex "tex:level/texture/particle.tga"
+                texchan_var "firepartictex"
+                samplermode_clamp 1
+                samplermode_filter 1
+            }
+        }
+        {
+            ident "eng_shader_std.coloralpha"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                multiplier 0.75
+                color 1.0 1.0 1.0
+                alpha 0.08
+                coloralpha_var "color_alpha"
+            }
+        }
+        {
+            ident "eng_shader_std.constvec"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                val 10.0 10.0 0.5 5.0
+                val_var "shrink"
+            }
+        }
+        {
+            ident "eng_shader_std.constvec"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                val 1.0 10.0 2.0 0.0
+                val_var "other"
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 34000
+                back_to_front 1
+                insp_ident "showwire"
+                cull_mode "none"
+                depth_test "less_equal"
+                depth_write 0
+                blend_col_src_fac "src_alpha"
+                blend_col_dest_fac "inv_src_alpha"
+                mesh_var "mesh"
+                texchan_var_array "firepartictex"
+                tex_attr_var_array "attrpartic"
+                attrmat_var_array ""
+                use_vertex_normal 1
+                use_vertex_coloralpha 1
+                use_vertex_bone_wgh 0
+                use_vertex_bone_subscr 0
+                use_vertex_point 1
+                mtl
+                {
+                    enabled 1
+                    emissive 1.0 1.0 1.0
+                }
+                shaderprog_ident
+                    "levelutil/shader/prog/partic.s3d_shaderprog_run"
+                shaderprog_param_array
+                {
+                    src_var "anim"
+                    dest_progvar "prog_anim"
+                }
+                {
+                    src_var "color_alpha"
+                    dest_progvar "prog_color_alpha"
+                }
+                {
+                    src_var "param"
+                    dest_progvar "prog_param"
+                }
+                {
+                    src_var "move_lin"
+                    dest_progvar "prog_move_lin"
+                }
+                {
+                    src_var "move_quadr"
+                    dest_progvar "prog_move_quadr"
+                }
+                {
+                    src_var "move_vari"
+                    dest_progvar "prog_move_vari"
+                }
+                {
+                    src_var "move_jiggle"
+                    dest_progvar "prog_move_jiggle"
+                }
+                {
+                    src_var "shrink"
+                    dest_progvar "prog_shrink"
+                }
+                {
+                    src_var "other"
+                    dest_progvar "prog_other"
+                }
+                fog_enabled 1
+            }
+        }
+    }
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/shader/world.old
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/shader/world.old	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/shader/world.old	(revision 2453)
@@ -0,0 +1,467 @@
+// Machine-made Shark 3D Snake Text 2x0 Stream. Format: ascii.
+shader_array
+{
+    name "caustic_caster_light"
+    sort "light_shvol"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.lightparam"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                diffuse 1.0 1.0 1.0
+                specular 0.0 0.0 0.0
+                range 22.1
+                multiplier 1.0
+                diffuse_var "light_diffuse"
+                ambient_var "light_ambient"
+                specular_var "light_specular"
+                cenrange_var "light_cenrange"
+            }
+        }
+        {
+            ident "eng_shader_shvol.lenparam"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                max_abs_len 20.0
+                max_rel_len 20.0
+                shvolparam_var "light_shvolparam"
+            }
+        }
+        {
+            ident "eng_shader_std.lightenter"
+            param
+            {
+                env "shaderenv"
+                cenrange_var "light_cenrange"
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.lightenum"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank -8000
+                cenrange_var "light_cenrange"
+                coll_var "casters"
+            }
+        }
+        {
+            ident "gtp_shader.mainenum"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                coll_var "recievers"
+            }
+        }
+        {
+            ident "eng_shader_std.collexec"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                coll_var "casters"
+                rank -8000
+                exec_trigger "caustic_cast_trigger"
+                exec_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_extvar "ext_light_cenrange"
+                }
+                {
+                    src_var "recievers"
+                    dest_extvar "recievers"
+                }
+            }
+        }
+    }
+}
+{
+    name "shvol_light_soft_tetra"
+    sort "light_softshvol_tetra"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.lightparam"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                diffuse 1.0 1.0 1.0
+                specular 1.0 1.0 1.0
+                range 20.0
+                multiplier 1.0
+                diffuse_var "light_diffuse"
+                ambient_var "light_ambient"
+                specular_var "light_specular"
+                cenrange_var "light_cenrange"
+            }
+        }
+        {
+            ident "eng_shader_shvol.lenparam"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                max_abs_len 20.0
+                max_rel_len 20.0
+                shvolparam_var "light_shvolparam"
+            }
+        }
+        {
+            ident "eng_shader_std.constfloat"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                val 0.25
+                val_var "size"
+            }
+        }
+        {
+            ident "eng_shader_std.lightenter"
+            param
+            {
+                env "shaderenv"
+                cenrange_var "light_cenrange"
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.lightenum"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank -99999
+                cenrange_var "light_cenrange"
+                coll_var "receivers"
+            }
+        }
+        {
+            ident "eng_shader_shvol.combineparam"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                lenparam_var "light_shvolparam"
+                bloat_var "size"
+                bloat_scale 0.5
+                shvolparam_var "light_bloated_shvolparam"
+            }
+        }
+        {
+            ident "eng_shader_shvol.enum"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank -99999
+                cenrange_var "light_cenrange"
+                shvolparam_var "light_bloated_shvolparam"
+                coll_var "occluders"
+            }
+        }
+        {
+            ident "eng_shader_std.totex"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                new_method "totex_method"
+                rank -99999
+                size_scale 1.0
+                destprop_antialias 0
+                dest_array
+                {
+                    from_var ""
+                    to_var "light_brighttex"
+                    texprop_restrusage 0
+                    texprop_depth 0
+                    texprop_float 0
+                    texprop_comp 4
+                    texprop_bitspercomp 0
+                    samplermode_filter 0
+                    samplermode_clamp 1
+                }
+                attrmat_var "light_brightmat"
+            }
+        }
+        {
+            ident "eng_shader_std.collexec"
+            param
+            {
+                env "shaderenv"
+                methods "totex_method"
+                coll_var "receivers"
+                rank 99999
+                exec_trigger "gen_brightclear_trigger"
+                exec_param_array
+            }
+        }
+        {
+            ident "eng_shader_special.multilight"
+            param
+            {
+                env "shaderenv"
+                first_methods "totex_method"
+                cenrange_var "light_cenrange"
+                projmat_var ""
+                scale_var "size"
+                sub_rank 99999
+                sub_method "sub_method"
+                sub_cenrange_var "sub_light_cenrange"
+                sub_projmat_var ""
+                sub_bloat_var "sub_light_bloat"
+                sub_intens_var "sub_light_intens"
+                elem_array
+                {
+                    offs -0.5 -0.5 -0.5
+                    bloat 0.0
+                }
+                {
+                    offs 0.5 0.5 -0.5
+                    bloat 0.0
+                }
+                {
+                    offs 0.5 -0.5 0.5
+                    bloat 0.0
+                }
+                {
+                    offs -0.5 0.5 0.5
+                    bloat 0.0
+                }
+            }
+        }
+        {
+            ident "eng_shader_shvol.combineparam"
+            param
+            {
+                env "shaderenv"
+                methods "sub_method"
+                lenparam_var "light_shvolparam"
+                bloat_var "sub_light_bloat"
+                bloat_scale 1.0
+                shvolparam_var "sub_light_shvolparam"
+            }
+        }
+        {
+            ident "eng_shader_shvol.perform"
+            param
+            {
+                env "shaderenv"
+                methods "sub_method"
+                rank 99999
+                coll_var "occluders"
+                mark_trigger "shvol_mark_trigger"
+                mark_param_array
+                {
+                    src_var "sub_light_cenrange"
+                    dest_extvar "ext_light_cenrange"
+                }
+                {
+                    src_var "sub_light_shvolparam"
+                    dest_extvar "ext_light_shvolparam"
+                }
+                paint_method ""
+                unmark_shaderprog_ident
+                    "levelutil/shader/prog/plain_pointcol.s3d_shaderprog_run"
+                unmark_shaderprog_param_array
+                unmark_blend_col_src_fac "one"
+                unmark_blend_col_dest_fac "one"
+                unmark_neg 1
+                unmark_color_var "sub_light_intens"
+                unmark_alpha 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.constvec"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                val 0.5 0.0 0.0 0.0
+                val_var "filterinfo"
+            }
+        }
+        {
+            ident "eng_shader_special.filter"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank -99999
+                iter_start 5
+                iter_end 0
+                iter_step -1
+                width_scale 1.0
+                height_scale 1.0
+                destprop_antialias 0
+                passinfo_var "passinfo"
+                src_array "light_brighttex"
+                dest_array
+                {
+                    from_var ""
+                    to_var "light_brighttex"
+                    texprop_restrusage 0
+                    texprop_depth 0
+                    texprop_float 0
+                    texprop_comp 4
+                    texprop_bitspercomp 0
+                    samplermode_filter 0
+                    samplermode_clamp 1
+                }
+                shaderprog_ident
+                    "levelutil/shader/prog/lightfilter.s3d_shaderprog_run"
+                shaderprog_param_array
+                {
+                    src_var "passinfo"
+                    dest_progvar "prog_passinfo"
+                }
+                {
+                    src_var "filterinfo"
+                    dest_progvar "prog_filterinfo"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.collexec"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                coll_var "receivers"
+                rank 32000
+                exec_trigger "lightbright_trigger"
+                exec_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_extvar "ext_light_cenrange"
+                }
+                {
+                    src_var "light_ambient"
+                    dest_extvar "ext_light_ambient"
+                }
+                {
+                    src_var "light_diffuse"
+                    dest_extvar "ext_light_diffuse"
+                }
+                {
+                    src_var "light_specular"
+                    dest_extvar "ext_light_specular"
+                }
+                {
+                    src_var "light_brighttex"
+                    dest_extvar "ext_light_brighttex"
+                }
+                {
+                    src_var "light_brightmat"
+                    dest_extvar "ext_light_brightmat"
+                }
+            }
+        }
+    }
+}
+{
+    name "new_mild_light"
+    sort "light_mild"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.lightparam"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                diffuse 1.0 1.0 1.0
+                specular 1.0 1.0 1.0
+                range 20.0
+                multiplier 0.25
+                diffuse_var "light_diffuse"
+                ambient_var "light_ambient"
+                specular_var "light_specular"
+                cenrange_var "light_cenrange"
+            }
+        }
+        {
+            ident "eng_shader_std.lightenter"
+            param
+            {
+                env "shaderenv"
+                cenrange_var "light_cenrange"
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.lightenum"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 32000
+                cenrange_var "light_cenrange"
+                coll_var "receivers"
+            }
+        }
+        {
+            ident "eng_shader_std.collexec"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                coll_var "receivers"
+                rank 32000
+                exec_trigger "lightmild_trigger"
+                exec_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_extvar "ext_light_cenrange"
+                }
+                {
+                    src_var "light_diffuse"
+                    dest_extvar "ext_light_diffuse"
+                }
+                {
+                    src_var "light_ambient"
+                    dest_extvar "ext_light_ambient"
+                }
+                {
+                    src_var "light_specular"
+                    dest_extvar "ext_light_specular"
+                }
+            }
+        }
+    }
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/shader/world.s3d_shader
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/shader/world.s3d_shader	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/shader/world.s3d_shader	(revision 2453)
@@ -0,0 +1,801 @@
+// Machine-made Shark 3D Snake Text 2x0 Stream. Format: ascii.
+shader_array
+{
+    name "caustic_caster_light"
+    sort "light_shvol"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.lightparam"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                diffuse 1.0 1.0 1.0
+                specular 0.0 0.0 0.0
+                range 22.1
+                multiplier 1.0
+                diffuse_var "light_diffuse"
+                ambient_var "light_ambient"
+                specular_var "light_specular"
+                cenrange_var "light_cenrange"
+            }
+        }
+        {
+            ident "eng_shader_shvol.lenparam"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                max_abs_len 20.0
+                max_rel_len 20.0
+                shvolparam_var "light_shvolparam"
+            }
+        }
+        {
+            ident "eng_shader_std.lightenter"
+            param
+            {
+                env "shaderenv"
+                cenrange_var "light_cenrange"
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.lightenum"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank -8000
+                cenrange_var "light_cenrange"
+                coll_var "casters"
+            }
+        }
+        {
+            ident "gtp_shader.mainenum"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                coll_var "recievers"
+            }
+        }
+        {
+            ident "eng_shader_std.collexec"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                coll_var "casters"
+                rank -8000
+                exec_trigger "caustic_cast_trigger"
+                exec_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_extvar "ext_light_cenrange"
+                }
+                {
+                    src_var "recievers"
+                    dest_extvar "recievers"
+                }
+            }
+        }
+    }
+}
+{
+    name "shvol_light_soft_tetra"
+    sort "light_softshvol_tetra"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.lightparam"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                diffuse 0.788235 0.788235 0.788235
+                specular 0.160784 0.160784 0.160784
+                range 6.1
+                multiplier 0.21
+                diffuse_var "light_diffuse"
+                ambient_var "light_ambient"
+                specular_var "light_specular"
+                cenrange_var "light_cenrange"
+            }
+        }
+        {
+            ident "eng_shader_shvol.lenparam"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                max_abs_len 4.4
+                max_rel_len 6.6
+                shvolparam_var "light_shvolparam"
+            }
+        }
+        {
+            ident "eng_shader_std.constfloat"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                val 0.11
+                val_var "size"
+            }
+        }
+        {
+            ident "eng_shader_std.lightenter"
+            param
+            {
+                env "shaderenv"
+                cenrange_var "light_cenrange"
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.lightenum"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank -99999
+                cenrange_var "light_cenrange"
+                coll_var "receivers"
+            }
+        }
+        {
+            ident "eng_shader_shvol.combineparam"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                lenparam_var "light_shvolparam"
+                bloat_var "size"
+                bloat_scale 0.5
+                shvolparam_var "light_bloated_shvolparam"
+            }
+        }
+        {
+            ident "eng_shader_shvol.enum"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank -99999
+                cenrange_var "light_cenrange"
+                shvolparam_var "light_bloated_shvolparam"
+                coll_var "occluders"
+            }
+        }
+        {
+            ident "eng_shader_std.totex"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                new_method "totex_method"
+                rank -99999
+                size_scale 1.0
+                destprop_antialias 0
+                dest_array
+                {
+                    from_var ""
+                    to_var "light_brighttex"
+                    texprop_restrusage 0
+                    texprop_depth 0
+                    texprop_float 0
+                    texprop_comp 4
+                    texprop_bitspercomp 0
+                    samplermode_filter 0
+                    samplermode_clamp 1
+                }
+                attrmat_var "light_brightmat"
+            }
+        }
+        {
+            ident "eng_shader_std.collexec"
+            param
+            {
+                env "shaderenv"
+                methods "totex_method"
+                coll_var "receivers"
+                rank 99999
+                exec_trigger "gen_brightclear_trigger"
+                exec_param_array
+            }
+        }
+        {
+            ident "eng_shader_special.multilight"
+            param
+            {
+                env "shaderenv"
+                first_methods "totex_method"
+                cenrange_var "light_cenrange"
+                projmat_var ""
+                scale_var "size"
+                sub_rank 99999
+                sub_method "sub_method"
+                sub_cenrange_var "sub_light_cenrange"
+                sub_projmat_var ""
+                sub_bloat_var "sub_light_bloat"
+                sub_intens_var "sub_light_intens"
+                elem_array
+                {
+                    offs -0.5 -0.5 -0.5
+                    bloat 0.0
+                }
+                {
+                    offs 0.5 0.5 -0.5
+                    bloat 0.0
+                }
+                {
+                    offs 0.5 -0.5 0.5
+                    bloat 0.0
+                }
+                {
+                    offs -0.5 0.5 0.5
+                    bloat 0.0
+                }
+            }
+        }
+        {
+            ident "eng_shader_shvol.combineparam"
+            param
+            {
+                env "shaderenv"
+                methods "sub_method"
+                lenparam_var "light_shvolparam"
+                bloat_var "sub_light_bloat"
+                bloat_scale 1.0
+                shvolparam_var "sub_light_shvolparam"
+            }
+        }
+        {
+            ident "eng_shader_shvol.perform"
+            param
+            {
+                env "shaderenv"
+                methods "sub_method"
+                rank 99999
+                coll_var "occluders"
+                mark_trigger "shvol_mark_trigger"
+                mark_param_array
+                {
+                    src_var "sub_light_cenrange"
+                    dest_extvar "ext_light_cenrange"
+                }
+                {
+                    src_var "sub_light_shvolparam"
+                    dest_extvar "ext_light_shvolparam"
+                }
+                paint_method ""
+                unmark_shaderprog_ident
+                    "levelutil/shader/prog/plain_pointcol.s3d_shaderprog_run"
+                unmark_shaderprog_param_array
+                unmark_blend_col_src_fac "one"
+                unmark_blend_col_dest_fac "one"
+                unmark_neg 1
+                unmark_color_var "sub_light_intens"
+                unmark_alpha 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.constvec"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                val 0.5 0.0 0.0 0.0
+                val_var "filterinfo"
+            }
+        }
+        {
+            ident "eng_shader_special.filter"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank -99999
+                iter_start 5
+                iter_end 0
+                iter_step -1
+                width_scale 1.0
+                height_scale 1.0
+                destprop_antialias 0
+                passinfo_var "passinfo"
+                src_array "light_brighttex"
+                dest_array
+                {
+                    from_var ""
+                    to_var "light_brighttex"
+                    texprop_restrusage 0
+                    texprop_depth 0
+                    texprop_float 0
+                    texprop_comp 4
+                    texprop_bitspercomp 0
+                    samplermode_filter 0
+                    samplermode_clamp 1
+                }
+                shaderprog_ident
+                    "levelutil/shader/prog/lightfilter.s3d_shaderprog_run"
+                shaderprog_param_array
+                {
+                    src_var "passinfo"
+                    dest_progvar "prog_passinfo"
+                }
+                {
+                    src_var "filterinfo"
+                    dest_progvar "prog_filterinfo"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.collexec"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                coll_var "receivers"
+                rank 32000
+                exec_trigger "lightbright_trigger"
+                exec_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_extvar "ext_light_cenrange"
+                }
+                {
+                    src_var "light_ambient"
+                    dest_extvar "ext_light_ambient"
+                }
+                {
+                    src_var "light_diffuse"
+                    dest_extvar "ext_light_diffuse"
+                }
+                {
+                    src_var "light_specular"
+                    dest_extvar "ext_light_specular"
+                }
+                {
+                    src_var "light_brighttex"
+                    dest_extvar "ext_light_brighttex"
+                }
+                {
+                    src_var "light_brightmat"
+                    dest_extvar "ext_light_brightmat"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.lightenum"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank -8000
+                cenrange_var "light_cenrange"
+                coll_var "casters"
+            }
+        }
+        {
+            ident "gtp_shader.mainenum"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                coll_var "recievers"
+            }
+        }
+        {
+            ident "eng_shader_std.collexec"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                coll_var "casters"
+                rank -8000
+                exec_trigger "caustic_cast_trigger"
+                exec_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_extvar "ext_light_cenrange"
+                }
+                {
+                    src_var "recievers"
+                    dest_extvar "recievers"
+                }
+            }
+        }
+    }
+}
+{
+    name "new_mild_light"
+    sort "light_mild"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.lightparam"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                diffuse 1.0 1.0 1.0
+                specular 1.0 1.0 1.0
+                range 20.0
+                multiplier 0.25
+                diffuse_var "light_diffuse"
+                ambient_var "light_ambient"
+                specular_var "light_specular"
+                cenrange_var "light_cenrange"
+            }
+        }
+        {
+            ident "eng_shader_std.lightenter"
+            param
+            {
+                env "shaderenv"
+                cenrange_var "light_cenrange"
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.lightenum"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 32000
+                cenrange_var "light_cenrange"
+                coll_var "receivers"
+            }
+        }
+        {
+            ident "eng_shader_std.collexec"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                coll_var "receivers"
+                rank 32000
+                exec_trigger "lightmild_trigger"
+                exec_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_extvar "ext_light_cenrange"
+                }
+                {
+                    src_var "light_diffuse"
+                    dest_extvar "ext_light_diffuse"
+                }
+                {
+                    src_var "light_ambient"
+                    dest_extvar "ext_light_ambient"
+                }
+                {
+                    src_var "light_specular"
+                    dest_extvar "ext_light_specular"
+                }
+            }
+        }
+    }
+}
+{
+    name "red_soft"
+    sort "light_softshvol_tetra"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.lightparam"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                diffuse 0.0901961 0.0 0.00392157
+                specular 0.215686 0.0 0.00392157
+                range 9.9
+                multiplier 0.11
+                diffuse_var "light_diffuse"
+                ambient_var "light_ambient"
+                specular_var "light_specular"
+                cenrange_var "light_cenrange"
+            }
+        }
+        {
+            ident "eng_shader_shvol.lenparam"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                max_abs_len 24.3
+                max_rel_len 16.6
+                shvolparam_var "light_shvolparam"
+            }
+        }
+        {
+            ident "eng_shader_std.constfloat"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                val 0.165
+                val_var "size"
+            }
+        }
+        {
+            ident "eng_shader_std.lightenter"
+            param
+            {
+                env "shaderenv"
+                cenrange_var "light_cenrange"
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.lightenum"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank -99999
+                cenrange_var "light_cenrange"
+                coll_var "receivers"
+            }
+        }
+        {
+            ident "eng_shader_shvol.combineparam"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                lenparam_var "light_shvolparam"
+                bloat_var "size"
+                bloat_scale 0.5
+                shvolparam_var "light_bloated_shvolparam"
+            }
+        }
+        {
+            ident "eng_shader_shvol.enum"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank -99999
+                cenrange_var "light_cenrange"
+                shvolparam_var "light_bloated_shvolparam"
+                coll_var "occluders"
+            }
+        }
+        {
+            ident "eng_shader_std.totex"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                new_method "totex_method"
+                rank -99999
+                size_scale 1.0
+                destprop_antialias 0
+                dest_array
+                {
+                    from_var ""
+                    to_var "light_brighttex"
+                    texprop_restrusage 0
+                    texprop_depth 0
+                    texprop_float 0
+                    texprop_comp 4
+                    texprop_bitspercomp 0
+                    samplermode_filter 0
+                    samplermode_clamp 1
+                }
+                attrmat_var "light_brightmat"
+            }
+        }
+        {
+            ident "eng_shader_std.collexec"
+            param
+            {
+                env "shaderenv"
+                methods "totex_method"
+                coll_var "receivers"
+                rank 99999
+                exec_trigger "gen_brightclear_trigger"
+                exec_param_array
+            }
+        }
+        {
+            ident "eng_shader_special.multilight"
+            param
+            {
+                env "shaderenv"
+                first_methods "totex_method"
+                cenrange_var "light_cenrange"
+                projmat_var ""
+                scale_var "size"
+                sub_rank 99999
+                sub_method "sub_method"
+                sub_cenrange_var "sub_light_cenrange"
+                sub_projmat_var ""
+                sub_bloat_var "sub_light_bloat"
+                sub_intens_var "sub_light_intens"
+                elem_array
+                {
+                    offs -0.5 -0.5 -0.5
+                    bloat 0.0
+                }
+                {
+                    offs 0.5 0.5 -0.5
+                    bloat 0.0
+                }
+                {
+                    offs 0.5 -0.5 0.5
+                    bloat 0.0
+                }
+                {
+                    offs -0.5 0.5 0.5
+                    bloat 0.0
+                }
+            }
+        }
+        {
+            ident "eng_shader_shvol.combineparam"
+            param
+            {
+                env "shaderenv"
+                methods "sub_method"
+                lenparam_var "light_shvolparam"
+                bloat_var "sub_light_bloat"
+                bloat_scale 1.0
+                shvolparam_var "sub_light_shvolparam"
+            }
+        }
+        {
+            ident "eng_shader_shvol.perform"
+            param
+            {
+                env "shaderenv"
+                methods "sub_method"
+                rank 99999
+                coll_var "occluders"
+                mark_trigger "shvol_mark_trigger"
+                mark_param_array
+                {
+                    src_var "sub_light_cenrange"
+                    dest_extvar "ext_light_cenrange"
+                }
+                {
+                    src_var "sub_light_shvolparam"
+                    dest_extvar "ext_light_shvolparam"
+                }
+                paint_method ""
+                unmark_shaderprog_ident
+                    "levelutil/shader/prog/plain_pointcol.s3d_shaderprog_run"
+                unmark_shaderprog_param_array
+                unmark_blend_col_src_fac "one"
+                unmark_blend_col_dest_fac "one"
+                unmark_neg 1
+                unmark_color_var "sub_light_intens"
+                unmark_alpha 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.constvec"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                val 0.5 0.0 0.0 0.0
+                val_var "filterinfo"
+            }
+        }
+        {
+            ident "eng_shader_special.filter"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank -99999
+                iter_start 5
+                iter_end 0
+                iter_step -1
+                width_scale 1.0
+                height_scale 1.0
+                destprop_antialias 0
+                passinfo_var "passinfo"
+                src_array "light_brighttex"
+                dest_array
+                {
+                    from_var ""
+                    to_var "light_brighttex"
+                    texprop_restrusage 0
+                    texprop_depth 0
+                    texprop_float 0
+                    texprop_comp 4
+                    texprop_bitspercomp 0
+                    samplermode_filter 0
+                    samplermode_clamp 1
+                }
+                shaderprog_ident
+                    "levelutil/shader/prog/lightfilter.s3d_shaderprog_run"
+                shaderprog_param_array
+                {
+                    src_var "passinfo"
+                    dest_progvar "prog_passinfo"
+                }
+                {
+                    src_var "filterinfo"
+                    dest_progvar "prog_filterinfo"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.collexec"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                coll_var "receivers"
+                rank 32000
+                exec_trigger "lightbright_trigger"
+                exec_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_extvar "ext_light_cenrange"
+                }
+                {
+                    src_var "light_ambient"
+                    dest_extvar "ext_light_ambient"
+                }
+                {
+                    src_var "light_diffuse"
+                    dest_extvar "ext_light_diffuse"
+                }
+                {
+                    src_var "light_specular"
+                    dest_extvar "ext_light_specular"
+                }
+                {
+                    src_var "light_brighttex"
+                    dest_extvar "ext_light_brighttex"
+                }
+                {
+                    src_var "light_brightmat"
+                    dest_extvar "ext_light_brightmat"
+                }
+            }
+        }
+    }
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/actor/.sconsign
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/actor/.sconsign	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/actor/.sconsign	(revision 2453)
@@ -0,0 +1,8 @@
+}q(Uworld.s3d_actorq(cSCons.Node.FS
+BuildInfo
+qoq}q(U	timestampqJÕEeFUcsigqJÕEeFubUlevelplayer.s3d_actorq(hoq	}q
+(hJÕEeFhJÕEeFubUmain.s3d_actorq
+(hoq
+}q
+(hJÕEeFhJÕEeFubUlevelplayerbasis.s3d_actorq(hoq}q(hJÕEeFhJÕEeFubUcontent.s3d_actorq(hoq}q(hJÕEeFhJÕEeFubU
+sky.s3d_actorq(hoq}q(hJÕEeFhJÕEeFubu.
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/actor/levelplayer.s3d_actor
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/actor/levelplayer.s3d_actor	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/actor/levelplayer.s3d_actor	(revision 2453)
@@ -0,0 +1,550 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Definition of the player.
+//
+// In this case, the player is a player having a walk collision detection
+// and can be controlled by the human player.
+//
+// The player is not defined directly, but only a suppl for the player.
+// The reason for this is that not only one player must be created,
+// but a new player for every player which logs into the server.
+// As long as no client logs into a server, no player is created.
+// Each time a player logs into the server, the player suppl
+// is used to create a player.
+
+
+// Since each dsc-file formally can only contain a single actor,
+// we use the group actor to define more than one actor.
+actor_ident "kit_base.group"
+actor_param
+{
+    // Delegate action calls to the children.
+    active 1
+    child_array
+    {
+        // This dispatcher dispatches commands coming 
+        // from outside the capsule. 
+        ident "kit_base.dispatch"
+        param
+        {
+            name "dispatch_export"
+            entry_array
+            // notice_destroy the player:
+            {
+                cmds "destroy"
+                targets "capsule"
+            }
+            {
+                cmds "created_local"
+                targets
+            }
+            {
+                cmds "created_net"
+                targets "reproduce"
+                newcmd "set_blocked"
+            }
+            {
+                cmds "net_traverse"
+                targets "group_player"
+                newcmd "traverse"
+            }
+            {
+                cmds "net_appear"
+                targets "reproduce"
+                newcmd "rework"
+            }
+            // Inform management:
+            {
+                // Store the inform-actor in "inform":
+                cmds "assign_inform" "set_inform"
+                targets "inform_deleg"
+                newcmd "set_deleg_target"
+            }
+            {
+                // Delegate the inform command:
+                cmds "assign_inform" "set_inform"
+                targets "informanswer"
+                    "oninform_gfxmgr" "oninform_sndmgr"
+                    "oninform_world" "oninform_sky" 
+                    "oninform_sim" 
+                    "oninform_noise"
+                    "oninform_sensorstate"
+                    "oninform_maincamera"
+                    "maininform_switch"
+                    "oninform_playerbody"
+            }
+            {
+                cmds "search_inform" "search_noinform"
+                targets "informanswer"
+            }
+            {
+                // Set the position of the player.
+                cmds "set_transf"
+                targets "scene_root"
+            }
+            {
+                cmds "add_motion"
+                targets "player_deleg" "godplayer_deleg"
+            }
+            {
+                cmds "add_motion_to_gear"
+                targets "gear"
+                newcmd "add_gear_motion"
+            }
+            {
+                cmds "god"
+                targets "god_switch"
+                newcmd "toggle_switch"
+            }
+        }
+    }
+    {
+        ident "kit_base.dispatch"
+        param
+        {
+            name "dispatch"
+            entry_array
+            {
+                // Disable god mode:
+                cmds "disable_god"
+                targets "maininform_switch"
+                newcmd "select_normalmode"
+            }
+            {
+                // Disable godmode.
+                cmds "disable_god"
+                targets "player_deleg_actor"
+                newcmd "enable"
+            }
+            {
+                // Disable godmode.
+                cmds "disable_god"
+                targets "godplayer_deleg_actor"
+                newcmd "disable"
+            }
+            {
+                // Disable godmode.
+                cmds "disable_god"
+                targets "godctrl"
+                newcmd "god_to_player"
+            }
+            {
+                // Disable godmode.
+                cmds "disable_god"
+                targets "scene_root"
+                newcmd "activate_body"
+            }
+            {
+                // Enable godmode.
+                cmds "enable_god"
+                targets "maininform_switch"
+                newcmd "select_godmode"
+            }
+            {
+                // Enable godmode.
+                cmds "enable_god"
+                targets "player_deleg_actor"
+                newcmd "disable"
+            }
+            {
+                // Enable godmode.
+                cmds "enable_god"
+                targets "godplayer_deleg_actor"
+                newcmd "enable"
+            }
+            {
+                // Enable godmode.
+                cmds "enable_god"
+                targets "godctrl"
+                newcmd "player_to_god"
+            }
+        }
+    }
+    {
+        ident "kit_base.deleg"
+        param
+        {
+            name "inform_deleg"
+            deleg_name "inform"
+            deleg_target ""
+            allow_no_target 1
+            enabled 1
+        }
+    }
+    {
+        ident "kit_engobj.informanswer"
+        param
+        {
+            name "informanswer"
+            answer_cmd "add_result"
+            answer_actor "capsule_deleg"
+        }
+    }
+    {
+        ident "kit_base.switch"
+        param
+        {
+            name "god_switch"
+            target "dispatch"
+            disable_switch_cmd "disable_god"
+            enable_switch_cmd "enable_god"
+        }
+    }
+    {
+        ident "kit_engobj.itemeye"
+        param
+        {
+            name "scene_root"
+            item_actor "group_player"
+            item_name "body:scene_root"
+        }
+    }
+    {
+        ident "kit_engobj.itemeye"
+        param
+        {
+            name "camera"
+            item_actor "group_player"
+            item_name "simplepos:camera"
+        }
+    }
+    {
+        ident "kit_engobj.itemeye"
+        param
+        {
+            name "playerbody"
+            item_actor "group_player"
+            item_name "body:scene_root"
+        }
+    }
+    {
+        ident "kit_engobj.itemeye"
+        param
+        {
+            name "gear"
+            item_actor "group_player"
+            item_name "gear:gear"
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            // Create the position of the godplayer
+            // (spawn at (0,0,0) for now).
+            name "god_vehicleobj"
+            obj_suppl "^stdsuppl"
+            obj_ident "simplepos:"
+            obj_param
+            {
+                env "^^env"
+            }
+        }
+    }
+    {
+        // Select the position of the godmode-player
+        // (we want the position, not the wrapping actor,
+        // so "unwrap" it).
+        ident "kit_engobj.itemeye"
+        param
+        {
+            name "god_vehicle"
+            item_actor "god_vehicleobj"
+            item_name ""
+        }
+    }
+    {
+        // Create a camera-position for the godmode-player
+        // mounted on the godmode-player's position
+        // (i.e. camera moves relatively to player-position).
+        ident "kit_base.obj"
+        param
+        {
+            name "god_camobj"
+            obj_suppl "^stdsuppl"
+            obj_ident "simplepos:"
+            obj_param
+            {
+                env "^^env"
+                parent "god_vehicle"
+            }
+        }
+    }
+    {
+        // Select the position of the godmode-camera
+        // (we want the position, not the wrapping actor,
+        // so "unwrap" it).
+        ident "kit_engobj.itemeye"
+        param
+        {
+            name "god_cam"
+            //item_actor "^god_spawn"
+            item_actor "god_camobj"
+            item_name ""
+        }
+    }
+    {
+        // The godplayer moves different than the normal player
+        // so pass the movement to this godmode-control actor.
+        ident "kit_engobj.godctrl"
+        param
+        {
+            active 1
+            name "godctrl"
+            move_dir 0.0 1.0 0.0
+            move_also 1.0 0.0 0.0
+            cam_dir 0.0 0.0 1.0
+            cam_also 1.0 0.0 0.0
+            god_vehicle "god_vehicle"
+            god_cam "god_cam"
+            player_vehicle "playerbody"
+            player_cam "camera"
+        }
+    }
+    {
+        ident "kit_engobj.motionlook"
+        param
+        {
+            name "motionlook"
+            look_actor "camera"
+            look_target "camera"
+            look_get_cmd "get_transf"
+            look_set_cmd "set_transf"
+            other_target "dispatch_export"
+            other_cmd "add_motion_to_gear"
+            axis 1.0 0.0 0.0
+            min_angle -170.0
+            max_angle -10.0
+        }
+    }
+    {
+        ident "kit_engobj.motionlook"
+        param
+        {
+            name "godmotionlook"
+            look_actor "god_cam"
+            look_target "god_cam"
+            look_get_cmd "get_transf"
+            look_set_cmd "set_transf"
+            other_target "godctrl"
+            other_cmd "add_motion"
+            axis 1.0 0.0 0.0
+            min_angle -170.0
+            max_angle -10.0
+        }
+    }
+    {
+        ident "kit_base.deleg"
+        param
+        {
+            name "player_deleg_actor"
+            deleg_name "player_deleg"
+            deleg_target "motionlook"
+            enabled 1
+            allow_no_target 1
+        }
+    }
+    {
+        ident "kit_base.deleg"
+        param
+        {
+            name "godplayer_deleg_actor"
+            deleg_name "godplayer_deleg"
+            deleg_target "godmotionlook"
+            enabled 0
+            allow_no_target 1
+        }
+    }
+    {
+        ident "kit_engobj.oninform"
+        param
+        {
+            // Tell the client about performing 
+            // the level change.
+            name "oninform_changelevel"
+            cmd "changelevel_perform"
+        }
+    }
+    {
+        ident "kit_engobj.oninformobj"
+        param
+        {
+            name "oninform_gfxmgr"
+            cmd "set_gfxmgr_level"
+            param "^gfxmgr"
+        }
+    }
+    {
+        ident "kit_engobj.oninformobj"
+        param
+        {
+            name "oninform_sndmgr"
+            cmd "set_sndmgr_level"
+            param "^sndmgr"
+        }
+    }
+    {
+        ident "kit_engobj.oninformobj"
+        param
+        {
+            name "oninform_world"
+            cmd "set_state_world"
+            param "^state_world"
+        }
+    }
+    {
+        ident "kit_engobj.oninformobj"
+        param
+        {
+            name "oninform_sky"
+            cmd "set_state_sky"
+            param "^state_sky"
+        }
+    }
+    {
+        ident "kit_engobj.oninformobj"
+        param
+        {
+            name "oninform_sim"
+            cmd "set_sim_world"
+            param "^sim_world"
+        }
+    }
+    {
+        ident "kit_engobj.oninformobj"
+        param
+        {
+            name "oninform_noise"
+            cmd "set_noise_world"
+            param "^noise_world"
+        }
+    }
+    {
+        ident "kit_engobj.oninformobj"
+        param
+        {
+            name "oninform_sensorstate"
+            cmd "set_sensorstate_world"
+            param "^sensorstate_world"
+        }
+    }
+    {
+        ident "kit_engobj.oninformobj"
+        param
+        {
+            name "oninform_maincamera"
+            cmd "set_camera"
+            param "camera"
+        }
+    }
+    {
+        ident "kit_engobj.oninformobj"
+        param
+        {
+            name "oninform_godcamera"
+            cmd "set_camera"
+            param "god_cam"
+        }
+    }
+    {
+        // This actor is used to switch between the main
+        // camera and the test camera.
+        // This actor switches between different actors
+        // which get the "assign_inform" or "set_inform" 
+        // command with the current inform-actor, whereas
+        // all other disabled actors get a "assign_inform" or
+        // "set_inform" with 0 as argument.
+        ident "kit_engobj.oninformswitch"
+        param
+        {
+            name "maininform_switch"
+            deleg_name "maininform"
+            target "oninform_maincamera"
+            entry_array
+            {
+                cmd "select_godmode"
+                target "oninform_godcamera"
+            }
+            {
+                cmd "select_normalmode"
+                target "oninform_maincamera"
+            }
+        }
+    }
+    {
+        ident "kit_engobj.oninformobj"
+        param
+        {
+            name "oninform_playerbody"
+            cmd "set_playerbody"
+            param "playerbody"
+        }
+    }
+    {
+        ident "kit_engobj.itemeye"
+        param
+        {
+            name "sensortrig_pos"
+            item_actor "group_player"
+            item_name "simplepos:sensortrig"
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {                            
+            name "sensortrig_elem"
+            obj_suppl "^^envcompsuppl"
+            obj_ident "eng_sensor_std.sensortrig"
+            obj_param
+            {
+                env "^^env" 
+                sensorstate "^sensorstate_world" 
+                pos "sensortrig_pos"
+            }
+        }
+    }
+    {
+        ident "kit_engobj.sensortrig"
+        param
+        {
+            name "sensortrig_world"
+            sensorelem_actor "sensortrig_elem"
+            sensorelem_name ""
+            enter_cmd "player_enter"
+            leave_cmd "player_leave"
+            sender "capsule_deleg"
+        }
+    }
+    {
+        ident "kit_base.onaction"
+        param
+        {
+            active 1
+            name "update_sensortrig_world_onaction"
+            target "sensortrig_world"
+            cmd "update"
+        }
+    }
+    {
+        ident "kit_engbase.netreproduce"
+        param
+        {
+            name "reproduce"
+            producer "inform"
+            charge "capsule_deleg"
+            reproduce_cmd "reproduce"
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/actor/main.s3d_actor
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/actor/main.s3d_actor	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/actor/main.s3d_actor	(revision 2453)
@@ -0,0 +1,334 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Define a local namespace for the level.
+// All actors within the capsule can access each other without restrictions.
+// All foreign actors outside the capsule cannot access actors
+// within the capsule. Instead, foreign can only send commands
+// to the capsule itself. The capsule delegates the commands
+// in a controlled way, see below.
+actor_ident "kit_base.capsule"
+actor_param
+{
+    // Delegate the action calls to all children:
+    active 1
+    // Scope string used for reporting errors:
+    scope "level"
+    // Name of the capsule actor within its own namespace.
+    // Actors within the capsule can access the capsule actor itself
+    // by this name.
+    local_name "capsule"
+    // Delegate commands from outside the capsule to this dispatcher.
+    // The dispatcher handles the commands from outside in a controlled way.
+    deleg_target "dispatch_export"
+    // Define a group of actors contained in the capsule actor.
+    // Formally, a capsule can only have a single member,
+    // but by using a group actor, it can contain any number of members.
+    child_ident "kit_base.group"
+    child_param
+    {
+        active 1
+        child_array
+        {
+            // Dispatcher for commands from outside the level.
+            // Commands coming from outside the capsule are delegated
+            // to this dispatcher. This dispatcher then decides
+            // which commands are understood, and which are the target actors.
+            ident "kit_base.dispatch"
+            param
+            {
+                // Name of the actor.
+                name "dispatch_export"
+                entry_array
+                {
+                    // Utility, to get a simple access to the level admin.
+                    cmds "get_level"
+                    targets "capsule"
+                    newcmd "get_admin"
+                }
+                {
+                    cmds "produce_player"
+                    targets "playerproducer"
+                    newcmd "produce"
+                }
+                {
+                    cmds "fetch_player"
+                    targets "player_set"
+                    newcmd "search_noinform"
+                }
+                {
+                    cmds "net_traverse"
+                    targets "dispatch_content"
+                }
+            }
+        }
+        {
+            ident "kit_base.deleg"
+            param
+            {
+                name ""
+                deleg_name "env"
+                deleg_target "^env"
+                allow_no_target 0
+                enabled 1
+            }
+        }
+        {
+            ident "kit_base.deleg"
+            param
+            {
+                name ""
+                deleg_name "perchmgr"
+                deleg_target "^perchmgr"
+                allow_no_target 0
+                enabled 1
+            }
+        }
+        {
+            ident "kit_engbase.gfxmgr"
+            param
+            {
+                name "gfxmgr"
+                ident "eng_base.gfxmgr"
+            }
+        }
+        {
+            ident "kit_base.obj"
+            param
+            {
+                name "gfxsuppl"
+                obj_suppl "^envcompsuppl"
+                obj_ident "eng_base.gfxsuppl"
+                obj_param
+                {
+                    env "env" 
+                    child_suppl "^basesuppl"
+                }
+            }
+        }
+        {
+            ident "kit_engbase.gfxassign"
+            param
+            {
+                obj "gfxsuppl"
+                gfxmgr "gfxmgr"
+            }
+        }
+        {
+            ident "kit_engbase.sndmgr"
+            param
+            {
+                name "sndmgr"
+                ident "eng_base.sndmgr"
+            }
+        }
+        {
+            ident "kit_base.obj"
+            param
+            {
+                name "stdsuppl"
+                obj_suppl "^envcompsuppl"
+                obj_ident "eng_base.sndsuppl"
+                obj_param
+                {
+                    env "env" 
+                    child_suppl "gfxsuppl"
+                }
+            }
+        }
+        {
+            ident "kit_engbase.sndassign"
+            param
+            {
+                obj "stdsuppl"
+                sndmgr "sndmgr"
+            }
+        }
+        {
+            ident "kit_engbase.clock"
+            param
+            {
+                active 1
+                name "clock"
+                clock_suppl "stdsuppl"
+                clock_ident "clock:"
+            }
+        }
+        {
+            ident "kit_engbase.state"
+            param
+            {
+                name "state_world"
+                obj_suppl "stdsuppl"
+                obj_ident "state:"
+            }
+        }
+        {
+            ident "kit_engbase.state"
+            param
+            {
+                name "state_sky"
+                obj_suppl "stdsuppl"
+                obj_ident "state:"
+            }
+        }
+        {
+            ident "kit_base.obj"
+            param
+            {
+                name "sensorstate_world"
+                obj_suppl "stdsuppl"
+                obj_ident "stdsensorstate:"
+                obj_param
+                {
+                    env "env"
+                    insp_geo_ident "showsensorgeo"
+                    insp_bound_ident "showsensorbound"
+                    insp_geo_color 0.0 0.0 1.0
+                    insp_bound_color 0.0 0.0 1.0
+                }
+            }
+        }
+        {
+            ident "kit_engobj.sim"
+            param
+            {
+                name "sim_world"
+                sim_suppl "stdsuppl"
+                sim_ident "sim:"
+                sim_param
+                {
+                    env "env"
+                    // When changing the step, you should change the erp 
+                    // by the same factor:
+                    step 0.02
+                    subiter 0
+                    gravity 0.0 0.0 -10.0
+                    erp 0.5
+                    cfm 1e-4
+                    max_correcting_vel 1000.0
+                    overlap 0.001
+                    damp 0.05
+                    max_vel 10.0
+                    max_spin 10.0
+                    settled_pos_eps 0.01
+                    settled_rot_eps 0.01
+                    settled_period 1.0
+                    settled_dist 1e3
+                    insp_geo_ident "showphysgeo"
+                    insp_bound_ident "showphysbound"
+                    insp_contact_ident "showphyscontact"
+                    insp_pas_geo_color 0.0 0.0 1.0
+                    insp_pas_bound_color 0.0 0.0 1.0
+                    insp_deact_geo_color 0.0 1.0 0.0
+                    insp_deact_bound_color 0.0 1.0 0.0
+                    insp_act_geo_color 1.0 0.0 0.0
+                    insp_act_bound_color 1.0 0.0 0.0
+                    insp_slave_geo_color 1.0 0.0 1.0
+                    insp_slave_bound_color 1.0 0.0 1.0
+                    insp_contact_extralen 0.2
+                    insp_contact_pre_color 1.0 0.0 1.0
+                    insp_contact_mid_color 0.0 0.0 1.0
+                    insp_contact_post_color 0.0 1.0 1.0
+                }
+                clock "clock"
+            }
+        }
+        {
+            // Event queue.
+            // This actor manages delayed commands.
+            // Define this actor after the 3d state
+            // to avoid unnecessary delays.
+            ident "kit_base.evtmgr"
+            param
+            {
+                // Name of the event queue actor:
+                name "evtmgr"
+                active 1
+                extcfg_actor "^cfg"
+                extcfg_entry_log "log.evtmgr"
+            }
+        }
+        {
+            ident "kit_base.extern"
+            param
+            {
+                name "content_extern"
+                res "level/actor/content.s3d_actor_run"
+                watch_target "content_extern"
+                watch_cmd "load_current"
+                active 1
+            }
+        }
+        {
+            // Actor containing all active players.
+            ident "kit_base.producer"
+            param
+            {
+                name "playerproducer"
+                deleg_name "player_set"
+                active 1
+                ident "kit_base.capsule"
+                param
+                {
+                    scope "levelplayer"
+                    local_name "capsule"
+                    local_deleg_name "capsule_deleg"
+                    deleg_target "dispatch_rawexport"
+                    active 1
+                    child_ident "kit_base.group"
+                    child_param
+                    {
+                        active 1
+                        child_array
+                        {
+                            ident "kit_base.dispatch"
+                            param
+                            {
+                                name "dispatch_rawexport"
+                                allow_other 1
+                                other_target "dispatch_export"
+                                entry_array
+                            }
+                        }
+                        {
+                            // Include the character actors for this level.
+                            // It is defined after the character bag
+                            // since this dsc file refers the bag actor.
+                            ident "kit_base.extern"
+                            param
+                            {
+                                // Delegate action calls to the child:
+                                name "levelplayerbasis_extern"
+                                res "level/actor/"
+                                        & "levelplayerbasis.s3d_actor_run"
+                                watch_target "levelplayerbasis_extern"
+                                watch_cmd "load_current"
+                                active 1
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        {
+            // Ignore level load time.
+            ident "kit_base.oninit"
+            param
+            {
+                target "^outside"
+                cmd "ignore_frmtime"
+            }
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/actor/levelplayerbasis.s3d_actor
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/actor/levelplayerbasis.s3d_actor	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/actor/levelplayerbasis.s3d_actor	(revision 2453)
@@ -0,0 +1,134 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Definition of the player.
+//
+// In this case, the player is a player having a walk collision detection
+// and can be controlled by the human player.
+//
+// The player is not defined directly, but only a suppl for the player.
+// The reason for this is that not only one player must be created,
+// but a new player for every player which logs into the server.
+// As long as no client logs into a server, no player is created.
+// Each time a player logs into the server, the player suppl
+// is used to create a player.
+
+
+// Since each dsc-file formally can only contain a single actor,
+// we use the group actor to define more than one actor.
+actor_ident "kit_base.group"
+actor_param
+{
+    // Delegate action calls to the children.
+    active 1
+    child_array
+    {
+        ident "kit_base.deleg"
+        param
+        {
+            name ""
+            deleg_name "env"
+            deleg_target "^env"
+            allow_no_target 0
+            enabled 1
+        }
+    }
+    {
+        ident "kit_base.deleg"
+        param
+        {
+            name ""
+            deleg_name "stdsuppl"
+            deleg_target "^stdsuppl"
+            allow_no_target 0
+            enabled 1
+        }
+    }
+    {
+        ident "kit_base.deleg"
+        param
+        {
+            name ""
+            deleg_name "state_world"
+            deleg_target "^state_world"
+            allow_no_target 0
+            enabled 1
+        }
+    }
+    {
+        ident "kit_base.deleg"
+        param
+        {
+            name ""
+            deleg_name "sim_world"
+            deleg_target "^sim_world"
+            allow_no_target 0
+            enabled 1
+        }
+    }
+    {
+        ident "kit_engobj.group"
+        param
+        {
+            name "group_player"
+            group_suppl "^stdsuppl"
+            group_ident "group:"
+            group_param
+            {
+                env "env"
+                gensuppl "stdsuppl"
+                given_array
+                {
+                    item "env"
+                    given_ident "env"
+                }
+                {
+                    item "stdsuppl"
+                    given_ident "gensuppl"
+                }
+                {
+                    item "^player_spawn"
+                    given_ident "hook"
+                }
+                {
+                    item "state_world"
+                    given_ident "state"
+                }
+                {
+                    item "sim_world"
+                    given_ident "sim"
+                }
+                {
+                    item ""
+                    given_ident "sensorstate"
+                }
+                res "level/model/"
+                    & "playermodel.s3d_inst_run"
+            }
+        }
+    }
+    {
+        // Include the character actors for this level.
+        // It is defined after the character bag
+        // since this dsc file refers the bag actor.
+        ident "kit_base.extern"
+        param
+        {
+            active 1
+            name "levelplayer_extern"
+            res "level/actor/levelplayer.s3d_actor_run"
+            watch_target "levelplayer_extern"
+            watch_cmd "load_current"
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/actor/sky.s3d_actor
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/actor/sky.s3d_actor	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/actor/sky.s3d_actor	(revision 2453)
@@ -0,0 +1,32 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+actor_ident "kit_base.group"
+actor_param
+{
+    // Delegate action calls to the children.
+    active 1
+    child_array
+    {
+        ident "kit_base.dispatch"
+        param
+        {
+            name "dispatch_sky"
+            entry_array
+            {
+                cmds "net_traverse"
+                targets
+            }
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/actor/world.s3d_actor
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/actor/world.s3d_actor	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/actor/world.s3d_actor	(revision 2453)
@@ -0,0 +1,54 @@
+// Machine-made Shark 3D Snake Text 2x0 Stream. Format: ascii.
+actor_ident "kit_base.group"
+actor_param
+{
+    active 1
+    child_array
+    {
+        ident "kit_base.dispatch"
+        param
+        {
+            name "dispatch_world"
+            entry_array
+            {
+                cmds "net_traverse"
+                targets
+            }
+        }
+    }
+    {
+        ident "kit_engobj.itemeye"
+        param
+        {
+            name "player_spawn"
+            item_actor "group_world"
+            item_name "simplepos:playerstart"
+        }
+    }
+    {
+        ident "kit_engobj.actu"
+        param
+        {
+            name "lamp_group_actu1"
+            actu_suppl "stdsuppl"
+            actu_ident "actucyc:"
+            actu_param
+            {
+            }
+            clock "clock"
+            vel 0.35
+            auto_play_forw 1
+        }
+    }
+    {
+        ident "kit_engobj.posactu"
+        param
+        {
+            pos_actor "group_world"
+            pos_names "path:lamp_group"
+            slot 0
+            actu "lamp_group_actu1"
+        }
+    }
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/actor/content.s3d_actor
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/actor/content.s3d_actor	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/level/actor/content.s3d_actor	(revision 2453)
@@ -0,0 +1,220 @@
+// Machine-made Shark 3D Snake Text 2x0 Stream. Format: ascii.
+actor_ident "kit_base.group"
+actor_param
+{
+    active 1
+    child_array
+    {
+        ident "kit_engobj.group"
+        param
+        {
+            name "group_bloom"
+            group_suppl "stdsuppl"
+            group_ident "group:"
+            group_param
+            {
+                env "^env"
+                gensuppl "stdsuppl"
+                given_array
+                {
+                    item "^env"
+                    given_ident "env"
+                }
+                {
+                    item "stdsuppl"
+                    given_ident "gensuppl"
+                }
+                {
+                    item ""
+                    given_ident "hook"
+                }
+                {
+                    item "state_world"
+                    given_ident "state"
+                }
+                {
+                    item "sim_world"
+                    given_ident "sim"
+                }
+                {
+                    item "sensorstate_world"
+                    given_ident "sensorstate"
+                }
+                res "level/model/bloom.s3d_inst_run"
+            }
+        }
+    }
+    {
+        ident "kit_base.dispatch"
+        param
+        {
+            name "dispatch_content"
+            entry_array
+            {
+                cmds "net_traverse"
+                targets "group_world" "group_sky" "group_bloom"
+                newcmd "traverse"
+            }
+            {
+                cmds "net_traverse"
+                targets "dispatch_world" "dispatch_sky"
+            }
+        }
+    }
+    {
+        ident "kit_engobj.noise"
+        param
+        {
+            active 1
+            name "noise_world"
+            noise_suppl "stdsuppl"
+            noise_ident "noise:"
+            noise_param
+            {
+                env "env"
+                state "state_world"
+                sim "sim_world"
+                clock "clock"
+                insp_ident "shownoise"
+                insp_point_color 1.0 1.0 0.5
+                insp_ext_color 0.5 1.0 0.5
+                insp_default_radius 0.5
+                pos_suppl "stdsuppl"
+                pos_ident "simplepos:"
+                speaker_suppl "stdsuppl"
+                speaker_ident "speaker:"
+                wave_suppl "stdsuppl"
+                attr_array
+                {
+                    mtl_array "character"
+                    dominance 10
+                    bump
+                    {
+                        share_range 0.0
+                        share_period 0.0
+                        min_vel 0.0
+                        max_vel 0.0
+                        max_volume 1.0
+                        wave ""
+                        speaker_range 50.0
+                        speaker_size 5.0
+                    }
+                    slide
+                    {
+                        share_range 0.0
+                        share_period 0.0
+                        min_vel 0.0
+                        max_vel 0.0
+                        max_volume 1.0
+                        wave ""
+                        speaker_range 50.0
+                        speaker_size 5.0
+                    }
+                }
+            }
+        }
+    }
+    {
+        ident "kit_engobj.group"
+        param
+        {
+            name "group_world"
+            group_suppl "stdsuppl"
+            group_ident "group:"
+            group_param
+            {
+                env "env"
+                gensuppl "stdsuppl"
+                given_array
+                {
+                    item "env"
+                    given_ident "env"
+                }
+                {
+                    item "stdsuppl"
+                    given_ident "gensuppl"
+                }
+                {
+                    item ""
+                    given_ident "hook"
+                }
+                {
+                    item "state_world"
+                    given_ident "state"
+                }
+                {
+                    item "sim_world"
+                    given_ident "sim"
+                }
+                {
+                    item "sensorstate_world"
+                    given_ident "sensorstate"
+                }
+                res "level/model/worldmodel.s3d_inst_run"
+            }
+        }
+    }
+    {
+        ident "kit_engobj.group"
+        param
+        {
+            name "group_sky"
+            group_suppl "stdsuppl"
+            group_ident "group:"
+            group_param
+            {
+                env "env"
+                gensuppl "stdsuppl"
+                given_array
+                {
+                    item "env"
+                    given_ident "env"
+                }
+                {
+                    item "stdsuppl"
+                    given_ident "gensuppl"
+                }
+                {
+                    item ""
+                    given_ident "hook"
+                }
+                {
+                    item "state_sky"
+                    given_ident "state"
+                }
+                {
+                    item ""
+                    given_ident "sim"
+                }
+                {
+                    item ""
+                    given_ident "sensorstate"
+                }
+                res "level/model/skymodel.s3d_inst_run"
+            }
+        }
+    }
+    {
+        ident "kit_base.extern"
+        param
+        {
+            active 1
+            name "world_extern"
+            res "level/actor/world.s3d_actor_run"
+            watch_target "world_extern"
+            watch_cmd "load_current"
+        }
+    }
+    {
+        ident "kit_base.extern"
+        param
+        {
+            active 1
+            name "sky_extern"
+            res "level/actor/sky.s3d_actor_run"
+            watch_target "sky_extern"
+            watch_cmd "load_current"
+        }
+    }
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/model/.sconsign
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/model/.sconsign	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/model/.sconsign	(revision 2453)
@@ -0,0 +1,7 @@
+}q(Udisplaymodel.s3d_instq(cSCons.Node.FS
+BuildInfo
+qoq}q(U	timestampqJÕEeFUcsigqJÕEeFubUdisplaymodel.s3d_modelq(hoq	}q
+(hJÕEeFhJÕEeFubUdisplaymodel.s3d_pospathq
+(hoq
+}q
+(hJÕEeFhJÕEeFubu.
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/model/displaymodel.s3d_inst
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/model/displaymodel.s3d_inst	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/model/displaymodel.s3d_inst	(revision 2453)
@@ -0,0 +1,136 @@
+// Machine-made Shark 3D Snake Text 2x0 Stream. Format: ascii.
+producer
+    "Shark 3D Exporter for Max v6000, Spinor GmbH (www.spinor.com), shark3d_v5"
+    & "x0x1_t153_c153_enterpr_win32_vc7x1_release_fwin32vc7x1release"
+source
+    "C:\\develop\\svn\\shark3d\\samples\\kit_empty_walk\\src\\res\\client\\mod"
+    & "el\\displaymodel.max"
+format "shark3d_inst_5"
+data
+{
+    elem_array
+    {
+        ident "stdsimplepos:scene_root"
+        name "simplepos:scene_root"
+        param
+        {
+            env "env"
+            parent "hook"
+            transl 0.0 0.0 0.0
+            quat 0.0 0.0 0.0 1.0
+        }
+    }
+    {
+        ident "stdpath:client/model/displaymodel.s3d_pospath_run#loading"
+        name "path:loading"
+        param
+        {
+            env "env"
+        }
+    }
+    {
+        ident "stdconcatpos:loading"
+        name "concatpos:loading"
+        param
+        {
+            env "env"
+            parent0 "simplepos:scene_root"
+            parent1 "path:loading"
+        }
+    }
+    {
+        ident "stdpath:client/model/displaymodel.s3d_pospath_run#logo"
+        name "path:logo"
+        param
+        {
+            env "env"
+        }
+    }
+    {
+        ident "stdconcatpos:logo"
+        name "concatpos:logo"
+        param
+        {
+            env "env"
+            parent0 "simplepos:scene_root"
+            parent1 "path:logo"
+        }
+    }
+    {
+        ident "stdsimplepos:saving"
+        name "simplepos:saving"
+        param
+        {
+            env "env"
+            parent "simplepos:scene_root"
+            transl 0.0 0.0 0.0
+            quat 1.0 -4.37114e-008 6.42204e-015 2.596e-007
+        }
+    }
+    {
+        ident "stdinst:loading"
+        name "inst:loading"
+        param
+        {
+            env "env"
+            gensuppl "gensuppl"
+            state "state"
+            model_ident
+                "stdmodel:client/model/displaymodel.s3d_model_run#loading"
+            model_param
+            {
+            }
+            shader_ident
+                "stdshader:levelutil/shader/display.s3d_shader_run#plain_trans"
+                & "p"
+            shader_param
+            {
+            }
+            pos "concatpos:loading"
+        }
+    }
+    {
+        ident "stdinst:logo"
+        name "inst:logo"
+        param
+        {
+            env "env"
+            gensuppl "gensuppl"
+            state "state"
+            ilkstr "clickable"
+            model_ident "stdmodel:client/model/displaymodel.s3d_model_run#logo"
+            model_param
+            {
+            }
+            shader_ident
+                "stdshader:levelutil/shader/display.s3d_shader_run#plain"
+            shader_param
+            {
+            }
+            pos "concatpos:logo"
+        }
+    }
+    {
+        ident "stdinst:saving"
+        name "inst:saving"
+        param
+        {
+            env "env"
+            gensuppl "gensuppl"
+            state "state"
+            model_ident
+                "stdmodel:client/model/displaymodel.s3d_model_run#saving"
+            model_param
+            {
+            }
+            shader_ident
+                "stdshader:levelutil/shader/display.s3d_shader_run#plain_trans"
+                & "p"
+            shader_param
+            {
+            }
+            pos "simplepos:saving"
+        }
+    }
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/model/displaymodel.s3d_pospath
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/model/displaymodel.s3d_pospath	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/model/displaymodel.s3d_pospath	(revision 2453)
@@ -0,0 +1,43 @@
+// Machine-made Shark 3D Snake Text 2x0 Stream. Format: ascii.
+producer
+    "Shark 3D Exporter for Max v6000, Spinor GmbH (www.spinor.com), shark3d_v5"
+    & "x0x1_t153_c153_enterpr_win32_vc7x1_release_fwin32vc7x1release"
+source
+    "C:\\develop\\svn\\shark3d\\samples\\kit_empty_walk\\src\\res\\client\\mod"
+    & "el\\displaymodel.max"
+format "shark3d_path_5"
+data
+{
+    path_array
+    {
+        name "logo"
+        range 0.0 3.33333
+        frame_array
+        {
+            key 0.0
+            transl -0.9 0.0 0.0
+            quat 1.0 -2.18557e-008 2.18557e-008 1.94707e-007
+        }
+        {
+            key 3.33333
+            transl -0.9 0.0 0.0
+            quat -1.0 4.53732e-007 -2.18558e-008 -1.94707e-007
+        }
+    }
+    {
+        name "loading"
+        range 0.0 3.33333
+        frame_array
+        {
+            key 0.0
+            transl 0.0 0.0 0.0
+            quat 1.0 -4.37114e-008 8.36128e-015 1.94707e-007
+        }
+        {
+            key 3.33333
+            transl 0.0 0.0 0.0
+            quat -1.0 4.37114e-008 -8.36128e-015 2.37169e-007
+        }
+    }
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/model/displaymodel.s3d_bonepath
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/model/displaymodel.s3d_bonepath	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/model/displaymodel.s3d_bonepath	(revision 2453)
@@ -0,0 +1,13 @@
+// Machine-made Shark 3D Snake Text 2x0 Stream. Format: ascii.
+producer
+    "Shark 3D Exporter for Max v6000, Spinor GmbH (www.spinor.com), shark3d_v5"
+    & "x0x1_t153_c153_enterpr_win32_vc7x1_release_fwin32vc7x1release"
+source
+    "C:\\develop\\svn\\shark3d\\samples\\kit_empty_walk\\src\\res\\client\\mod"
+    & "el\\displaymodel.max"
+format "shark3d_path_5"
+data
+{
+    path_array
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/model/displaymodel.s3d_model
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/model/displaymodel.s3d_model	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/model/displaymodel.s3d_model	(revision 2453)
@@ -0,0 +1,208 @@
+// Machine-made Shark 3D Snake Text 2x0 Stream. Format: ascii.
+producer
+    "Shark 3D Exporter for Max v6000, Spinor GmbH (www.spinor.com), shark3d_v5"
+    & "x0x1_t153_c153_enterpr_win32_vc7x1_release_fwin32vc7x1release"
+source
+    "C:\\develop\\svn\\shark3d\\samples\\kit_empty_walk\\src\\res\\client\\mod"
+    & "el\\displaymodel.max"
+format "shark3d_model_5"
+data
+{
+    model_array
+    {
+        name "logo"
+        range 0.0 3.33333
+        model_variant_array
+        {
+            kind_set "render"
+            prec 0.0
+            family_array
+            {
+                layer_array
+                {
+                    tex_name "stdtex:client/texture/logo_clamp.tga"
+                    wrap_x "clamp"
+                    wrap_y "clamp"
+                    wrap_z ""
+                    filter "std"
+                }
+            }
+            vertex_array
+            {
+                frame_array
+                {
+                    point -0.1 0.1 -5.2108e-016
+                    normal 2.81099e-015 -1.91069e-015 1.0
+                    tex_coord_array 0.0 0.0
+                }
+            }
+            {
+                frame_array
+                {
+                    point -0.1 -0.1 5.68387e-016
+                    normal 2.81099e-015 -1.91069e-015 1.0
+                    tex_coord_array 0.0 1.0
+                }
+            }
+            {
+                frame_array
+                {
+                    point 0.1 0.1 -5.68387e-016
+                    normal 2.81099e-015 -1.91069e-015 1.0
+                    tex_coord_array 1.0 0.0
+                }
+            }
+            {
+                frame_array
+                {
+                    point 0.1 -0.1 5.2108e-016
+                    normal 2.81099e-015 -1.91069e-015 1.0
+                    tex_coord_array 1.0 1.0
+                }
+            }
+            face_array
+            {
+                family_idx 0
+                vertex_idx_array 0 1 2
+            }
+            {
+                family_idx 0
+                vertex_idx_array 3 2 1
+            }
+            prim_sphere_array
+            prim_capsule_array
+            prim_box_array
+        }
+    }
+    {
+        name "loading"
+        range 0.0 3.33333
+        model_variant_array
+        {
+            kind_set "render"
+            prec 0.0
+            family_array
+            {
+                layer_array
+                {
+                    tex_name "stdtex:client/texture/loading_clamp.tga"
+                    wrap_x "clamp"
+                    wrap_y "clamp"
+                    wrap_z ""
+                    filter "std"
+                }
+            }
+            vertex_array
+            {
+                frame_array
+                {
+                    point -0.4 0.1 -6.05005e-015
+                    normal 2.98966e-021 0.0 1.0
+                    tex_coord_array 0.0 0.0
+                }
+            }
+            {
+                frame_array
+                {
+                    point -0.4 -0.1 -4.30924e-015
+                    normal 2.98966e-021 0.0 1.0
+                    tex_coord_array 0.0 1.0
+                }
+            }
+            {
+                frame_array
+                {
+                    point 0.4 0.1 4.30924e-015
+                    normal 2.98966e-021 0.0 1.0
+                    tex_coord_array 1.0 0.0
+                }
+            }
+            {
+                frame_array
+                {
+                    point 0.4 -0.1 6.05005e-015
+                    normal 2.98966e-021 0.0 1.0
+                    tex_coord_array 1.0 1.0
+                }
+            }
+            face_array
+            {
+                family_idx 0
+                vertex_idx_array 0 1 2
+            }
+            {
+                family_idx 0
+                vertex_idx_array 3 2 1
+            }
+            prim_sphere_array
+            prim_capsule_array
+            prim_box_array
+        }
+    }
+    {
+        name "saving"
+        range 0.0 3.33333
+        model_variant_array
+        {
+            kind_set "render"
+            prec 0.0
+            family_array
+            {
+                layer_array
+                {
+                    tex_name "stdtex:client/texture/saving_clamp.tga"
+                    wrap_x "clamp"
+                    wrap_y "clamp"
+                    wrap_z ""
+                    filter "std"
+                }
+            }
+            vertex_array
+            {
+                frame_array
+                {
+                    point -0.4 0.1 -2.19216e-017
+                    normal 4.85782e-021 8.47033e-022 1.0
+                    tex_coord_array 0.0 0.0
+                }
+            }
+            {
+                frame_array
+                {
+                    point -0.4 -0.1 -2.67472e-015
+                    normal 4.85782e-021 8.47033e-022 1.0
+                    tex_coord_array 0.0 1.0
+                }
+            }
+            {
+                frame_array
+                {
+                    point 0.4 0.1 2.67472e-015
+                    normal 4.85782e-021 8.47033e-022 1.0
+                    tex_coord_array 1.0 0.0
+                }
+            }
+            {
+                frame_array
+                {
+                    point 0.4 -0.1 2.19216e-017
+                    normal 4.85782e-021 8.47033e-022 1.0
+                    tex_coord_array 1.0 1.0
+                }
+            }
+            face_array
+            {
+                family_idx 0
+                vertex_idx_array 0 1 2
+            }
+            {
+                family_idx 0
+                vertex_idx_array 3 2 1
+            }
+            prim_sphere_array
+            prim_capsule_array
+            prim_box_array
+        }
+    }
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/texture/.sconsign
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/texture/.sconsign	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/texture/.sconsign	(revision 2453)
@@ -0,0 +1,9 @@
+}q(Ulogo_clamp.tgaq(cSCons.Node.FS
+BuildInfo
+qoq}q(U	timestampqJÕEeFUcsigqJÕEeFubU
+charset.tgaq(hoq	}q
+(hJÕEeFhJÕEeFubUcursor_sel.tgaq
+(hoq
+}q
+(hJÕEeFhJÕEeFubUstatecursor.tgaq(hoq}q(hJÕEeFhJÕEeFubUsaving_clamp.tgaq(hoq}q(hJÕEeFhJÕEeFubUloading_clamp.tgaq(hoq}q(hJÕEeFhJÕEeFubUtest.tgaq(hoq}q(hJÕEeFhJÕEeFubUcursor_def.tgaq(hoq}q
+(hJÕEeFhJÕEeFubu.
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/actor/.sconsign
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/actor/.sconsign	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/actor/.sconsign	(revision 2453)
@@ -0,0 +1,10 @@
+}q(Uclient.s3d_actorq(cSCons.Node.FS
+BuildInfo
+qoq}q(U	timestampqJÖEeFUcsigqJÖEeFubUdisplay.s3d_actorq(hoq	}q
+(hJÖEeFhJÖEeFubU
+snd.s3d_actorq
+(hoq
+}q
+(hJÖEeFhJÖEeFubUmotion.s3d_actorq(hoq}q(hJÖEeFhJÖEeFubU
+gfx.s3d_actorq(hoq}q(hJÖEeFhJÖEeFubU
+io.s3d_actorq(hoq}q(hJÖEeFhJÖEeFubUdisplayworld.s3d_actorq(hoq}q(hJÖEeFhJÖEeFubu.
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/actor/gfx.s3d_actor
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/actor/gfx.s3d_actor	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/actor/gfx.s3d_actor	(revision 2453)
@@ -0,0 +1,852 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Definition of the graphics output.
+// This includes the graphics engine object and the gfxports.
+//
+// This file defines three gfxports.
+// a) Display gfxport.   Depth range 0.00 to 0.01.
+// b) World gfxport.     Depth range 0.01 to 0.99
+// c) Sky gfxport.       Depth range 0.99 to 1.00
+
+// The client root actor is a capsule, defining an own local namespace.
+actor_ident "kit_base.capsule"
+actor_param
+{
+    // Delegate the action calls to all children:
+    active 1
+    // Scope name for reporting errors:
+    scope "gfx"
+    // Name of the capsule actor within its own namespace.
+    // Actors within the capsule can access the capsule
+    // actor itself by this name.
+    local_name "capsule"
+    // Delegate events from outside:
+    deleg_target "dispatch_export"
+    // The capsule actor contains a group of actors:
+    child_ident "kit_base.group"
+    child_param
+    {
+        // Delegate action calls to the children.
+        active 1
+        child_array
+        {
+            // Dispatcher for commands from outside the capsule.
+            ident "kit_base.dispatch"
+            param
+            {
+                name "dispatch_export"
+                entry_array
+                {
+                    cmds "set_cursor_x" "set_cursor_y"
+                    targets "cursor"
+                }
+                {
+                    cmds "set_playerbody"
+                    targets "cursor"
+                    newcmd "set_avoid"
+                }
+                {
+                    cmds "set_gfxmgr_level"
+                    targets "gfxsect_level"
+                    newcmd "assign_gfxmgr"
+                }
+                {
+                    cmds "set_state_display"
+                    targets "gfxport_display"
+                    newcmd "assign_state"
+                }
+                {
+                    cmds "set_state_world"
+                    targets "gfxport_world"
+                    newcmd "assign_state"
+                }
+                {
+                    cmds "set_state_sky"
+                    targets "gfxport_sky"
+                    newcmd "assign_state"
+                }
+                {
+                    cmds "set_sim_world"
+                    targets "inspperform_sim_world"
+                    newcmd "set_obj"
+                }
+                {
+                    cmds "set_sim_world"
+                    targets "cursor"
+                    newcmd "set_sim"
+                }
+                {
+                    cmds "set_noise_world"
+                    targets "inspperform_noise_world"
+                    newcmd "set_obj"
+                }
+                {
+                    cmds "set_sensorstate_world"
+                    targets "inspperform_sensorstate_world"
+                    newcmd "set_obj"
+                }
+                {
+                    // Update camera transformation of world:
+                    cmds "set_camera_efftransf"
+                    targets "gfxport_world"
+                    newcmd "set_transf"
+                }
+                {
+                    // Click command:
+                    cmds "click"
+                        "set_cursor_x" "set_cursor_y"
+                        "move_cursor_x" "move_cursor_y"
+                    targets //"cursor"
+                }
+                {
+                    // Toggle frmtime information:
+                    cmds "toggle_frmtime"
+                    targets "inspfrmtime"
+                    newcmd "toggle_insp"
+                }
+                {
+                    // Toggle frmtime information:
+                    cmds "toggle_stat" "reset_stat"
+                    targets "inspfrmtime"
+                }
+                {
+                    cmds "reset_msg"
+                    targets "inspmsg"
+                    newcmd "reset"
+                }
+                {
+                    cmds "toggle_fullscreen"
+                    targets "gfxout"
+                }
+                {
+                    cmds "toggle_showgfxbound"
+                    targets 
+                        "toggle_showgfxbound_sky" 
+                        "toggle_showgfxbound_world" 
+                        "toggle_showgfxbound_display"
+                    newcmd "perform"
+                }
+                {
+                    cmds "toggle_showgfxmesh"
+                    targets
+                        "toggle_showgfxmesh_sky"
+                        "toggle_showgfxmesh_world"
+                        "toggle_showgfxmesh_display"
+                    newcmd "perform"
+                }
+                {
+                    cmds "toggle_showgfxwire"
+                    targets 
+                        "toggle_showgfxwire_sky" 
+                        "toggle_showgfxwire_world" 
+                        "toggle_showgfxwire_display"
+                    newcmd "perform"
+                }
+                {
+                    cmds "toggle_showgfxocclmesh"
+                    targets 
+                        "toggle_showgfxocclmesh_sky" 
+                        "toggle_showgfxocclmesh_world" 
+                        "toggle_showgfxocclmesh_display"
+                    newcmd "perform"
+                }
+                {
+                    cmds "toggle_showgfxocclwire"
+                    targets 
+                        "toggle_showgfxocclwire_sky" 
+                        "toggle_showgfxocclwire_world" 
+                        "toggle_showgfxocclwire_display"
+                    newcmd "perform"
+                }
+                {
+                    cmds "toggle_showphysbound"
+                    targets "toggle_showphysbound"
+                    newcmd "perform"
+                }
+                {
+                    cmds "toggle_showphysgeo"
+                    targets "toggle_showphysgeo"
+                    newcmd "perform"
+                }
+                {
+                    cmds "toggle_showphyscontact"
+                    targets "toggle_showphyscontact"
+                    newcmd "perform"
+                }
+                {
+                    cmds "toggle_shownoise"
+                    targets "toggle_shownoise"
+                    newcmd "perform"
+                }
+                {
+                    cmds "toggle_showsensorgeo"
+                    targets "toggle_showsensorgeo"
+                    newcmd "perform"
+                }
+                {
+                    cmds "toggle_showsensorbound"
+                    targets "toggle_showsensorbound"
+                    newcmd "perform"
+                }
+                {
+                    cmds "store_screenshot"
+                    targets "gfxeng"
+                }
+
+                // Paint sequence.
+                // The following entry_array define the steps in correct order
+                // which have to be performed for rendering a frame.
+                {
+                    cmds "paint"
+                    targets "cursor"
+                    newcmd "perform_raycast"
+                }
+                {
+                    cmds "paint"
+                    targets "gfxport_display"
+                    newcmd "perform"
+                }
+                {
+                    // Paint the general information.
+                    cmds "paint"
+                    targets "inspmem"
+                    newcmd "perform_insp"
+                }
+                {
+                    // Paint the general information.
+                    cmds "paint"
+                    targets "inspmsg"
+                    newcmd "perform_insp"
+                }
+                {
+                    // Paint the general information.
+                    cmds "paint"
+                    targets "inspgeneral"
+                    newcmd "perform_insp"
+                }
+                {
+                    // Finish the paint cycle.
+                    cmds "paint"
+                    targets "gfxeng"
+                    newcmd "perform_insp"
+                }
+                {
+                    // Finish the paint cycle.
+                    cmds "paint"
+                    targets "gfxout"
+                    newcmd "perform_insp"
+                }
+                {
+                    cmds "paint"
+                    targets "cursor"
+                    newcmd "perform_insp"
+                }
+                {
+                    // Update per-frame information of the gfx engine.
+                    cmds "paint"
+                    targets "inspperform_sim_world"
+                    newcmd "perform_insp"
+                }
+                {
+                    cmds "paint"
+                    targets "inspperform_noise_world"
+                    newcmd "perform_insp"
+                }
+                {
+                    // Update per-frame information of the gfx engine.
+                    cmds "paint"
+                    targets "inspperform_sensorstate_world"
+                    newcmd "perform_insp"
+                }
+                {
+                    // Paint the inspfrmtime last:
+                    cmds "paint"
+                    targets "inspfrmtime"
+                    newcmd "perform_insp"
+                }
+                {
+                    // Draw the per-frame information.
+                    cmds "paint"
+                    targets "insppaint"
+                    newcmd "paint"
+                }
+                {
+                    // Finish the paint cycle.
+                    cmds "paint"
+                    targets "gfxeng"
+                    newcmd "end_render"
+                }
+                {
+                    cmds "paint"
+                    targets "gfxout"
+                    newcmd "present"
+                }
+            }
+        }
+        {
+            // 3D graphics engine:
+            ident "kit_io.gfxeng"
+            param
+            {
+                name "gfxeng"
+                active 1
+                extcfg_actor "^^^cfg"
+                extcfg_entry_param "gfxeng"
+                extcfg_entry_insp_stat_enabled "insp.gfxstat"
+                inspcollect "^^inspcollect"
+                given_array
+                {
+                    item "^^^envcompsuppl"
+                    given_ident "envcompsuppl"
+                }
+                {
+                    item "^^^env"
+                    given_ident "env"
+                }
+            }
+        }
+        {
+            // 3D graphics engine:
+            ident "kit_io.gfxout"
+            param
+            {
+                ctx "^ctx"
+                gfxeng "gfxeng"
+                name "gfxout"
+                active 1
+                extcfg_actor "^^^cfg"
+                extcfg_entry_param "gfxout"
+                extcfg_entry_insp_base_enabled "insp.gfxbase"
+                inspcollect "^^inspcollect"
+            }
+        }
+        {
+            ident "kit_engbase.gfxctx"
+            param
+            {
+                name "gfxctx"
+                gfxeng "gfxeng"
+                extcfg_actor "^^^cfg"
+                extcfg_entry_featureset "feature_set"
+            }
+        }
+        {
+            // 3D graphics engine:
+            ident "kit_engbase.gfxsect"
+            param
+            {
+                name "gfxsect_display"
+                gfxctx "gfxctx"
+                gfxmgr_actor "^^display"
+                gfxmgr_cmd "get_display_gfxmgr"
+            }
+        }
+        {
+            // 3D graphics engine:
+            ident "kit_engbase.gfxsect"
+            param
+            {
+                name "gfxsect_level"
+                gfxctx "gfxctx"
+                gfxmgr_actor ""
+                gfxmgr_cmd ""
+            }
+        }
+        {
+            // Painting per-frame information lines.
+            ident "kit_engbase.insppaint"
+            param
+            {
+                name "insppaint"
+                inspcollect "^^inspcollect"
+                gfxctx "gfxctx"
+                tex_suppl "^^^basesuppl"
+                tex_ident "tex:client/texture/charset.tga"
+                extcfg_actor "^^^cfg"
+                extcfg_entry_chunk "insp.paint"
+            }
+        }
+
+        {
+            // Reporting general information.
+            ident "kit_base.inspmsg"
+            param
+            {
+                name "inspmsg"
+                inspcollect "^^inspcollect"
+                extcfg_actor "^^^cfg"
+                extcfg_entry_insp "insp.msg"
+                extcfg_entry_limit "insp.msg_limit"
+                extcfg_entry_alsoinfo "insp.msg_alsoinfo"
+            }
+        }
+        {
+            // Reporting general information.
+            ident "kit_base.inspgeneral"
+            param
+            {
+                name "inspgeneral"
+                inspcollect "^^inspcollect"
+                extcfg_actor "^^^cfg"
+                extcfg_entry_insp "insp.general"
+            }
+        }
+        {
+            // frmtime calculation actor.
+            ident "kit_base.inspfrmtime"
+            param
+            {
+                name "inspfrmtime"
+                inspcollect "^^inspcollect"
+                extcfg_actor "^^^cfg"
+                extcfg_entry_insp "insp.frmtime"
+                extcfg_entry_logfile "insp.frmtime_logfile"
+            }
+        }
+        {
+            //
+            ident "kit_base.inspmem"
+            param
+            {
+                name "inspmem"
+                inspcollect "^^inspcollect"
+                extcfg_actor "^^^cfg"
+                extcfg_entry_insp "insp.mem"
+            }
+        }
+        {
+            ident "kit_engbase.gfxport"
+            param
+            {
+                name "gfxport_sky"
+                
+                active 1
+                
+                gfxout "gfxout"
+                gfxctx "gfxctx"
+                next ""
+                couple 0
+                
+                state_actor ""
+                state_cmd ""
+                
+                gfxstat "gfxstat"
+                
+                extcfg_actor "^^^cfg"
+                extcfg_entry_proj "proj_world"
+                extcfg_entry_param "gfxport"
+                //extcfg_entry_eyedist "eyedist.display"
+
+                view_transl_x 0.00
+                view_transl_y 0.00
+                view_scale_x 1.00
+                view_scale_y 1.00
+                view_depth_start 0.99
+                view_depth_end 1.00
+
+                // Use orthogonal projection.
+                proj_ortho 0
+                // View frustum extension.
+                // These values are plane slopes in case of a persepctive
+                // projection, and coordinates otherwise.
+                // If all set to zero, read from cfguration file instead.
+                proj_open_x 0.0
+                proj_open_y 0.0
+                proj_center_x 0.0
+                proj_center_y 0.0
+                // Clipping plane coordinates.
+                proj_neg_z 0.05
+                proj_pos_z 1000.0
+                // Fog:
+                fog_color 0.5 0.5 0.5
+                //fog_density 0.02
+                
+                destprop_antialias 1
+                clear_must_coloralpha 1
+                clear_color 0.0 0.0 0.0
+
+                enum_trigger "main_trigger"
+            }
+        }
+        {
+            ident "kit_engbase.gfxport"
+            param
+            {
+                name "gfxport_world"
+                
+                active 1
+                
+                gfxout "gfxout"
+                gfxctx "gfxctx"
+                next "gfxport_sky"
+                couple 1   // Sky is coupled
+                
+                state_actor ""
+                state_cmd ""
+                
+                gfxstat "gfxstat"
+                
+                extcfg_actor "^^^cfg"
+                extcfg_entry_proj "proj_world"
+                extcfg_entry_param "gfxport"
+                //extcfg_entry_eyedist "eyedist.display"
+
+                view_transl_x 0.00
+                view_transl_y 0.00
+                view_scale_x 1.00
+                view_scale_y 1.00
+                view_depth_start 0.01
+                view_depth_end 0.99
+
+                // Use orthogonal projection.
+                proj_ortho 0
+                // View frustum extension.
+                // These values are plane slopes in case of a persepctive
+                // projection, and coordinates otherwise.
+                // If all set to zero, read from cfguration file instead.
+                proj_open_x 0.0
+                proj_open_y 0.0
+                proj_center_x 0.0
+                proj_center_y 0.0
+                // Clipping plane coordinates.
+                proj_neg_z 0.05
+                proj_pos_z 1000.0
+                // Fog:
+                fog_color 0.5 0.5 0.5
+                //fog_density 0.02
+
+                destprop_antialias 1
+                clear_must_coloralpha 1
+                clear_color 0.0 0.0 0.0
+
+                enum_trigger "main_trigger"
+            }
+        }
+        {
+            ident "kit_special.raycast"
+            param
+            {
+                name "raycast_cursor"
+            }
+        }
+        {
+            ident "kit_special.cursor"
+            param
+            {
+                name "cursor"
+                proj_src "gfxport_world"
+                proj_cmd "get_proj"
+                transf_src "gfxport_world"
+                transf_cmd "get_transf"
+                raycast_actor "raycast_cursor"
+                raycast_cmd "perform_raycast"
+                ray_start_z -1.0
+                ray_end_z 1.0
+
+                extcfg_actor "^^^cfg"
+                extcfg_entry_param "gfxeng"
+                extcfg_entry_insp_stat_enabled "insp.cursor"
+                inspcollect "^^inspcollect"
+            }
+        }
+        {
+            ident "kit_engbase.gfxport"
+            param
+            {
+                name "gfxport_display"
+                
+                active 1
+                
+                gfxout "gfxout"
+                gfxctx "gfxctx"
+                next "gfxport_world"
+                couple 0
+
+                state_actor "^^display"
+                state_cmd "get_display_state"
+                
+                gfxstat "gfxstat"
+                
+                extcfg_actor "^^^cfg"
+                extcfg_entry_proj "proj_display"
+                extcfg_entry_param "gfxport"
+                //extcfg_entry_eyedist "eyedist.display"
+
+                view_transl_x 0.00
+                view_transl_y 0.00
+                view_scale_x 1.00
+                view_scale_y 1.00
+                view_depth_start 0.00
+                view_depth_end 0.01
+
+                proj_ortho 1
+                proj_open_x 0.0
+                proj_open_y 0.0
+                proj_center_x 0.0
+                proj_center_y 0.0
+                proj_neg_z -1.0
+                proj_pos_z 1.0
+
+                fog_color 0.5 0.5 0.5
+                //fog_density 0.02
+
+                destprop_antialias 1
+                clear_must_coloralpha 1
+                clear_color 0.0 0.0 0.0
+
+                enum_trigger "main_trigger"
+            }
+        }
+        {
+            ident "kit_engbase.inspperform"
+            param
+            {
+                name "inspperform_sim_world"
+                inspcollect "^^inspcollect"
+                gfxport "gfxport_world"
+                obj ""
+            }
+        }
+        {
+            ident "kit_engbase.inspperform"
+            param
+            {
+                name "inspperform_noise_world"
+                inspcollect "^^inspcollect"
+                gfxport "gfxport_world"
+                obj ""
+            }
+        }
+        {
+            ident "kit_engbase.inspperform"
+            param
+            {
+                name "inspperform_sensorstate_world"
+                inspcollect "^^inspcollect"
+                gfxport "gfxport_world"
+                obj ""
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showgfxbound_sky"
+                target "gfxport_sky"
+                cmd "toggle_mode_flag"
+                param "showbound"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showgfxbound_world"
+                target "gfxport_world"
+                cmd "toggle_mode_flag"
+                param "showbound"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showgfxbound_display"
+                target "gfxport_display"
+                cmd "toggle_mode_flag"
+                param "showbound"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showgfxmesh_sky"
+                target "gfxport_sky"
+                cmd "toggle_mode_flag"
+                param "showmesh"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showgfxmesh_world"
+                target "gfxport_world"
+                cmd "toggle_mode_flag"
+                param "showmesh"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showgfxmesh_display"
+                target "gfxport_display"
+                cmd "toggle_mode_flag"
+                param "showmesh"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showgfxwire_sky"
+                target "gfxport_sky"
+                cmd "toggle_mode_flag"
+                param "showwire"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showgfxwire_world"
+                target "gfxport_world"
+                cmd "toggle_mode_flag"
+                param "showwire"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showgfxwire_display"
+                target "gfxport_display"
+                cmd "toggle_mode_flag"
+                param "showwire"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showgfxocclmesh_sky"
+                target "gfxport_sky"
+                cmd "toggle_mode_flag"
+                param "showocclmesh"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showgfxocclmesh_world"
+                target "gfxport_world"
+                cmd "toggle_mode_flag"
+                param "showocclmesh"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showgfxocclmesh_display"
+                target "gfxport_display"
+                cmd "toggle_mode_flag"
+                param "showocclmesh"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showgfxocclwire_sky"
+                target "gfxport_sky"
+                cmd "toggle_mode_flag"
+                param "showocclwire"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showgfxocclwire_world"
+                target "gfxport_world"
+                cmd "toggle_mode_flag"
+                param "showocclwire"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showgfxocclwire_display"
+                target "gfxport_display"
+                cmd "toggle_mode_flag"
+                param "showocclwire"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showphysbound"
+                target "gfxport_world"
+                cmd "toggle_mode_flag"
+                param "showphysbound"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showphysgeo"
+                target "gfxport_world"
+                cmd "toggle_mode_flag"
+                param "showphysgeo"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showphyscontact"
+                target "gfxport_world"
+                cmd "toggle_mode_flag"
+                param "showphyscontact"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_shownoise"
+                target "gfxport_world"
+                cmd "toggle_mode_flag"
+                param "shownoise"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showsensorbound"
+                target "gfxport_world"
+                cmd "toggle_mode_flag"
+                param "showsensorbound"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showsensorgeo"
+                target "gfxport_world"
+                cmd "toggle_mode_flag"
+                param "showsensorgeo"
+            }
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/actor/snd.s3d_actor
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/actor/snd.s3d_actor	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/actor/snd.s3d_actor	(revision 2453)
@@ -0,0 +1,188 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Definition of the snd output.
+// This includes the snd engine object and the sndport.
+
+// The client root actor is a capsule, defining an own local namespace.
+actor_ident "kit_base.capsule"
+actor_param
+{
+    // Delegate the action calls to all children:
+    active 1
+    // Scope name for reporting errors:
+    scope "snd"
+    // Name of the capsule actor within its own namespace.
+    // Actors within the capsule can access the capsule 
+    // actor itself by this name.
+    local_name "capsule"
+    // Delegate events from outside:
+    deleg_target "dispatch_export"
+    // The capsule actor contains a group of actors:
+    child_ident "kit_base.group"
+    child_param
+    {
+        // Delegate action calls to the children.
+        active 1
+        child_array
+        {
+            // Dispatcher for commands from outside the capsule.
+            ident "kit_base.dispatch"
+            param
+            {
+                name "dispatch_export"
+                entry_array
+                {
+                    cmds "set_sndmgr_level"
+                    targets "sndsect_level"
+                    newcmd "assign_sndmgr"
+                }
+                {
+                    cmds "set_state_display"
+                    targets "sndport_display"
+                    newcmd "assign_state"
+                }
+                {
+                    cmds "set_state_world"
+                    targets "sndport_world"
+                    newcmd "assign_state"
+                }
+                {
+                    cmds "set_state_sky"
+                    targets "sndport_sky"
+                    newcmd "assign_state"
+                }
+                {
+                    // Update camera transformation of world:
+                    cmds "set_camera_efftransf"
+                    targets 
+                        "sndport_world"
+                    newcmd "set_transf"
+                }
+                {
+                    cmds "suspend"
+                    targets
+                }
+                {
+                    cmds "update"
+                    targets "sndport_display"
+                    newcmd "perform"
+                }
+            }
+        }
+        {
+            // Snd engine.
+            ident "kit_io.sndeng"
+            param
+            {
+                name "sndeng"
+                active 1
+                extcfg_actor "^^^cfg"
+                extcfg_entry_param "snd"
+                given_array
+                {
+                    item "^ctx"
+                    given_ident "ctx"
+                }
+            }
+        }
+        {
+            // 3D graphics engine:
+            ident "kit_engbase.sndctx"
+            param
+            {
+                name "sndctx"
+                sndeng "sndeng"
+            }
+        }
+        {
+            // 3D graphics engine:
+            ident "kit_engbase.sndsect"
+            param
+            {
+                name "sndsect_display"
+                sndctx "sndctx"
+                sndmgr_actor "^^display"
+                sndmgr_cmd "get_display_sndmgr"
+            }
+        }
+        {
+            // 3D graphics engine:
+            ident "kit_engbase.sndsect"
+            param
+            {
+                name "sndsect_level"
+                sndctx "sndctx"
+                sndmgr_actor ""
+                sndmgr_cmd ""
+            }
+        }
+        {
+            // Sndport for sky:
+            ident "kit_engbase.sndport"
+            param
+            {
+                active 1
+                name "sndport_sky"
+                sndctx "sndctx"
+                next ""
+                couple 0
+            }
+        }
+        {
+            // Sndport for world:
+            ident "kit_engbase.sndport"
+            param
+            {
+                active 1
+                name "sndport_world"
+                sndctx "sndctx"
+                next "sndport_sky"
+                couple 1
+            }
+        }
+        {
+            // Sndport for display:
+            ident "kit_engbase.sndport"
+            param
+            {
+                active 1
+                name "sndport_display"
+                sndctx "sndctx"
+                next "sndport_world"
+                couple 0
+                state_actor "^^display"
+                state_cmd "get_display_state"
+            }
+        }
+        
+        /*{
+            // CD Player:
+            ident "kit_special.s3d_actorplayer"
+            param
+            {
+                name "cdplayer"
+                stop_on_destruct 1
+            }
+        }*/
+        /*{
+            // Start the first track of the CD on startup.
+            ident "kit_base.oninit"
+            param
+            {
+                target "cdplayer"
+                cmd "play_track_one"
+            }
+        }*/
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/actor/display.s3d_actor
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/actor/display.s3d_actor	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/actor/display.s3d_actor	(revision 2453)
@@ -0,0 +1,200 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Client-side display.
+// The display is a 3D state completely managed on client side
+// to display informations like health points or the inventory.
+
+// The client root actor is a capsule, defining an own local namespace.
+actor_ident "kit_base.capsule"
+actor_param
+{
+    // Delegate the action calls to all children:
+    active 1
+    // Scope name for reporting errors.
+    scope "display"
+    // Name of the capsule actor within its own namespace.
+    // Actors within the capsule can access the capsule
+    // actor itself by this name.
+    local_name "capsule"
+    // Delegate events from outside to.
+    deleg_target "dispatch_export"
+    // The capsule actor encapsulates a group of actors:
+    child_ident "kit_base.group"
+    child_param
+    {
+        // Delegate action calls to the children.
+        active 1
+        child_array
+        {
+            // Central command dispatch actor.
+            // This dispatcher is used internally within the client.
+            ident "kit_base.dispatch"
+            param
+            {
+                name "dispatch_export"
+                entry_array
+                {
+                    cmds "get_display_gfxmgr"
+                    targets "gfxmgr"
+                    newcmd "get_obj"
+                }
+                {
+                    cmds "get_display_sndmgr"
+                    targets "sndmgr"
+                    newcmd "get_obj"
+                }
+                {
+                    cmds "get_display_state"
+                    targets "display_state"
+                    newcmd "get_obj"
+                }
+                {
+                    cmds "enable_notice_loading"
+                    targets "loading_pos"
+                    newcmd "enable_pos"
+                }
+                {
+                    cmds "disable_notice_loading"
+                    targets "loading_pos"
+                    newcmd "disable_pos"
+                }
+                {
+                    cmds "notice_saving_enable"
+                    targets "saving_pos"
+                    newcmd "enable_pos"
+                }
+                {
+                    cmds "notice_saving_disable"
+                    targets "saving_pos"
+                    newcmd "disable_pos"
+                }
+            }
+        }
+        {
+            ident "kit_base.deleg"
+            param
+            {
+                name ""
+                deleg_name "env"
+                deleg_target "^^env"
+                allow_no_target 0
+                enabled 1
+            }
+        }
+        {
+            ident "kit_base.deleg"
+            param
+            {
+                name ""
+                deleg_name "perchmgr"
+                deleg_target "^perchmgr"
+                allow_no_target 0
+                enabled 1
+            }
+        }
+        {
+            ident "kit_engbase.gfxmgr"
+            param
+            {
+                name "gfxmgr"
+                ident "eng_base.gfxmgr"
+            }
+        }
+        {
+            ident "kit_base.obj"
+            param
+            {
+                name "gfxsuppl"
+                obj_suppl "^^envcompsuppl"
+                obj_ident "eng_base.gfxsuppl"
+                obj_param
+                {
+                    env "^^env" 
+                    child_suppl "^^basesuppl"
+                
+                }
+            }
+        }
+        {
+            ident "kit_engbase.gfxassign"
+            param
+            {
+                obj "gfxsuppl"
+                gfxmgr "gfxmgr"
+            }
+        }
+        {
+            ident "kit_engbase.sndmgr"
+            param
+            {
+                name "sndmgr"
+                ident "eng_base.sndmgr"
+            }
+        }
+        {
+            ident "kit_base.obj"
+            param
+            {
+                name "stdsuppl"
+                obj_suppl "^^envcompsuppl"
+                obj_ident "eng_base.sndsuppl"
+                obj_param
+                {
+                    env "^^env" 
+                    child_suppl "gfxsuppl"
+                }
+            }
+        }
+        {
+            ident "kit_engbase.sndassign"
+            param
+            {
+                obj "stdsuppl"
+                sndmgr "sndmgr"
+            }
+        }
+        {
+            ident "kit_engbase.clock"
+            param
+            {
+                active 1
+                name "clock"
+                clock_suppl "stdsuppl"
+                clock_ident "clock:"
+            }
+        }
+        {
+            ident "kit_engbase.state"
+            param
+            {
+                name "display_state"
+                obj_suppl "stdsuppl"
+                obj_ident "state:"
+            }
+        }
+        {
+            // Load the display 3d data:
+            ident "kit_base.extern"
+            param
+            {
+                // Delegate action calls to the child:
+                name "displaystate_extern"
+                res "client/actor/displayworld.s3d_actor_run"
+                watch_target "displaystate_extern"
+                watch_cmd "load_current"
+                active 1
+            }
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/actor/motion.s3d_actor
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/actor/motion.s3d_actor	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/actor/motion.s3d_actor	(revision 2453)
@@ -0,0 +1,84 @@
+// Automatically generated Shark 3D Snake 1x0 Text Stream. Format: ascii.
+actor_ident "kit_base.capsule"
+actor_param
+{
+    active 1
+    scope "motion"
+    local_name "capsule"
+    deleg_target "dispatch_export"
+    child_ident "kit_base.group"
+    child_param
+    {
+        // Delegate action calls to the children.
+        active 1
+        child_array
+        {
+            ident "kit_base.dispatch"
+            param
+            {
+                name "dispatch_export"
+                entry_array
+                {
+                    cmds "update_motion"
+                    targets "motioninput"
+                    newcmd "update"
+                }
+                {
+                    cmds 
+                        "apply_move_pos_x" "apply_move_neg_x" 
+                        "apply_move_pos_y" "apply_move_neg_y" 
+                        "apply_move_pos_z" "apply_move_neg_z"
+                        "assign_vel_pos_x" "assign_vel_neg_x" 
+                        "assign_vel_pos_y" "assign_vel_neg_y" 
+                        "assign_vel_pos_z" "assign_vel_neg_z"
+                        "switch_vel_pos_x" "switch_vel_neg_x" 
+                        "switch_vel_pos_y" "switch_vel_neg_y" 
+                        "switch_vel_pos_z" "switch_vel_neg_z"
+                        "apply_rot_pos_x" "apply_rot_neg_x" 
+                        "apply_rot_pos_y" "apply_rot_neg_y" 
+                        "apply_rot_pos_z" "apply_rot_neg_z"
+                        "assign_spin_pos_x" "assign_spin_neg_x" 
+                        "assign_spin_pos_y" "assign_spin_neg_y" 
+                        "assign_spin_pos_z" "assign_spin_neg_z"
+                        "switch_spin_pos_x" "switch_spin_neg_x" 
+                        "switch_spin_pos_y" "switch_spin_neg_y" 
+                        "switch_spin_pos_z" "switch_spin_neg_z"
+                    targets "motioninput"
+                }
+            }
+        }
+        {
+            ident "kit_engobj.motioninput"
+            param
+            {
+                active 1
+                name "motioninput"
+                motion_target "^universeplayer"
+                motion_cmd "add_motion"
+                move_scale_x 12.
+                move_scale_y 12.
+                move_scale_z 12.
+                vel_scale_x 12.
+                vel_scale_y -12.
+                vel_scale_z 12.
+                vel_speed_x 12.
+                vel_speed_y 12.
+                vel_speed_z 12.
+                rot_scale_x -0.5
+                rot_scale_y 1.0
+                rot_scale_z -1.0
+                spin_scale_x -4.
+                spin_scale_y 4.
+                spin_scale_z -4.
+                spin_speed_x -2.
+                spin_speed_y 2.
+                spin_speed_z -2.
+                extcfg_actor "^^cfg"
+                extcfg_entry_smooth_move "input.smooth_move"
+                extcfg_entry_smooth_rot "input.smooth_rot"
+                extcfg_entry_deadzone "input.deadzone"
+            }
+        }
+    }
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/actor/io.s3d_actor
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/actor/io.s3d_actor	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/actor/io.s3d_actor	(revision 2453)
@@ -0,0 +1,243 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Definition of the input and output.
+
+// The client root actor is a capsule, defining an own local namespace.
+actor_ident "kit_base.capsule"
+actor_param
+{
+    // Delegate the action calls to all children:
+    active 1
+    // Scope name. Used in error messages.
+    scope "io"
+    // Name of the capsule actor within its own namespace.
+    // Actors within the capsule can access the capsule
+    // actor itself by this name.
+    local_name "capsule"
+    // Delegate commands from outside to the correct dispatcher.
+    deleg_target "dispatch_export"
+    // The capsule actor contains a group of actors:
+    child_ident "kit_base.group"
+    child_param
+    {
+        // Delegate action calls to the children.
+        active 1
+        child_array
+        {
+            // Dispatcher for commands from outside the client capsule.
+            ident "kit_base.dispatch"
+            param
+            {
+                name "dispatch_export"
+                entry_array
+                {
+                    cmds "set_sndmgr_level"
+                        "set_state_world" "set_state_sky" 
+                    targets "snd"
+                }
+                {
+                    // Assign a 3D state image.
+                    cmds "set_camera_transf"
+                    targets "extratransf"
+                    newcmd "set_transf"
+                }
+                {
+                    // Commands for gfx:
+                    cmds "set_gfxmgr_level"
+                        "set_state_world" "set_state_sky" 
+                        "set_sim_world" 
+                        "set_noise_world" 
+                        "set_sensorstate_world"
+                        "set_cursor_x" "set_cursor_y"
+                        "move_cursor_x" "move_cursor_y"
+                        "toggle_showgfxbound" 
+                        "toggle_showgfxmesh" "toggle_showgfxwire" 
+                        "toggle_showgfxocclmesh" "toggle_showgfxocclwire"
+                        "toggle_showphysbound" "toggle_showphysgeo"
+                        "toggle_showphyscontact"
+                        "toggle_shownoise"
+                        "toggle_showsensorgeo" 
+                        "toggle_showsensorbound"
+                        "store_screenshot"
+                        "reset_msg"
+                        "toggle_frmtime" "toggle_stat" "reset_stat"
+                        "toggle_fullscreen"
+                        "set_playerbody"
+                    targets "gfx"
+                }
+                {
+                    cmds "toggle_catch_mouse"
+                    targets "toggle_catch_mouse"
+                    newcmd "perform"
+                }
+                
+                // Update output:
+                {
+                    // Render the gfxports:
+                    cmds "perform_output"
+                    targets "gfx"
+                    newcmd "paint"
+                }
+                {
+                    // Update snd:
+                    cmds "perform_output"
+                    targets "snd"
+                    newcmd "update"
+                }
+                {
+                    // Update snd:
+                    cmds "suspend_output"
+                    targets "snd"
+                    newcmd "suspend"
+                }
+
+                // Update input:
+                {
+                    cmds "perform_input"
+                    targets "input"
+                    newcmd "update"
+                }
+            }
+        }
+        {
+            // Dispatcher for commands from outside the client capsule.
+            ident "kit_base.dispatch"
+            param
+            {
+                name "dispatch"
+                entry_array
+                {
+                    // Assign a 3D state image.
+                    cmds "set_camera_efftransf"
+                    targets "gfx" "snd"
+                }
+                {
+                    cmds "input_dev_found"
+                    targets "inputcfg"
+                    newcmd "configure_dev"
+                }
+                {
+                    cmds "input_dev_lost"
+                    targets
+                }
+            }
+        }
+        {
+            ident "kit_engbase.extratransf"
+            param
+            {
+                name "extratransf"
+                transf_target "dispatch"
+                transf_cmd "set_camera_efftransf"
+                extcfg_actor "^^cfg"
+                extcfg_entry_extratransf "client.extratransf"
+            }
+        }
+        {
+            // Create the context object.
+            // The context is the glue managing input and output.
+            // Other IO-actors like input or gfx refer this context actor:
+            ident "kit_io.ctx"
+            param
+            {
+                name "ctx"
+                active 1
+                src_actor "^^root"
+                src_cmd "get_ctx"
+                extcfg_actor "^^cfg"
+                extcfg_entry_param "context"
+                given_array
+                {
+                    item "^^env"
+                    given_ident "env"
+                }
+            }
+        }
+        {
+            // Include the graphics output definitions.
+            ident "kit_base.extern"
+            param
+            {
+                // Delegate action calls to the child:
+                deleg_name "gfx"
+                res "client/actor/gfx.s3d_actor_run"
+                watch_target "^io_extern"
+                watch_cmd "load_current"
+                active 1
+            }
+        }
+        {
+            ident "kit_base.extern"
+            param
+            {
+                // Delegate action calls to the child:
+                deleg_name "snd"
+                res "client/actor/snd.s3d_actor_run"
+                watch_target "^io_extern"
+                watch_cmd "load_current"
+                active 1
+            }
+        }
+        {
+            // Input actor.
+            ident "kit_io.input"
+            param
+            {
+                name "input"
+                ctx "ctx"
+                extcfg_actor "^^cfg"
+                extcfg_entry "input.mgr"
+                found_target "dispatch"
+                found_cmd "input_dev_found"
+                lost_target "dispatch"
+                lost_cmd "input_dev_lost"
+                char_target "^dispatch_input"
+                char_cmd "handle_char"
+                given_array
+                {
+                    item "^^env"
+                    given_ident "env"
+                }
+                {
+                    item "ctx"
+                    given_ident "ctx"
+                }
+            }
+        }
+        {
+            // Simple default input configuration.
+            // This actor sends input configuration commands
+            // to the input actor.
+            ident "kit_io.inputcfg"
+            param
+            {
+                name "inputcfg"
+                input "input"               // The input actor to cfgurate.
+                target "^dispatch_input"    // Target of input commands.
+                extcfg_actor "^^cfg"
+                extcfg_entry_mapping "input.mapping"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_catch_mouse"
+                target "input"
+                cmd "userfunc_all"
+                param "toggle_catch_mouse"
+            }
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/actor/displayworld.s3d_actor
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/actor/displayworld.s3d_actor	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/actor/displayworld.s3d_actor	(revision 2453)
@@ -0,0 +1,103 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Client-side display 3d objects.
+
+// Group actor:
+actor_ident "kit_base.group"
+actor_param
+{
+    // Delegate action calls to the children.
+    active 1
+    child_array
+    {
+        ident "kit_engobj.group"
+        param
+        {
+            name "group_display"
+            group_suppl "stdsuppl"
+            group_ident "group:"
+            group_param
+            {
+                env "env"
+                gensuppl "stdsuppl"
+                res "client/model/displaymodel.s3d_inst_run"
+                given_array
+                {
+                    item "env"
+                    given_ident "env"
+                }
+                {
+                    item "stdsuppl"
+                    given_ident "gensuppl"
+                }
+                {
+                    item ""
+                    given_ident "hook"
+                }
+                {
+                    item "display_state"
+                    given_ident "state"
+                }
+                {
+                    item ""
+                    given_ident "sim"
+                }
+                {
+                    item ""
+                    given_ident "sensorstate"
+                }
+            }
+        }
+    }
+    {
+        ident "kit_base.dispatch"
+        param
+        {
+            name "dispatch"
+            entry_array
+            {
+                cmds "init"
+                targets "loading_pos" "saving_pos"
+                newcmd "disable_pos"
+            }
+        }
+    }
+    // Select the loading object:
+    {
+        ident "kit_engobj.itemeye"
+        param
+        {
+            name "loading_pos"
+            item_actor "group_display"
+            item_name "path:loading"
+        }
+    }
+    {
+        ident "kit_engobj.itemeye"
+        param
+        {
+            name "saving_pos"
+            item_actor "group_display"
+            item_name "simplepos:saving"
+        }
+    }
+    {
+        ident "kit_base.oninit"
+        param
+        {
+            target "dispatch"
+            cmd "init"
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/actor/client.s3d_actor
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/actor/client.s3d_actor	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/src/res/client/actor/client.s3d_actor	(revision 2453)
@@ -0,0 +1,672 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Definition of the game client.
+// This file defines all actors used on client side.
+// It includes the graphic output definitions "client/actor/gfx.s3d_actor_run"
+// and the display defintion "client/actor/display.s3d_actor_run".
+
+// The client root actor is a capsule, defining an own local namespace.
+actor_ident "kit_base.capsule"
+actor_param
+{
+    // Delegate the action calls to all children:
+    active 1
+    // Scope name. Used in error messages.
+    scope "client"
+    // Name of the capsule actor within its own namespace.
+    // Actors within the capsule can access the capsule
+    // actor itself by this name.
+    local_name "capsule"
+    // Delegate commands from outside to the correct dispatcher.
+    deleg_target "dispatch_export"
+    // The capsule actor contains a group of actors:
+    child_ident "kit_base.group"
+    child_param
+    {
+        // Delegate action calls to the children.
+        active 1
+        child_array
+        {
+            // Dispatcher for commands from outside the client capsule.
+            ident "kit_base.dispatch"
+            param
+            {
+                name "dispatch_export"
+                entry_array
+            }
+        }
+        {
+            // Central command dispatch actor.
+            // This dispatcher is used internally within the client.
+            ident "kit_base.dispatch"
+            param
+            {
+                name "dispatch"
+                entry_array
+                {
+                    cmds "set_camera_transf"
+                    targets "io"
+                }
+                {
+                    cmds "io_reloaded"
+                    targets "universeplayer_refresh_charge"
+                    newcmd "perform"
+                }
+            }
+        }
+        {
+            // This dispatcher is used to filter input commands.
+            ident "kit_base.dispatch"
+            param
+            {
+                name "dispatch_input"
+                entry_array
+                {
+                    cmds "quit" "refresh_all_res"
+                    targets "^root"
+                }
+                {
+                    cmds "store_file_default"
+                    targets "store_file_default"
+                    newcmd "perform"
+                }
+                {
+                    cmds "load_file_default"
+                    targets "load_file_default"
+                    newcmd "perform"
+                }
+                {
+                    // Send these commands to server:
+                    cmds
+                        "fire" "directfire" "god" "special"
+                        "goto_level0" "goto_level1" 
+                        "goto_level2" "goto_level3"
+                        "goto_level4" "goto_level5"
+                        "goto_level6" "goto_level7" 
+                        "goto_level8" "goto_level9"
+                        "goto_level10" "goto_level11" 
+                        "goto_level12" "goto_level13"
+                        "goto_level14" "goto_level15"
+                        "goto_level16" "goto_level17" 
+                        "goto_level18" "goto_level19"
+                        "goto_level20" "goto_level21"
+                        "goto_level_next" "goto_level_prev"
+                    // Delegate to the universe-player:
+                    targets "universeplayer"
+                }
+                {
+                    // Send movement commands to the movement control actor:
+                    cmds
+                        "apply_move_pos_x" "apply_move_neg_x" 
+                        "apply_move_pos_y" "apply_move_neg_y" 
+                        "apply_move_pos_z" "apply_move_neg_z"
+                        "assign_vel_pos_x" "assign_vel_neg_x" 
+                        "assign_vel_pos_y" "assign_vel_neg_y" 
+                        "assign_vel_pos_z" "assign_vel_neg_z"
+                        "switch_vel_pos_x" "switch_vel_neg_x" 
+                        "switch_vel_pos_y" "switch_vel_neg_y" 
+                        "switch_vel_pos_z" "switch_vel_neg_z"
+                        "apply_rot_pos_x" "apply_rot_neg_x" 
+                        "apply_rot_pos_y" "apply_rot_neg_y" 
+                        "apply_rot_pos_z" "apply_rot_neg_z"
+                        "assign_spin_pos_x" "assign_spin_neg_x" 
+                        "assign_spin_pos_y" "assign_spin_neg_y" 
+                        "assign_spin_pos_z" "assign_spin_neg_z"
+                        "switch_spin_pos_x" "switch_spin_neg_x" 
+                        "switch_spin_pos_y" "switch_spin_neg_y" 
+                        "switch_spin_pos_z" "switch_spin_neg_z"
+                        "jump"
+                    targets "motion"
+                }
+                {
+                    // Commands for gfx:
+                    cmds "set_cursor_x" "set_cursor_y"
+                        "move_cursor_x" "move_cursor_y"
+                        "toggle_showgfxbound" 
+                        "toggle_showgfxmesh" 
+                        "toggle_showgfxwire" 
+                        "toggle_showgfxocclmesh" 
+                        "toggle_showgfxocclwire"
+                        "toggle_showphysbound" 
+                        "toggle_showphysgeo"
+                        "toggle_showphyscontact"
+                        "toggle_shownoise"
+                        "toggle_showsensorbound" 
+                        "toggle_showsensorgeo"
+                        "store_screenshot"
+                        "reset_msg"
+                        "toggle_frmtime" 
+                        "toggle_stat" "reset_stat"
+                        "toggle_fullscreen"
+                        "toggle_catch_mouse"
+                    targets "io"
+                }
+                {
+                    cmds "reload_io"
+                    targets "io_extern"
+                    newcmd "load_current"
+                }
+                {
+                    // Character input
+                    cmds "handle_char"
+                    targets
+                }
+            }
+        }
+        {
+            // Dispatcher of commands coming from the server.
+            ident "kit_base.dispatch"
+            param
+            {
+                name "dispatch_universe"
+                entry_array
+                {
+                    cmds "get_basesuppl"
+                    targets "sersuppl"
+                    newcmd "get_obj"
+                }
+                {
+                    cmds "ignore_frmtime"
+                    targets "^root"
+                }
+                {
+                    cmds "cfg_access_int_info"
+                    targets "^cfg"
+                    newcmd "access_int_info"
+                }
+                {
+                    cmds "cfg_access_float_info"
+                    targets "^cfg"
+                    newcmd "access_float_info"
+                }
+                {
+                    cmds "cfg_access_str_info"
+                    targets "^cfg"
+                    newcmd "access_str_info"
+                }
+                {
+                    cmds "cfg_access_chunk_info"
+                    targets "^cfg"
+                    newcmd "access_chunk_info"
+                }
+                {
+                    cmds "universe_cfg_access_int_info"
+                    targets "universe_cfg"
+                    newcmd "access_int_info"
+                }
+                {
+                    cmds "universe_cfg_access_float_info"
+                    targets "universe_cfg"
+                    newcmd "access_float_info"
+                }
+                {
+                    cmds "universe_cfg_access_str_info"
+                    targets "universe_cfg"
+                    newcmd "access_str_info"
+                }
+                {
+                    cmds "universe_cfg_access_chunk_info"
+                    targets "universe_cfg"
+                    newcmd "access_chunk_info"
+                }
+                {
+                    cmds "enable_notice_destroying" "disable_notice_destroying"
+                        "enable_notice_loading" "disable_notice_loading"
+                        "enable_notice_saving" "disable_notice_saving"
+                    targets
+                }
+            }
+        }
+        {
+            ident "kit_perch.mgr"
+            param
+            {
+                name "perchmgr"
+            }
+        }
+        {
+            ident "kit_snk.data"
+            param
+            {
+                name "universe_cfg"
+                val
+                {
+                    server 0
+                }
+            }
+        }
+        {
+            ident "kit_base.sersuppl"
+            param
+            {
+                name "sersuppl"
+                child "^basesuppl"
+            }
+        }
+        {
+            // Dispatcher of commands coming from the server.
+            ident "kit_base.dispatch"
+            param
+            {
+                name "dispatch_inform"
+                entry_array
+                {
+                    cmds "set_state_world"
+                    targets "state_world"
+                    newcmd "set_obj"
+                }
+                {
+                    cmds "set_state_sky"
+                    targets "state_sky"
+                    newcmd "set_obj"
+                }
+                {
+                    cmds
+                        "set_gfxmgr_level"
+                        "set_sndmgr_level"
+                        "set_state_world"
+                        "set_state_sky"
+                        "set_sim_world"
+                        "set_noise_world"
+                        "set_sensorstate_world"
+                    targets "io"
+                }
+                {
+                    cmds "set_sim_world"
+                    targets "sim_world"
+                    newcmd "set_obj"
+                }
+                {
+                    cmds "set_noise_world"
+                    targets "noise_world"
+                    newcmd "set_obj"
+                }
+                {
+                    cmds "set_sensorstate_world"
+                    targets "sensorstate_world"
+                    newcmd "set_obj"
+                }
+                {
+                    cmds "set_camera"
+                    targets "elem_camera"
+                    newcmd "set_obj"
+                }
+                {
+                    cmds "set_playerbody"
+                    targets "io"
+                }
+                {
+                    cmds "notice_level_load_pre"
+                    targets "display"
+                    newcmd "enable_notice_loading"
+                }
+                {
+                    cmds "notice_level_load_post"
+                    targets "display"
+                    newcmd "disable_notice_loading"
+                }
+                {
+                    cmds
+                        "notice_level_load_pre"
+                        "notice_level_load_post"
+                    targets "io"
+                    newcmd "suspend_output"
+                }
+                {
+                    cmds
+                        "notice_level_load_pre"
+                        "notice_level_load_post"
+                    targets "io"
+                    newcmd "perform_output"
+                }
+            }
+        }
+        {
+            // Event queue.
+            ident "kit_base.evtmgr"
+            param
+            {
+                name "evtmgr"
+                active 1
+                extcfg_actor "^cfg"
+                extcfg_entry_log "log.evtmgr"
+            }
+        }
+        {
+            // Information line collection actor.
+            // This actor collects per-frame information lines
+            // like the frmtime.
+            // This actor does not generate the information,
+            // but only is responsible for collecting the lines.
+            ident "kit_base.inspcollect"
+            param
+            {
+                name "inspcollect"
+            }
+        }
+        {
+            ident "kit_engbase.extern"
+            param
+            {
+                name "universe_extern"
+                deleg_name "universe"
+                allow_no_target 1
+                res ""
+                active 1
+                net_imprint 0
+            }
+        }
+        {
+            ident "kit_engbase.plug"
+            param
+            {
+                name "plug"
+                deleg_name "plug_root"
+                netlink_suppl "^envcompsuppl"
+                netlink_ident "eng_base.netlink"
+                netlink_param
+                {
+                    env "^env"
+                }
+                netroot_target "universe"
+                lost_target ""
+                lost_cmd ""
+                nettraverse_target "universe_extern"
+                nettraverse_cmd "traverse"
+            }
+        }
+        {
+            // Create a network engine.
+            ident "kit_io.neteng"
+            param
+            {
+                name "neteng"
+                active 1
+                // Get parameters from the actor "cfg", 
+                // which is defined above.
+                extcfg_actor "^cfg"
+                // Get the parameters from the "network" entry.
+                extcfg_entry_param "network"
+                given_array
+                {
+                    item "^env"
+                    given_ident "env"
+                }                
+            }
+        }
+        {
+            ident "kit_engbase.plugconnect"
+            param
+            {
+                name "plugconnect"
+                plug "plug"
+                neteng "neteng"
+                localroot "^server"
+                extcfg_actor "^cfg"
+                extcfg_entry_addr "client.addr"
+            }
+        }
+        {
+            ident "kit_engobj.informmgr"
+            param
+            {
+                name "universeplayer_informmgr"
+                deleg_name "universeplayer"
+                inform "dispatch_inform"
+                ignore_no_charge 1
+                notify_target ""
+                notify_pre_cmd ""
+                notify_post_cmd ""
+                produce_target "plug_root"
+                produce_cmd "produce_player"
+            }
+        }
+        {
+            ident "kit_base.paramvoid"
+            param
+            {
+                name "universeplayer_refresh_charge"
+                target "universeplayer_informmgr"
+                cmd "refresh_charge"
+            }
+        }
+        {
+            ident "kit_engobj.fetch"
+            param
+            {
+                name "universeplayer_fetch"
+                query_target "universeplayer_informmgr"
+                query_cmd "get_charge"
+                produce_target "universeplayer_informmgr"
+                produce_cmd "produce_charge"
+                produce_report_target ""
+                produce_report_cmd ""
+                enum_target ""
+                enum_cmd ""
+                enum_report_target ""
+                enum_report_cmd ""
+            }
+        }
+
+        {
+            ident "kit_engobj.itemeye"
+            param
+            {
+                name "sim_world"
+            }
+        }
+        {
+            ident "kit_engobj.itemeye"
+            param
+            {
+                name "noise_world"
+            }
+        }
+        {
+            ident "kit_engobj.itemeye"
+            param
+            {
+                name "sensorstate_world"
+            }
+        }
+        {
+            ident "kit_engobj.itemeye"
+            param
+            {
+                name "elem_camera"
+            }
+        }
+        {
+            // Define the camera:
+            ident "kit_engobj.cameractrl"
+            param
+            {
+                name "cameractrl"
+                active 1
+                rawtransf_src "elem_camera"
+                transf_target "dispatch"
+                transf_cmd "set_camera_transf"
+            }
+        }
+        {
+            // Include the definition of the display.
+            ident "kit_base.extern"
+            param
+            {
+                // Delegate action calls to the child:
+                name "display_extern"
+                deleg_name "display"
+                res "client/actor/display.s3d_actor_run"
+                // No watch because display needs "set_clientimageobj_xxx"
+                active 1
+            }
+        }
+        {
+            // Include actors for movement control:
+            ident "kit_base.extern"
+            param
+            {
+                // Delegate action calls to the child:
+                deleg_name "motion"
+                res "client/actor/motion.s3d_actor_run"
+                active 1
+            }
+        }
+        {
+            ident "kit_engobj.itemeye"
+            param
+            {
+                name "state_world"
+            }
+        }
+        {
+            ident "kit_engobj.itemeye"
+            param
+            {
+                name "state_sky"
+            }
+        }
+        {
+            ident "kit_engobj.itemeye"
+            param
+            {
+                name "state_display"
+            }
+        }
+        {
+            // Include the definition of the display.
+            ident "kit_base.extern"
+            param
+            {
+                // Delegate action calls to the child:
+                name "io_extern"
+                deleg_name "io"
+                res "client/actor/io.s3d_actor_run"
+                notify_target "dispatch"
+                notify_post_cmd "io_reloaded"
+                watch_target "io_extern"
+                watch_cmd "load_current"
+                active 1
+            }
+        }
+
+        // The following entry_array define the order of actions
+        // performed each frame in the client.
+        // General order:
+        //   1. Receive data from server.
+        //   2. Update output (especially timeconsuming 3D output).
+        //   3. Evaluate input.
+        //   4. Send data to server.
+        // Note that performing input before output would be the wrong order,
+        // since the input would not have been evaluated by the server yet-
+        // The above order archives that the display reflects the input
+        // as soon as possible.
+        {
+            ident "kit_base.onaction"
+            param
+            {
+                active 1
+                name "check_universeplayer_onaction"
+                target "universeplayer_fetch"
+                cmd "check_produce_charge"
+            }
+        }
+        {
+            // First, evaluate data received from server:
+            ident "kit_base.onaction"
+            param
+            {
+                active 1
+                name "poll_recv_onaction"
+                target "plug"
+                cmd "poll_recv"
+            }
+        }
+        {
+            // Update camera transformation to views and snd.
+            ident "kit_base.onaction"
+            param
+            {
+                active 1
+                name "update_cameractrl_onaction"
+                target "cameractrl"
+                cmd "update"
+            }
+        }
+        {
+            // Render the gfxports and update the sndports:
+            ident "kit_base.onaction"
+            param
+            {
+                active 1
+                name "perform_output_onaction"
+                target "io"
+                cmd "perform_output"
+            }
+        }
+        {
+            // Evaluate input data:
+            ident "kit_base.onaction"
+            param
+            {
+                active 1
+                name "perform_input_onaction"
+                target "io"
+                cmd "perform_input"
+            }
+        }
+        {
+            // Evaluate motin input control:
+            ident "kit_base.onaction"
+            param
+            {
+                active 1
+                name "update_motion_onaction"
+                target "motion"
+                cmd "update_motion"
+            }
+        }
+        {
+            // Send data to server:
+            ident "kit_base.onaction"
+            param
+            {
+                active 1
+                name "poll_send_onaction"
+                target "plug"
+                cmd "poll_send"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "store_file_default"
+                target "universeplayer"
+                cmd "store_file"
+                param "save.sav"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "load_file_default"
+                target "universeplayer"
+                cmd "load_file"
+                param "save.sav"
+            }
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_max_shaderutil.cfg
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_max_shaderutil.cfg	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_max_shaderutil.cfg	(revision 2453)
@@ -0,0 +1,24 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+src_dir "src/res/"
+bin_dir "bin/res/"
+info_prefix "info"
+include_pat ""
+targets
+{
+    src_suffix ".s3d_shader"
+    bin_suffix ".s3d_shader_run"
+    // can_copy 0 or 1 ?
+}
+
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_run.bat
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_run.bat	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_run.bat	(revision 2453)
@@ -0,0 +1,14 @@
+setlocal
+call win32_env.bat
+
+set PARAM=win32_run.cfg -comaddrport %S3D_HOSTADDR%:33302
+set PLAYEREXE="%S3D_SDKDIR%\bin\win32_vc7x1\%S3D_RUNCFG%\shark3d_player.exe"
+start "Shark 3D Player" %PLAYEREXE% %PARAM%
+if errorlevel 1 goto error
+
+exit /B 0
+
+:error
+echo Error.
+pause
+exit /B 1
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/build/win32_vc7x1/gtp_shader/Release/BuildLog.htm
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/build/win32_vc7x1/gtp_shader/Release/BuildLog.htm	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/build/win32_vc7x1/gtp_shader/Release/BuildLog.htm	(revision 2453)
@@ -0,0 +1,49 @@
+<html>
+<head>
+<META HTTP-EQUIV="Content-Type" content="text/html; charset=windows-1250">
+</head>
+<body>
+<pre>
+<table width=100% bgcolor=#CFCFE5><tr> <td> <font face=arial size=+3>
+Build Log
+</font></table><table width=* cellspacing=0 cellpadding=0><tr><td width=0 bgcolor=#EDEDF5>&nbsp;</td><td width=0 bgcolor=#FFFFFF>&nbsp;</td><td width=*><pre>
+<h3>------- Build started: Project: gtp_shader, Configuration: Release|Win32 -------
+</h3>
+</pre></table><table width=100% bgcolor=#DFDFE5><tr><td><font face=arial size=+2>
+Command Lines
+</font></table><table width=* cellspacing=0 cellpadding=0><tr><td width=0 bgcolor=#EDEDF5>&nbsp;</td><td width=0 bgcolor=#FFFFFF>&nbsp;</td><td width=*><pre>Creating temporary file "c:\Shark3D\v5x0x6_t164x12u\animatedDoor164x12u\build\win32_vc7x1\gtp_shader\Release\RSP000054.rsp" with contents
+[
+/O2 /I "..\..\..\..\shark3d\src\eng\shader\special" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "GTP_SHADER_EXPORTS" /D "_WINDLL" /D "_MBCS" /FD /EHsc /MD /Fo"Release/" /Fd"Release/vc70.pdb" /W3 /c /Wp64 /Zi /TP
+\Shark3D\v5x0x6_t164x12u\animatedDoor164x12u\src\gtp_shader\gtp_shader_causticcube.cpp
+]
+Creating command line "cl.exe @c:\Shark3D\v5x0x6_t164x12u\animatedDoor164x12u\build\win32_vc7x1\gtp_shader\Release\RSP000054.rsp /nologo"
+Creating temporary file "c:\Shark3D\v5x0x6_t164x12u\animatedDoor164x12u\build\win32_vc7x1\gtp_shader\Release\RSP000055.rsp" with contents
+[
+/OUT:"../../../bin/win32_vc7x1/debug/shark3d_gtp_shader.dll" /INCREMENTAL:NO /NOLOGO /LIBPATH:"../../../../shark3d/bin/win32_vc7x1/release/" /DLL /DEBUG /PDB:"../../../bin/win32_vc7x1/debug/shark3d_gtp_shader.pdb" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /IMPLIB:"../../../bin/win32_vc7x1/debug/shark3d_gtp_shader.lib" /MACHINE:X86 shark3d_eng_util.lib shark3d_util.lib shark3d_eng_interf.lib shark3d_sys.lib shark3d_comp.lib shark3d_drv_interf.lib shark3d_drv_util.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
+.\Release\eng_shader_special_worldmat.obj
+.\Release\gtp_shader.obj
+.\Release\gtp_shader_causticcube.obj
+.\Release\gtp_shader_createtex.obj
+.\Release\gtp_shader_cubetexfilter.obj
+.\Release\gtp_shader_envmap.obj
+.\Release\gtp_shader_focusedprojmat.obj
+.\Release\gtp_shader_mainenum.obj
+.\Release\gtp_shader_module.obj
+.\Release\gtp_shader_opticsutil.obj
+.\Release\gtp_shader_public.obj
+.\Release\gtp_shader_versioncheck.obj
+]
+Creating command line "link.exe @c:\Shark3D\v5x0x6_t164x12u\animatedDoor164x12u\build\win32_vc7x1\gtp_shader\Release\RSP000055.rsp"
+</pre></table><table width=100% bgcolor=#DFDFE5><tr><td><font face=arial size=+2>
+Output Window
+</font></table><table width=* cellspacing=0 cellpadding=0><tr><td width=0 bgcolor=#EDEDF5>&nbsp;</td><td width=0 bgcolor=#FFFFFF>&nbsp;</td><td width=*><pre>Compiling...
+gtp_shader_causticcube.cpp
+\Shark3D\v5x0x6_t164x12u\animatedDoor164x12u\src\gtp_shader\gtp_shader_causticcube.cpp(692) : warning C4305: 'argument' : truncation from 'double' to 'float'
+Linking...
+   Creating library ../../../bin/win32_vc7x1/debug/shark3d_gtp_shader.lib and object ../../../bin/win32_vc7x1/debug/shark3d_gtp_shader.exp
+</pre></table><table width=100% bgcolor=#DFDFE5><tr><td><font face=arial size=+2>
+Results
+</font></table><table width=* cellspacing=0 cellpadding=0><tr><td width=0 bgcolor=#EDEDF5>&nbsp;</td><td width=0 bgcolor=#FFFFFF>&nbsp;</td><td width=*><pre>
+Build log was saved at "file://c:\Shark3D\v5x0x6_t164x12u\animatedDoor164x12u\build\win32_vc7x1\gtp_shader\Release\BuildLog.htm"
+gtp_shader - 0 error(s), 1 warning(s)</pre></table><table   width=100% height=20 bgcolor=#CFCFE5><tr><td><font face=arial size=+2>
+</font></table></body></html>
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/build/win32_vc7x1/gtp_shader/gtp_shader.vcproj
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/build/win32_vc7x1/gtp_shader/gtp_shader.vcproj	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/build/win32_vc7x1/gtp_shader/gtp_shader.vcproj	(revision 2453)
@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="windows-1250"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="gtp_shader"
+	ProjectGUID="{04088B1C-4726-46C5-8A30-D8BF1753D13A}"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="../../../bin/win32_vc7x1/debug"
+			IntermediateDirectory="Debug"
+			ConfigurationType="2"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\..\shark3d\src\eng\shader\special"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;GTP_SHADER_EXPORTS"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="4"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="shark3d_eng_util.lib shark3d_util.lib shark3d_eng_interf.lib shark3d_sys.lib shark3d_comp.lib shark3d_drv_interf.lib shark3d_drv_util.lib"
+				OutputFile="$(OutDir)/shark3d_gtp_shader.dll"
+				LinkIncremental="2"
+				AdditionalLibraryDirectories="../../../../shark3d/bin/win32_vc7x1/debug/"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile="$(OutDir)/shark3d_gtp_shader.pdb"
+				SubSystem="2"
+				ImportLibrary="$(OutDir)/shark3d_gtp_shader.lib"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="../../../bin/win32_vc7x1/debug"
+			IntermediateDirectory="Release"
+			ConfigurationType="2"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="..\..\..\..\shark3d\src\eng\shader\special"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;GTP_SHADER_EXPORTS"
+				RuntimeLibrary="2"
+				BufferSecurityCheck="FALSE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="shark3d_eng_util.lib shark3d_util.lib shark3d_eng_interf.lib shark3d_sys.lib shark3d_comp.lib shark3d_drv_interf.lib shark3d_drv_util.lib"
+				OutputFile="$(OutDir)/shark3d_gtp_shader.dll"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories="../../../../shark3d/bin/win32_vc7x1/release/"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile="$(OutDir)/shark3d_gtp_shader.pdb"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				ImportLibrary="$(OutDir)/shark3d_gtp_shader.lib"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="shader"
+			Filter="">
+			<File
+				RelativePath="..\..\..\src\gtp_shader\eng_shader_special_worldmat.cpp">
+			</File>
+			<File
+				RelativePath="..\..\..\src\gtp_shader\eng_shader_special_worldmat.h">
+			</File>
+			<File
+				RelativePath="..\..\..\src\gtp_shader\gtp_shader.cpp">
+			</File>
+			<File
+				RelativePath="..\..\..\src\gtp_shader\gtp_shader.h">
+			</File>
+			<File
+				RelativePath="..\..\..\src\gtp_shader\gtp_shader_causticcube.cpp">
+			</File>
+			<File
+				RelativePath="..\..\..\src\gtp_shader\gtp_shader_causticcube.h">
+			</File>
+			<File
+				RelativePath="..\..\..\src\gtp_shader\gtp_shader_createtex.cpp">
+			</File>
+			<File
+				RelativePath="..\..\..\src\gtp_shader\gtp_shader_createtex.h">
+			</File>
+			<File
+				RelativePath="..\..\..\src\gtp_shader\gtp_shader_cubetexfilter.cpp">
+			</File>
+			<File
+				RelativePath="..\..\..\src\gtp_shader\gtp_shader_cubetexfilter.h">
+			</File>
+			<File
+				RelativePath="..\..\..\src\gtp_shader\gtp_shader_envmap.cpp">
+			</File>
+			<File
+				RelativePath="..\..\..\src\gtp_shader\gtp_shader_envmap.h">
+			</File>
+			<File
+				RelativePath="..\..\..\src\gtp_shader\gtp_shader_focusedprojmat.cpp">
+			</File>
+			<File
+				RelativePath="..\..\..\src\gtp_shader\gtp_shader_focusedprojmat.h">
+			</File>
+			<File
+				RelativePath="..\..\..\src\gtp_shader\gtp_shader_mainenum.cpp">
+			</File>
+			<File
+				RelativePath="..\..\..\src\gtp_shader\gtp_shader_mainenum.h">
+			</File>
+			<File
+				RelativePath="..\..\..\src\gtp_shader\gtp_shader_module.cpp">
+			</File>
+			<File
+				RelativePath="..\..\..\src\gtp_shader\gtp_shader_module.h">
+			</File>
+			<File
+				RelativePath="..\..\..\src\gtp_shader\gtp_shader_opticsutil.cpp">
+			</File>
+			<File
+				RelativePath="..\..\..\src\gtp_shader\gtp_shader_opticsutil.h">
+			</File>
+			<File
+				RelativePath="..\..\..\src\gtp_shader\gtp_shader_public.cpp">
+			</File>
+			<File
+				RelativePath="..\..\..\src\gtp_shader\gtp_shader_public.h">
+			</File>
+			<File
+				RelativePath="..\..\..\src\gtp_shader\gtp_shader_versioncheck.cpp">
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/build/win32_vc7x1/gtp_shader/Debug/BuildLog.htm
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/build/win32_vc7x1/gtp_shader/Debug/BuildLog.htm	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/build/win32_vc7x1/gtp_shader/Debug/BuildLog.htm	(revision 2453)
@@ -0,0 +1,49 @@
+<html>
+<head>
+<META HTTP-EQUIV="Content-Type" content="text/html; charset=windows-1250">
+</head>
+<body>
+<pre>
+<table width=100% bgcolor=#CFCFE5><tr> <td> <font face=arial size=+3>
+Build Log
+</font></table><table width=* cellspacing=0 cellpadding=0><tr><td width=0 bgcolor=#EDEDF5>&nbsp;</td><td width=0 bgcolor=#FFFFFF>&nbsp;</td><td width=*><pre>
+<h3>------- Build started: Project: gtp_shader, Configuration: Debug|Win32 -------
+</h3>
+</pre></table><table width=100% bgcolor=#DFDFE5><tr><td><font face=arial size=+2>
+Command Lines
+</font></table><table width=* cellspacing=0 cellpadding=0><tr><td width=0 bgcolor=#EDEDF5>&nbsp;</td><td width=0 bgcolor=#FFFFFF>&nbsp;</td><td width=*><pre>Creating temporary file "c:\Shark3D\v5x0x6_t164x12u\animatedDoor164x12u\build\win32_vc7x1\gtp_shader\Debug\RSP00003B.rsp" with contents
+[
+/Od /I "..\..\..\..\shark3d\src\eng\shader\special" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "GTP_SHADER_EXPORTS" /D "_WINDLL" /D "_MBCS" /Gm /EHsc /RTC1 /MDd /Fo"Debug/" /Fd"Debug/vc70.pdb" /W3 /c /Wp64 /ZI /TP
+\Shark3D\v5x0x6_t164x12u\animatedDoor164x12u\src\gtp_shader\gtp_shader_focusedprojmat.cpp
+]
+Creating command line "cl.exe @c:\Shark3D\v5x0x6_t164x12u\animatedDoor164x12u\build\win32_vc7x1\gtp_shader\Debug\RSP00003B.rsp /nologo"
+Creating temporary file "c:\Shark3D\v5x0x6_t164x12u\animatedDoor164x12u\build\win32_vc7x1\gtp_shader\Debug\RSP00003C.rsp" with contents
+[
+/OUT:"../../../bin/win32_vc7x1/debug/shark3d_gtp_shader.dll" /INCREMENTAL /NOLOGO /LIBPATH:"../../../../shark3d/bin/win32_vc7x1/debug/" /DLL /DEBUG /PDB:"../../../bin/win32_vc7x1/debug/shark3d_gtp_shader.pdb" /SUBSYSTEM:WINDOWS /IMPLIB:"../../../bin/win32_vc7x1/debug/shark3d_gtp_shader.lib" /MACHINE:X86 shark3d_eng_util.lib shark3d_util.lib shark3d_eng_interf.lib shark3d_sys.lib shark3d_comp.lib shark3d_drv_interf.lib shark3d_drv_util.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
+.\Debug\eng_shader_special_worldmat.obj
+.\Debug\gtp_shader.obj
+.\Debug\gtp_shader_causticcube.obj
+.\Debug\gtp_shader_createtex.obj
+.\Debug\gtp_shader_cubetexfilter.obj
+.\Debug\gtp_shader_envmap.obj
+.\Debug\gtp_shader_focusedprojmat.obj
+.\Debug\gtp_shader_mainenum.obj
+.\Debug\gtp_shader_module.obj
+.\Debug\gtp_shader_opticsutil.obj
+.\Debug\gtp_shader_public.obj
+.\Debug\gtp_shader_versioncheck.obj
+]
+Creating command line "link.exe @c:\Shark3D\v5x0x6_t164x12u\animatedDoor164x12u\build\win32_vc7x1\gtp_shader\Debug\RSP00003C.rsp"
+</pre></table><table width=100% bgcolor=#DFDFE5><tr><td><font face=arial size=+2>
+Output Window
+</font></table><table width=* cellspacing=0 cellpadding=0><tr><td width=0 bgcolor=#EDEDF5>&nbsp;</td><td width=0 bgcolor=#FFFFFF>&nbsp;</td><td width=*><pre>Compiling...
+gtp_shader_focusedprojmat.cpp
+c:\Shark3D\v5x0x6_t164x12u\animatedDoor164x12u\src\gtp_shader\gtp_shader_focusedprojmat.cpp(341) : warning C4305: 'initializing' : truncation from 'double' to 'float'
+c:\Shark3D\v5x0x6_t164x12u\animatedDoor164x12u\src\gtp_shader\gtp_shader_focusedprojmat.cpp(349) : warning C4244: 'argument' : conversion from 'double' to 'float', possible loss of data
+Linking...
+</pre></table><table width=100% bgcolor=#DFDFE5><tr><td><font face=arial size=+2>
+Results
+</font></table><table width=* cellspacing=0 cellpadding=0><tr><td width=0 bgcolor=#EDEDF5>&nbsp;</td><td width=0 bgcolor=#FFFFFF>&nbsp;</td><td width=*><pre>
+Build log was saved at "file://c:\Shark3D\v5x0x6_t164x12u\animatedDoor164x12u\build\win32_vc7x1\gtp_shader\Debug\BuildLog.htm"
+gtp_shader - 0 error(s), 2 warning(s)</pre></table><table   width=100% height=20 bgcolor=#CFCFE5><tr><td><font face=arial size=+2>
+</font></table></body></html>
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/build/win32_vc7x1/gtp_shader/gtp_shader.sln
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/build/win32_vc7x1/gtp_shader/gtp_shader.sln	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/build/win32_vc7x1/gtp_shader/gtp_shader.sln	(revision 2453)
@@ -0,0 +1,27 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtp_shader", "gtp_shader.vcproj", "{04088B1C-4726-46C5-8A30-D8BF1753D13A}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		Debug = Debug
+		Debug_lib = Debug_lib
+		Release = Release
+		Release_lib = Release_lib
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{04088B1C-4726-46C5-8A30-D8BF1753D13A}.Debug.ActiveCfg = Debug|Win32
+		{04088B1C-4726-46C5-8A30-D8BF1753D13A}.Debug.Build.0 = Debug|Win32
+		{04088B1C-4726-46C5-8A30-D8BF1753D13A}.Debug_lib.ActiveCfg = Debug|Win32
+		{04088B1C-4726-46C5-8A30-D8BF1753D13A}.Debug_lib.Build.0 = Debug|Win32
+		{04088B1C-4726-46C5-8A30-D8BF1753D13A}.Release.ActiveCfg = Release|Win32
+		{04088B1C-4726-46C5-8A30-D8BF1753D13A}.Release.Build.0 = Release|Win32
+		{04088B1C-4726-46C5-8A30-D8BF1753D13A}.Release_lib.ActiveCfg = Release|Win32
+		{04088B1C-4726-46C5-8A30-D8BF1753D13A}.Release_lib.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/build/win32_vc7x1/gtp_shader/gtp_shader-ndsproperties.xml
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/build/win32_vc7x1/gtp_shader/gtp_shader-ndsproperties.xml	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/build/win32_vc7x1/gtp_shader/gtp_shader-ndsproperties.xml	(revision 2453)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<NDSProject xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0" supplier="Nokia">
+  <updateMmpFile>true</updateMmpFile>
+  <pkgFile>sis\gtp_shader.pkg</pkgFile>
+  <pkgUpdate>true</pkgUpdate>
+  <pkgGeneration>true</pkgGeneration>
+  <lang>EN</lang>
+  <updateContextHelp>true</updateContextHelp>
+</NDSProject>
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_max_shadergui.cfg
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_max_shadergui.cfg	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_max_shadergui.cfg	(revision 2453)
@@ -0,0 +1,183 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+modules
+{
+    name "drv_stdres"
+    path "shark3d_drv_stdres.dll"
+}
+{
+    name "gui_stdilk"
+    path "shark3d_gui_stdilk.dll"
+}
+{
+    name "gui_stdnode"
+    path "shark3d_gui_stdnode.dll"
+}
+{
+    name "gui_stdedit"
+    path "shark3d_gui_stdedit.dll"
+}
+{
+    name "gui_stdprop"
+    path "shark3d_gui_stdprop.dll"
+}
+{
+    name "gui_actor"
+    path "shark3d_gui_actor.dll"
+}
+
+msg_eval
+{
+    msg_output_target_note "editor"
+    msg_output_target_error "editor"
+}
+
+resmgr 
+{
+    ident "drv_stdres.resmgr_dispatch"
+    param 
+    {
+        env "env"
+        log_enabled 0
+        entry_array
+        {
+            prefix ""
+            ident "drv_stdres.resmgr_file"
+            param
+            {
+                env "env"
+                // Prefix added to the resource name for infos and errors:
+                name_prefix ""
+                // Location to load the files from:
+                ref_dir "[homedir]"
+                // Convertor for the ref_dir, for replacing placeholders.
+                ref_dir_conv "path_conv"
+                // Don't allow resource names to start with ".." or "/":
+                allow_any_path 0
+                // Case sensitive file name on Win32 platform.
+                // Should be enabled to avoid problems
+                // with non-Win32 platforms, packfiles or DRU.
+                non_strict_path 1
+                resinfo_uses_path 1
+                // Cache size not too large to avoid stuttering:
+                file_cache_size 4096
+                // Log all file accesses:
+                log_enabled 1
+            }
+        }
+        {
+            prefix "images:"
+            ident "drv_stdres.resmgr_file"
+            param
+            {
+                env "env"
+                // Prefix added to the resource name for infos and errors:
+                name_prefix ""
+                // Location to load the files from:
+                ref_dir "[appdir]shark3d/external/"
+                // Convertor for the ref_dir, for replacing placeholders.
+                ref_dir_conv "path_conv"
+                // Don't allow resource names to start with ".." or "/":
+                allow_any_path 0
+                // Case sensitive file name on Win32 platform.
+                // Should be enabled to avoid problems
+                // with non-Win32 platforms, packfiles or DRU.
+                non_strict_path 1
+                resinfo_uses_path 1
+                // Cache size not too large to avoid stuttering:
+                file_cache_size 4096
+                // Log all file accesses:
+                log_enabled 1
+            }
+        }
+        {
+            prefix "help:"
+            ident "drv_stdres.resmgr_file"
+            param
+            {
+                env "env"
+                // Prefix added to the resource name for infos and errors:
+                name_prefix ""
+                // Location to load the files from:
+                ref_dir "[appdir]shark3d/doc/"
+                // Convertor for the ref_dir, for replacing placeholders.
+                ref_dir_conv "path_conv"
+                // Don't allow resource names to start with ".." or "/":
+                allow_any_path 0
+                // Case sensitive file name on Win32 platform.
+                // Should be enabled to avoid problems
+                // with non-Win32 platforms, packfiles or DRU.
+                non_strict_path 1
+                resinfo_uses_path 1
+                // Cache size not too large to avoid stuttering:
+                file_cache_size 4096
+                // Log all file accesses:
+                log_enabled 1
+            }
+        }
+        {
+            prefix "cfg:"
+            ident "drv_stdres.resmgr_file"
+            param
+            {
+                env "env"
+                // Prefix added to the resource name for infos and errors:
+                name_prefix ""
+                // Location to load the files from:
+                ref_dir "[appdir]shark3d/src/gui/cfg"
+                // Convertor for the ref_dir, for replacing placeholders.
+                ref_dir_conv "path_conv"
+                // Don't allow resource names to start with ".." or "/":
+                allow_any_path 1
+                // Case sensitive file name on Win32 platform.
+                // Should be enabled to avoid problems
+                // with non-Win32 platforms, packfiles or DRU.
+                non_strict_path 1
+                resinfo_uses_path 1
+                // Cache size not too large to avoid stuttering:
+                file_cache_size 4096
+                // Log all file accesses:
+                log_enabled 1
+            }
+        }
+    }        
+}
+
+res
+{
+    str_table_name "cfg:strtable.cfg"
+    param_table_name "cfg:paramtable.cfg"
+    help_icon "images:icons/16x16/info.png"
+    help_start "help:index.html"
+    cfg_show_templ_ident "launch_templ_text"
+}
+
+update
+{
+    pending_delay 0.1
+    res_head "update."
+    com_buf_size 1000000 // Only needed if not using a local server
+    connect_addrport ""
+    res_targets_cfg "res_targets.cfg"
+}
+
+
+propwnd
+{
+    prop_ident "gui_stdprop.prop_chunk"
+    prop_param
+    {
+    }
+    ilk "cfg:ilk_shader.cfg"
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/tmp/res/collect.txt
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/tmp/res/collect.txt	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/tmp/res/collect.txt	(revision 2453)
@@ -0,0 +1,203 @@
+client/actor/client.s3d_actor_run
+client/actor/display.s3d_actor_run
+client/actor/displayworld.s3d_actor_run
+client/actor/gfx.s3d_actor_run
+client/actor/io.s3d_actor_run
+client/actor/motion.s3d_actor_run
+client/actor/snd.s3d_actor_run
+client/model/displaymodel.s3d_inst_run
+client/model/displaymodel.s3d_model_run
+client/model/displaymodel.s3d_pospath_run
+client/texture/charset.tga
+client/texture/cursor_def.tga
+client/texture/cursor_sel.tga
+client/texture/loading_clamp.tga
+client/texture/logo_clamp.tga
+client/texture/saving_clamp.tga
+client/texture/statecursor.tga
+client/texture/test.tga
+level/actor/content.s3d_actor_run
+level/actor/levelplayer.s3d_actor_run
+level/actor/levelplayerbasis.s3d_actor_run
+level/actor/main.s3d_actor_run
+level/actor/sky.s3d_actor_run
+level/actor/world.s3d_actor_run
+level/model/bloom.s3d_inst_run
+level/model/bloom.s3d_model_run
+level/model/bloom.s3d_pospath_run
+level/model/playermodel.s3d_inst_run
+level/model/playermodel.s3d_model_run
+level/model/playermodel.s3d_pospath_run
+level/model/skymodel.s3d_inst_run
+level/model/skymodel.s3d_model_run
+level/model/skymodel.s3d_pospath_run
+level/model/worldmodel.s3d_inst_run
+level/model/worldmodel.s3d_model_run
+level/model/worldmodel.s3d_pospath_run
+level/shader/fire.s3d_shader_run
+level/shader/world.s3d_shader_run
+level/texture/BENEDETI.tga
+level/texture/GOLDFOIL.tga
+level/texture/MtlPlat2.jpg
+level/texture/MtlPlat2_Bump.jpg
+level/texture/blueside.tga
+level/texture/dummy1to1.tga
+level/texture/dummy1to2.tga
+level/texture/dummy1to4.tga
+level/texture/dummy2to1.tga
+level/texture/dummy4to1.tga
+level/texture/firecolor.tga
+level/texture/green.tga
+level/texture/greenside.tga
+level/texture/laborwall.jpg
+level/texture/lamp.jpg
+level/texture/particle.tga
+level/texture/pillarbump2.dds
+level/texture/pillarbump3.tga
+level/texture/pillarcolor.tga
+level/texture/red.tga
+level/texture/redbackground.tga
+level/texture/sima.tga
+level/texture/sky_back_clamp.tga
+level/texture/sky_bottom_clamp.tga
+level/texture/sky_front_clamp.tga
+level/texture/sky_left_clamp.tga
+level/texture/sky_right_clamp.tga
+level/texture/sky_top_clamp.tga
+level/texture/steelplt.jpg
+level/texture/szar.png
+level/texture/texdiffuse.tga
+level/texture/texnormal.tga
+level/texture/white.tga
+levelutil/actor/door.s3d_perch_run
+levelutil/shader/basic.s3d_shader_run
+levelutil/shader/comic.s3d_shader_run
+levelutil/shader/display.s3d_shader_run
+levelutil/shader/ordinary.s3d_shader_run
+levelutil/shader/ordinary_transp.s3d_shader_run
+levelutil/shader/posteffects.s3d_shader_run
+levelutil/shader/prog/black.s3d_shaderprog_run
+levelutil/shader/prog/bloom_bright.s3d_shaderprog_run
+levelutil/shader/prog/bloom_combine.s3d_shaderprog_run
+levelutil/shader/prog/bloom_presmooth_bright.s3d_shaderprog_run
+levelutil/shader/prog/bloom_smooth.s3d_shaderprog_run
+levelutil/shader/prog/bump.s3d_shaderprog_run
+levelutil/shader/prog/bump_bright.s3d_shaderprog_run
+levelutil/shader/prog/bump_mild.s3d_shaderprog_run
+levelutil/shader/prog/bump_shmap.s3d_shaderprog_run
+levelutil/shader/prog/comic.s3d_shaderprog_run
+levelutil/shader/prog/d3d9_hlsl/black_d3d9_hlsl_ps1x1.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/black_d3d9_hlsl_vs1x1.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/bloom_bright_d3d9_hlsl_ps2x0.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/bloom_bright_d3d9_hlsl_vs1x1.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/bloom_combine_d3d9_hlsl_ps2x0.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/bloom_combine_d3d9_hlsl_vs1x1.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/bloom_presmooth_bright_d3d9_hlsl_ps2x0.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/bloom_presmooth_bright_d3d9_hlsl_vs1x1.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/bloom_smooth_d3d9_hlsl_ps2x0.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/bloom_smooth_d3d9_hlsl_vs1x1.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/bump_d3d9_hlsl_ps2x0.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/bump_d3d9_hlsl_vs1x1.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/comic_d3d9_hlsl_ps2x0.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/comic_d3d9_hlsl_vs2x0.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/gen_brightclear_d3d9_hlsl_ps2x0.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/gen_brightclear_d3d9_hlsl_vs1x1.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/gen_brightmap_for_softshmap_d3d9_hlsl_ps2x0.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/gen_brightmap_for_softshmap_d3d9_hlsl_vs1x1.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/gen_shmap_d3d9_hlsl_ps2x0.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/gen_shmap_d3d9_hlsl_vs2x0.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/gen_shvol_extrude_d3d9_hlsl_ps2x0.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/gen_shvol_extrude_d3d9_hlsl_vs1x1.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/gen_shvol_view_d3d9_hlsl_ps2x0.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/gen_shvol_view_d3d9_hlsl_vs1x1.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/gtp_cau_photonmap_d3d9_hlsl_ps3x0.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/gtp_cau_photonmap_d3d9_hlsl_vs3x0.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/gtp_caustic_cubemap_point_d3d9_hlsl_ps3x0.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/gtp_caustic_cubemap_point_d3d9_hlsl_vs3x0.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/gtp_caustic_recieve_d3d9_hlsl_ps2x0.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/gtp_caustic_recieve_d3d9_hlsl_vs2x0.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/gtp_diffuse_d3d9_hlsl_ps3x0.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/gtp_diffuse_d3d9_hlsl_vs2x0.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/gtp_distance_impostor_d3d9_hlsl_ps3x0.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/gtp_distance_impostor_d3d9_hlsl_vs3x0.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/gtp_envmapSimple_d3d9_hlsl_ps1x1.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/gtp_envmapSimple_d3d9_hlsl_vs1x1.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/gtp_reduce_cubemap_d3d9_hlsl_ps3x0.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/gtp_reduce_cubemap_d3d9_hlsl_vs2x0.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/include_shmap_filter_d3d9_hlsl.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/include_stdstate_d3d9_hlsl.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/lightfilter_d3d9_hlsl_ps2x0.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/lightfilter_d3d9_hlsl_vs2x0.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/partic_d3d9_hlsl_ps2x0.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/partic_d3d9_hlsl_vs2x0.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/plain_point_d3d9_hlsl_ps2x0.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/plain_point_d3d9_hlsl_vs2x0.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/plain_pointcol_d3d9_hlsl_ps2x0.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/plain_pointcol_d3d9_hlsl_vs2x0.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/plain_pointcoltex_d3d9_hlsl_ps2x0.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/plain_pointcoltex_d3d9_hlsl_vs2x0.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/plain_pointtex_d3d9_hlsl_ps2x0.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/plain_pointtex_d3d9_hlsl_vs2x0.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/standard_d3d9_hlsl_ps2x0.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/standard_d3d9_hlsl_vs1x1.s3d_shadercode_run
+levelutil/shader/prog/d3d9_hlsl/standard_d3d9_hlsl_vs2x0.s3d_shadercode_run
+levelutil/shader/prog/gen_brightclear.s3d_shaderprog_run
+levelutil/shader/prog/gen_brightmap_for_softshmap.s3d_shaderprog_run
+levelutil/shader/prog/gen_shmap.s3d_shaderprog_run
+levelutil/shader/prog/gen_shvol_quick.s3d_shaderprog_run
+levelutil/shader/prog/gen_shvol_strict.s3d_shaderprog_run
+levelutil/shader/prog/gtp_cau_photonmap.s3d_shaderprog_run
+levelutil/shader/prog/gtp_caustic_cubemap_point.s3d_shaderprog_run
+levelutil/shader/prog/gtp_caustic_recieve.s3d_shaderprog_run
+levelutil/shader/prog/gtp_diffuse.s3d_shaderprog_run
+levelutil/shader/prog/gtp_distance_impostor.s3d_shaderprog_run
+levelutil/shader/prog/gtp_envmap.s3d_shaderprog_run
+levelutil/shader/prog/gtp_envmap_metal.s3d_shaderprog_run
+levelutil/shader/prog/gtp_envmap_refract.s3d_shaderprog_run
+levelutil/shader/prog/gtp_reduce_cubemap.s3d_shaderprog_run
+levelutil/shader/prog/lightfilter.s3d_shaderprog_run
+levelutil/shader/prog/ogl_glsl/black_ogl_glsl_fs1x0.s3d_shadercode_run
+levelutil/shader/prog/ogl_glsl/black_ogl_glsl_vs1x0.s3d_shadercode_run
+levelutil/shader/prog/ogl_glsl/bloom_bright_ogl_glsl_fs1x0.s3d_shadercode_run
+levelutil/shader/prog/ogl_glsl/bloom_bright_ogl_glsl_vs1x0.s3d_shadercode_run
+levelutil/shader/prog/ogl_glsl/bloom_combine_ogl_glsl_fs1x0.s3d_shadercode_run
+levelutil/shader/prog/ogl_glsl/bloom_combine_ogl_glsl_vs1x0.s3d_shadercode_run
+levelutil/shader/prog/ogl_glsl/bloom_smooth_ogl_glsl_fs1x0.s3d_shadercode_run
+levelutil/shader/prog/ogl_glsl/bloom_smooth_ogl_glsl_vs1x0.s3d_shadercode_run
+levelutil/shader/prog/ogl_glsl/bump_ogl_glsl_fs1x0.s3d_shadercode_run
+levelutil/shader/prog/ogl_glsl/bump_ogl_glsl_vs1x0.s3d_shadercode_run
+levelutil/shader/prog/ogl_glsl/comic_ogl_glsl_fs1x0.s3d_shadercode_run
+levelutil/shader/prog/ogl_glsl/comic_ogl_glsl_vs1x0.s3d_shadercode_run
+levelutil/shader/prog/ogl_glsl/gen_brightclear_ogl_glsl_fs1x0.s3d_shadercode_run
+levelutil/shader/prog/ogl_glsl/gen_brightclear_ogl_glsl_vs1x0.s3d_shadercode_run
+levelutil/shader/prog/ogl_glsl/gen_shvol_extrude_ogl_glsl_vs1x0.s3d_shadercode_run
+levelutil/shader/prog/ogl_glsl/gen_shvol_view_ogl_glsl_vs1x0.s3d_shadercode_run
+levelutil/shader/prog/ogl_glsl/include_shmap_filter_ogl_glsl.s3d_shadercode_run
+levelutil/shader/prog/ogl_glsl/include_shmap_filter_ogl_glsl_vs1x0.s3d_shadercode_run
+levelutil/shader/prog/ogl_glsl/include_stddef_ogl_glsl_vs1x0.s3d_shadercode_run
+levelutil/shader/prog/ogl_glsl/lightfilter_ogl_glsl_fs1x0.s3d_shadercode_run
+levelutil/shader/prog/ogl_glsl/lightfilter_ogl_glsl_vs1x0.s3d_shadercode_run
+levelutil/shader/prog/ogl_glsl/partic_ogl_glsl_fs1x0.s3d_shadercode_run
+levelutil/shader/prog/ogl_glsl/partic_ogl_glsl_vs1x0.s3d_shadercode_run
+levelutil/shader/prog/ogl_glsl/plain_ogl_glsl_vs1x0.s3d_shadercode_run
+levelutil/shader/prog/ogl_glsl/shvol_ogl_glsl_vs1x0.s3d_shadercode_run
+levelutil/shader/prog/ogl_glsl/standard_ogl_glsl_fs1x0.s3d_shadercode_run
+levelutil/shader/prog/ogl_glsl/standard_ogl_glsl_vs1x0.s3d_shadercode_run
+levelutil/shader/prog/partic.s3d_shaderprog_run
+levelutil/shader/prog/plain_point.s3d_shaderprog_run
+levelutil/shader/prog/plain_pointcol.s3d_shaderprog_run
+levelutil/shader/prog/plain_pointcoltex.s3d_shaderprog_run
+levelutil/shader/prog/plain_pointtex.s3d_shaderprog_run
+levelutil/shader/prog/standard.s3d_shaderprog_run
+levelutil/shader/sky.s3d_shader_run
+main/actor/cas.s3d_actor_run
+main/actor/common.s3d_actor_run
+main/actor/main.s3d_actor_run
+server/actor/server.s3d_actor_run
+server/actor/serverlink.s3d_actor_run
+universe/actor/levels.s3d_actor_run
+universe/actor/setting.s3d_actor_run
+universe/actor/settingplayer.s3d_actor_run
+universe/actor/universe.s3d_actor_run
+universe/actor/universeplayer.s3d_actor_run
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/tmp/res/res_targets.lst
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/tmp/res/res_targets.lst	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/tmp/res/res_targets.lst	(revision 2453)
@@ -0,0 +1,236 @@
+// Machine-made Shark 3D Snake Text 2x0 Stream. Format: ascii.
+targets "client/actor/client.s3d_actor_run"
+    "client/actor/display.s3d_actor_run"
+    "client/actor/displayworld.s3d_actor_run" "client/actor/gfx.s3d_actor_run"
+    "client/actor/io.s3d_actor_run" "client/actor/motion.s3d_actor_run"
+    "client/actor/snd.s3d_actor_run" "client/model/displaymodel.s3d_inst_run"
+    "client/model/displaymodel.s3d_model_run"
+    "client/model/displaymodel.s3d_pospath_run" "client/texture/charset.tga"
+    "client/texture/cursor_def.tga" "client/texture/cursor_sel.tga"
+    "client/texture/loading_clamp.tga" "client/texture/logo_clamp.tga"
+    "client/texture/saving_clamp.tga" "client/texture/statecursor.tga"
+    "client/texture/test.tga" "level/actor/content.s3d_actor_run"
+    "level/actor/levelplayer.s3d_actor_run"
+    "level/actor/levelplayerbasis.s3d_actor_run"
+    "level/actor/main.s3d_actor_run" "level/actor/sky.s3d_actor_run"
+    "level/actor/world.s3d_actor_run" "level/model/bloom.s3d_inst_run"
+    "level/model/bloom.s3d_model_run" "level/model/bloom.s3d_pospath_run"
+    "level/model/playermodel.s3d_inst_run"
+    "level/model/playermodel.s3d_model_run"
+    "level/model/playermodel.s3d_pospath_run"
+    "level/model/skymodel.s3d_inst_run" "level/model/skymodel.s3d_model_run"
+    "level/model/skymodel.s3d_pospath_run"
+    "level/model/worldmodel.s3d_inst_run"
+    "level/model/worldmodel.s3d_model_run"
+    "level/model/worldmodel.s3d_pospath_run" "level/shader/fire.s3d_shader_run"
+    "level/shader/world.s3d_shader_run" "level/texture/BENEDETI.tga"
+    "level/texture/blueside.tga" "level/texture/dummy1to1.tga"
+    "level/texture/dummy1to2.tga" "level/texture/dummy1to4.tga"
+    "level/texture/dummy2to1.tga" "level/texture/dummy4to1.tga"
+    "level/texture/firecolor.tga" "level/texture/GOLDFOIL.tga"
+    "level/texture/green.tga" "level/texture/greenside.tga"
+    "level/texture/laborwall.jpg" "level/texture/lamp.jpg"
+    "level/texture/MtlPlat2.jpg" "level/texture/MtlPlat2_Bump.jpg"
+    "level/texture/particle.tga" "level/texture/pillarbump2.dds"
+    "level/texture/pillarbump3.tga" "level/texture/pillarcolor.tga"
+    "level/texture/red.tga" "level/texture/redbackground.tga"
+    "level/texture/sima.tga" "level/texture/sky_back_clamp.tga"
+    "level/texture/sky_bottom_clamp.tga" "level/texture/sky_front_clamp.tga"
+    "level/texture/sky_left_clamp.tga" "level/texture/sky_right_clamp.tga"
+    "level/texture/sky_top_clamp.tga" "level/texture/steelplt.jpg"
+    "level/texture/szar.png" "level/texture/texdiffuse.tga"
+    "level/texture/texnormal.tga" "level/texture/white.tga"
+    "levelutil/actor/door.s3d_perch_run"
+    "levelutil/shader/basic.s3d_shader_run"
+    "levelutil/shader/comic.s3d_shader_run"
+    "levelutil/shader/display.s3d_shader_run"
+    "levelutil/shader/ordinary.s3d_shader_run"
+    "levelutil/shader/ordinary_transp.s3d_shader_run"
+    "levelutil/shader/posteffects.s3d_shader_run"
+    "levelutil/shader/sky.s3d_shader_run"
+    "levelutil/shader/prog/black.s3d_shaderprog_run"
+    "levelutil/shader/prog/bloom_bright.s3d_shaderprog_run"
+    "levelutil/shader/prog/bloom_combine.s3d_shaderprog_run"
+    "levelutil/shader/prog/bloom_presmooth_bright.s3d_shaderprog_run"
+    "levelutil/shader/prog/bloom_smooth.s3d_shaderprog_run"
+    "levelutil/shader/prog/bump.s3d_shaderprog_run"
+    "levelutil/shader/prog/bump_bright.s3d_shaderprog_run"
+    "levelutil/shader/prog/bump_mild.s3d_shaderprog_run"
+    "levelutil/shader/prog/bump_shmap.s3d_shaderprog_run"
+    "levelutil/shader/prog/comic.s3d_shaderprog_run"
+    "levelutil/shader/prog/gen_brightclear.s3d_shaderprog_run"
+    "levelutil/shader/prog/gen_brightmap_for_softshmap.s3d_shaderprog_run"
+    "levelutil/shader/prog/gen_shmap.s3d_shaderprog_run"
+    "levelutil/shader/prog/gen_shvol_quick.s3d_shaderprog_run"
+    "levelutil/shader/prog/gen_shvol_strict.s3d_shaderprog_run"
+    "levelutil/shader/prog/gtp_caustic_cubemap_point.s3d_shaderprog_run"
+    "levelutil/shader/prog/gtp_caustic_recieve.s3d_shaderprog_run"
+    "levelutil/shader/prog/gtp_cau_photonmap.s3d_shaderprog_run"
+    "levelutil/shader/prog/gtp_diffuse.s3d_shaderprog_run"
+    "levelutil/shader/prog/gtp_distance_impostor.s3d_shaderprog_run"
+    "levelutil/shader/prog/gtp_envmap.s3d_shaderprog_run"
+    "levelutil/shader/prog/gtp_envmap_metal.s3d_shaderprog_run"
+    "levelutil/shader/prog/gtp_envmap_refract.s3d_shaderprog_run"
+    "levelutil/shader/prog/gtp_reduce_cubemap.s3d_shaderprog_run"
+    "levelutil/shader/prog/lightfilter.s3d_shaderprog_run"
+    "levelutil/shader/prog/partic.s3d_shaderprog_run"
+    "levelutil/shader/prog/plain_point.s3d_shaderprog_run"
+    "levelutil/shader/prog/plain_pointcol.s3d_shaderprog_run"
+    "levelutil/shader/prog/plain_pointcoltex.s3d_shaderprog_run"
+    "levelutil/shader/prog/plain_pointtex.s3d_shaderprog_run"
+    "levelutil/shader/prog/standard.s3d_shaderprog_run"
+    "levelutil/shader/prog/d3d9_hlsl/black_d3d9_hlsl_ps1x1.s3d_shadercode_run"
+    "levelutil/shader/prog/d3d9_hlsl/black_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+    "levelutil/shader/prog/d3d9_hlsl/bloom_bright_d3d9_hlsl_ps2x0.s3d_shaderco"
+    & "de_run"
+    "levelutil/shader/prog/d3d9_hlsl/bloom_bright_d3d9_hlsl_vs1x1.s3d_shaderco"
+    & "de_run"
+    "levelutil/shader/prog/d3d9_hlsl/bloom_combine_d3d9_hlsl_ps2x0.s3d_shaderc"
+    & "ode_run"
+    "levelutil/shader/prog/d3d9_hlsl/bloom_combine_d3d9_hlsl_vs1x1.s3d_shaderc"
+    & "ode_run"
+    "levelutil/shader/prog/d3d9_hlsl/bloom_presmooth_bright_d3d9_hlsl_ps2x0.s3"
+    & "d_shadercode_run"
+    "levelutil/shader/prog/d3d9_hlsl/bloom_presmooth_bright_d3d9_hlsl_vs1x1.s3"
+    & "d_shadercode_run"
+    "levelutil/shader/prog/d3d9_hlsl/bloom_smooth_d3d9_hlsl_ps2x0.s3d_shaderco"
+    & "de_run"
+    "levelutil/shader/prog/d3d9_hlsl/bloom_smooth_d3d9_hlsl_vs1x1.s3d_shaderco"
+    & "de_run"
+    "levelutil/shader/prog/d3d9_hlsl/bump_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+    "levelutil/shader/prog/d3d9_hlsl/bump_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+    "levelutil/shader/prog/d3d9_hlsl/comic_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+    "levelutil/shader/prog/d3d9_hlsl/comic_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+    "levelutil/shader/prog/d3d9_hlsl/gen_brightclear_d3d9_hlsl_ps2x0.s3d_shade"
+    & "rcode_run"
+    "levelutil/shader/prog/d3d9_hlsl/gen_brightclear_d3d9_hlsl_vs1x1.s3d_shade"
+    & "rcode_run"
+    "levelutil/shader/prog/d3d9_hlsl/gen_brightmap_for_softshmap_d3d9_hlsl_ps2"
+    & "x0.s3d_shadercode_run"
+    "levelutil/shader/prog/d3d9_hlsl/gen_brightmap_for_softshmap_d3d9_hlsl_vs1"
+    & "x1.s3d_shadercode_run"
+    "levelutil/shader/prog/d3d9_hlsl/gen_shmap_d3d9_hlsl_ps2x0.s3d_shadercode_"
+    & "run"
+    "levelutil/shader/prog/d3d9_hlsl/gen_shmap_d3d9_hlsl_vs2x0.s3d_shadercode_"
+    & "run"
+    "levelutil/shader/prog/d3d9_hlsl/gen_shvol_extrude_d3d9_hlsl_ps2x0.s3d_sha"
+    & "dercode_run"
+    "levelutil/shader/prog/d3d9_hlsl/gen_shvol_extrude_d3d9_hlsl_vs1x1.s3d_sha"
+    & "dercode_run"
+    "levelutil/shader/prog/d3d9_hlsl/gen_shvol_view_d3d9_hlsl_ps2x0.s3d_shader"
+    & "code_run"
+    "levelutil/shader/prog/d3d9_hlsl/gen_shvol_view_d3d9_hlsl_vs1x1.s3d_shader"
+    & "code_run"
+    "levelutil/shader/prog/d3d9_hlsl/gtp_caustic_cubemap_point_d3d9_hlsl_ps3x0"
+    & ".s3d_shadercode_run"
+    "levelutil/shader/prog/d3d9_hlsl/gtp_caustic_cubemap_point_d3d9_hlsl_vs3x0"
+    & ".s3d_shadercode_run"
+    "levelutil/shader/prog/d3d9_hlsl/gtp_caustic_recieve_d3d9_hlsl_ps2x0.s3d_s"
+    & "hadercode_run"
+    "levelutil/shader/prog/d3d9_hlsl/gtp_caustic_recieve_d3d9_hlsl_vs2x0.s3d_s"
+    & "hadercode_run"
+    "levelutil/shader/prog/d3d9_hlsl/gtp_cau_photonmap_d3d9_hlsl_ps3x0.s3d_sha"
+    & "dercode_run"
+    "levelutil/shader/prog/d3d9_hlsl/gtp_cau_photonmap_d3d9_hlsl_vs3x0.s3d_sha"
+    & "dercode_run"
+    "levelutil/shader/prog/d3d9_hlsl/gtp_diffuse_d3d9_hlsl_ps3x0.s3d_shadercod"
+    & "e_run"
+    "levelutil/shader/prog/d3d9_hlsl/gtp_diffuse_d3d9_hlsl_vs2x0.s3d_shadercod"
+    & "e_run"
+    "levelutil/shader/prog/d3d9_hlsl/gtp_distance_impostor_d3d9_hlsl_ps3x0.s3d"
+    & "_shadercode_run"
+    "levelutil/shader/prog/d3d9_hlsl/gtp_distance_impostor_d3d9_hlsl_vs3x0.s3d"
+    & "_shadercode_run"
+    "levelutil/shader/prog/d3d9_hlsl/gtp_envmapSimple_d3d9_hlsl_ps1x1.s3d_shad"
+    & "ercode_run"
+    "levelutil/shader/prog/d3d9_hlsl/gtp_envmapSimple_d3d9_hlsl_vs1x1.s3d_shad"
+    & "ercode_run"
+    "levelutil/shader/prog/d3d9_hlsl/gtp_reduce_cubemap_d3d9_hlsl_ps3x0.s3d_sh"
+    & "adercode_run"
+    "levelutil/shader/prog/d3d9_hlsl/gtp_reduce_cubemap_d3d9_hlsl_vs2x0.s3d_sh"
+    & "adercode_run"
+    "levelutil/shader/prog/d3d9_hlsl/include_shmap_filter_d3d9_hlsl.s3d_shader"
+    & "code_run"
+    "levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_r"
+    & "un"
+    "levelutil/shader/prog/d3d9_hlsl/include_stdstate_d3d9_hlsl.s3d_shadercode"
+    & "_run"
+    "levelutil/shader/prog/d3d9_hlsl/lightfilter_d3d9_hlsl_ps2x0.s3d_shadercod"
+    & "e_run"
+    "levelutil/shader/prog/d3d9_hlsl/lightfilter_d3d9_hlsl_vs2x0.s3d_shadercod"
+    & "e_run"
+    "levelutil/shader/prog/d3d9_hlsl/partic_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+    "levelutil/shader/prog/d3d9_hlsl/partic_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+    "levelutil/shader/prog/d3d9_hlsl/plain_pointcoltex_d3d9_hlsl_ps2x0.s3d_sha"
+    & "dercode_run"
+    "levelutil/shader/prog/d3d9_hlsl/plain_pointcoltex_d3d9_hlsl_vs2x0.s3d_sha"
+    & "dercode_run"
+    "levelutil/shader/prog/d3d9_hlsl/plain_pointcol_d3d9_hlsl_ps2x0.s3d_shader"
+    & "code_run"
+    "levelutil/shader/prog/d3d9_hlsl/plain_pointcol_d3d9_hlsl_vs2x0.s3d_shader"
+    & "code_run"
+    "levelutil/shader/prog/d3d9_hlsl/plain_pointtex_d3d9_hlsl_ps2x0.s3d_shader"
+    & "code_run"
+    "levelutil/shader/prog/d3d9_hlsl/plain_pointtex_d3d9_hlsl_vs2x0.s3d_shader"
+    & "code_run"
+    "levelutil/shader/prog/d3d9_hlsl/plain_point_d3d9_hlsl_ps2x0.s3d_shadercod"
+    & "e_run"
+    "levelutil/shader/prog/d3d9_hlsl/plain_point_d3d9_hlsl_vs2x0.s3d_shadercod"
+    & "e_run"
+    "levelutil/shader/prog/d3d9_hlsl/standard_d3d9_hlsl_ps2x0.s3d_shadercode_r"
+    & "un"
+    "levelutil/shader/prog/d3d9_hlsl/standard_d3d9_hlsl_vs1x1.s3d_shadercode_r"
+    & "un"
+    "levelutil/shader/prog/d3d9_hlsl/standard_d3d9_hlsl_vs2x0.s3d_shadercode_r"
+    & "un"
+    "levelutil/shader/prog/ogl_glsl/black_ogl_glsl_fs1x0.s3d_shadercode_run"
+    "levelutil/shader/prog/ogl_glsl/black_ogl_glsl_vs1x0.s3d_shadercode_run"
+    "levelutil/shader/prog/ogl_glsl/bloom_bright_ogl_glsl_fs1x0.s3d_shadercode"
+    & "_run"
+    "levelutil/shader/prog/ogl_glsl/bloom_bright_ogl_glsl_vs1x0.s3d_shadercode"
+    & "_run"
+    "levelutil/shader/prog/ogl_glsl/bloom_combine_ogl_glsl_fs1x0.s3d_shadercod"
+    & "e_run"
+    "levelutil/shader/prog/ogl_glsl/bloom_combine_ogl_glsl_vs1x0.s3d_shadercod"
+    & "e_run"
+    "levelutil/shader/prog/ogl_glsl/bloom_smooth_ogl_glsl_fs1x0.s3d_shadercode"
+    & "_run"
+    "levelutil/shader/prog/ogl_glsl/bloom_smooth_ogl_glsl_vs1x0.s3d_shadercode"
+    & "_run"
+    "levelutil/shader/prog/ogl_glsl/bump_ogl_glsl_fs1x0.s3d_shadercode_run"
+    "levelutil/shader/prog/ogl_glsl/bump_ogl_glsl_vs1x0.s3d_shadercode_run"
+    "levelutil/shader/prog/ogl_glsl/comic_ogl_glsl_fs1x0.s3d_shadercode_run"
+    "levelutil/shader/prog/ogl_glsl/comic_ogl_glsl_vs1x0.s3d_shadercode_run"
+    "levelutil/shader/prog/ogl_glsl/gen_brightclear_ogl_glsl_fs1x0.s3d_shaderc"
+    & "ode_run"
+    "levelutil/shader/prog/ogl_glsl/gen_brightclear_ogl_glsl_vs1x0.s3d_shaderc"
+    & "ode_run"
+    "levelutil/shader/prog/ogl_glsl/gen_shvol_extrude_ogl_glsl_vs1x0.s3d_shade"
+    & "rcode_run"
+    "levelutil/shader/prog/ogl_glsl/gen_shvol_view_ogl_glsl_vs1x0.s3d_shaderco"
+    & "de_run"
+    "levelutil/shader/prog/ogl_glsl/include_shmap_filter_ogl_glsl.s3d_shaderco"
+    & "de_run"
+    "levelutil/shader/prog/ogl_glsl/include_shmap_filter_ogl_glsl_vs1x0.s3d_sh"
+    & "adercode_run"
+    "levelutil/shader/prog/ogl_glsl/include_stddef_ogl_glsl_vs1x0.s3d_shaderco"
+    & "de_run"
+    "levelutil/shader/prog/ogl_glsl/lightfilter_ogl_glsl_fs1x0.s3d_shadercode_"
+    & "run"
+    "levelutil/shader/prog/ogl_glsl/lightfilter_ogl_glsl_vs1x0.s3d_shadercode_"
+    & "run"
+    "levelutil/shader/prog/ogl_glsl/partic_ogl_glsl_fs1x0.s3d_shadercode_run"
+    "levelutil/shader/prog/ogl_glsl/partic_ogl_glsl_vs1x0.s3d_shadercode_run"
+    "levelutil/shader/prog/ogl_glsl/plain_ogl_glsl_vs1x0.s3d_shadercode_run"
+    "levelutil/shader/prog/ogl_glsl/shvol_ogl_glsl_vs1x0.s3d_shadercode_run"
+    "levelutil/shader/prog/ogl_glsl/standard_ogl_glsl_fs1x0.s3d_shadercode_run"
+    "levelutil/shader/prog/ogl_glsl/standard_ogl_glsl_vs1x0.s3d_shadercode_run"
+    "main/actor/cas.s3d_actor_run" "main/actor/common.s3d_actor_run"
+    "main/actor/main.s3d_actor_run" "server/actor/server.s3d_actor_run"
+    "server/actor/serverlink.s3d_actor_run"
+    "universe/actor/levels.s3d_actor_run"
+    "universe/actor/setting.s3d_actor_run"
+    "universe/actor/settingplayer.s3d_actor_run"
+    "universe/actor/universe.s3d_actor_run"
+    "universe/actor/universeplayer.s3d_actor_run"
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/tmp/res/levelutil/actor/door.s3d_perch_parse
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/tmp/res/levelutil/actor/door.s3d_perch_parse	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/tmp/res/levelutil/actor/door.s3d_perch_parse	(revision 2453)
@@ -0,0 +1,136 @@
+main 
+  op var "m_inside" "@int" 
+    <no-blk>
+    <no-exp>
+  op var "m_actu" "@actor" 
+    <no-blk>
+    <no-exp>
+  op var "m_speaker" "@actor" 
+    <no-blk>
+    <no-exp>
+  op func "initActor" "@void" 
+    blk 
+      stat.exp 
+        exp.op func "@assign" 
+          exp.op var "m_inside" 
+            <no-exp>
+          exp.litint 0 
+      stat.exp 
+        exp.op func "@assign" 
+          exp.op var "m_actu" 
+            <no-exp>
+          exp.op func "findActor" 
+            <no-exp>
+            exp.op func "getParamStr" 
+              <no-exp>
+              exp.litstr "actu" 
+      stat.exp 
+        exp.op func "@assign" 
+          exp.op var "m_speaker" 
+            <no-exp>
+          exp.op func "findActor" 
+            <no-exp>
+            exp.op func "getParamStr" 
+              <no-exp>
+              exp.litstr "speaker" 
+    <no-exp>
+  op func "finishActor" "@void" 
+    blk 
+    <no-exp>
+  op func "open" "@void" 
+    blk 
+      stat.exp 
+        exp.dyn "play_to_end" "" 
+            Pass in exp.op var "m_actu" 
+              <no-exp>
+      stat.exp 
+        exp.dyn "start" "" 
+            Pass in exp.op var "m_speaker" 
+              <no-exp>
+      stat.defop 
+        op var "duration" "@float" 
+          <no-blk>
+          exp.dyn "get_duration" "@float" 
+              Pass in exp.op var "m_actu" 
+                <no-exp>
+      stat.exp 
+        exp.op func "evtAppoint" 
+          <no-exp>
+          exp.litstr "soundOff" 
+          exp.op var "duration" 
+            <no-exp>
+    <no-exp>
+  op func "close" "@void" 
+    blk 
+      stat.exp 
+        exp.dyn "play_to_start" "" 
+            Pass in exp.op var "m_actu" 
+              <no-exp>
+      stat.exp 
+        exp.dyn "start" "" 
+            Pass in exp.op var "m_speaker" 
+              <no-exp>
+      stat.defop 
+        op var "duration" "@float" 
+          <no-blk>
+          exp.dyn "get_duration" "@float" 
+              Pass in exp.op var "m_actu" 
+                <no-exp>
+      stat.exp 
+        exp.op func "evtAppoint" 
+          <no-exp>
+          exp.litstr "soundOff" 
+          exp.op var "duration" 
+            <no-exp>
+    <no-exp>
+  op func "enter" "@void" 
+    param in "sender" "@actor" 
+    blk 
+      stat.if 
+        exp.op func "@cmpeq" 
+          exp.op var "m_inside" 
+            <no-exp>
+          exp.litint 0 
+        blk 
+          stat.exp 
+            exp.op func "open" 
+              <no-exp>
+        <no-blk>
+      stat.exp 
+        exp.op func "@assign" 
+          exp.op var "m_inside" 
+            <no-exp>
+          exp.op func "@add" 
+            exp.op var "m_inside" 
+              <no-exp>
+            exp.litint 1 
+    <no-exp>
+  op func "leave" "@void" 
+    param in "sender" "@actor" 
+    blk 
+      stat.exp 
+        exp.op func "@assign" 
+          exp.op var "m_inside" 
+            <no-exp>
+          exp.op func "@sub" 
+            exp.op var "m_inside" 
+              <no-exp>
+            exp.litint 1 
+      stat.if 
+        exp.op func "@cmpeq" 
+          exp.op var "m_inside" 
+            <no-exp>
+          exp.litint 0 
+        blk 
+          stat.exp 
+            exp.op func "close" 
+              <no-exp>
+        <no-blk>
+    <no-exp>
+  op func "soundOff" "@void" 
+    blk 
+      stat.exp 
+        exp.dyn "stop" "" 
+            Pass in exp.op var "m_speaker" 
+              <no-exp>
+    <no-exp>
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/tmp/res/levelutil/actor/door.s3d_perch_rawim
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/tmp/res/levelutil/actor/door.s3d_perch_rawim	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/tmp/res/levelutil/actor/door.s3d_perch_rawim	(revision 2453)
@@ -0,0 +1,104 @@
+main 
+  func 
+    Name "initActor"
+    Decl "@void-"
+    DynDecl "-v"
+    Label 4
+    blk
+      null.i
+      storescr.i scr 1
+      const.s str "actu"
+      bi.getParamStr
+      bi.findActor
+      storescr.a scr 2
+      const.s str "speaker"
+      bi.getParamStr
+      bi.findActor
+      storescr.a scr 3
+  func 
+    Name "finishActor"
+    Decl "@void-"
+    DynDecl "-v"
+    Label 5
+    blk
+  func 
+    Name "open"
+    Decl "@void-"
+    DynDecl ""
+    Label 6
+    blk
+      loadscr.a scr 2
+      const.s str "play_to_end"
+      bi.a.dyncall str "-v"
+      loadscr.a scr 3
+      const.s str "start"
+      bi.a.dyncall str "-v"
+      loadscr.a scr 2
+      const.s str "get_duration"
+      bi.a.dyncall str ">f"
+      storeloc.f loc 11
+      const.s str "soundOff"
+      loadloc.f loc 11
+      bi.evtAppoint
+  func 
+    Name "close"
+    Decl "@void-"
+    DynDecl ""
+    Label 7
+    blk
+      loadscr.a scr 2
+      const.s str "play_to_start"
+      bi.a.dyncall str "-v"
+      loadscr.a scr 3
+      const.s str "start"
+      bi.a.dyncall str "-v"
+      loadscr.a scr 2
+      const.s str "get_duration"
+      bi.a.dyncall str ">f"
+      storeloc.f loc 12
+      const.s str "soundOff"
+      loadloc.f loc 12
+      bi.evtAppoint
+  func 
+    Name "enter"
+    Decl "@void-<@actor"
+    DynDecl "-v<a"
+    Label 8
+    blk
+      storeloc.a loc 13
+      loadscr.i scr 1
+      null.i
+      equal.i
+      jumpz uselab 14
+      call uselab 6
+      @lab deflab 14
+      loadscr.i scr 1
+      const.i int 1
+      bi.i.add
+      storescr.i scr 1
+  func 
+    Name "leave"
+    Decl "@void-<@actor"
+    DynDecl "-v<a"
+    Label 9
+    blk
+      storeloc.a loc 16
+      loadscr.i scr 1
+      const.i int 1
+      bi.i.sub
+      storescr.i scr 1
+      loadscr.i scr 1
+      null.i
+      equal.i
+      jumpz uselab 17
+      call uselab 7
+      @lab deflab 17
+  func 
+    Name "soundOff"
+    Decl "@void-"
+    DynDecl "-v"
+    Label 10
+    blk
+      loadscr.a scr 3
+      const.s str "stop"
+      bi.a.dyncall str "-v"
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/tmp/res/levelutil/actor/door.s3d_perch_lst
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/tmp/res/levelutil/actor/door.s3d_perch_lst	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/tmp/res/levelutil/actor/door.s3d_perch_lst	(revision 2453)
@@ -0,0 +1,477 @@
+                                        # Perch byte-code assembly file:
+                                        # Time stamp: 2007-06-13T16:21:59,281
+                                        # Shark 3D (tm) Engine (www.shark3d.com)
+                                        # Copyright 1996-2006 Spinor GmbH
+                                        
+000000        73 68 61 72 6b 33 64 5f   data.str "shark3d_perch_bytecode"
+              70 65 72 63 68 5f 62 79 
+              74 65 63 6f 64 65 00 
+000017        31 36 34 78 31 32 00      data.str "164x12"
+                                        
+                                        # Info string cnt: (You can eliminate the info strings by using the bare compilation mode.)
+00001e        95                        data.intcompact 21
+                                        # Info string 0:
+00001f        63 3a 2f 53 68 61 72 6b   data.str "c:/Shark3D/v5x0x6_t164x12u/shark3_labour/src/res/levelutil/actor/door.s3d_perch|14,1"
+              33 44 2f 76 35 78 30 78 
+              36 5f 74 31 36 34 78 31 
+              32 75 2f 73 68 61 72 6b 
+              33 5f 6c 61 62 6f 75 72 
+              2f 73 72 63 2f 72 65 73 
+              2f 6c 65 76 65 6c 75 74 
+              69 6c 2f 61 63 74 6f 72 
+              2f 64 6f 6f 72 2e 73 33 
+              64 5f 70 65 72 63 68 7c 
+              31 34 2c 31 00 
+                                        # Info string 1:
+000074        63 3a 2f 53 68 61 72 6b   data.str "c:/Shark3D/v5x0x6_t164x12u/shark3_labour/src/res/levelutil/actor/door.s3d_perch|18,6"
+              33 44 2f 76 35 78 30 78 
+              36 5f 74 31 36 34 78 31 
+              32 75 2f 73 68 61 72 6b 
+              33 5f 6c 61 62 6f 75 72 
+              2f 73 72 63 2f 72 65 73 
+              2f 6c 65 76 65 6c 75 74 
+              69 6c 2f 61 63 74 6f 72 
+              2f 64 6f 6f 72 2e 73 33 
+              64 5f 70 65 72 63 68 7c 
+              31 38 2c 36 00 
+                                        # Info string 2:
+0000c9        63 3a 2f 53 68 61 72 6b   data.str "c:/Shark3D/v5x0x6_t164x12u/shark3_labour/src/res/levelutil/actor/door.s3d_perch|20,25"
+              33 44 2f 76 35 78 30 78 
+              36 5f 74 31 36 34 78 31 
+              32 75 2f 73 68 61 72 6b 
+              33 5f 6c 61 62 6f 75 72 
+              2f 73 72 63 2f 72 65 73 
+              2f 6c 65 76 65 6c 75 74 
+              69 6c 2f 61 63 74 6f 72 
+              2f 64 6f 6f 72 2e 73 33 
+              64 5f 70 65 72 63 68 7c 
+              32 30 2c 32 35 00 
+                                        # Info string 3:
+00011f        63 3a 2f 53 68 61 72 6b   data.str "c:/Shark3D/v5x0x6_t164x12u/shark3_labour/src/res/levelutil/actor/door.s3d_perch|20,14"
+              33 44 2f 76 35 78 30 78 
+              36 5f 74 31 36 34 78 31 
+              32 75 2f 73 68 61 72 6b 
+              33 5f 6c 61 62 6f 75 72 
+              2f 73 72 63 2f 72 65 73 
+              2f 6c 65 76 65 6c 75 74 
+              69 6c 2f 61 63 74 6f 72 
+              2f 64 6f 6f 72 2e 73 33 
+              64 5f 70 65 72 63 68 7c 
+              32 30 2c 31 34 00 
+                                        # Info string 4:
+000175        63 3a 2f 53 68 61 72 6b   data.str "c:/Shark3D/v5x0x6_t164x12u/shark3_labour/src/res/levelutil/actor/door.s3d_perch|21,28"
+              33 44 2f 76 35 78 30 78 
+              36 5f 74 31 36 34 78 31 
+              32 75 2f 73 68 61 72 6b 
+              33 5f 6c 61 62 6f 75 72 
+              2f 73 72 63 2f 72 65 73 
+              2f 6c 65 76 65 6c 75 74 
+              69 6c 2f 61 63 74 6f 72 
+              2f 64 6f 6f 72 2e 73 33 
+              64 5f 70 65 72 63 68 7c 
+              32 31 2c 32 38 00 
+                                        # Info string 5:
+0001cb        63 3a 2f 53 68 61 72 6b   data.str "c:/Shark3D/v5x0x6_t164x12u/shark3_labour/src/res/levelutil/actor/door.s3d_perch|21,17"
+              33 44 2f 76 35 78 30 78 
+              36 5f 74 31 36 34 78 31 
+              32 75 2f 73 68 61 72 6b 
+              33 5f 6c 61 62 6f 75 72 
+              2f 73 72 63 2f 72 65 73 
+              2f 6c 65 76 65 6c 75 74 
+              69 6c 2f 61 63 74 6f 72 
+              2f 64 6f 6f 72 2e 73 33 
+              64 5f 70 65 72 63 68 7c 
+              32 31 2c 31 37 00 
+                                        # Info string 6:
+000221        63 3a 2f 53 68 61 72 6b   data.str "c:/Shark3D/v5x0x6_t164x12u/shark3_labour/src/res/levelutil/actor/door.s3d_perch|24,6"
+              33 44 2f 76 35 78 30 78 
+              36 5f 74 31 36 34 78 31 
+              32 75 2f 73 68 61 72 6b 
+              33 5f 6c 61 62 6f 75 72 
+              2f 73 72 63 2f 72 65 73 
+              2f 6c 65 76 65 6c 75 74 
+              69 6c 2f 61 63 74 6f 72 
+              2f 64 6f 6f 72 2e 73 33 
+              64 5f 70 65 72 63 68 7c 
+              32 34 2c 36 00 
+                                        # Info string 7:
+000276        63 3a 2f 53 68 61 72 6b   data.str "c:/Shark3D/v5x0x6_t164x12u/shark3_labour/src/res/levelutil/actor/door.s3d_perch|28,6"
+              33 44 2f 76 35 78 30 78 
+              36 5f 74 31 36 34 78 31 
+              32 75 2f 73 68 61 72 6b 
+              33 5f 6c 61 62 6f 75 72 
+              2f 73 72 63 2f 72 65 73 
+              2f 6c 65 76 65 6c 75 74 
+              69 6c 2f 61 63 74 6f 72 
+              2f 64 6f 6f 72 2e 73 33 
+              64 5f 70 65 72 63 68 7c 
+              32 38 2c 36 00 
+                                        # Info string 8:
+0002cb        63 3a 2f 53 68 61 72 6b   data.str "c:/Shark3D/v5x0x6_t164x12u/shark3_labour/src/res/levelutil/actor/door.s3d_perch|29,14"
+              33 44 2f 76 35 78 30 78 
+              36 5f 74 31 36 34 78 31 
+              32 75 2f 73 68 61 72 6b 
+              33 5f 6c 61 62 6f 75 72 
+              2f 73 72 63 2f 72 65 73 
+              2f 6c 65 76 65 6c 75 74 
+              69 6c 2f 61 63 74 6f 72 
+              2f 64 6f 6f 72 2e 73 33 
+              64 5f 70 65 72 63 68 7c 
+              32 39 2c 31 34 00 
+                                        # Info string 9:
+000321        63 3a 2f 53 68 61 72 6b   data.str "c:/Shark3D/v5x0x6_t164x12u/shark3_labour/src/res/levelutil/actor/door.s3d_perch|30,17"
+              33 44 2f 76 35 78 30 78 
+              36 5f 74 31 36 34 78 31 
+              32 75 2f 73 68 61 72 6b 
+              33 5f 6c 61 62 6f 75 72 
+              2f 73 72 63 2f 72 65 73 
+              2f 6c 65 76 65 6c 75 74 
+              69 6c 2f 61 63 74 6f 72 
+              2f 64 6f 6f 72 2e 73 33 
+              64 5f 70 65 72 63 68 7c 
+              33 30 2c 31 37 00 
+                                        # Info string 10:
+000377        63 3a 2f 53 68 61 72 6b   data.str "c:/Shark3D/v5x0x6_t164x12u/shark3_labour/src/res/levelutil/actor/door.s3d_perch|31,35"
+              33 44 2f 76 35 78 30 78 
+              36 5f 74 31 36 34 78 31 
+              32 75 2f 73 68 61 72 6b 
+              33 5f 6c 61 62 6f 75 72 
+              2f 73 72 63 2f 72 65 73 
+              2f 6c 65 76 65 6c 75 74 
+              69 6c 2f 61 63 74 6f 72 
+              2f 64 6f 6f 72 2e 73 33 
+              64 5f 70 65 72 63 68 7c 
+              33 31 2c 33 35 00 
+                                        # Info string 11:
+0003cd        63 3a 2f 53 68 61 72 6b   data.str "c:/Shark3D/v5x0x6_t164x12u/shark3_labour/src/res/levelutil/actor/door.s3d_perch|32,5"
+              33 44 2f 76 35 78 30 78 
+              36 5f 74 31 36 34 78 31 
+              32 75 2f 73 68 61 72 6b 
+              33 5f 6c 61 62 6f 75 72 
+              2f 73 72 63 2f 72 65 73 
+              2f 6c 65 76 65 6c 75 74 
+              69 6c 2f 61 63 74 6f 72 
+              2f 64 6f 6f 72 2e 73 33 
+              64 5f 70 65 72 63 68 7c 
+              33 32 2c 35 00 
+                                        # Info string 12:
+000422        63 3a 2f 53 68 61 72 6b   data.str "c:/Shark3D/v5x0x6_t164x12u/shark3_labour/src/res/levelutil/actor/door.s3d_perch|36,6"
+              33 44 2f 76 35 78 30 78 
+              36 5f 74 31 36 34 78 31 
+              32 75 2f 73 68 61 72 6b 
+              33 5f 6c 61 62 6f 75 72 
+              2f 73 72 63 2f 72 65 73 
+              2f 6c 65 76 65 6c 75 74 
+              69 6c 2f 61 63 74 6f 72 
+              2f 64 6f 6f 72 2e 73 33 
+              64 5f 70 65 72 63 68 7c 
+              33 36 2c 36 00 
+                                        # Info string 13:
+000477        63 3a 2f 53 68 61 72 6b   data.str "c:/Shark3D/v5x0x6_t164x12u/shark3_labour/src/res/levelutil/actor/door.s3d_perch|37,14"
+              33 44 2f 76 35 78 30 78 
+              36 5f 74 31 36 34 78 31 
+              32 75 2f 73 68 61 72 6b 
+              33 5f 6c 61 62 6f 75 72 
+              2f 73 72 63 2f 72 65 73 
+              2f 6c 65 76 65 6c 75 74 
+              69 6c 2f 61 63 74 6f 72 
+              2f 64 6f 6f 72 2e 73 33 
+              64 5f 70 65 72 63 68 7c 
+              33 37 2c 31 34 00 
+                                        # Info string 14:
+0004cd        63 3a 2f 53 68 61 72 6b   data.str "c:/Shark3D/v5x0x6_t164x12u/shark3_labour/src/res/levelutil/actor/door.s3d_perch|38,17"
+              33 44 2f 76 35 78 30 78 
+              36 5f 74 31 36 34 78 31 
+              32 75 2f 73 68 61 72 6b 
+              33 5f 6c 61 62 6f 75 72 
+              2f 73 72 63 2f 72 65 73 
+              2f 6c 65 76 65 6c 75 74 
+              69 6c 2f 61 63 74 6f 72 
+              2f 64 6f 6f 72 2e 73 33 
+              64 5f 70 65 72 63 68 7c 
+              33 38 2c 31 37 00 
+                                        # Info string 15:
+000523        63 3a 2f 53 68 61 72 6b   data.str "c:/Shark3D/v5x0x6_t164x12u/shark3_labour/src/res/levelutil/actor/door.s3d_perch|39,35"
+              33 44 2f 76 35 78 30 78 
+              36 5f 74 31 36 34 78 31 
+              32 75 2f 73 68 61 72 6b 
+              33 5f 6c 61 62 6f 75 72 
+              2f 73 72 63 2f 72 65 73 
+              2f 6c 65 76 65 6c 75 74 
+              69 6c 2f 61 63 74 6f 72 
+              2f 64 6f 6f 72 2e 73 33 
+              64 5f 70 65 72 63 68 7c 
+              33 39 2c 33 35 00 
+                                        # Info string 16:
+000579        63 3a 2f 53 68 61 72 6b   data.str "c:/Shark3D/v5x0x6_t164x12u/shark3_labour/src/res/levelutil/actor/door.s3d_perch|40,5"
+              33 44 2f 76 35 78 30 78 
+              36 5f 74 31 36 34 78 31 
+              32 75 2f 73 68 61 72 6b 
+              33 5f 6c 61 62 6f 75 72 
+              2f 73 72 63 2f 72 65 73 
+              2f 6c 65 76 65 6c 75 74 
+              69 6c 2f 61 63 74 6f 72 
+              2f 64 6f 6f 72 2e 73 33 
+              64 5f 70 65 72 63 68 7c 
+              34 30 2c 35 00 
+                                        # Info string 17:
+0005ce        63 3a 2f 53 68 61 72 6b   data.str "c:/Shark3D/v5x0x6_t164x12u/shark3_labour/src/res/levelutil/actor/door.s3d_perch|44,6"
+              33 44 2f 76 35 78 30 78 
+              36 5f 74 31 36 34 78 31 
+              32 75 2f 73 68 61 72 6b 
+              33 5f 6c 61 62 6f 75 72 
+              2f 73 72 63 2f 72 65 73 
+              2f 6c 65 76 65 6c 75 74 
+              69 6c 2f 61 63 74 6f 72 
+              2f 64 6f 6f 72 2e 73 33 
+              64 5f 70 65 72 63 68 7c 
+              34 34 2c 36 00 
+                                        # Info string 18:
+000623        63 3a 2f 53 68 61 72 6b   data.str "c:/Shark3D/v5x0x6_t164x12u/shark3_labour/src/res/levelutil/actor/door.s3d_perch|52,6"
+              33 44 2f 76 35 78 30 78 
+              36 5f 74 31 36 34 78 31 
+              32 75 2f 73 68 61 72 6b 
+              33 5f 6c 61 62 6f 75 72 
+              2f 73 72 63 2f 72 65 73 
+              2f 6c 65 76 65 6c 75 74 
+              69 6c 2f 61 63 74 6f 72 
+              2f 64 6f 6f 72 2e 73 33 
+              64 5f 70 65 72 63 68 7c 
+              35 32 2c 36 00 
+                                        # Info string 19:
+000678        63 3a 2f 53 68 61 72 6b   data.str "c:/Shark3D/v5x0x6_t164x12u/shark3_labour/src/res/levelutil/actor/door.s3d_perch|60,6"
+              33 44 2f 76 35 78 30 78 
+              36 5f 74 31 36 34 78 31 
+              32 75 2f 73 68 61 72 6b 
+              33 5f 6c 61 62 6f 75 72 
+              2f 73 72 63 2f 72 65 73 
+              2f 6c 65 76 65 6c 75 74 
+              69 6c 2f 61 63 74 6f 72 
+              2f 64 6f 6f 72 2e 73 33 
+              64 5f 70 65 72 63 68 7c 
+              36 30 2c 36 00 
+                                        # Info string 20:
+0006cd        63 3a 2f 53 68 61 72 6b   data.str "c:/Shark3D/v5x0x6_t164x12u/shark3_labour/src/res/levelutil/actor/door.s3d_perch|61,17"
+              33 44 2f 76 35 78 30 78 
+              36 5f 74 31 36 34 78 31 
+              32 75 2f 73 68 61 72 6b 
+              33 5f 6c 61 62 6f 75 72 
+              2f 73 72 63 2f 72 65 73 
+              2f 6c 65 76 65 6c 75 74 
+              69 6c 2f 61 63 74 6f 72 
+              2f 64 6f 6f 72 2e 73 33 
+              64 5f 70 65 72 63 68 7c 
+              36 31 2c 31 37 00 
+                                        
+                                        # Float constant cnt:
+000723        80                        data.intcompact 0
+                                        
+                                        # String constant cnt:
+000724        91                        data.intcompact 17
+                                        # String constant 0:
+000725        69 6e 69 74 41 63 74 6f   data.str "initActor"
+              72 00 
+                                        # String constant 1:
+00072f        2d 76 00                  data.str "-v"
+                                        # String constant 2:
+000732        61 63 74 75 00            data.str "actu"
+                                        # String constant 3:
+000737        73 70 65 61 6b 65 72 00   data.str "speaker"
+                                        # String constant 4:
+00073f        66 69 6e 69 73 68 41 63   data.str "finishActor"
+              74 6f 72 00 
+                                        # String constant 5:
+00074b        6f 70 65 6e 00            data.str "open"
+                                        # String constant 6:
+000750        70 6c 61 79 5f 74 6f 5f   data.str "play_to_end"
+              65 6e 64 00 
+                                        # String constant 7:
+00075c        73 74 61 72 74 00         data.str "start"
+                                        # String constant 8:
+000762        67 65 74 5f 64 75 72 61   data.str "get_duration"
+              74 69 6f 6e 00 
+                                        # String constant 9:
+00076f        3e 66 00                  data.str ">f"
+                                        # String constant 10:
+000772        73 6f 75 6e 64 4f 66 66   data.str "soundOff"
+              00 
+                                        # String constant 11:
+00077b        63 6c 6f 73 65 00         data.str "close"
+                                        # String constant 12:
+000781        70 6c 61 79 5f 74 6f 5f   data.str "play_to_start"
+              73 74 61 72 74 00 
+                                        # String constant 13:
+00078f        65 6e 74 65 72 00         data.str "enter"
+                                        # String constant 14:
+000795        2d 76 3c 61 00            data.str "-v<a"
+                                        # String constant 15:
+00079a        6c 65 61 76 65 00         data.str "leave"
+                                        # String constant 16:
+0007a0        73 74 6f 70 00            data.str "stop"
+                                        
+                                        # Main info string:
+0007a5        80                        data.intcompact 0
+                                        
+                                        # Exported function cnt:
+0007a6        85                        data.intcompact 5
+                                        # Exported function "initActor", dynamic linkage "-v":
+0007a7        81                        data.intcompact 1
+0007a8        80                        data.intcompact 0
+0007a9        81                        data.intcompact 1
+0007aa        80                        data.labdist l10 l1
+                                        # Exported function "finishActor", dynamic linkage "-v":
+0007ab        86                        data.intcompact 6
+0007ac        84                        data.intcompact 4
+0007ad        81                        data.intcompact 1
+0007ae        94                        data.labdist l10 l2
+                                        # Exported function "enter", dynamic linkage "-v<a":
+0007af        91                        data.intcompact 17
+0007b0        8d                        data.intcompact 13
+0007b1        8e                        data.intcompact 14
+0007b2        00 d9                     data.labdist l10 l5
+                                        # Exported function "leave", dynamic linkage "-v<a":
+0007b4        92                        data.intcompact 18
+0007b5        8f                        data.intcompact 15
+0007b6        8e                        data.intcompact 14
+0007b7        00 f0                     data.labdist l10 l6
+                                        # Exported function "soundOff", dynamic linkage "-v":
+0007b9        93                        data.intcompact 19
+0007ba        8a                        data.intcompact 10
+0007bb        81                        data.intcompact 1
+0007bc        01 87                     data.labdist l10 l7
+                                        
+                                        # Script variable of type "i" cnt:
+0007be        81                        data.intcompact 1
+                                        # Script variable of type "i" entry 0:
+0007bf        6d 5f 69 6e 73 69 64 65   data.str "m_inside"
+              00 
+                                        # Script variable of type "f" cnt:
+0007c8        80                        data.intcompact 0
+                                        # Script variable of type "s" cnt:
+0007c9        80                        data.intcompact 0
+                                        # Script variable of type "o" cnt:
+0007ca        80                        data.intcompact 0
+                                        # Script variable of type "a" cnt:
+0007cb        82                        data.intcompact 2
+                                        # Script variable of type "a" entry 0:
+0007cc        6d 5f 61 63 74 75 00      data.str "m_actu"
+                                        # Script variable of type "a" entry 1:
+0007d3        6d 5f 73 70 65 61 6b 65   data.str "m_speaker"
+              72 00 
+                                        # Script variable of type "ir" cnt:
+0007dd        80                        data.intcompact 0
+                                        # Script variable of type "fr" cnt:
+0007de        80                        data.intcompact 0
+                                        # Script variable of type "sr" cnt:
+0007df        80                        data.intcompact 0
+                                        # Script variable of type "or" cnt:
+0007e0        80                        data.intcompact 0
+                                        # Script variable of type "ar" cnt:
+0007e1        80                        data.intcompact 0
+                                        
+                                        # Code size:
+0007e2        01 8f                     data.labdist l10 l11
+                                        
+                                        # Code:
+l10:
+                                        
+                                        # Function "initActor" of type "@void-", dynamic linkage "-v":
+l1:
+0007e4 000000 32                        null.i
+0007e5 000001 0a 80                     storescr.i 0
+0007e7 000003 7a 82                     const.s 2
+0007e9 000005 bc 82                     bi.getParamStr 2
+0007eb 000007 c4 83                     bi.findActor 3
+0007ed 000009 0e 80                     storescr.a 0
+0007ef 00000b 7a 83                     const.s 3
+0007f1 00000d bc 84                     bi.getParamStr 4
+0007f3 00000f c4 85                     bi.findActor 5
+0007f5 000011 0e 81                     storescr.a 1
+0007f7 000013 7f                        return
+                                        
+                                        # Function "finishActor" of type "@void-", dynamic linkage "-v":
+l2:
+0007f8 000014 7f                        return
+                                        
+                                        # Function "open" of type "@void-", dynamic linkage "":
+l3:
+0007f9 000015 29 81                     changeloc.f 1
+0007fb 000017 04 80                     loadscr.a 0
+0007fd 000019 7a 86                     const.s 6
+0007ff 00001b ca 88 81                  bi.a.dyncall 8 1
+000802 00001e 04 81                     loadscr.a 1
+000804 000020 7a 87                     const.s 7
+000806 000022 ca 89 81                  bi.a.dyncall 9 1
+000809 000025 04 80                     loadscr.a 0
+00080b 000027 7a 88                     const.s 8
+00080d 000029 ca 8a 89                  bi.a.dyncall 10 9
+000810 00002c 1f ff                     storeloc.f -1
+000812 00002e 7a 8a                     const.s 10
+000814 000030 15 ff                     loadloc.f -1
+000816 000032 c8 8b                     bi.evtAppoint 11
+000818 000034 29 ff                     changeloc.f -1
+00081a 000036 7f                        return
+                                        
+                                        # Function "close" of type "@void-", dynamic linkage "":
+l4:
+00081b 000037 29 81                     changeloc.f 1
+00081d 000039 04 80                     loadscr.a 0
+00081f 00003b 7a 8c                     const.s 12
+000821 00003d ca 8d 81                  bi.a.dyncall 13 1
+000824 000040 04 81                     loadscr.a 1
+000826 000042 7a 87                     const.s 7
+000828 000044 ca 8e 81                  bi.a.dyncall 14 1
+00082b 000047 04 80                     loadscr.a 0
+00082d 000049 7a 88                     const.s 8
+00082f 00004b ca 8f 89                  bi.a.dyncall 15 9
+000832 00004e 1f ff                     storeloc.f -1
+000834 000050 7a 8a                     const.s 10
+000836 000052 15 ff                     loadloc.f -1
+000838 000054 c8 90                     bi.evtAppoint 16
+00083a 000056 29 ff                     changeloc.f -1
+00083c 000058 7f                        return
+                                        
+                                        # Function "enter" of type "@void-<@actor", dynamic linkage "-v<a":
+l5:
+00083d 000059 2c 81                     changeloc.a 1
+00083f 00005b 22 ff                     storeloc.a -1
+000841 00005d 00 80                     loadscr.i 0
+000843 00005f 32                        null.i
+000844 000060 46                        equal.i
+000845 000061 7c 83                     jumpz l8
+000847 000063 7e 7f af                  call l3
+l8:
+00084a 000066 00 80                     loadscr.i 0
+00084c 000068 78 81                     const.i 1
+00084e 00006a 87                        bi.i.add
+00084f 00006b 0a 80                     storescr.i 0
+000851 00006d 2c ff                     changeloc.a -1
+000853 00006f 7f                        return
+                                        
+                                        # Function "leave" of type "@void-<@actor", dynamic linkage "-v<a":
+l6:
+000854 000070 2c 81                     changeloc.a 1
+000856 000072 22 ff                     storeloc.a -1
+000858 000074 00 80                     loadscr.i 0
+00085a 000076 78 81                     const.i 1
+00085c 000078 88                        bi.i.sub
+00085d 000079 0a 80                     storescr.i 0
+00085f 00007b 00 80                     loadscr.i 0
+000861 00007d 32                        null.i
+000862 00007e 46                        equal.i
+000863 00007f 7c 83                     jumpz l9
+000865 000081 7e 7f b3                  call l4
+l9:
+000868 000084 2c ff                     changeloc.a -1
+00086a 000086 7f                        return
+                                        
+                                        # Function "soundOff" of type "@void-", dynamic linkage "-v":
+l7:
+00086b 000087 04 81                     loadscr.a 1
+00086d 000089 7a 90                     const.s 16
+00086f 00008b ca 94 81                  bi.a.dyncall 20 1
+000872 00008e 7f                        return
+                                        
+                                        # End of assembly file.
+                                        
+l11:
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/tmp/res/level/model/skymodel.s3d_model_log
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/tmp/res/level/model/skymodel.s3d_model_log	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/tmp/res/level/model/skymodel.s3d_model_log	(revision 2453)
@@ -0,0 +1,43 @@
+// Machine-made Shark 3D Snake Text 2x0 Stream. Format: ascii.
+model_array
+{
+    name "box"
+    bound_min -50.0 -50.0 0.0
+    bound_max 50.0 50.0 100.0
+    texture_cnt 6
+    bone_cnt 0
+    variant_array
+    {
+        variant_idx 0
+        kind_pat "render|geo"
+        packet_max_vert_cnt 0
+        packet_max_tri_cnt 0
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "render"
+        optimized 1
+        closed 0
+        sealed 0
+        caulked 0
+        family_cnt 6
+        vert_cnt 24
+        vert_ess_cnt 24
+        tri_cnt 12
+        tri_ess_cnt 12
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 6
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 0
+        has_neigh 0
+        has_normal 1
+        has_tangentu 0
+        has_tangentv 0
+        has_coloralpha 0
+        tex_layer_cnt 1
+        tex_attr_cnt 1
+    }
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/tmp/res/level/model/bloom.s3d_model_log
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/tmp/res/level/model/bloom.s3d_model_log	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/tmp/res/level/model/bloom.s3d_model_log	(revision 2453)
@@ -0,0 +1,75 @@
+// Machine-made Shark 3D Snake Text 2x0 Stream. Format: ascii.
+model_array
+{
+    name "bloom"
+    bound_min -321.867 -321.867 0.0
+    bound_max 321.867 321.867 643.735
+    texture_cnt 0
+    bone_cnt 0
+    variant_array
+    {
+        variant_idx 0
+        kind_pat "render|geo"
+        packet_max_vert_cnt 0
+        packet_max_tri_cnt 0
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "geo" "render"
+        optimized 1
+        closed 0
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 24
+        vert_ess_cnt 24
+        tri_cnt 12
+        tri_ess_cnt 12
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 1
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 1
+        has_neigh 0
+        has_normal 1
+        has_tangentu 0
+        has_tangentv 0
+        has_coloralpha 0
+        tex_layer_cnt 0
+        tex_attr_cnt 0
+    }
+    {
+        variant_idx 1
+        kind_pat "sep_neigh"
+        packet_max_vert_cnt 200
+        packet_max_tri_cnt 200
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "shvol_occl"
+        optimized 1
+        closed 1
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 8
+        vert_ess_cnt 8
+        tri_cnt 12
+        tri_ess_cnt 12
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 1
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 0
+        has_neigh 1
+        has_normal 0
+        has_tangentu 0
+        has_tangentv 0
+        has_coloralpha 0
+        tex_layer_cnt 0
+        tex_attr_cnt 0
+    }
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/tmp/res/level/model/worldmodel.s3d_model_log
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/tmp/res/level/model/worldmodel.s3d_model_log	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/tmp/res/level/model/worldmodel.s3d_model_log	(revision 2453)
@@ -0,0 +1,1235 @@
+// Machine-made Shark 3D Snake Text 2x0 Stream. Format: ascii.
+model_array
+{
+    name "labourwalls"
+    bound_min -3.28954 -3.55913 -2.10916
+    bound_max 3.28954 3.55913 2.10916
+    texture_cnt 2
+    bone_cnt 0
+    variant_array
+    {
+        variant_idx 0
+        kind_pat "render|geo"
+        packet_max_vert_cnt 0
+        packet_max_tri_cnt 0
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "geo" "render"
+        optimized 1
+        closed 0
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 194
+        vert_ess_cnt 194
+        tri_cnt 92
+        tri_ess_cnt 92
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 1
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 1
+        has_neigh 0
+        has_normal 1
+        has_tangentu 1
+        has_tangentv 1
+        has_coloralpha 0
+        tex_layer_cnt 2
+        tex_attr_cnt 1
+    }
+    {
+        variant_idx 1
+        kind_pat "sep_neigh"
+        packet_max_vert_cnt 200
+        packet_max_tri_cnt 200
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "shvol_occl"
+        optimized 1
+        closed 1
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 48
+        vert_ess_cnt 48
+        tri_cnt 92
+        tri_ess_cnt 92
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 1
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 0
+        has_neigh 1
+        has_normal 0
+        has_tangentu 0
+        has_tangentv 0
+        has_coloralpha 0
+        tex_layer_cnt 0
+        tex_attr_cnt 0
+    }
+}
+{
+    name "redlamp"
+    bound_min -0.250405 -0.131169 -0.0647683
+    bound_max 0.250405 0.131169 0.0647684
+    texture_cnt 2
+    bone_cnt 0
+    variant_array
+    {
+        variant_idx 0
+        kind_pat "render|geo"
+        packet_max_vert_cnt 0
+        packet_max_tri_cnt 0
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "geo" "render"
+        optimized 1
+        closed 0
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 236
+        vert_ess_cnt 236
+        tri_cnt 220
+        tri_ess_cnt 220
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 1
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 1
+        has_neigh 0
+        has_normal 1
+        has_tangentu 1
+        has_tangentv 1
+        has_coloralpha 0
+        tex_layer_cnt 2
+        tex_attr_cnt 1
+    }
+    {
+        variant_idx 1
+        kind_pat "sep_neigh"
+        packet_max_vert_cnt 200
+        packet_max_tri_cnt 200
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "shvol_occl"
+        optimized 1
+        closed 1
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 144
+        vert_ess_cnt 131
+        tri_cnt 248
+        tri_ess_cnt 220
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 2
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 0
+        has_neigh 1
+        has_normal 0
+        has_tangentu 0
+        has_tangentv 0
+        has_coloralpha 0
+        tex_layer_cnt 0
+        tex_attr_cnt 0
+    }
+}
+{
+    name "self"
+    bound_min -0.265709 -0.77935 -1.02537
+    bound_max 0.26571 0.77935 1.02537
+    texture_cnt 2
+    bone_cnt 0
+    variant_array
+    {
+        variant_idx 0
+        kind_pat "render|geo"
+        packet_max_vert_cnt 0
+        packet_max_tri_cnt 0
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "geo" "render"
+        optimized 1
+        closed 0
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 232
+        vert_ess_cnt 232
+        tri_cnt 128
+        tri_ess_cnt 128
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 1
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 1
+        has_neigh 0
+        has_normal 1
+        has_tangentu 1
+        has_tangentv 1
+        has_coloralpha 0
+        tex_layer_cnt 2
+        tex_attr_cnt 1
+    }
+    {
+        variant_idx 1
+        kind_pat "sep_neigh"
+        packet_max_vert_cnt 200
+        packet_max_tri_cnt 200
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "shvol_occl"
+        optimized 1
+        closed 1
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 80
+        vert_ess_cnt 80
+        tri_cnt 128
+        tri_ess_cnt 128
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 1
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 0
+        has_neigh 1
+        has_normal 0
+        has_tangentu 0
+        has_tangentv 0
+        has_coloralpha 0
+        tex_layer_cnt 0
+        tex_attr_cnt 0
+    }
+}
+{
+    name "self2"
+    bound_min -1.22198 -1.28629 -0.26571
+    bound_max 1.22198 1.28629 0.26571
+    texture_cnt 2
+    bone_cnt 0
+    variant_array
+    {
+        variant_idx 0
+        kind_pat "render|geo"
+        packet_max_vert_cnt 0
+        packet_max_tri_cnt 0
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "geo" "render"
+        optimized 1
+        closed 0
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 232
+        vert_ess_cnt 232
+        tri_cnt 128
+        tri_ess_cnt 128
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 1
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 1
+        has_neigh 0
+        has_normal 1
+        has_tangentu 1
+        has_tangentv 1
+        has_coloralpha 0
+        tex_layer_cnt 2
+        tex_attr_cnt 1
+    }
+    {
+        variant_idx 1
+        kind_pat "sep_neigh"
+        packet_max_vert_cnt 200
+        packet_max_tri_cnt 200
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "shvol_occl"
+        optimized 1
+        closed 1
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 80
+        vert_ess_cnt 80
+        tri_cnt 128
+        tri_ess_cnt 128
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 1
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 0
+        has_neigh 1
+        has_normal 0
+        has_tangentu 0
+        has_tangentv 0
+        has_coloralpha 0
+        tex_layer_cnt 0
+        tex_attr_cnt 0
+    }
+}
+{
+    name "table"
+    bound_min -0.695347 -0.876044 -0.52957
+    bound_max 0.695347 0.876044 0.52957
+    texture_cnt 2
+    bone_cnt 0
+    variant_array
+    {
+        variant_idx 0
+        kind_pat "render|geo"
+        packet_max_vert_cnt 0
+        packet_max_tri_cnt 0
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "geo" "render"
+        optimized 1
+        closed 0
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 168
+        vert_ess_cnt 168
+        tri_cnt 84
+        tri_ess_cnt 84
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 1
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 1
+        has_neigh 0
+        has_normal 1
+        has_tangentu 1
+        has_tangentv 1
+        has_coloralpha 0
+        tex_layer_cnt 2
+        tex_attr_cnt 1
+    }
+    {
+        variant_idx 1
+        kind_pat "sep_neigh"
+        packet_max_vert_cnt 200
+        packet_max_tri_cnt 200
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "shvol_occl"
+        optimized 1
+        closed 1
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 56
+        vert_ess_cnt 56
+        tri_cnt 84
+        tri_ess_cnt 84
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 1
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 0
+        has_neigh 1
+        has_normal 0
+        has_tangentu 0
+        has_tangentv 0
+        has_coloralpha 0
+        tex_layer_cnt 0
+        tex_attr_cnt 0
+    }
+}
+{
+    name "pipe"
+    bound_min -1.68296 -3.55198 -1.67812
+    bound_max 1.68296 3.55198 1.67812
+    texture_cnt 2
+    bone_cnt 0
+    variant_array
+    {
+        variant_idx 0
+        kind_pat "render|geo"
+        packet_max_vert_cnt 0
+        packet_max_tri_cnt 0
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "geo" "render"
+        optimized 1
+        closed 0
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 312
+        vert_ess_cnt 312
+        tri_cnt 548
+        tri_ess_cnt 548
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 1
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 1
+        has_neigh 0
+        has_normal 1
+        has_tangentu 1
+        has_tangentv 1
+        has_coloralpha 0
+        tex_layer_cnt 2
+        tex_attr_cnt 1
+    }
+    {
+        variant_idx 1
+        kind_pat "sep_neigh"
+        packet_max_vert_cnt 200
+        packet_max_tri_cnt 200
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "shvol_occl"
+        optimized 1
+        closed 0
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 352
+        vert_ess_cnt 323
+        tri_cnt 608
+        tri_ess_cnt 548
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 4
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 0
+        has_neigh 1
+        has_normal 0
+        has_tangentu 0
+        has_tangentv 0
+        has_coloralpha 0
+        tex_layer_cnt 0
+        tex_attr_cnt 0
+    }
+}
+{
+    name "pipe3"
+    bound_min -1.67567 -3.55198 -1.67784
+    bound_max 1.67567 3.55198 1.67784
+    texture_cnt 2
+    bone_cnt 0
+    variant_array
+    {
+        variant_idx 0
+        kind_pat "render|geo"
+        packet_max_vert_cnt 0
+        packet_max_tri_cnt 0
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "geo" "render"
+        optimized 1
+        closed 0
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 302
+        vert_ess_cnt 302
+        tri_cnt 528
+        tri_ess_cnt 528
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 1
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 1
+        has_neigh 0
+        has_normal 1
+        has_tangentu 1
+        has_tangentv 1
+        has_coloralpha 0
+        tex_layer_cnt 2
+        tex_attr_cnt 1
+    }
+    {
+        variant_idx 1
+        kind_pat "sep_neigh"
+        packet_max_vert_cnt 200
+        packet_max_tri_cnt 200
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "shvol_occl"
+        optimized 1
+        closed 0
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 370
+        vert_ess_cnt 330
+        tri_cnt 615
+        tri_ess_cnt 528
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 4
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 0
+        has_neigh 1
+        has_normal 0
+        has_tangentu 0
+        has_tangentv 0
+        has_coloralpha 0
+        tex_layer_cnt 0
+        tex_attr_cnt 0
+    }
+}
+{
+    name "bottle"
+    bound_min -0.356099 -0.356099 -0.373537
+    bound_max 0.356099 0.356099 0.373537
+    texture_cnt 2
+    bone_cnt 0
+    variant_array
+    {
+        variant_idx 0
+        kind_pat "render|geo"
+        packet_max_vert_cnt 0
+        packet_max_tri_cnt 0
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "geo" "render"
+        optimized 1
+        closed 0
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 275
+        vert_ess_cnt 275
+        tri_cnt 440
+        tri_ess_cnt 440
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 1
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 1
+        has_neigh 0
+        has_normal 1
+        has_tangentu 1
+        has_tangentv 1
+        has_coloralpha 0
+        tex_layer_cnt 2
+        tex_attr_cnt 1
+    }
+    {
+        variant_idx 1
+        kind_pat "sep_neigh"
+        packet_max_vert_cnt 200
+        packet_max_tri_cnt 200
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "shvol_occl"
+        optimized 1
+        closed 1
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 315
+        vert_ess_cnt 278
+        tri_cnt 521
+        tri_ess_cnt 440
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 3
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 0
+        has_neigh 1
+        has_normal 0
+        has_tangentu 0
+        has_tangentv 0
+        has_coloralpha 0
+        tex_layer_cnt 0
+        tex_attr_cnt 0
+    }
+}
+{
+    name "container"
+    bound_min -1.22875 -1.00593 -1.10637
+    bound_max 1.22875 1.00593 1.10637
+    texture_cnt 1
+    bone_cnt 0
+    variant_array
+    {
+        variant_idx 0
+        kind_pat "render|geo"
+        packet_max_vert_cnt 0
+        packet_max_tri_cnt 0
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "geo" "render"
+        optimized 1
+        closed 0
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 342
+        vert_ess_cnt 342
+        tri_cnt 440
+        tri_ess_cnt 440
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 1
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 1
+        has_neigh 0
+        has_normal 1
+        has_tangentu 1
+        has_tangentv 1
+        has_coloralpha 0
+        tex_layer_cnt 2
+        tex_attr_cnt 1
+    }
+    {
+        variant_idx 1
+        kind_pat "sep_neigh"
+        packet_max_vert_cnt 200
+        packet_max_tri_cnt 200
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "shvol_occl"
+        optimized 1
+        closed 1
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 340
+        vert_ess_cnt 292
+        tri_cnt 543
+        tri_ess_cnt 440
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 3
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 0
+        has_neigh 1
+        has_normal 0
+        has_tangentu 0
+        has_tangentv 0
+        has_coloralpha 0
+        tex_layer_cnt 0
+        tex_attr_cnt 0
+    }
+}
+{
+    name "board"
+    bound_min -5.10216e-005 -1.89232 -1.04055
+    bound_max -5.10216e-005 1.89232 1.04055
+    texture_cnt 2
+    bone_cnt 0
+    variant_array
+    {
+        variant_idx 0
+        kind_pat "render|geo"
+        packet_max_vert_cnt 0
+        packet_max_tri_cnt 0
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "geo" "render"
+        optimized 1
+        closed 0
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 4
+        vert_ess_cnt 4
+        tri_cnt 2
+        tri_ess_cnt 2
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 1
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 1
+        has_neigh 0
+        has_normal 1
+        has_tangentu 1
+        has_tangentv 1
+        has_coloralpha 0
+        tex_layer_cnt 2
+        tex_attr_cnt 1
+    }
+    {
+        variant_idx 1
+        kind_pat "sep_neigh"
+        packet_max_vert_cnt 200
+        packet_max_tri_cnt 200
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "shvol_occl"
+        optimized 1
+        closed 0
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 4
+        vert_ess_cnt 4
+        tri_cnt 2
+        tri_ess_cnt 2
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 1
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 0
+        has_neigh 1
+        has_normal 0
+        has_tangentu 0
+        has_tangentv 0
+        has_coloralpha 0
+        tex_layer_cnt 0
+        tex_attr_cnt 0
+    }
+}
+{
+    name "boardborder"
+    bound_min -0.0603018 -1.99838 -1.12462
+    bound_max 0.0603018 1.99838 1.12462
+    texture_cnt 1
+    bone_cnt 0
+    variant_array
+    {
+        variant_idx 0
+        kind_pat "render|geo"
+        packet_max_vert_cnt 0
+        packet_max_tri_cnt 0
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "geo" "render"
+        optimized 1
+        closed 0
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 64
+        vert_ess_cnt 64
+        tri_cnt 48
+        tri_ess_cnt 48
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 1
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 1
+        has_neigh 0
+        has_normal 1
+        has_tangentu 1
+        has_tangentv 1
+        has_coloralpha 0
+        tex_layer_cnt 2
+        tex_attr_cnt 1
+    }
+    {
+        variant_idx 1
+        kind_pat "sep_neigh"
+        packet_max_vert_cnt 200
+        packet_max_tri_cnt 200
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "shvol_occl"
+        optimized 1
+        closed 1
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 24
+        vert_ess_cnt 24
+        tri_cnt 48
+        tri_ess_cnt 48
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 1
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 0
+        has_neigh 1
+        has_normal 0
+        has_tangentu 0
+        has_tangentv 0
+        has_coloralpha 0
+        tex_layer_cnt 0
+        tex_attr_cnt 0
+    }
+}
+{
+    name "pipe04"
+    bound_min -1.67567 -3.55198 -1.67784
+    bound_max 1.67567 3.55198 1.67784
+    texture_cnt 2
+    bone_cnt 0
+    variant_array
+    {
+        variant_idx 0
+        kind_pat "render|geo"
+        packet_max_vert_cnt 0
+        packet_max_tri_cnt 0
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "geo" "render"
+        optimized 1
+        closed 0
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 302
+        vert_ess_cnt 302
+        tri_cnt 528
+        tri_ess_cnt 528
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 1
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 1
+        has_neigh 0
+        has_normal 1
+        has_tangentu 1
+        has_tangentv 1
+        has_coloralpha 0
+        tex_layer_cnt 2
+        tex_attr_cnt 1
+    }
+    {
+        variant_idx 1
+        kind_pat "sep_neigh"
+        packet_max_vert_cnt 200
+        packet_max_tri_cnt 200
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "shvol_occl"
+        optimized 1
+        closed 0
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 370
+        vert_ess_cnt 330
+        tri_cnt 615
+        tri_ess_cnt 528
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 4
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 0
+        has_neigh 1
+        has_normal 0
+        has_tangentu 0
+        has_tangentv 0
+        has_coloralpha 0
+        tex_layer_cnt 0
+        tex_attr_cnt 0
+    }
+}
+{
+    name "lamphanger"
+    bound_min -0.102537 -0.102537 -0.0512681
+    bound_max 0.102537 0.102537 0.0512686
+    texture_cnt 2
+    bone_cnt 0
+    variant_array
+    {
+        variant_idx 0
+        kind_pat "render|geo"
+        packet_max_vert_cnt 0
+        packet_max_tri_cnt 0
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "geo" "render"
+        optimized 1
+        closed 0
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 24
+        vert_ess_cnt 24
+        tri_cnt 12
+        tri_ess_cnt 12
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 1
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 1
+        has_neigh 0
+        has_normal 1
+        has_tangentu 1
+        has_tangentv 1
+        has_coloralpha 0
+        tex_layer_cnt 2
+        tex_attr_cnt 1
+    }
+    {
+        variant_idx 1
+        kind_pat "sep_neigh"
+        packet_max_vert_cnt 200
+        packet_max_tri_cnt 200
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "shvol_occl"
+        optimized 1
+        closed 1
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 8
+        vert_ess_cnt 8
+        tri_cnt 12
+        tri_ess_cnt 12
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 1
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 0
+        has_neigh 1
+        has_normal 0
+        has_tangentu 0
+        has_tangentv 0
+        has_coloralpha 0
+        tex_layer_cnt 0
+        tex_attr_cnt 0
+    }
+}
+{
+    name "lampbura"
+    bound_min -0.36293 -0.36293 -0.0708621
+    bound_max 0.36293 0.36293 0.0708625
+    texture_cnt 2
+    bone_cnt 0
+    variant_array
+    {
+        variant_idx 0
+        kind_pat "render|geo"
+        packet_max_vert_cnt 0
+        packet_max_tri_cnt 0
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "geo" "render"
+        optimized 1
+        closed 0
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 123
+        vert_ess_cnt 123
+        tri_cnt 80
+        tri_ess_cnt 80
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 1
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 1
+        has_neigh 0
+        has_normal 1
+        has_tangentu 1
+        has_tangentv 1
+        has_coloralpha 0
+        tex_layer_cnt 2
+        tex_attr_cnt 1
+    }
+    {
+        variant_idx 1
+        kind_pat "sep_neigh"
+        packet_max_vert_cnt 200
+        packet_max_tri_cnt 200
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "shvol_occl"
+        optimized 1
+        closed 1
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 42
+        vert_ess_cnt 42
+        tri_cnt 80
+        tri_ess_cnt 80
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 1
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 0
+        has_neigh 1
+        has_normal 0
+        has_tangentu 0
+        has_tangentv 0
+        has_coloralpha 0
+        tex_layer_cnt 0
+        tex_attr_cnt 0
+    }
+}
+{
+    name "bulb"
+    bound_min -0.0839971 -0.0839971 -0.0839972
+    bound_max 0.0839971 0.0839971 0.0839971
+    texture_cnt 1
+    bone_cnt 0
+    variant_array
+    {
+        variant_idx 0
+        kind_pat "render|geo"
+        packet_max_vert_cnt 0
+        packet_max_tri_cnt 0
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "geo" "render"
+        optimized 1
+        closed 0
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 382
+        vert_ess_cnt 382
+        tri_cnt 760
+        tri_ess_cnt 760
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 1
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 1
+        has_neigh 0
+        has_normal 1
+        has_tangentu 0
+        has_tangentv 0
+        has_coloralpha 1
+        tex_layer_cnt 1
+        tex_attr_cnt 1
+    }
+}
+{
+    name "lampwire"
+    bound_min -0.00512683 -0.00512682 -0.512684
+    bound_max 0.00512683 0.00512685 0.512684
+    texture_cnt 1
+    bone_cnt 0
+    variant_array
+    {
+        variant_idx 0
+        kind_pat "render|geo"
+        packet_max_vert_cnt 0
+        packet_max_tri_cnt 0
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "geo" "render"
+        optimized 1
+        closed 0
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 24
+        vert_ess_cnt 24
+        tri_cnt 12
+        tri_ess_cnt 12
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 1
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 1
+        has_neigh 0
+        has_normal 1
+        has_tangentu 1
+        has_tangentv 1
+        has_coloralpha 0
+        tex_layer_cnt 2
+        tex_attr_cnt 1
+    }
+    {
+        variant_idx 1
+        kind_pat "sep_neigh"
+        packet_max_vert_cnt 200
+        packet_max_tri_cnt 200
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "shvol_occl"
+        optimized 1
+        closed 1
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 8
+        vert_ess_cnt 8
+        tri_cnt 12
+        tri_ess_cnt 12
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 1
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 0
+        has_neigh 1
+        has_normal 0
+        has_tangentu 0
+        has_tangentv 0
+        has_coloralpha 0
+        tex_layer_cnt 0
+        tex_attr_cnt 0
+    }
+}
+{
+    name "head_group"
+    bound_min -0.286418 -0.34622 -0.436515
+    bound_max 0.290669 0.334447 0.436515
+    texture_cnt 0
+    bone_cnt 0
+    variant_array
+    {
+        variant_idx 0
+        kind_pat "render|geo"
+        packet_max_vert_cnt 0
+        packet_max_tri_cnt 0
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "geo"
+        optimized 1
+        closed 0
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 24
+        vert_ess_cnt 24
+        tri_cnt 12
+        tri_ess_cnt 12
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 1
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 1
+        has_neigh 0
+        has_normal 1
+        has_tangentu 0
+        has_tangentv 0
+        has_coloralpha 0
+        tex_layer_cnt 0
+        tex_attr_cnt 0
+    }
+}
+{
+    name "head"
+    bound_min -0.28564 -0.426236 -0.358122
+    bound_max 0.252187 0.436978 0.360846
+    texture_cnt 2
+    bone_cnt 0
+    variant_array
+    {
+        variant_idx 0
+        kind_pat "render|geo"
+        packet_max_vert_cnt 0
+        packet_max_tri_cnt 0
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "render"
+        optimized 1
+        closed 0
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 1171
+        vert_ess_cnt 1171
+        tri_cnt 1374
+        tri_ess_cnt 1374
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 1
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 0
+        has_neigh 0
+        has_normal 1
+        has_tangentu 1
+        has_tangentv 1
+        has_coloralpha 0
+        tex_layer_cnt 2
+        tex_attr_cnt 1
+    }
+    {
+        variant_idx 1
+        kind_pat "sep_neigh"
+        packet_max_vert_cnt 200
+        packet_max_tri_cnt 200
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "shvol_occl"
+        optimized 1
+        closed 1
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 1125
+        vert_ess_cnt 914
+        tri_cnt 1722
+        tri_ess_cnt 1374
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 9
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 0
+        has_neigh 1
+        has_normal 0
+        has_tangentu 0
+        has_tangentv 0
+        has_coloralpha 0
+        tex_layer_cnt 0
+        tex_attr_cnt 0
+    }
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/tmp/res/level/model/playermodel.s3d_model_log
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/tmp/res/level/model/playermodel.s3d_model_log	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/tmp/res/level/model/playermodel.s3d_model_log	(revision 2453)
@@ -0,0 +1,43 @@
+// Machine-made Shark 3D Snake Text 2x0 Stream. Format: ascii.
+model_array
+{
+    name "scene_root"
+    bound_min 3.40282e+038 3.40282e+038 3.40282e+038
+    bound_max -3.40282e+038 -3.40282e+038 -3.40282e+038
+    texture_cnt 0
+    bone_cnt 0
+    variant_array
+    {
+        variant_idx 0
+        kind_pat "render|geo"
+        packet_max_vert_cnt 0
+        packet_max_tri_cnt 0
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "geo"
+        optimized 1
+        closed 0
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 0
+        vert_ess_cnt 0
+        tri_cnt 0
+        tri_ess_cnt 0
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 0
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 1
+        has_neigh 0
+        has_normal 0
+        has_tangentu 0
+        has_tangentv 0
+        has_coloralpha 0
+        tex_layer_cnt 0
+        tex_attr_cnt 0
+    }
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/tmp/res/client/model/displaymodel.s3d_model_log
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/tmp/res/client/model/displaymodel.s3d_model_log	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/tmp/res/client/model/displaymodel.s3d_model_log	(revision 2453)
@@ -0,0 +1,123 @@
+// Machine-made Shark 3D Snake Text 2x0 Stream. Format: ascii.
+model_array
+{
+    name "logo"
+    bound_min -0.1 -0.1 -5.68387e-016
+    bound_max 0.1 0.1 5.68387e-016
+    texture_cnt 1
+    bone_cnt 0
+    variant_array
+    {
+        variant_idx 0
+        kind_pat "render|geo"
+        packet_max_vert_cnt 0
+        packet_max_tri_cnt 0
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "render"
+        optimized 1
+        closed 0
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 4
+        vert_ess_cnt 4
+        tri_cnt 2
+        tri_ess_cnt 2
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 1
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 0
+        has_neigh 0
+        has_normal 1
+        has_tangentu 0
+        has_tangentv 0
+        has_coloralpha 0
+        tex_layer_cnt 1
+        tex_attr_cnt 1
+    }
+}
+{
+    name "loading"
+    bound_min -0.4 -0.1 -6.05005e-015
+    bound_max 0.4 0.1 6.05005e-015
+    texture_cnt 1
+    bone_cnt 0
+    variant_array
+    {
+        variant_idx 0
+        kind_pat "render|geo"
+        packet_max_vert_cnt 0
+        packet_max_tri_cnt 0
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "render"
+        optimized 1
+        closed 0
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 4
+        vert_ess_cnt 4
+        tri_cnt 2
+        tri_ess_cnt 2
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 1
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 0
+        has_neigh 0
+        has_normal 1
+        has_tangentu 0
+        has_tangentv 0
+        has_coloralpha 0
+        tex_layer_cnt 1
+        tex_attr_cnt 1
+    }
+}
+{
+    name "saving"
+    bound_min -0.4 -0.1 -2.67472e-015
+    bound_max 0.4 0.1 2.67472e-015
+    texture_cnt 1
+    bone_cnt 0
+    variant_array
+    {
+        variant_idx 0
+        kind_pat "render|geo"
+        packet_max_vert_cnt 0
+        packet_max_tri_cnt 0
+        packet_max_bone_cnt 32
+        prec 0.0
+        usage "render"
+        optimized 1
+        closed 0
+        sealed 0
+        caulked 0
+        family_cnt 1
+        vert_cnt 4
+        vert_ess_cnt 4
+        tri_cnt 2
+        tri_ess_cnt 2
+        bone_idx_cnt 0
+        bone_idx_ess_cnt 0
+        packet_cnt 1
+        key_cnt 1
+        has_bones 0
+        has_bone_subscr 0
+        has_opp 0
+        has_neigh 0
+        has_normal 1
+        has_tangentu 0
+        has_tangentv 0
+        has_coloralpha 0
+        tex_layer_cnt 1
+        tex_attr_cnt 1
+    }
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_max_shadermgr.cfg
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_max_shadermgr.cfg	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_max_shadermgr.cfg	(revision 2453)
@@ -0,0 +1,15 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+src_dir "src/res/"
+bin_dir "bin/res/"
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_pack.bat
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_pack.bat	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_pack.bat	(revision 2453)
@@ -0,0 +1,15 @@
+setlocal
+call win32_env.bat
+
+set JOURNAL_PATH=packfile.s3d_packjournal
+set PACK_PATH=packfile.s3d_pack
+set COLLECT_PATH=bin\res
+set COLLECT_PAT=!.sconsign
+
+set JOURNAL_PARAM=
+if exist %JOURNAL_PATH% set JOURNAL_PARAM=-journal %JOURNAL_PATH%
+
+set BINDIR=%S3D_SDKDIR%\bin\win32_vc7x1\%S3D_RUNCFG%
+set PACKRES="%BINDIR%\shark3d_tool_packres.exe"
+%PACKRES% %COLLECT_PATH% %COLLECT_PAT% %PACK_PATH% 4096 %JOURNAL_PARAM%
+@if errorlevel 1 echo shark3d_error
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_editor.cfg
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_editor.cfg	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_editor.cfg	(revision 2453)
@@ -0,0 +1,233 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+modules
+{
+    name "drv_stdres"
+    path "shark3d_drv_stdres.dll"
+}
+{
+    name "gui_stdilk"
+    path "shark3d_gui_stdilk.dll"
+}
+{
+    name "gui_stdnode"
+    path "shark3d_gui_stdnode.dll"
+}
+{
+    name "gui_stdedit"
+    path "shark3d_gui_stdedit.dll"
+}
+{
+    name "gui_stdprop"
+    path "shark3d_gui_stdprop.dll"
+}
+{
+    name "gui_actor"
+    path "shark3d_gui_actor.dll"
+}
+
+update_period 0.01
+
+msg_eval
+{
+    msg_output_target_note "editor_log"
+    msg_output_target_error "editor_error"
+}
+
+resmgr 
+{
+    ident "drv_stdres.resmgr_dispatch"
+    param 
+    {
+        env "env"
+        log_enabled 0
+        entry_array
+        {
+            prefix ""
+            ident "drv_stdres.resmgr_file"
+            param
+            {
+                env "env"
+                // Prefix added to the resource name for infos and errors:
+                name_prefix ""
+                // Location to load the files from:
+                ref_dir "[homedir]"
+                // Convertor for the ref_dir, for replacing placeholders.
+                ref_dir_conv "path_conv"
+                // Don't allow resource names to start with ".." or "/":
+                allow_any_path 0
+                // Case sensitive file name on Win32 platform.
+                // Should be enabled to avoid problems
+                // with non-Win32 platforms, packfiles or DRU.
+                non_strict_path 1
+                resinfo_uses_path 1
+                // Cache size not too large to avoid stuttering:
+                file_cache_size 4096
+                // Log all file accesses:
+                log_enabled 1
+            }
+        }
+        {
+            prefix "images:"
+            ident "drv_stdres.resmgr_file"
+            param
+            {
+                env "env"
+                // Prefix added to the resource name for infos and errors:
+                name_prefix ""
+                // Location to load the files from:
+                ref_dir "[appdir]../../../external/"
+                // Convertor for the ref_dir, for replacing placeholders.
+                ref_dir_conv "path_conv"
+                // Don't allow resource names to start with ".." or "/":
+                allow_any_path 0
+                // Case sensitive file name on Win32 platform.
+                // Should be enabled to avoid problems
+                // with non-Win32 platforms, packfiles or DRU.
+                non_strict_path 1
+                resinfo_uses_path 1
+                // Cache size not too large to avoid stuttering:
+                file_cache_size 4096
+                // Log all file accesses:
+                log_enabled 1
+            }
+        }
+        {
+            prefix "help:"
+            ident "drv_stdres.resmgr_file"
+            param
+            {
+                env "env"
+                // Prefix added to the resource name for infos and errors:
+                name_prefix ""
+                // Location to load the files from:
+                ref_dir "[appdir]../../../doc/"
+                // Convertor for the ref_dir, for replacing placeholders.
+                ref_dir_conv "path_conv"
+                // Don't allow resource names to start with ".." or "/":
+                allow_any_path 0
+                // Case sensitive file name on Win32 platform.
+                // Should be enabled to avoid problems
+                // with non-Win32 platforms, packfiles or DRU.
+                non_strict_path 1
+                resinfo_uses_path 1
+                // Cache size not too large to avoid stuttering:
+                file_cache_size 4096
+                // Log all file accesses:
+                log_enabled 1
+            }
+        }
+        {
+            prefix "cfg:"
+            ident "drv_stdres.resmgr_file"
+            param
+            {
+                env "env"
+                // Prefix added to the resource name for infos and errors:
+                name_prefix ""
+                // Location to load the files from:
+                ref_dir "[appdir]../../../src/gui/cfg"
+                // Convertor for the ref_dir, for replacing placeholders.
+                ref_dir_conv "path_conv"
+                // Don't allow resource names to start with ".." or "/":
+                allow_any_path 1
+                // Case sensitive file name on Win32 platform.
+                // Should be enabled to avoid problems
+                // with non-Win32 platforms, packfiles or DRU.
+                non_strict_path 1
+                resinfo_uses_path 1
+                // Cache size not too large to avoid stuttering:
+                file_cache_size 4096
+                // Log all file accesses:
+                log_enabled 1
+            }
+        }
+    }        
+}
+
+res
+{
+    str_table_name "cfg:strtable.cfg"
+    param_table_name "cfg:paramtable.cfg"
+    help_icon "images:icons/16x16/helpbutton.png"
+    help_start "help:index.html"
+    cfg_show_templ_ident "launch_templ_text"
+}
+output
+{
+    name_array 
+        "editor_log"
+        "editor_error"
+        "tool" 
+        "engine_log" 
+        "engine_error" 
+    label_array 
+        "Editor log ([linecnt] lines)" 
+        "Editor errors ([linecnt] lines)"
+        "Tools ([linecnt] lines)" 
+        "Engine log ([linecnt] lines)" 
+        "Current engine errors ([linecnt] lines)"
+} 
+update
+{
+    pending_delay 0.1
+    res_head "comres."
+    com_buf_size 1000000 // Only needed if not using a local server
+    connect_addrport "127.0.0.1:33302"
+    res_targets_cfg "res_targets.cfg"
+}
+tool
+{
+    // If a line matches this pattern, it is considered as error.
+    error_pattern "*shark3d_error*"
+    run_window_name "Shark 3D"
+    output_target_run_normal "tool"
+    output_target_run_error "tool"
+    output_target_res_make_normal "tool"
+    output_target_res_make_error "tool"
+    output_target_res_clear_normal "tool"
+    output_target_res_clear_error "tool"
+
+    app_run "win32_run.bat"
+    app_make "win32_res_make.bat"
+    app_maketarget "win32_res_maketarget.bat [target]"
+    app_clear "win32_res_clear.bat"
+}
+comserv
+{
+    // As larger as faster updates of large resources:
+    com_buf_size 1000000 
+    timeout 60.0
+    listen_addrport ":33302"
+}
+msglog
+{
+    output_target_note "engine_log"
+    output_target_error "engine_error"
+    com_buf_size 0
+    connect_addrport "127.0.0.1:33302"
+    sic_pat "Sic:*"
+}
+proj
+{
+    icon_default "images:icons/16x16/help.png"
+    root "cfg:proj_root.cfg"
+    foreign_jump_templ_ident "launch_templ_text"
+}
+filewatch
+{
+    src_dir "src/res/"
+    bin_dir "bin/res/"
+    pat "!(*.$$$|*.svn|*.svn/*|*.scons|*.sconsign)"
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/universe/actor/setting.s3d_actor_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/universe/actor/setting.s3d_actor_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/universe/actor/setting.s3d_actor_run	(revision 2453)
@@ -0,0 +1,222 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+actor_ident "kit_base.group"
+actor_param
+{
+    // Delegate action calls to the children.
+    active 1
+    child_array
+    {
+        // Dispatcher handling messages for the level root.            
+        ident "kit_base.dispatch"
+        param
+        {
+            name "dispatch_export"
+            entry_array
+            {
+                cmds "rawproduce_player"
+                targets "player_rawproducer"
+                newcmd "produce"
+            }
+            {
+                cmds "find_player"
+                targets "player_set"
+                newcmd "search_noinform"
+            }
+            {
+                cmds "net_traverse"
+                targets 
+                    "level_extern"
+                newcmd "traverse"
+            }
+            {
+                cmds "store_pre"
+                targets "player_set"
+            }
+            {
+                cmds "goto"
+                    "goto_level0" "goto_level1" 
+                    "goto_level2" "goto_level3" 
+                    "goto_level4" "goto_level5" 
+                    "goto_level6" "goto_level7" 
+                    "goto_level8" "goto_level9" 
+                    "goto_level10" "goto_level11" 
+                    "goto_level12" "goto_level13" 
+                    "goto_level14" "goto_level15" 
+                    "goto_level16" "goto_level17" 
+                    "goto_level18" "goto_level19" 
+                    "goto_level20" "goto_level21" 
+                targets "levelmgr"
+            }
+        }
+    }
+    {
+        ident "kit_base.dispatch"
+        param
+        {
+            name "dispatch"
+            entry_array
+            {
+                cmds 
+                    "notice_level_load_pre"
+                    "notice_level_load_post"
+                targets "outside"
+            }
+        }
+    }
+    {
+        // Stub object for the cfg actor.
+        // Delegates the commands to the real cfg actor 
+        // outside the universe.
+        ident "kit_base.dispatch"
+        param
+        {
+            name "cfg"
+            entry_array
+            {
+                cmds "access_int_info"
+                targets "outside"
+                newcmd "cfg_access_int_info"
+            }
+            {
+                cmds "access_float_info"
+                targets "outside"
+                newcmd "cfg_access_float_info"
+            }
+            {
+                cmds "access_str_info"
+                targets "outside"
+                newcmd "cfg_access_str_info"
+            }
+            {
+                cmds "access_chunk_info"
+                targets "outside"
+                newcmd "cfg_access_chunk_info"
+            }
+        }
+    }
+    {
+        // Stub object for the cfg actor.
+        // Delegates the commands to the real cfg actor 
+        // outside the universe.
+        ident "kit_base.dispatch"
+        param
+        {
+            name "setting_cfg"
+            entry_array
+            {
+                cmds "access_int_info"
+                targets "outside"
+                newcmd "universe_cfg_access_int_info"
+            }
+            {
+                cmds "access_float_info"
+                targets "outside"
+                newcmd "universe_cfg_access_float_info"
+            }
+            {
+                cmds "access_str_info"
+                targets "outside"
+                newcmd "universe_cfg_access_str_info"
+            }
+            {
+                cmds "access_chunk_info"
+                targets "outside"
+                newcmd "universe_cfg_access_chunk_info"
+            }
+        }
+    }
+    {
+        ident "kit_base.env"
+        param
+        {
+            name "env"
+        }
+    }
+    {
+        ident "kit_base.envcompsuppl"
+        param
+        {
+            name "envcompsuppl"
+        }
+    }
+    {
+        ident "kit_base.dispatch"
+        param
+        {
+            name "basesuppl"
+            entry_array
+            {
+                cmds "get_obj"
+                targets "outside"
+                newcmd "get_basesuppl"
+            }
+        }
+    }
+    {
+        ident "kit_perch.mgr"
+        param
+        {
+            name "perchmgr"
+        }
+    }
+    {
+        // Extern actor loading and holding the current level.
+        ident "kit_engbase.extern"
+        param
+        {
+            active 1
+            name "level_extern"
+            deleg_name "level"
+            res ""
+            allow_no_target 1
+            notify_target "dispatch"
+            notify_pre_cmd "notice_level_load_pre"
+            notify_post_cmd "notice_level_load_post"
+        }
+    }
+    {
+        ident "kit_base.dispatch"
+        param
+        {
+            name "levelloader"
+            entry_array
+            {
+                cmds "goto"
+                targets "level_extern"
+                newcmd "load"
+            }
+        }
+    }
+    {
+        // External files describing all levels:
+        ident "kit_base.extern"
+        param
+        {
+            // Delegate action calls to the child:
+            active 1
+            res "universe/actor/levels.s3d_actor_run"
+        }
+    }
+    {
+        // External file describing the structure of each player:
+        ident "kit_base.extern"
+        param
+        {
+            // Delegate action calls to the child:
+            active 1
+            res "universe/actor/settingplayer.s3d_actor_run"
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/universe/actor/universeplayer.s3d_actor_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/universe/actor/universeplayer.s3d_actor_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/universe/actor/universeplayer.s3d_actor_run	(revision 2453)
@@ -0,0 +1,343 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Definition of a player on the universe.
+//
+// It mainly manages the connection to the client.
+// A player actor lives as long as the connection to the client exists.
+//
+// A player actor does not contain level-specific player information.
+// Such information is managed by a level-specific level-player actor.
+// The level-player actor is created each time again entering a new level.
+// For this, a level must understand a level-player command for producing
+// the a level-player.
+
+// Since each dsc-file formally can only contain a singe actor,
+// we use the group actor to define more than one actor.
+actor_ident "kit_base.group"
+actor_param
+{
+    // Delegate action calls to the children.
+    active 1
+    child_array
+    {
+        ident "kit_base.producer"
+        param
+        {
+            name "player_rawproducer"
+            deleg_name "player_set"
+            active 1
+            ident "kit_base.capsule"
+            param
+            {
+                // Delegate the action calls to all children:
+                active 1
+                // Name of the scope of the capsule.
+                scope "universeplayer"
+                // Name of the capsule actor within its own namespace.
+                // Actors within the capsule can access the capsule
+                // actor itself by this name.
+                local_name "capsule"
+                // Name of the capsule seen from outside
+                // registered in the local namespace. Commands sent
+                // to this actor are delegate to "delegate_target".
+                local_deleg_name "capsule_deleg"
+                // Delegate commands from outside to the dispatcher.
+                deleg_target "dispatch_export"
+                // The capsule contains a group of child actors.
+                child_ident "kit_base.group"
+                child_param
+                {
+                    // Delegate action calls to the children.
+                    active 1
+                    child_array
+                    {
+                        // Dispatcher for events from outside the player
+                        // capsule.
+                        ident "kit_base.dispatch"
+                        param
+                        {
+                            name "dispatch_export"
+                            entry_array
+                            {
+                                cmds "destroy"
+                                targets "settingplayer" "capsule"
+                            }
+                            {
+                                cmds "created_local"
+                                targets
+                            }
+                            {
+                                cmds "created_net"
+                                targets "reproduce"
+                                newcmd "set_blocked"
+                            }
+                            {
+                                cmds "created_net"
+                                targets "netlost"
+                                newcmd "set_observe_activate"
+                            }
+                            {
+                                cmds "store_pre"
+                                targets "settingplayer_informmgr"
+                                newcmd "inform_reset"
+                            }
+                            {
+                                cmds "store_post"
+                                targets "settingplayer_informmgr"
+                                newcmd "inform_set"
+                            }
+                            {
+                                cmds "load_post"
+                                targets "settingplayer_fetch"
+                                newcmd "perform_fetch_charge"
+                            }
+                            {
+                                cmds "net_traverse"
+                                targets
+                                    "settingplayer_netproduce"
+                                    "settingplayer_netappear"
+                                    "netlost"
+                                newcmd "traverse"
+                            }
+                            {
+                                cmds "net_appear"
+                                targets "reproduce"
+                                newcmd "rework"
+                            }
+                            {
+                                // Store the inform-actor in "inform":
+                                cmds "assign_inform" "set_inform"
+                                targets "inform_deleg"
+                                newcmd "set_deleg_target"
+                            }
+                            {
+                                cmds "assign_inform" "set_inform"
+                                targets "informanswer"
+                            }
+                            {
+                                // Refresh connection to setting-player.
+                                cmds "assign_inform" "set_inform"
+                                targets "settingplayer_refresh_charge"
+                                newcmd "perform"
+                            }
+                            {
+                                cmds "search_inform" "search_noinform"
+                                targets "informanswer"
+                            }
+                            {
+                                cmds "add_motion"
+                                targets "settingplayer"
+                            }
+                            {
+                                cmds "goto_level0" "goto_level1"
+                                    "goto_level2" "goto_level3"
+                                    "goto_level4" "goto_level5"
+                                    "goto_level6" "goto_level7"
+                                    "goto_level8" "goto_level9"
+                                    "goto_level10" "goto_level11"
+                                    "goto_level12" "goto_level13"
+                                    "goto_level14" "goto_level15"
+                                    "goto_level16" "goto_level17"
+                                    "goto_level18" "goto_level19"
+                                    "goto_level20" "goto_level21"
+                                targets "^setting_serroot"
+                            }
+                            {
+                                cmds "god" "goto_level_next" "goto_level_prev" 
+                                    "special"
+                                // Delegate to the setting-player:
+                                targets "settingplayer"
+                            }
+                            {
+                                cmds "store_file" "load_file"
+                                targets "^setting"
+                            }
+                            {
+                                cmds
+                                    "notice_level_load_pre"
+                                    "notice_level_load_post"
+                                targets "inform"
+                            }
+                        }
+                    }
+                    {
+                        ident "kit_base.dispatch"
+                        param
+                        {
+                            name "dispatch"
+                            entry_array
+                            {
+                                cmds
+                                    "settingplayer_pre"
+                                    "settingplayer_post"
+                                targets
+                            }
+                        }
+                    }
+                    {
+                        // Dispatcher for commands from the setting player:
+                        ident "kit_base.dispatch"
+                        param
+                        {
+                            name "dispatch_inform"
+                            entry_array
+                            {
+                                cmds 
+                                    "set_gfxmgr_level"
+                                    "set_sndmgr_level"
+                                    "set_state_world"
+                                    "set_state_sky"
+                                    "set_sim_world"
+                                    "set_noise_world"
+                                    "set_sensorstate_world"
+                                    "set_camera"
+                                    "set_playerbody"
+                                targets "inform"
+                            }
+                            {
+                                cmds "reproduce"
+                                targets "settingplayer_netproduce"
+                            }
+                        }
+                    }
+                    {
+                        ident "kit_base.deleg"
+                        param
+                        {
+                            name "inform_deleg"
+                            deleg_name "inform"
+                            deleg_target ""
+                            allow_no_target 1
+                            enabled 1
+                        }
+                    }
+                    {
+                        ident "kit_engobj.informanswer"
+                        param
+                        {
+                            name "informanswer"
+                            answer_cmd "add_result"
+                            answer_actor "capsule_deleg"
+                        }
+                    }
+                    {
+                        ident "kit_engobj.informmgr"
+                        param
+                        {
+                            name "settingplayer_informmgr"
+                            //
+                            deleg_name "settingplayer"
+                            // The inform-actor. A setting player sends
+                            // its commands to this actor:
+                            inform "dispatch_inform"
+                            ignore_no_charge 1
+                            // Recip about setting-player changes.
+                            notify_target "dispatch"
+                            notify_pre_cmd "settingplayer_pre"
+                            notify_post_cmd "settingplayer_post"
+                            // If no setting player exists, this command is 
+                            // sent to this actor to get a player in a setting.
+                            produce_target "^setting_serroot"
+                            produce_cmd "rawproduce_player"
+                        }
+                    }
+                    {
+                        ident "kit_base.paramvoid"
+                        param
+                        {
+                            name "settingplayer_refresh_charge"
+                            target "settingplayer_informmgr"
+                            cmd "refresh_charge"
+                        }
+                    }
+                    {
+                        ident "kit_engbase.netproducer"
+                        param
+                        {
+                            name "settingplayer_netproduce"
+                            produce_target "settingplayer_informmgr"
+                            produce_cmd "produce_charge"
+                            net_traverse_cmd "net_traverse"
+                            created_local_cmd "created_local"
+                            created_net_cmd "created_net"
+                        }
+                    }
+                    {
+                        ident "kit_engbase.netappear"
+                        param
+                        {
+                            name "settingplayer_netappear"
+                            appear_target "settingplayer"
+                            appear_cmd "net_appear"
+                        }
+                    }
+                    {
+                        ident "kit_engobj.fetch"
+                        param
+                        {
+                            name "settingplayer_fetch"
+                            query_target "settingplayer_informmgr"
+                            query_cmd "get_charge"
+                            produce_target "settingplayer_netproduce"
+                            produce_cmd "produce"
+                            produce_report_target ""
+                            produce_report_cmd ""
+                            enum_target "^setting_serroot"
+                            enum_cmd "find_player"
+                            enum_report_target "settingplayer_informmgr"
+                            enum_report_cmd "assign_charge"
+                        }
+                    }
+                    {
+                        ident "kit_engbase.netreproduce"
+                        param
+                        {
+                            name "reproduce"
+                            producer "^player_netproducer"
+                            charge "capsule_deleg"
+                            reproduce_cmd "reproduce"
+                        }
+                    }
+                    {
+                        ident "kit_snk.childif"
+                        param
+                        {
+                            extcfg_actor "^^universe_cfg"
+                            extcfg_entry_switch "server"
+                            then_child_ident "kit_base.onaction"
+                            then_child_param
+                            {
+                                // Check if a new player must be created.
+                                active 1
+                                name "check_settingplayer_onaction"
+                                target "settingplayer_fetch"
+                                cmd "check_produce_charge"
+                            }
+                        }
+                    }
+                    {
+                        ident "kit_engbase.netlost"
+                        param
+                        {
+                            active 0
+                            name "netlost"
+                            lost_target "dispatch_export"
+                            lost_cmd "destroy"
+                        }
+                    }
+                }
+            }
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/universe/actor/universe.s3d_actor_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/universe/actor/universe.s3d_actor_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/universe/actor/universe.s3d_actor_run	(revision 2453)
@@ -0,0 +1,182 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Universe definition. 
+// The universe contains the game state.
+
+actor_ident "kit_base.capsule"
+actor_param
+{
+    active 1
+    scope "universe"
+    local_name "capsule"
+    deleg_target "dispatch_export"
+    child_ident "kit_base.group"
+    child_param
+    {
+        // Delegate action calls to the children.
+        active 1
+        child_array
+        {
+            ident "kit_base.dispatch"
+            param
+            {
+                name "dispatch_export"
+                entry_array
+                {
+                    cmds "produce_player"
+                    targets "player_netproducer"
+                    newcmd "produce"
+                }
+                {
+                    cmds "net_traverse"
+                    targets 
+                        "setting_serroot"
+                }
+                {
+                    cmds "net_traverse"
+                    targets 
+                        "player_netproducer"
+                        "player_netappear"
+                    newcmd "traverse"
+                }
+            }
+        }
+        {
+            // Dispatcher handling messages from the universe,
+            // which contains the game state.
+            ident "kit_base.dispatch"
+            param
+            {
+                name "dispatch_serialize"
+                entry_array
+                {
+                    cmds "store_pre" "store_post" "load_post"
+                    targets "player_set"
+                }
+                {
+                    // Handle every command to avoid error:
+                    cmds "delete_pre" "delete_post"
+                        "store_pre" "store_post"
+                        "load_pre" "load_post"
+                    targets
+                }
+            }
+        }
+        {
+            ident "kit_base.dispatch"
+            param
+            {
+                name "dispatch_setting"
+                entry_array
+                {
+                    cmds 
+                        "get_basesuppl"
+                        "ignore_frmtime"
+                        "cfg_access_int_info"
+                        "cfg_access_float_info"
+                        "cfg_access_str_info"
+                        "cfg_access_chunk_info"
+                        "universe_cfg_access_int_info"
+                        "universe_cfg_access_float_info"
+                        "universe_cfg_access_str_info"
+                        "universe_cfg_access_chunk_info"
+                    targets "^dispatch_universe"
+                }
+                {
+                    cmds 
+                        "notice_level_load_pre"
+                        "notice_level_load_post"
+                    targets "player_set"
+                }
+            }
+        }
+        {
+            // Define a serialization actor.
+            // This actor can store and load its child into and from a file.
+            // Important! This actor defines a local namespace. 
+            // It is not possible to access actors outside this namespace.
+            // Instead, you can send commands to the "outside" actor.
+            ident "kit_base.serroot"
+            param
+            {
+                // Delegate action calls to the child.
+                active 1
+                // Scope of the local namespace.
+                scope "setting"
+                // Actor name from outside.
+                export_name "setting"
+                // Name to delegate commands inside the universe to.
+                export_deleg_name "setting_serroot"
+                // Name to send commands for outside the universe to.
+                deleg_target "dispatch_export"
+                // Target to send commands outside the universe to.
+                local_outside_name "outside"
+                // 
+                outside_target "dispatch_setting"
+                // Objects outside the universe referenced from inside,
+                // fetched from the outside actor:
+                known_cmds "get_basesuppl"
+                // Header identifier for the state files.
+                ident "std"
+                // Notification commands about loading and saving.
+                notify_target "dispatch_serialize"
+                notify_pre_delete_cmd "delete_pre"
+                notify_post_delete_cmd "delete_post"
+                notify_pre_store_cmd "store_pre"
+                notify_post_store_cmd "store_post"
+                notify_pre_load_cmd "load_pre"
+                notify_post_load_cmd "load_post"
+                // The level root has an own namespace:
+                child_ident "kit_base.extern"
+                child_param
+                {
+                    // Delegate action calls to the child:
+                    active 1
+                    res "universe/actor/setting.s3d_actor_run"
+                }
+            }
+        }
+        {
+            // External file describing the structure of each player:
+            ident "kit_base.extern"
+            param
+            {
+                // Delegate action calls to the child:
+                active 1
+                res "universe/actor/universeplayer.s3d_actor_run"
+            }
+        }
+        {
+            ident "kit_engbase.netproducer"
+            param
+            {
+                name "player_netproducer"
+                produce_target "player_rawproducer"
+                produce_cmd "produce"
+                net_traverse_cmd "net_traverse"
+                created_local_cmd "created_local"
+                created_net_cmd "created_net"
+            }
+        }
+        {
+            ident "kit_engbase.netappear"
+            param
+            {
+                name "player_netappear"
+                appear_target "player_set"
+                appear_cmd "net_appear"
+            }
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/universe/actor/levels.s3d_actor_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/universe/actor/levels.s3d_actor_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/universe/actor/levels.s3d_actor_run	(revision 2453)
@@ -0,0 +1,107 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Level manager definition. 
+// This includes references to all available levels.
+
+actor_ident "kit_base.group"
+actor_param
+{
+    // Delegate action calls to the children.
+    active 1
+    child_array
+    {
+        // Actor evaluating level switch commands.
+        ident "kit_base.dispatch"
+        param
+        {
+            name "levelmgr"
+            log 1   // To log level switches.
+            entry_array
+            {
+                cmds "goto_level0"
+                targets "goto_level"
+                newcmd "perform"
+            }
+            {
+                cmds "goto_level1"
+                targets "goto_level"
+                newcmd "perform"
+            }
+            {
+                cmds "goto_level2"
+                targets "goto_level"
+                newcmd "perform"
+            }
+            {
+                cmds "goto_level3"
+                targets "goto_level"
+                newcmd "perform"
+            }
+            {
+                cmds "goto_level4"
+                targets "goto_level"
+                newcmd "perform"
+            }
+            {
+                cmds "goto_level5"
+                targets "goto_level"
+                newcmd "perform"
+            }
+            {
+                cmds "goto_level6"
+                targets "goto_level"
+                newcmd "perform"
+            }
+            {
+                cmds "goto_level7"
+                targets "goto_level"
+                newcmd "perform"
+            }
+            {
+                cmds "goto_level8"
+                targets "goto_level"
+                newcmd "perform"
+            }
+            {
+                cmds "goto_level9"
+                targets "goto_level"
+                newcmd "perform"
+            }
+        }
+    }
+    {
+        ident "kit_base.paramstr"
+        param
+        {
+            name "goto_level"
+            target "levelloader"
+            cmd "goto"
+            param "level/actor/main.s3d_actor_run"
+        }
+    }
+    {
+        ident "kit_snk.childif"
+        param
+        {
+            extcfg_actor "setting_cfg"
+            extcfg_entry_switch "server"
+            then_child_ident "kit_base.oninit"
+            then_child_param
+            {
+                target "levelmgr"
+                cmd "goto_level0"
+            }
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/universe/actor/settingplayer.s3d_actor_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/universe/actor/settingplayer.s3d_actor_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/universe/actor/settingplayer.s3d_actor_run	(revision 2453)
@@ -0,0 +1,291 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Definition of a player on the setting.
+//
+// It mainly manages the connection to the client.
+// A player actor lives as long as the connection to the client exists.
+//
+// A player actor does not contain level-specific player information.
+// Such information is managed by a level-specific level-player actor.
+// The level-player actor is created each time again entering a new level.
+// For this, a level must understand a level-player command for producing
+// the a level-player.
+
+// Since each dsc-file formally can only contain a singe actor,
+// we use the group actor to define more than one actor.
+actor_ident "kit_base.group"
+actor_param
+{
+    // Delegate action calls to the children.
+    active 1
+    child_array
+    {
+        ident "kit_base.producer"
+        param
+        {
+            name "player_rawproducer"
+            deleg_name "player_set"
+            active 1
+            ident "kit_base.capsule"
+            param
+            {
+                // Delegate the action calls to all children:
+                active 1
+                // Name of the scope of the capsule.
+                scope "settingplayer"
+                // Name of the capsule actor within its own namespace.
+                // Actors within the capsule can access the capsule
+                // actor itself by this name.
+                local_name "capsule"
+                // Name of the capsule seen from outside
+                // registered in the local namespace. Commands sent
+                // to this actor are delegate to "delegate_target".
+                local_deleg_name "capsule_deleg"
+                // Delegate commands from outside to the dispatcher.
+                deleg_target "dispatch_export"
+                // The capsule contains a group of child actors.
+                child_ident "kit_base.group"
+                child_param
+                {
+                    // Delegate action calls to the children.
+                    active 1
+                    child_array
+                    {
+                        // Dispatcher for events from outside the player
+                        // capsule.
+                        ident "kit_base.dispatch"
+                        param
+                        {
+                            name "dispatch_export"
+                            entry_array
+                            {
+                                cmds "destroy"
+                                targets "levelplayer" "capsule"
+                            }
+                            {
+                                cmds "created_local"
+                                targets
+                            }
+                            {
+                                cmds "created_net"
+                                targets "reproduce"
+                                newcmd "set_blocked"
+                            }
+                            {
+                                cmds "net_traverse"
+                                targets
+                                    "levelplayer_netproduce"
+                                    "levelplayer_netappear"
+                                newcmd "traverse"
+                            }
+                            {
+                                cmds "net_appear"
+                                targets "reproduce"
+                                newcmd "rework"
+                            }
+                            {
+                                cmds "add_motion"
+                                targets "levelplayer"
+                            }
+                            {
+                                // Store the inform-actor in "inform":
+                                cmds "assign_inform" "set_inform"
+                                targets "inform_deleg"
+                                newcmd "set_deleg_target"
+                            }
+                            {
+                                cmds "assign_inform" "set_inform"
+                                targets "informanswer"
+                            }
+                            {
+                                // Refresh connection to setting-player.
+                                cmds "assign_inform"
+                                targets "levelplayer_refresh_charge"
+                                newcmd "perform"
+                            }
+                            {
+                                cmds "search_inform" "search_noinform"
+                                targets "informanswer"
+                            }
+                            {
+                                cmds "god" "goto_level_next" "goto_level_prev"
+                                    "special"
+                                // Delegate to the level-player:
+                                targets "levelplayer"
+                            }
+                        }
+                    }
+                    {
+                        ident "kit_base.dispatch"
+                        param
+                        {
+                            name "dispatch"
+                            entry_array
+                            {
+                                cmds "levelplayer_pre"
+                                targets
+                            }
+                            {
+                                cmds "levelplayer_post"
+                                targets
+                            }
+                        }
+                    }
+                    {
+                        // Dispatcher for commands from the level player:
+                        ident "kit_base.dispatch"
+                        param
+                        {
+                            name "dispatch_inform"
+                            entry_array
+                            {
+                                cmds 
+                                    "set_gfxmgr_level"
+                                    "set_sndmgr_level"
+                                    "set_state_world"
+                                    "set_state_sky"
+                                    "set_sim_world"
+                                    "set_noise_world"
+                                    "set_sensorstate_world"
+                                    "set_camera"
+                                    "set_playerbody"
+                                targets "inform"
+                            }
+                            {
+                                cmds "reproduce"
+                                targets "levelplayer_netproduce"
+                            }
+                        }
+                    }
+                    {
+                        ident "kit_base.deleg"
+                        param
+                        {
+                            name "inform_deleg"
+                            deleg_name "inform"
+                            deleg_target ""
+                            allow_no_target 1
+                            enabled 1
+                        }
+                    }
+                    {
+                        ident "kit_engobj.informanswer"
+                        param
+                        {
+                            name "informanswer"
+                            answer_cmd "add_result"
+                            answer_actor "capsule_deleg"
+                        }
+                    }
+                    {
+                        ident "kit_engobj.informmgr"
+                        param
+                        {
+                            name "levelplayer_informmgr"
+                            //
+                            deleg_name "levelplayer"
+                            // The inform-actor. A level player sends
+                            // its commands to this actor:
+                            inform "dispatch_inform"
+                            ignore_no_charge 1
+                            // Recip about level-player changes.
+                            notify_target "dispatch"
+                            notify_pre_cmd "levelplayer_pre"
+                            notify_post_cmd "levelplayer_post"
+                            // If no level player exists, this command is sent
+                            // to this actor to get a player in a level.
+                            produce_target "^level"
+                            produce_cmd "produce_player"
+                        }
+                    }
+                    {
+                        ident "kit_base.paramvoid"
+                        param
+                        {
+                            name "levelplayer_refresh_charge"
+                            target "levelplayer_informmgr"
+                            cmd "refresh_charge"
+                        }
+                    }
+                    {
+                        ident "kit_engbase.netproducer"
+                        param
+                        {
+                            name "levelplayer_netproduce"
+                            produce_target "levelplayer_informmgr"
+                            produce_cmd "produce_charge"
+                            net_traverse_cmd "net_traverse"
+                            created_local_cmd "created_local"
+                            created_net_cmd "created_net"
+                        }
+                    }
+                    {
+                        ident "kit_engbase.netappear"
+                        param
+                        {
+                            name "levelplayer_netappear"
+                            appear_target "levelplayer"
+                            appear_cmd "net_appear"
+                        }
+                    }
+                    {
+                        ident "kit_engobj.fetch"
+                        param
+                        {
+                            name "levelplayer_fetch"
+                            query_target "levelplayer_informmgr"
+                            query_cmd "get_charge"
+                            produce_target "levelplayer_netproduce"
+                            produce_cmd "produce"
+                            produce_report_target ""
+                            produce_report_cmd ""
+                            enum_target ""
+                            enum_cmd ""
+                            enum_report_target ""
+                            enum_report_cmd ""
+                        }
+                    }
+                    {
+                        ident "kit_engbase.netreproduce"
+                        param
+                        {
+                            name "reproduce"
+                            producer "inform"
+                            charge "capsule_deleg"
+                            reproduce_cmd "reproduce"
+                        }
+                    }                    
+                    {
+                        ident "kit_snk.childif"
+                        param
+                        {
+                            extcfg_actor "^setting_cfg"
+                            extcfg_entry_switch "server"
+                            then_child_ident "kit_base.onaction"
+                            then_child_param
+                            {
+                                // Check if a new player must be created.
+                                active 1
+                                name "check_levelplayer_onaction"
+                                target "levelplayer_fetch"
+                                cmd "check_produce_charge"
+                            }
+                        }
+                    }
+                    
+                }
+            }
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/main/actor/main.s3d_actor_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/main/actor/main.s3d_actor_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/main/actor/main.s3d_actor_run	(revision 2453)
@@ -0,0 +1,178 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Startup file.
+//
+// This file is the first resource file loaded by the Shark 3D player.
+// Job of this file is to define global components which are used both 
+// by the server and client, and to define the server and client actors.
+// The server is loaded from "server/actor/server.s3d_actor_run",
+// the client is loaded from "client/actor/client.s3d_actor_run".
+
+// Scope name of the global namespace.
+// This name is used to display error messages if an actor is not found.
+scope "root"
+// Name of the root actor. See in the docu for the actor ident "kit.root".
+// This actor can perform commands like "quit".
+name "root"
+// Name of the actor delegating commands to.
+// This can be used if C++ components outside the actor tree
+// want to send commands to the actor tree, 
+// for example from a script within a HTML page.
+deleg_target "dispatch_export"
+// Type of the child actor.
+// In this case, the root actor is a group actor, containing several 
+// child actors. The ident "kit_base.group" means to search the actor 
+// of ident "group" in the DLL which was registered under the name "core",
+// see "example.cfg".
+child_ident "kit_base.group"   
+// Parameters of the child actor. The kind of parameters which are understood 
+// depends on the type of the actor. In this case the type of the actor 
+// is "kit_base.group", which understands the parameter "child_array".
+// See the actor reference in the programmer reference in the documentation.
+// This reference contains a list of all actor types and its parameters.
+child_param
+{
+    // Delegate action calls to the children.
+    active 1
+    // List of child actors of this group actor.
+    // Each child actor again is described by its type and parameters.
+    // See the actor reference in the programmer reference in the 
+    // documentation. This reference contains a list of all actor types 
+    // and its parameters.
+    child_array
+    {
+        ident "kit_base.dispatch"
+        param
+        {
+            name "dispatch_export"
+            entry_array
+            {
+                cmds "report_note" "res_refresh" "refresh_all_res"
+                targets "root"
+            }
+        }
+    }
+    {
+        // Actor managing the cfguration data from the cfguration file,
+        // for example from "run_win32.cfg".
+        ident "kit_snk.data"
+        param
+        {
+            name "cfg"
+            // The cfguration data from the cfg-file can be retrieved
+            // from the actor root:
+            src_actor "root"
+            src_cmd "get_cfg"
+        }
+    }
+    {
+        ident "kit_base.extern"
+        param
+        {
+            // Delegate action calls to the child:
+            active 1
+            deleg_name "common"
+            res "main/actor/common.s3d_actor_run"
+        }
+    }
+    {
+        // Create a CAS access server is enabled. 
+        ident "kit_snk.childif"
+        param
+        {
+            // Name of the actor containing the cfguration data.
+            extcfg_actor "cfg"
+            // Check for this entry of the cfguration file.
+            extcfg_entry_switch "cas.enabled"
+            // Type of the child actor.
+            // In this case, the child actor loads another dsc-file.
+            then_child_ident "kit_base.extern"
+            // Parameters of the child actor.
+            then_child_param
+            {
+                // Delegate action calls to the child:
+                active 1
+                deleg_name "cas"
+                res "main/actor/cas.s3d_actor_run"
+            }
+        }
+    }
+    {
+        // Create a server is enabled. This actor only creates a child actor
+        // if a particular cfguration entry is present.
+        ident "kit_snk.childif"
+        param
+        {
+            // Name of the actor containing the cfguration data.
+            extcfg_actor "cfg"
+            // Check for this entry of the cfguration file.
+            extcfg_entry_switch "server.enabled"
+            // Type of the child actor.
+            // In this case, the child actor loads another dsc-file.
+            then_child_ident "kit_base.extern"
+            // Parameters of the child actor.
+            then_child_param
+            {
+                // Delegate action calls to the child:
+                active 1
+                // Name of this extern actor.
+                name "server_extern"
+                // Name to send commands for the server to.
+                deleg_name "server"
+                // Name of the description file describing the server:
+                res "server/actor/server.s3d_actor_run"
+            }
+        }
+    }
+    {
+        // Create a client is enabled. 
+        // Works in the same way as for the server.
+        ident "kit_snk.childif"
+        param
+        {
+            extcfg_actor "cfg"
+            extcfg_entry_switch "client.enabled"
+            then_child_ident "kit_base.extern"
+            then_child_param
+            {
+                // Delegate action calls to the child:
+                active 1
+                // Name of this extern actor.
+                name "client_extern"
+                // Name to send commands for the client to.
+                deleg_name "client"
+                // Name of the description file describing the client:
+                res "client/actor/client.s3d_actor_run"
+            }
+        }
+    }
+    {
+        // Second client.
+        ident "kit_snk.childif"
+        param
+        {
+            extcfg_actor "cfg"
+            extcfg_entry_switch "client.enabled"
+            then_child_ident "kit_base.extern"
+            then_child_param
+            {
+                // Delegate action calls to the child:
+                active 1
+                name "client_sec_extern"
+                deleg_name "client_sec"
+                res ""
+            }
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/main/actor/cas.s3d_actor_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/main/actor/cas.s3d_actor_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/main/actor/cas.s3d_actor_run	(revision 2453)
@@ -0,0 +1,132 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Definition of the CAS (component access shell).
+// The CAS allows to interactively inspect and modify the actors at runtime
+// via a TCP port.
+
+// Encapsulate all actors defining the CAS in an own namespace:
+actor_ident "kit_base.capsule"
+actor_param
+{
+    active 1
+    scope "cas"
+    local_name "capsule"
+    deleg_target ""
+    child_ident "kit_base.group"   
+    child_param                  
+    {
+        // Delegate action calls to the children.
+        active 1
+        child_array
+        {
+            // Producer for CAS objects:
+            ident "kit_base.producer"
+            param
+            {
+                active 1
+                name "connection_producer"
+                deleg_name "connectionset"
+                ident "kit_base.capsule"
+                param
+                {
+                    active 1
+                    scope "cas_connection"
+                    local_name "capsule"
+                    deleg_target "dispatch_export"
+                    child_ident "kit_base.group"
+                    child_param
+                    {
+                        // Delegate action calls to the children.
+                        active 1
+                        child_array
+                        {
+                            // Dispatcher for commands from outside 
+                            // the capsule:
+                            ident "kit_base.dispatch"
+                            param
+                            {
+                                name "dispatch_export"
+                                entry_array
+                                {
+                                    // Assign the socket object.
+                                    cmds "set_tcpstream"
+                                    targets "tcpinput"
+                                }
+                            }
+                        }
+                        {
+                            // Dispatcher within the CAS capsule.
+                            ident "kit_base.dispatch"
+                            param
+                            {
+                                name "dispatch"
+                                entry_array
+                                {
+                                    // If the connection is lost or closed,
+                                    // destroy the CAS object.
+                                    cmds "notify_lost" "notify_closed"
+                                    targets "capsule"
+                                    newcmd "destroy"
+                                }
+                            }
+                        }
+                        {
+                            // The CAS shell evaluating commands.
+                            ident "kit_com.shell"
+                            param
+                            {
+                                name "shell"
+                                write_line_cmd "write_line"
+                                quit_cmd "close"
+                                start_actor "^^root"
+                            }
+                        }
+                        {
+                            // CAS socket and line parser:
+                            ident "kit_com.tcpinput"
+                            param
+                            {
+                                active 1
+                                name "tcpinput"
+                                extcfg_actor "^^cfg"
+                                extcfg_entry_addrport ""
+                                extcfg_entry_echo "cas.echo"
+                                extcfg_entry_telnet "cas.telnet"
+                                interpreter "shell"
+                                welcome 
+                                    "Welcome to the Shark 3D "
+                                    & "component access shell (CAS)."
+                                    "Type 'help' for help."
+                                prompt "Shark3D-CAS> "
+                                notify "dispatch"
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        {
+            // Listen socket waiting for incoming connections:
+            ident "kit_com.tcplisten"
+            param
+            {
+                active 1
+                ignore_socket_errors 1
+                extcfg_actor "^cfg"
+                extcfg_entry_addrport "cas.addrport"
+                producer "connection_producer"
+            }
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/main/actor/common.s3d_actor_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/main/actor/common.s3d_actor_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/main/actor/common.s3d_actor_run	(revision 2453)
@@ -0,0 +1,1024 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+actor_ident "kit_base.group"
+actor_param
+{
+    // Delegate action calls to the children.
+    active 1
+    child_array
+    {
+        ident "kit_base.env"
+        param
+        {
+            name "env"
+        }
+    }
+    {
+        ident "kit_base.envcompsuppl"
+        param
+        {
+            name "envcompsuppl"
+        }
+    }
+    
+    // Forward declaration of the base suppl:
+    {
+        // A kind of forward declaration of the main generic suppl 
+        // named "basesuppl".
+        ident "kit_base.obj"
+        param
+        {
+            name "basesuppl"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.delegsuppl"
+            obj_param
+            {
+                env "env"
+                target "rawsuppl"
+            }
+        }
+    }
+    
+    // Bitmap parser:
+    {
+        // Actor containing the bitmap parser.
+        // A bitmap parser is necessary to load different bitmap file formats.
+        ident "kit_base.extobj"
+        param
+        {
+            name "bitmapparser"
+            // Get parameters from the actor "cfg", which is defined above.
+            obj_suppl "envcompsuppl"
+            extcfg_actor "cfg"
+            // Get the parameters from the "bitmapparser" entry.
+            extcfg_entry_ident "bitmapparser.ident"
+            extcfg_entry_param "bitmapparser.param"
+            given_array
+            {
+                item "env"
+                given_ident "env"
+            }
+        }
+    }
+    
+    // Video parser:
+    {
+        // Actor containing the bitmap parser.
+        // A video parser is necessary to load different video file formats.
+        ident "kit_base.extobj"
+        param
+        {
+            name "videoparser"
+            obj_suppl "envcompsuppl"
+            // Get parameters from the actor "cfg", which is defined above.
+            extcfg_actor "cfg"
+            // Get the parameters from the "videoparser" entry.
+            extcfg_entry_ident "videoparser.ident"
+            extcfg_entry_param "videoparser.param"
+            given_array
+            {
+                item "env"
+                given_ident "env"
+            }
+        }
+    }
+    
+    // Standard model suppl:
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "stdmodelsupplraw"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_model_std.modelsuppl"
+            obj_param
+            {
+                env "env"
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "stdmodelsupplindiv"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.indivsuppl"
+            obj_param
+            {
+                env "env"
+                child_suppl "stdmodelsupplraw"
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "stdmodelsuppl"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.uniquesuppl"
+            obj_param
+            {
+                env "env"
+                child_suppl "stdmodelsupplindiv"
+            }
+        }
+    }
+    
+    // Rectangle model suppl:
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "rectmodelsupplraw"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_model_special.rectmodelsuppl"
+            obj_param
+            {
+                env "env"
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "rectmodelsuppl"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.uniquesuppl"
+            obj_param
+            {
+                env "env"
+                child_suppl "rectmodelsupplraw"
+            }
+        }
+    }
+    
+    // Geo suppl:
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "geosupplraw"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_geo_std.geosuppl"
+            obj_param
+            {
+                env "env" 
+                modelsuppl "stdmodelsuppl"
+                usage "geo"
+                max_tri_cnt 1000
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "geosuppl"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.uniquesuppl"
+            obj_param
+            {
+                env "env" 
+                child_suppl "geosupplraw"
+            }
+        }
+    }
+    
+    // Path suppl:
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "pathsupplraw"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_pos_std.pathsuppl"
+            obj_param
+            {
+                env "env"
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "pathsuppl"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.uniquesuppl"
+            obj_param
+            {
+                env "env" 
+                child_suppl "pathsupplraw"
+            }
+        }
+    }
+    
+    // Bone-anim suppl:
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "boneanimsupplraw"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_pos_std.boneanimsuppl"
+            obj_param
+            {
+                env "env"
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "boneanimsuppl"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.uniquesuppl"
+            obj_param
+            {
+                env "env"
+                child_suppl "boneanimsupplraw"
+            }
+        }
+    }
+    
+    // Bone-motion suppl:
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "bonemotionsuppl"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_pos_std.bonemotionsuppl"
+            obj_param
+            {
+                env "env"
+                gensuppl "basesuppl"
+            }
+        }
+    }
+    
+    // PVS suppl:
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "visibpvssuppl"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_visib_pvs.pvssuppl"
+            obj_param
+            {
+                env "env"
+            }
+        }
+    }
+
+    // Static texture suppl:
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "statictexsupplraw"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_tex_std.statictexsuppl"
+            obj_param
+            {
+                env "env"
+                bitmapparser "bitmapparser"
+                scale 0.0
+                char_taildelim "#"
+                patexp_scalable "*scalable*"
+                patexp_restrusage "*rect*"
+                patexp_mipmap "!*nomipmap*"
+                patexp_compress "*compress*"
+                patexp_dynamic "*dynamic*"
+                patexp_signed "*signed*"
+                patexp_comp1 "*comp1*"
+                patexp_comp2 "*comp2*"
+                patexp_comp3 "*comp3*"
+                patexp_comp4 "*comp4*"
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "statictexsuppl"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.uniquesuppl"
+            obj_param
+            {
+                env "env"
+                child_suppl "statictexsupplraw"
+            }
+        }
+    }
+    
+    // Cube texture suppl:
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "cubetexsupplraw"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_tex_std.cubetexsuppl"
+            obj_param
+            {
+                env "env"
+                bitmapparser "bitmapparser"
+                scale 0.0
+                char_taildelim "#"
+                char_cubejoker "§"
+                patexp_scalable "*scalable*"
+                patexp_restrusage "*rect*"
+                patexp_mipmap "!*nomipmap*"
+                patexp_compress "*compress*"
+                patexp_dynamic "*dynamic*"
+                patexp_signed "*signed*"
+                patexp_comp1 "*comp1*"
+                patexp_comp2 "*comp2*"
+                patexp_comp3 "*comp3*"
+                patexp_comp4 "*comp4*"
+                cube_face_negx "negx"
+                cube_face_posx "posx"
+                cube_face_negy "negy"
+                cube_face_posy "posy"
+                cube_face_negz "negz"
+                cube_face_posz "posz"
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "cubetexsuppl"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.uniquesuppl"
+            obj_param
+            {
+                env "env"
+                child_suppl "cubetexsupplraw"
+            }
+        }
+    }
+
+    // Ident texture supplier:
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "identtexsupplraw"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_tex_std.identtexsuppl"
+            obj_param
+            {
+                env "env"
+                char_taildelim "#"
+                patexp_scalable "*scalable*"
+                patexp_restrusage "*rect*"
+                patexp_mipmap "!*nomipmap*"
+                patexp_compress "*compress*"
+                patexp_dynamic "*dynamic*"
+                patexp_signed "*signed*"
+                patexp_comp1 "*comp1*"
+                patexp_comp2 "*comp2*"
+                patexp_comp3 "*comp3*"
+                patexp_comp4 "*comp4*"
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "identtexsuppl"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.uniquesuppl"
+            obj_param
+            {
+                env "env"
+                child_suppl "identtexsupplraw"
+            }
+        }
+    }
+
+    // Video texture suppl:
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "videotexsupplraw"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_tex_std.videotexsuppl"
+            obj_param
+            {
+                env "env"
+                videoparser "videoparser"
+                char_taildelim "#"
+                patexp_scalable "*scalable*"
+                patexp_restrusage "*rect*"
+                patexp_mipmap "!*nomipmap*"
+                patexp_compress "*compress*"
+                patexp_dynamic "*dynamic*"
+                patexp_signed "*signed*"
+                patexp_comp1 "*comp1*"
+                patexp_comp2 "*comp2*"
+                patexp_comp3 "*comp3*"
+                patexp_comp4 "*comp4*"
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "videotexsuppl"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.uniquesuppl"
+            obj_param
+            {
+                env "env"
+                child_suppl "videotexsupplraw"
+            }
+        }
+    }
+
+    // Bitmap fonts and font textures:
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "rastfontsupplraw"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_font_std.rastfontsuppl"
+            obj_param
+            {
+                env "env"
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "rastfontsuppl"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.uniquesuppl"
+            obj_param
+            {
+                env "env"
+                child_suppl "rastfontsupplraw"
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "fonttexsupplraw"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_font_std.texsuppl"
+            obj_param
+            {
+                env "env"
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "fonttexsuppl"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.uniquesuppl"
+            obj_param
+            {
+                env "env"
+                child_suppl "fonttexsupplraw"
+            }
+        }
+    }
+    
+    // Vector fonts and font models:
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "vecfontsupplraw"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_font_std.vecfontsuppl"
+            obj_param
+            {
+                env "env"
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "vecfontsuppl"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.uniquesuppl"
+            obj_param
+            {
+                env "env"
+                child_suppl "vecfontsupplraw"
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "fontmodelsupplraw"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_font_std.modelsuppl"
+            obj_param
+            {
+                env "env"
+                font_suppl "vecfontsuppl"
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "fontmodelsuppl"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.uniquesuppl"
+            obj_param
+            {
+                env "env"
+                child_suppl "fontmodelsupplraw"
+            }
+        }
+    }
+    
+    // Shader suppl:
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "gfxbatchmgr"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.gfxbatchmgr"
+            obj_param
+            {
+                env "env"
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "gfxprogmgr"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.gfxprogmgr"
+            obj_param
+            {
+                env "env"
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "texpool"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.texpool"
+            obj_param
+            {
+                env "env"
+            }
+        }
+    }
+    {
+        ident "kit_engbase.shaderenv"
+        param
+        {
+            name "shaderenv"
+            childshadersuppl "envcompsuppl"
+            bitmapparser "bitmapparser"
+            gensuppl "basesuppl"
+            texpool "texpool"
+            gfxprogmgr "gfxprogmgr"
+            gfxbatchmgr "gfxbatchmgr"
+            extcfg_actor "cfg"
+            extcfg_entry_economise "view.economise"
+            extcfg_entry_reduce "view.reduce"
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "shadersupplraw"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.shadersuppl"
+            obj_param
+            {
+                shaderenv "shaderenv" 
+                given_array
+                {
+                    item "shaderenv"
+                    given_ident "shaderenv"
+                }
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "shadersuppl"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.uniquesuppl"
+            obj_param
+            {
+                env "env" 
+                child_suppl "shadersupplraw"
+            }
+        }
+    }
+    
+    // Wave suppl:
+    {
+        // Actor managing a wave file parser. 
+        ident "kit_base.extobj"
+        param
+        {
+            name "waveparser"
+            // Get parameters from the actor "cfg", which is defined above.
+            obj_suppl "envcompsuppl"
+            extcfg_actor "cfg"
+            // Get the parameters from the "waveparser" entry.
+            extcfg_entry_ident "waveparser.ident"
+            extcfg_entry_param "waveparser.param"
+            given_array
+            {
+                item "env"
+                given_ident "env"
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "stdwavesupplraw"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_wave_std.wavesuppl"
+            obj_param
+            {
+                env "env" 
+                waveparser "waveparser"
+            }
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "stdwavesuppl"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.uniquesuppl"
+            obj_param
+            {
+                env "env" 
+                child_suppl "stdwavesupplraw"
+            }
+        }
+    }
+    
+    // Main suppl:
+    {
+        ident "kit_base.obj"
+        param
+        {
+            name "rawsuppl"
+            obj_suppl "envcompsuppl"
+            obj_ident "eng_base.prefixsuppl"
+            obj_param
+            {
+                env "env"
+                entry_array
+                {
+                    prefix "direct:"
+                    new_suppl "envcompsuppl"
+                    new_ident ""
+                    new_append 1
+                    // Main component suppl:
+                }
+                {
+                    prefix "clock:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_base.clock"
+                    new_append 0
+                }
+                {
+                    prefix "state:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_base.state"
+                    new_append 0
+                }
+                {
+                    prefix "group:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_base.group"
+                    new_append 0
+                }
+                {
+                    prefix "simplepos:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_base.simplepos"
+                    new_append 0
+                }
+                {
+                    prefix "concatpos:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_base.concatpos"
+                    new_append 0
+                }
+                {
+                    prefix "rectmodel:"
+                    new_suppl "rectmodelsuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                {
+                    prefix "geo:"
+                    new_suppl "geosuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                {
+                    prefix "tex:"
+                    new_suppl "statictexsuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                {
+                    prefix "cubetex:"
+                    new_suppl "cubetexsuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                {
+                    prefix "identtex:"
+                    new_suppl "identtexsuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                {
+                    prefix "statictex:"
+                    new_suppl "statictexsuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                {
+                    prefix "videotex:"
+                    new_suppl "videotexsuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                {
+                    prefix "fonttex:"
+                    new_suppl "fonttexsuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                {
+                    prefix "fontmodel:"
+                    new_suppl "fontmodelsuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                {
+                    prefix "wave:"
+                    new_suppl "stdwavesuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                {
+                    prefix "speaker:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_base.speaker"
+                    new_append 0
+                }
+                {
+                    prefix "rastfont:"
+                    new_suppl "rastfontsuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                {
+                    prefix "vecfont:"
+                    new_suppl "vecfontsuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                {
+                    prefix "actulin:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_base.actulin"
+                    new_append 0
+                }
+                {
+                    prefix "actucyc:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_base.actucyc"
+                    new_append 0
+                }
+                {
+                    prefix "visibpvs:"
+                    new_suppl "visibpvssuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                {
+                    prefix "sim:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_phys_std.sim"
+                    new_append 0
+                }
+                {
+                    prefix "noise:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_base.noise"
+                    new_append 0
+                }
+                {
+                    prefix "boneanim:"
+                    new_suppl "boneanimsuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                {
+                    prefix "bonemotion:"
+                    new_suppl "bonemotionsuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                // Standard suppls:
+                {
+                    prefix "stdmodel:"
+                    new_suppl "stdmodelsuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                {
+                    prefix "stdgeo:"
+                    new_suppl "geosuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                {
+                    prefix "stdtex:"
+                    new_suppl "statictexsuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                {
+                    prefix "stdshader:"
+                    new_suppl "shadersuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                {
+                    prefix "stdsimplepos:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_base.simplepos"
+                    new_append 0
+                }
+                {
+                    prefix "stdconcatpos:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_base.concatpos"
+                    new_append 0
+                }
+                {
+                    prefix "stdpath:"
+                    new_suppl "pathsuppl"
+                    new_ident ""
+                    new_append 1
+                }
+                {
+                    prefix "stdskin:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_pos_std.combine"
+                    new_append 0
+                }
+                {
+                    prefix "stdskel:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_pos_std.boneskel"
+                    new_append 0
+                }
+                {
+                    prefix "stdbonesel:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_pos_std.pick"
+                    new_append 0
+                }
+                {
+                    prefix "stdgear:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_phys_std.gear"
+                    new_append 0
+                }
+                {
+                    prefix "stdbody:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_phys_std.body"
+                    new_append 0
+                }
+                {
+                    prefix "stdfixed:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_phys_std.fixed"
+                    new_append 0
+                }
+                {
+                    prefix "stddisjunct:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_phys_std.disjunct"
+                    new_append 0
+                }
+                {
+                    prefix "stdconstrstand:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_phys_std.constrstand"
+                    new_append 0
+                }
+                {
+                    prefix "stdconstrball:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_phys_std.constrball"
+                    new_append 0
+                }
+                {
+                    prefix "stdconstrhinge:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_phys_std.constrhinge"
+                    new_append 0
+                }
+                {
+                    prefix "stdconstrhingetwo:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_phys_std.constrhingetwo"
+                    new_append 0
+                }
+                {
+                    prefix "stdconstrslider:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_phys_std.constrslider"
+                    new_append 0
+                }
+                {
+                    prefix "stdconstrattach:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_phys_std.constrattach"
+                    new_append 0
+                }
+                {
+                    prefix "stdinst:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_base.inst"
+                    new_append 0
+                }
+                {
+                    prefix "stdsensorstate:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_sensor_std.sensorstate"
+                    new_append 0
+                }
+                {
+                    prefix "stdsensor:"
+                    new_suppl "envcompsuppl"
+                    new_ident "eng_sensor_std.sensorvol"
+                    new_append 0
+                }
+            }
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/ordinary_transp.s3d_shader_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/ordinary_transp.s3d_shader_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/ordinary_transp.s3d_shader_run	(revision 2453)
@@ -0,0 +1,144 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Triggers:
+// 1 - Main
+// 2 - Mark shadow volume
+// 4 - Unmark shadow volume
+// 8 - Render light.
+
+shader_array
+{
+    name "ordinary_transp"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                // mesh used for normal rendering
+                methods "init_method"
+                usage "render"
+                mesh_var "mesh"
+                texchan_var_array "tex0" "normalmap"
+                tex_attr_var_array "attr0"
+                tangentu_attr_var "tangentu"
+                tangentv_attr_var "tangentv"
+                insp_ident "showmesh"
+                insp_rank 80000
+                insp_color 1.0 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+                {
+                    triggers "drvlight_trigger" "light_trigger"
+                    method "drvlight_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                }
+            }
+        }
+        {
+            // collect 'basic' lights
+            ident "eng_shader_std.drvlightcoll"
+            param
+            {
+                env "shaderenv"
+                reset_methods "main_method"
+                append_methods "drvlight_method"
+
+                lightarray_var "lightarray"
+                diffuse_var "light_diffuse"
+                ambient_var "light_ambient"
+                specular_var "light_specular"
+                cenrange_var "light_cenrange"
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 34000
+                back_to_front 1
+                insp_ident "showwire"
+
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 0
+
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+
+                blend_col_src_fac "src_alpha"
+                blend_col_dest_fac "inv_src_alpha"
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+
+                mtl
+                {
+                    enabled 1
+                    ambient 0. 0. 0.
+                    diffuse 1. 1. 1.
+                    specular 0. 0. 0.
+                    emissive 0. 0. 0.
+                    specexp 0.
+                }
+
+                lightarray_var "lightarray"
+                shaderprog_ident "levelutil/shader/prog/"
+                        & "standard.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+    }
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/basic.s3d_shader_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/basic.s3d_shader_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/basic.s3d_shader_run	(revision 2453)
@@ -0,0 +1,689 @@
+// Shark 3D Snake Text Stream 1x0 (ascii).
+shader_array
+{
+    // Shader useful for max helper objects.
+    name "pos_helper"
+    ident ""
+    param
+    {
+    }
+}
+{
+    // Shader rendering w/o lighting.
+    name "plain"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                usage "render"
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                insp_ident "showmesh"
+                insp_rank 80000
+                insp_color 1.0 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 12000
+                insp_ident "showwire"
+                
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                color 1.0 1.0 1.0
+
+                shaderprog_ident "levelutil/shader/prog/"
+                        & "plain_pointtex.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+    }
+}
+{
+    // Simple transparence without lighting.
+    name "plain_transp"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                usage "render"
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                insp_ident "showmesh"
+                insp_rank 80000
+                insp_color 1.0 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 34000
+                back_to_front 1
+                insp_ident "showwire"
+
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 0
+                blend_col_src_fac "src_alpha"
+                blend_col_dest_fac "inv_src_alpha"
+
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+
+                shaderprog_ident "levelutil/shader/prog/"
+                        & "plain_pointtex.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+    }
+}
+{
+    // Shader rendering with lighting not using the normal vectors.
+    name "ambient"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                usage "render"
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                insp_ident "showmesh"
+                insp_rank 80000
+                insp_color 1.0 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+                {
+                    triggers "drvlight_trigger"
+                    method "drvlight_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.drvlightcoll"
+            param
+            {
+                env "shaderenv"
+                reset_methods "init_method"
+                append_methods "drvlight_method"
+                
+                lightarray_var "lightarray"
+                diffuse_var "light_diffuse"
+                ambient_var "light_ambient"
+                specular_var "light_specular"
+                cenrange_var "light_cenrange"
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 12000
+                insp_ident "showwire"
+
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+
+                mtl
+                {
+                    ambient 1. 1. 1.
+                }
+
+                lightarray_var "lightarray"
+
+                shaderprog_ident "levelutil/shader/prog/"
+                        & "standard.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+    }
+}
+{
+    // Shader using vertex lighting
+    name "plain_drvlight"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                usage "render"
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                insp_ident "showmesh"
+                insp_rank 80000
+                insp_color 1.0 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+                {
+                    triggers "drvlight_trigger"
+                    method "drvlight_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.drvlightcoll"
+            param
+            {   
+                env "shaderenv"
+                reset_methods "main_method"
+                append_methods "drvlight_method"
+
+                lightarray_var "lightarray"
+                diffuse_var "light_diffuse"
+                ambient_var "light_ambient"
+                specular_var "light_specular"
+                cenrange_var "light_cenrange"
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 12000
+                insp_ident "showwire"
+
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+
+                fog_enabled 1
+
+                mtl
+                {
+                    diffuse 1. 1. 1.
+                }
+
+                lightarray_var "lightarray"
+
+                shaderprog_ident "levelutil/shader/prog/"
+                        & "standard.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+    }
+}
+{
+    // A simple shader using vertex colors exported from Max.
+    name "plain_vertex_colors"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                usage "render"
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                insp_ident "showmesh"
+                insp_rank 80000
+                insp_color 1.0 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 12000
+                insp_ident "showwire"
+
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_coloralpha 1
+
+                fog_enabled 1
+
+                shaderprog_ident "levelutil/shader/prog/"
+                        & "plain_pointcoltex.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+    }
+}
+{
+    // Additive glass: Additive blending
+    // with faked environment mappping.
+    // In contrast to alpha-blended glass,
+    // such glass looks more unrealistic,
+    // but avoids transparency sorting problems.
+    name "blend_glass_add"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                usage "render"
+                mesh_var "mesh"
+                texchan_var_array "tex0" // //xxx should be sphere
+                tex_attr_var_array "attr0"
+                insp_ident "showmesh"
+                insp_rank 80000
+                insp_color 1.0 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+                {
+                    triggers "drvlight_trigger"
+                    method "drvlight_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.drvlightcoll"
+            param
+            {
+                env "shaderenv"
+                reset_methods "main_method"
+                append_methods "drvlight_method"
+
+                lightarray_var "lightarray"
+                diffuse_var "light_diffuse"
+                ambient_var "light_ambient"
+                specular_var "light_specular"
+                cenrange_var "light_cenrange"
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 34000
+                back_to_front 1
+                insp_ident "showwire"
+
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 0
+
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+
+                blend_col_src_fac "one"
+                blend_col_dest_fac "one"
+                fog_black 1
+
+                mtl
+                {
+                    ambient 1. 1. 1.
+                }
+
+                lightarray_var "lightarray"
+
+                shaderprog_ident "levelutil/shader/prog/"
+                        & "standard.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+    }
+}
+{
+    // Additive fluid: Transparent, distorted mapping.
+    name "blend_fluid_add"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                usage "render"
+                mesh_var "mesh"
+                texchan_var_array "tex0" // //xxx should be distort
+                tex_attr_var_array "attr0"
+                insp_ident "showmesh"
+                insp_rank 80000
+                insp_color 1.0 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+                {
+                    triggers "drvlight_trigger"
+                    method "drvlight_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.drvlightcoll"
+            param
+            {
+                env "shaderenv"
+                reset_methods "main_method"
+                append_methods "drvlight_method"
+
+                lightarray_var "lightarray"
+                diffuse_var "light_diffuse"
+                ambient_var "light_ambient"
+                specular_var "light_specular"
+                cenrange_var "light_cenrange"
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 34000
+                back_to_front 1
+                insp_ident "showwire"
+
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 0
+
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+
+                blend_col_src_fac "one"
+                blend_col_dest_fac "one"
+                fog_black 1
+
+                mtl
+                {
+                    ambient 1. 1. 1.
+                }
+
+                lightarray_var "lightarray"
+
+                shaderprog_ident "levelutil/shader/prog/"
+                        & "standard.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/display.s3d_shader_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/display.s3d_shader_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/display.s3d_shader_run	(revision 2453)
@@ -0,0 +1,156 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Definition of the shaders for the display.
+// A shader is an object responsible for drawing objects.
+shader_array
+{
+    // Shader rendering without lighting.
+    name "plain"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                usage "render"
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                insp_ident "showmesh"
+                insp_rank 80000
+                insp_color 1.0 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 41000
+                insp_ident "showwire"
+
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+
+                shaderprog_ident "levelutil/shader/prog/"
+                        & "plain_pointtex.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+    }
+}
+{
+    // Transparent shader rendering without lighting.
+    name "plain_transp"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                usage "render"
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                insp_ident "showmesh"
+                insp_rank 80000
+                insp_color 1.0 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 44000
+                insp_ident "showwire"
+
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+
+                mesh_var "mesh"
+
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+
+                blend_col_src_fac "src_alpha"
+                blend_col_dest_fac "inv_src_alpha"
+
+                shaderprog_ident "levelutil/shader/prog/"
+                        & "plain_pointtex.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/posteffects.s3d_shader_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/posteffects.s3d_shader_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/posteffects.s3d_shader_run	(revision 2453)
@@ -0,0 +1,210 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Definition of the shaders.
+// A shader is an object responsible for drawing objects.
+
+shader_array
+{
+    name "bloom"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.regionenter"
+            param
+            {
+                env "shaderenv"
+                usage "geo"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+    
+                enter_array
+                {
+                    triggers "main_trigger"
+                    method "main_method"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.bundle"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 35010
+                new_method "bundle_method"
+            }
+        }
+        {
+            ident "eng_shader_std.redirect"
+            param
+            {
+                env "shaderenv"
+                register_methods "main_method"
+                // negative value of 'close_rank'
+                register_rank -35010
+                close_methods "bundle_method"
+                // define when EndRenderTex is called
+                close_rank 90000
+                // define when BeginRenderMain is called
+                open_methods "bundle_method"
+                open_rank 90030
+                destprop_antialias 0
+                dest_array
+                {
+                    from_var ""
+                    to_var "screentex"
+                    texprop_restrusage 0
+                    texprop_depth 0
+                    texprop_float 0
+                    texprop_comp 4
+                    texprop_bitspercomp 0
+                    samplermode_filter 0
+                    samplermode_clamp 1
+                }
+            }
+        }
+        {
+            // Reduce image size and get bright pixels.
+            ident "eng_shader_special.filter"
+            param
+            {
+                env "shaderenv"
+                methods "bundle_method"
+                rank 90010
+    
+                iter_start 0
+                iter_end 0
+                iter_step 0
+                width_scale 0.5
+                height_scale 0.5
+                destprop_antialias 0
+
+                passinfo_var "passinfo"
+    
+                src_array "screentex"
+                dest_array
+                {
+                    from_var ""
+                    to_var "brightsmooth"
+                    texprop_restrusage 0
+                    texprop_depth 0
+                    texprop_float 0
+                    texprop_comp 4
+                    texprop_bitspercomp 0
+                    samplermode_filter 1
+                    samplermode_clamp 1
+                }
+    
+                shaderprog_ident "levelutil/shader/prog/"
+                        & "bloom_bright.s3d_shaderprog_run"
+                //shaderprog_ident "levelutil/shader/prog/"
+                //      & "bloom_presmooth_bright.s3d_shaderprog_run"
+                shaderprog_param_array
+                {
+                    src_var "passinfo"
+                    dest_progvar "prog_passinfo"
+                }
+            }
+        }
+        {
+            // Smooth (exponential averaging).
+            ident "eng_shader_special.filter"
+            param
+            {
+                env "shaderenv"
+                methods "bundle_method"
+                rank 90020
+    
+                iter_start 4
+                iter_end 0
+                iter_step -1
+                width_scale 1.0
+                height_scale 1.0
+                destprop_antialias 0
+
+                passinfo_var "passinfo"
+    
+                src_array "brightsmooth"
+                dest_array
+                {
+                    from_var ""
+                    to_var "brightsmooth"
+                    texprop_restrusage 0
+                    texprop_depth 0
+                    texprop_float 0
+                    texprop_comp 4
+                    texprop_bitspercomp 0
+                    samplermode_filter 1
+                    samplermode_clamp 1
+                }
+       
+                shaderprog_ident "levelutil/shader/prog/"
+                        & "bloom_smooth.s3d_shaderprog_run"
+                shaderprog_param_array
+                {
+                    src_var "passinfo"
+                    dest_progvar "prog_passinfo"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.rectmesh"
+            param
+            {
+                env "shaderenv"
+                methods "bundle_method"
+
+                mesh_var "rectmesh"
+                attr_var "rectattr"
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "bundle_method"
+                rank 90040
+                
+                cull_mode "back"
+                depth_test "always"
+                depth_write 0
+    
+                mesh_var "rectmesh"
+                texchan_var_array "screentex" "brightsmooth"
+                tex_attr_var_array "rectattr"
+                attrmat_var_array ""
+                
+                use_vertex_point 1
+
+                blend_col_src_fac "one"
+                blend_col_dest_fac "zero"
+
+                shaderprog_ident "levelutil/shader/prog/"
+                        & "bloom_combine.s3d_shaderprog_run"
+                shaderprog_param_array
+                {
+                    src_var "passinfo"
+                    dest_progvar "prog_passinfo"
+                }
+            }
+        }
+    }
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/comic.s3d_shaderprog_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/comic.s3d_shaderprog_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/comic.s3d_shaderprog_run	(revision 2453)
@@ -0,0 +1,159 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Shader program configuration.
+// Different drivers access different parameters.
+
+ogl
+{
+    glsl
+    {
+        vertshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "comic_ogl_glsl_vs1x0.s3d_shadercode_run"
+            }
+        }
+        fragshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "comic_ogl_glsl_fs1x0.s3d_shadercode_run"
+            }
+        }
+        sampler_array "tex0"
+    }
+}
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "comic_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+        }
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+
+        light_array
+        {
+            cnt 4
+            pos_codevar "lightArray[$].pos"
+            dir_codevar ""
+            ambient_codevar "lightArray[$].ambient"
+            diffuse_codevar "lightArray[$].diffuse"
+            specular_codevar "lightArray[$].specular"
+            atten_codevar "lightArray[$].atten"
+        }
+        light_activecnt_codevar "activeLights"
+
+        mtl
+        {
+            power_codevar "mtrlPower"
+            emissive_codevar "mtrlEmissive"
+        }
+
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "comic_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+        fog_codevar "paramFog"
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "comic_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+        }
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+
+        light_array
+        {
+            cnt 4
+            pos_codevar "lightArray[$].pos"
+            dir_codevar ""
+            ambient_codevar "lightArray[$].ambient"
+            diffuse_codevar "lightArray[$].diffuse"
+            specular_codevar "lightArray[$].specular"
+            atten_codevar "lightArray[$].atten"
+        }
+        light_activecnt_codevar "activeLights"
+
+        mtl
+        {
+            //power_codevar "mtrlPower"
+            emissive_codevar "mtrlEmissive"
+        }
+
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "comic_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+        fog_codevar "paramFog"
+    }
+}
+//#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gtp_diffuse.s3d_shaderprog_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gtp_diffuse.s3d_shaderprog_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gtp_diffuse.s3d_shaderprog_run	(revision 2453)
@@ -0,0 +1,82 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                & "gtp_diffuse_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+        }
+        tracking
+        {
+            codevar "matProj"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matProjView"
+            slot 0
+            chan "projview"
+            trans "identity"
+        }
+{
+    codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+}
+{
+    codevar "matViewInvTrans"
+            slot 0
+            chan "view"
+            trans "invtransp"
+}
+
+param_array
+{
+    src_progvar "lastCenter"
+    dest_codevar "last_Center"
+    type "float4"
+}
+{
+    src_progvar "worldMat"
+    dest_codevar "worldMat"
+    type "float4x4"
+}
+{
+    src_progvar "worldMatIT"
+    dest_codevar "worldMatIT"
+    type "float4x4"
+}
+
+
+
+    }
+
+    hlsl_pixshader
+    {
+      code_variant_array
+      {
+            profile "3x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gtp_diffuse_d3d9_hlsl_ps3x0.s3d_shadercode_run"
+      }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gtp_envmap.s3d_shaderprog_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gtp_envmap.s3d_shaderprog_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gtp_envmap.s3d_shaderprog_run	(revision 2453)
@@ -0,0 +1,82 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                & "gtp_envmapSimple_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+        }
+        tracking
+        {
+            codevar "matProj"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matProjView"
+            slot 0
+            chan "projview"
+            trans "identity"
+        }
+{
+    codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+}
+{
+    codevar "matViewInvTrans"
+            slot 0
+            chan "view"
+            trans "invtransp"
+}
+
+param_array
+{
+    src_progvar "lastCenter"
+    dest_codevar "last_Center"
+    type "float4"
+}
+{
+    src_progvar "worldMat"
+    dest_codevar "worldMat"
+    type "float4x4"
+}
+{
+    src_progvar "worldMatIT"
+    dest_codevar "worldMatIT"
+    type "float4x4"
+}
+
+
+
+    }
+
+    hlsl_pixshader
+    {
+      code_variant_array
+      {
+            profile "3x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gtp_envmapSimple_d3d9_hlsl_ps1x1.s3d_shadercode_run"
+      }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gtp_distance_impostor.s3d_shaderprog_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gtp_distance_impostor.s3d_shaderprog_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gtp_distance_impostor.s3d_shaderprog_run	(revision 2453)
@@ -0,0 +1,50 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                & "gtp_distance_impostor_d3d9_hlsl_vs3x0.s3d_shadercode_run"
+        }
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+	{
+	    codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+	}
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "3x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gtp_distance_impostor_d3d9_hlsl_ps3x0.s3d_shadercode_run"
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gen_brightmap_for_softshmap.s3d_shaderprog_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gen_brightmap_for_softshmap.s3d_shaderprog_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gen_brightmap_for_softshmap.s3d_shaderprog_run	(revision 2453)
@@ -0,0 +1,180 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gen_brightmap_for_softshmap_d3d9_hlsl_vs1x1."
+                    & "s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_projmat"
+            dest_codevar "lightProjMat"
+            type "float4x4"
+        }
+        {
+            src_progvar "prog_light_shmapmat"
+            dest_codevar "lightShmapMat"
+            type "float4x4"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gen_brightmap_for_softshmap_d3d9_hlsl_ps2x0."
+                    & "s3d_shadercode_run"
+        }
+        
+        param_array
+        {
+            src_progvar "prog_light_intens"
+            dest_codevar "lightIntens"
+            type "float4"
+        }
+
+        tex_size_codevar_array "" "" "lightShmapSize"
+        tex_rcpsize_codevar_array "" "" "lightShmapRcpSize"
+
+        predefine_array
+        {
+            name "S3D_SHMAP_ZBIAS"
+            //val "0.0003" // For no-filtering
+            val "0.0010" // For 4-filtering
+            //val "0.0010" // For 16-filtering
+        }
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gen_brightmap_for_softshmap_d3d9_hlsl_vs1x1."
+                    & "s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_projmat"
+            dest_codevar "lightProjMat"
+            type "float4x4"
+        }
+        {
+            src_progvar "prog_light_shmapmat"
+            dest_codevar "lightShmapMat"
+            type "float4x4"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gen_brightmap_for_softshmap_d3d9_hlsl_ps2x0."
+                    & "s3d_shadercode_run"
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_intens"
+            dest_codevar "lightIntens"
+            type "float4"
+        }
+
+        tex_size_codevar_array "" "" "lightShmapSize"
+        tex_rcpsize_codevar_array "" "" "lightShmapRcpSize"
+
+        predefine_array
+        /*
+        {
+            name "S3D_SHMAP_FILTER4"
+            val ""
+        }
+        */
+        {
+            name "S3D_SHMAP_ZBIAS"
+            //val "0.0003" // For no-filtering
+            //val "0.0010" // For 4-filtering
+            val "0.0010" // For 16-filtering
+        }
+    }
+}
+//#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/standard.s3d_shaderprog_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/standard.s3d_shaderprog_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/standard.s3d_shaderprog_run	(revision 2453)
@@ -0,0 +1,215 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Shader program configuration.
+// Different drivers access different parameters.
+
+ogl
+{
+    glsl
+    {
+        vertshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "standard_ogl_glsl_vs1x0.s3d_shadercode_run"
+            }
+
+            tracking
+            {
+                // uniform mat4 matBone[4];
+                cnt 4
+                codevar "matBone[$]"
+                chan "bone"
+                trans "identity"
+            }
+
+            //  attribute vec4 bone_wgh;
+            bone_wgh "boneWgh"
+            //bone_subscr "boneSubscr"
+
+            predefine_array
+            {
+                name "S3D_USE_BONEWGH"
+            }
+        }
+    }
+}
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "standard_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+            //debug_code_file "src/res/levelutil/shader/prog/d3d9_hlsl/"
+            //      & "standard_d3d9_hlsl_vs2x0.s3d_shadercode"
+        }
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "standard_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+            //debug_code_file "src/res/levelutil/shader/prog/d3d9_hlsl/"
+            //      & "standard_d3d9_hlsl_vs1x1.s3d_shadercode"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        light_array
+        {
+            cnt 5
+            pos_codevar "lightArray[$].pos"
+            dir_codevar ""
+            ambient_codevar "lightArray[$].ambient"
+            diffuse_codevar "lightArray[$].diffuse"
+            specular_codevar "lightArray[$].specular"
+            atten_codevar "lightArray[$].atten"
+        }
+        light_activecnt_codevar "activeLights"
+
+        mtl
+        {
+            power_codevar "mtrlPower"
+            emissive_codevar "mtrlEmissive"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+        {
+            name "S3D_LIGHT_CNT"
+            val "5"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "standard_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+            
+        fog_codevar "paramFog"
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "standard_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+            //debug_code_file "src/res/levelutil/shader/prog/d3d9_hlsl/"
+            //      & "standard_d3d9_hlsl_vs2x0.s3d_shadercode"
+        }
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "standard_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+            //debug_code_file "src/res/levelutil/shader/prog/d3d9_hlsl/"
+            //      & "standard_d3d9_hlsl_vs1x1.s3d_shadercode"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        light_array
+        {
+            cnt 5
+            pos_codevar "lightArray[$].pos"
+            dir_codevar ""
+            ambient_codevar "lightArray[$].ambient"
+            diffuse_codevar "lightArray[$].diffuse"
+            specular_codevar "lightArray[$].specular"
+            atten_codevar "lightArray[$].atten"
+        }
+        light_activecnt_codevar "activeLights"
+
+        mtl
+        {
+            power_codevar "mtrlPower"
+            emissive_codevar "mtrlEmissive"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+        {
+            name "S3D_LIGHT_CNT"
+            val "5"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "standard_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+            
+        fog_codevar "paramFog"
+    }
+}
+//#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/bump_bright.s3d_shaderprog_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/bump_bright.s3d_shaderprog_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/bump_bright.s3d_shaderprog_run	(revision 2453)
@@ -0,0 +1,370 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Opengl Highlevel Shaderlanguage
+ogl
+{
+    glsl
+    {
+        vertshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "bump_ogl_glsl_vs1x0.s3d_shadercode_run"
+            }
+            tracking
+            {
+                // uniform mat4 matBone[4];
+                cnt 4
+                codevar "matBone[$]"
+                chan "bone"
+                trans "identity"
+            }
+
+            //  attribute vec4 bone_wgh;
+            bone_wgh "boneWgh"
+            //bone_subscr "boneSubscr"
+
+            predefine_array
+            {
+                name "S3D_USE_BONEWGH"
+            }
+            {
+                name "S3D_LIGHT_BRIGHT"
+            }
+            {
+                name "S3D_LIGHT_BRIGHT_CARE"
+            }
+            {
+                name "S3D_PARALLAX_MAPPING"
+            }
+        }
+
+        fragshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "bump_ogl_glsl_fs1x0.s3d_shadercode_run"
+            }
+            predefine_array
+            {
+                name "S3D_SPECULAR_EXP"
+                val "4.0"
+            }
+            {
+                name "S3D_GEOMETRIC_SHADOW"
+            }
+            {
+                name "S3D_PARALLAX_MAPPING"
+            }
+            {
+                name "S3D_PARALLAX_SCALE"
+                val "0.07"
+            }
+            {
+                name "S3D_PARALLAX_BIAS"
+                val "0.50196078431372549" // = 128/255
+            }
+            {
+                name "S3D_LIGHT_BRIGHT"
+            }
+            {
+                name "S3D_LIGHT_BRIGHT_CARE"
+            }
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_cenrange"
+            dest_codevar "lightCenRange"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_ambient"
+            dest_codevar "lightAmbient"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_diffuse"
+            dest_codevar "lightDiffuse"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_specular"
+            dest_codevar "lightSpecular"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_brightmat"
+            dest_codevar "lightBrightMat"
+            type "float4x4"
+        }
+
+        sampler_array "tex0" "normalSamp" "lightBrightSamp"
+        tex_rcpsize_codevar_array "" "" "lightBrightRcpSize"
+    }
+}
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        // Code of the pixel program
+        code_variant_array
+       {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bump_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+            debug_code_file "src/res/levelutil/shader/prog/d3d9_hlsl/"
+                    & "bump_d3d9_hlsl_vs1x1.s3d_shadercode"
+        }
+
+
+        // Copy matrices into vertex program constants.
+        // The field "chan" can be one
+        // of "identity", "proj", "view" or "projview" "bone"
+        // The field "trans" can be one
+        // of "identity", "inv", "transp" or "invtransp"
+        // One matrix needs 4 constants.
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_cenrange"
+            dest_codevar "lightCenRange"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_brightmat"
+            dest_codevar "lightBrightMat"
+            type "float4x4"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+        {
+            name "S3D_PARALLAX_MAPPING"
+        }
+        {
+            name "S3D_LIGHT_BRIGHT"
+        }
+        {
+            name "S3D_LIGHT_BRIGHT_CARE"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bump_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+        
+        param_array
+        {
+            src_progvar "prog_light_ambient"
+            dest_codevar "lightAmbient"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_diffuse"
+            dest_codevar "lightDiffuse"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_specular"
+            dest_codevar "lightSpecular"
+            type "float4"
+        }
+        
+        predefine_array
+        {
+            name "S3D_SPECULAR_EXP"
+            val "4.0"
+        }
+        {
+            name "S3D_GEOMETRIC_SHADOW"
+        }
+        {
+            name "S3D_PARALLAX_MAPPING"
+        }
+        {
+            name "S3D_PARALLAX_SCALE"
+            val "0.07"
+        }
+        {
+            name "S3D_PARALLAX_BIAS"
+            val "0.50196078431372549" // = 128/255
+        }
+        {
+            name "S3D_LIGHT_BRIGHT"
+        }
+        {
+            name "S3D_LIGHT_BRIGHT_CARE"
+        }
+
+        tex_rcpsize_codevar_array "" "" "lightBrightRcpSize" 
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        // Code of the pixel program
+        code_variant_array
+       {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bump_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+            debug_code_file "src/res/levelutil/shader/prog/d3d9_hlsl/"
+                    & "bump_d3d9_hlsl_vs1x1.s3d_shadercode"
+        }
+
+
+        // Copy matrices into vertex program constants.
+        // The field "chan" can be one
+        // of "identity", "proj", "view" or "projview" "bone"
+        // The field "trans" can be one
+        // of "identity", "inv", "transp" or "invtransp"
+        // One matrix needs 4 constants.
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_cenrange"
+            dest_codevar "lightCenRange"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_brightmat"
+            dest_codevar "lightBrightMat"
+            type "float4x4"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+        {
+            name "S3D_PARALLAX_MAPPING"
+        }
+        {
+            name "S3D_LIGHT_BRIGHT"
+        }
+        {
+            name "S3D_LIGHT_BRIGHT_CARE"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bump_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+
+        param_array        
+        {
+            src_progvar "prog_light_ambient"
+            dest_codevar "lightAmbient"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_diffuse"
+            dest_codevar "lightDiffuse"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_specular"
+            dest_codevar "lightSpecular"
+            type "float4"
+        }
+
+        predefine_array
+        {
+            name "S3D_SPECULAR_EXP"
+            val "4.0"
+        }
+        {
+            name "S3D_GEOMETRIC_SHADOW"
+        }
+        {
+            name "S3D_PARALLAX_MAPPING"
+        }
+        {
+            name "S3D_PARALLAX_SCALE"
+            val "0.07"
+        }
+        {
+            name "S3D_PARALLAX_BIAS"
+            val "0.50196078431372549" // = 128/255
+        }
+        {
+            name "S3D_LIGHT_BRIGHT"
+        }
+        {
+            name "S3D_LIGHT_BRIGHT_CARE"
+        }
+
+        tex_rcpsize_codevar_array "" "" "lightBrightRcpSize" 
+    }
+}
+//#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gtp_caustic_recieve.s3d_shaderprog_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gtp_caustic_recieve.s3d_shaderprog_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gtp_caustic_recieve.s3d_shaderprog_run	(revision 2453)
@@ -0,0 +1,61 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                & "gtp_caustic_recieve_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+        }
+        tracking
+        {
+            codevar "matProj"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }        
+        {
+            codevar "matView"
+                    slot 0
+                    chan "view"
+                    trans "identity"
+        }
+        param_array
+        {
+            src_progvar "lastCenter"
+            dest_codevar "last_Center"
+            type "float4"
+        }
+        {
+            src_progvar "worldMat"
+            dest_codevar "worldMat"
+            type "float4x4"
+        }
+    }
+
+    hlsl_pixshader
+    {
+      code_variant_array
+      {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gtp_caustic_recieve_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+      }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/bloom_presmooth_bright.s3d_shaderprog_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/bloom_presmooth_bright.s3d_shaderprog_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/bloom_presmooth_bright.s3d_shaderprog_run	(revision 2453)
@@ -0,0 +1,134 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+ogl
+{
+    glsl
+    {
+        vertshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                    & "bloom_presmooth_bright_ogl_glsl_vs1x0."
+                    & "s3d_shadercode_run"
+            }
+        }
+        fragshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                    & "bloom_presmooth_bright_ogl_glsl_fs1x0."
+                    & "s3d_shadercode_run"
+            }
+        }
+
+        sampler_array "tex0"
+        tex_size_codevar_array "tex0Size"
+        tex_rcpsize_codevar_array "tex0RcpSize"
+    }
+}
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bloom_presmooth_bright_d3d9_hlsl_vs1x1."
+                    & "s3d_shadercode_run"
+        }
+        tracking
+        {
+            codevar "matProjView"
+            slot 0
+            chan "projview"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+
+        mtl
+        {
+            emissive_codevar "mtrlEmissive"
+        }
+
+        tex_rcpsize_codevar_array "tex0RcpSize"
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bloom_presmooth_bright_d3d9_hlsl_ps2x0."
+                    & "s3d_shadercode_run"
+        }
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bloom_presmooth_bright_d3d9_hlsl_vs1x1."
+                    & "s3d_shadercode_run"
+        }
+        tracking
+        {
+            codevar "matProjView"
+            slot 0
+            chan "projview"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+        tex_rcpsize_codevar_array "tex0RcpSize"
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bloom_presmooth_bright_d3d9_hlsl_ps2x0."
+                    & "s3d_shadercode_run"
+        }
+    }
+}
+//#endif
+
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gtp_caustic_cubemap_point.s3d_shaderprog_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gtp_caustic_cubemap_point.s3d_shaderprog_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gtp_caustic_cubemap_point.s3d_shaderprog_run	(revision 2453)
@@ -0,0 +1,56 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "3x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                & "gtp_caustic_cubemap_point_d3d9_hlsl_vs3x0.s3d_shadercode_run"
+        } 
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        } 
+        {
+            codevar "matViewInv"
+            slot 0
+            chan "view"
+            trans "inv"
+        }        
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "3x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gtp_caustic_cubemap_point_d3d9_hlsl_ps3x0.s3d_shadercode_run"
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/black.s3d_shaderprog_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/black.s3d_shaderprog_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/black.s3d_shaderprog_run	(revision 2453)
@@ -0,0 +1,104 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+ogl
+{
+    glsl
+    {
+        vertshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "black_ogl_glsl_vs1x0.s3d_shadercode_run"
+            }
+        }
+
+        fragshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "black_ogl_glsl_fs1x0.s3d_shadercode_run"
+            }
+        }
+    }
+}
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "black_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+        }
+        tracking
+        {
+            codevar "matProjView"
+            slot 0
+            chan "projview"
+            trans "identity"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "black_d3d9_hlsl_ps1x1.s3d_shadercode_run"
+        }
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "black_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+        }
+        tracking
+        {
+            codevar "matProjView"
+            slot 0
+            chan "projview"
+            trans "identity"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "black_d3d9_hlsl_ps1x1.s3d_shadercode_run"
+        }
+    }
+}
+//#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/partic.s3d_shaderprog_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/partic.s3d_shaderprog_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/partic.s3d_shaderprog_run	(revision 2453)
@@ -0,0 +1,360 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Shader program configuration.
+// Different drivers access different parameters.
+
+ogl
+{
+    glsl
+    {
+        vertshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "partic_ogl_glsl_vs1x0.s3d_shadercode_run"
+            }
+
+            tracking
+            {
+                // uniform mat4 matBone[4];
+                cnt 4
+                codevar "matBone[$]"
+                chan "bone"
+                trans "identity"
+            }
+
+            //  attribute vec4 bone_wgh;
+            bone_wgh "boneWgh"
+            //bone_subscr "boneSubscr"
+
+            predefine_array
+            {
+                name "S3D_USE_BONEWGH"
+            }
+        }
+
+        fragshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "partic_ogl_glsl_fs1x0.s3d_shadercode_run"
+            }
+        }
+        
+        sampler_array "tex0"
+        
+        param_array
+        {
+            src_progvar "prog_anim"
+            dest_codevar "anim"
+            type "float4"
+        }
+        {
+            src_progvar "prog_color_alpha"
+            dest_codevar "colorAlpha"
+            type "float4"
+        }
+        {
+            src_progvar "prog_param"
+            dest_codevar "param"
+            type "float4"
+        }
+        {
+            src_progvar "prog_move_lin"
+            dest_codevar "moveLin"
+            type "float4"
+        }
+        {
+            src_progvar "prog_move_quadr"
+            dest_codevar "moveQuadr"
+            type "float4"
+        }
+        {
+            src_progvar "prog_move_vari"
+            dest_codevar "moveVari"
+            type "float4"
+        }
+        {
+            src_progvar "prog_move_jiggle"
+            dest_codevar "moveJiggle"
+            type "float4"
+        }
+        {
+            src_progvar "prog_shrink"
+            dest_codevar "shrink"
+            type "float4"
+        }
+        {
+            src_progvar "prog_other"
+            dest_codevar "other"
+            type "float4"
+        }
+    }
+}
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "partic_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+            //debug_code_file "src/res/levelutil/shader/prog/d3d9_hlsl/"
+            //      & "partic_d3d9_hlsl_vs2x0.s3d_shadercode"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        light_array
+        {
+            cnt 5
+            pos_codevar "lightArray[$].pos"
+            dir_codevar ""
+            ambient_codevar "lightArray[$].ambient"
+            diffuse_codevar "lightArray[$].diffuse"
+            specular_codevar "lightArray[$].specular"
+            atten_codevar "lightArray[$].atten"
+        }
+        light_activecnt_codevar "activeLights"
+
+        mtl
+        {
+            power_codevar "mtrlPower"
+            emissive_codevar "mtrlEmissive"
+        }
+        
+        param_array
+        {
+            src_progvar "prog_anim"
+            dest_codevar "anim"
+            type "float4"
+        }
+        {
+            src_progvar "prog_color_alpha"
+            dest_codevar "colorAlpha"
+            type "float4"
+        }
+        {
+            src_progvar "prog_param"
+            dest_codevar "param"
+            type "float4"
+        }
+        {
+            src_progvar "prog_move_lin"
+            dest_codevar "moveLin"
+            type "float4"
+        }
+        {
+            src_progvar "prog_move_quadr"
+            dest_codevar "moveQuadr"
+            type "float4"
+        }
+        {
+            src_progvar "prog_move_vari"
+            dest_codevar "moveVari"
+            type "float4"
+        }
+        {
+            src_progvar "prog_move_jiggle"
+            dest_codevar "moveJiggle"
+            type "float4"
+        }
+        {
+            src_progvar "prog_shrink"
+            dest_codevar "shrink"
+            type "float4"
+        }
+        {
+            src_progvar "prog_other"
+            dest_codevar "other"
+            type "float4"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+        {
+            name "S3D_LIGHT_CNT"
+            val "5"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "partic_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+            
+        fog_codevar "paramFog"
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "partic_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+            //debug_code_file "src/res/levelutil/shader/prog/d3d9_hlsl/"
+            //      & "partic_d3d9_hlsl_vs2x0.s3d_shadercode"
+        }
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "partic_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+            //debug_code_file "src/res/levelutil/shader/prog/d3d9_hlsl/"
+            //      & "partic_d3d9_hlsl_vs1x1.s3d_shadercode"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        light_array
+        {
+            cnt 5
+            pos_codevar "lightArray[$].pos"
+            dir_codevar ""
+            ambient_codevar "lightArray[$].ambient"
+            diffuse_codevar "lightArray[$].diffuse"
+            specular_codevar "lightArray[$].specular"
+            atten_codevar "lightArray[$].atten"
+        }
+        light_activecnt_codevar "activeLights"
+
+        mtl
+        {
+            power_codevar "mtrlPower"
+            emissive_codevar "mtrlEmissive"
+        }
+
+        param_array
+        {
+            src_progvar "prog_anim"
+            dest_codevar "anim"
+            type "float4"
+        }
+        {
+            src_progvar "prog_color_alpha"
+            dest_codevar "colorAlpha"
+            type "float4"
+        }
+        {
+            src_progvar "prog_param"
+            dest_codevar "param"
+            type "float4"
+        }
+        {
+            src_progvar "prog_move_lin"
+            dest_codevar "moveLin"
+            type "float4"
+        }
+        {
+            src_progvar "prog_move_quadr"
+            dest_codevar "moveQuadr"
+            type "float4"
+        }
+        {
+            src_progvar "prog_move_vari"
+            dest_codevar "moveVari"
+            type "float4"
+        }
+        {
+            src_progvar "prog_move_jiggle"
+            dest_codevar "moveJiggle"
+            type "float4"
+        }
+        {
+            src_progvar "prog_shrink"
+            dest_codevar "shrink"
+            type "float4"
+        }
+        {
+            src_progvar "prog_other"
+            dest_codevar "other"
+            type "float4"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+        {
+            name "S3D_LIGHT_CNT"
+            val "5"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "partic_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+            
+        fog_codevar "paramFog"
+    }
+}
+//#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gtp_envmap_metal.s3d_shaderprog_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gtp_envmap_metal.s3d_shaderprog_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gtp_envmap_metal.s3d_shaderprog_run	(revision 2453)
@@ -0,0 +1,88 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                & "gtp_envmapSimple_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+        }
+        tracking
+        {
+            codevar "matProj"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matProjView"
+            slot 0
+            chan "projview"
+            trans "identity"
+        }
+{
+    codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+}
+{
+    codevar "matViewInvTrans"
+            slot 0
+            chan "view"
+            trans "invtransp"
+}
+
+param_array
+{
+    src_progvar "lastCenter"
+    dest_codevar "last_Center"
+    type "float4"
+}
+{
+    src_progvar "worldMat"
+    dest_codevar "worldMat"
+    type "float4x4"
+}
+{
+    src_progvar "worldMatIT"
+    dest_codevar "worldMatIT"
+    type "float4x4"
+}
+
+
+
+    }
+
+    hlsl_pixshader
+    {
+      code_variant_array
+      {
+            profile "3x0"
+            entry_point "metal"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gtp_envmapSimple_d3d9_hlsl_ps1x1.s3d_shadercode_run"
+      }
+      param_array
+	  {
+    	src_progvar "Fresnel"
+    	dest_codevar "Fresnel"
+    	type "float4"
+	  }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_caustic_cubemap_point_d3d9_hlsl_vs3x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_caustic_cubemap_point_d3d9_hlsl_vs3x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_caustic_cubemap_point_d3d9_hlsl_vs3x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,72 @@
+
+// gametools
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+
+struct VS_INPUT
+{
+    float2 texCoord : TEXCOORD0;
+    float4 posObj: POSITION;   
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+    float2 center: TEXCOORD0;
+    float pointSize: PSIZE;
+    float radius :TEXCOORD1;
+    float4 color :TEXCOORD2;
+    
+};
+
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 3x0
+const float4x4 projMat;
+const float4x4 matView;
+const float4x4 matViewInv;
+sampler tex0: register(s0);
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    float pointSize = 20;
+    float resolution = 128;
+    
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    output.pointSize = pointSize;    
+    output.radius = pointSize / resolution;
+    
+   float4 pos = tex2Dlod(tex0, float4(input.posObj.x, input.posObj.y,0,0));
+   
+   //debug
+   //output.posScr = float4(input.posObj.xy *2.0 - 1.0, 0, 1);
+   
+  //output.posScr = pos;
+  output.center = output.posScr;  
+  
+  //output.color = float4(1,0,1,1);
+   if(pos.w == 0)
+   {
+        output.center = 0.0f;
+        output.posScr = 1000.0f; //transform out of view
+   }
+   else
+   {
+        float4 mPosition = float4(normalize(pos.xyz),1); 
+        float4 cPosition = mul(mPosition, matView);
+        float4 hPosition = mul(cPosition, projMat); 
+
+        output.posScr = hPosition;  
+        output.center = float2(hPosition.x, hPosition.y) / hPosition.w;
+   }
+   
+    
+  
+    
+   return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/plain_point_d3d9_hlsl_vs2x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/plain_point_d3d9_hlsl_vs2x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/plain_point_d3d9_hlsl_vs2x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,58 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+    float4 diffuse: COLOR0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 projMat;
+const float4x4 matView;
+const float4 mtrlEmissive;
+
+S3D_MATBONE_DECL_STD(matBone)
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 2x0
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    float4x4 matBoneFinal;
+    S3D_BONE_TRANSF_STD(
+            matBoneFinal, matBone, input.boneWgh, input.boneSubscr);
+    // Transform vectors by matBoneFinal
+    float4 posView = mul(input.posObj, matBoneFinal);
+
+    output.posScr = mul(posView, projMat);
+    output.diffuse = mtrlEmissive;
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_reduce_cubemap_d3d9_hlsl_vs2x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_reduce_cubemap_d3d9_hlsl_vs2x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_reduce_cubemap_d3d9_hlsl_vs2x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,37 @@
+
+// gametools
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+
+struct VS_INPUT
+{
+    float2 texCoord : TEXCOORD0;
+    float4 posObj: POSITION;   
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+    float2 texCoord: TEXCOORD0;
+    float nFace: TEXCOORD1;
+};
+
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 2x0
+
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+    
+    output.nFace = input.posObj.z;
+input.posObj.z = 0;
+    output.posScr = input.posObj;
+    output.texCoord= input.texCoord;
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/lightfilter_d3d9_hlsl_vs2x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/lightfilter_d3d9_hlsl_vs2x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/lightfilter_d3d9_hlsl_vs2x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,55 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    float2 screen: TEXCOORD0;
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+    float2 screen: TEXCOORD0;
+    float2 scale: TEXCOORD1;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 matProjView;
+const float4 tex0RcpSize;
+const float4 passInfo;
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 2x0
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+    output.posScr = mul(input.posObj, matProjView);
+
+    // Smoothing parameters:
+    // Go from wide to small to avoid artifacts in case of depth jumps.
+    // Use pow(2,iter) instead of pow(3,iter), 
+    // because this gives a better quality:
+    float iter = passInfo.x;
+    float smooth = exp2(iter);
+    
+    output.screen.xy = input.screen;
+    output.scale.xy = tex0RcpSize * smooth;
+    
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gen_shvol_view_d3d9_hlsl_vs1x1.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gen_shvol_view_d3d9_hlsl_vs1x1.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gen_shvol_view_d3d9_hlsl_vs1x1.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,46 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posView: POSITION;
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 projMat;
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 1x1
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    // Transform:
+    output.posScr = mul(input.posView, projMat);
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/include_shmap_filter_d3d9_hlsl.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/include_shmap_filter_d3d9_hlsl.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/include_shmap_filter_d3d9_hlsl.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,124 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef SHMAP_FILTER_D3D9_HLSL_SC
+#define SHMAP_FILTER_D3D9_HLSL_SC
+
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef S3D_SHMAP_ZBIAS
+#define S3D_SHMAP_ZBIAS 0
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+
+float s3d_shmapFilter(
+        sampler lightShmapSamp,
+        float4 lightShmapCoord,
+        float4 lightShmapSize,
+        float4 lightShmapRcpSize)
+{
+#ifdef S3D_SHMAP_FILTER16
+    float2 shmapCoordRaw 
+            = lightShmapCoord.xy * lightShmapSize / lightShmapCoord.w;
+    float2 shmapCoordFull = shmapCoordRaw + float2(0.5, 0.5);
+    float2 shmapCoordBase = floor(shmapCoordFull);
+    float2 shmapCoordFrac = shmapCoordFull - shmapCoordBase;
+    float4 shmapCoordBaseAB = lightShmapRcpSize.xyxy * (
+            shmapCoordBase.xyxy + float4(-1.5, 0, -0.5, 0));
+    float4 shmapCoordBaseCD = lightShmapRcpSize.xyxy * (
+            shmapCoordBase.xyxy + float4(+0.5, 0, +1.5, 0));
+    float4 shmapDeltaXY = lightShmapRcpSize.xyxy * float4(0, -1.5, 0, -0.5);
+    float4 shmapDeltaZW = lightShmapRcpSize.xyxy * float4(0, +0.5, 0, +1.5);
+
+    float4 shmapCoordAXY = shmapCoordBaseAB.xyxy + shmapDeltaXY.xyzw;
+    float4 shmapCoordAZW = shmapCoordBaseAB.xyxy + shmapDeltaZW.xyzw;
+    float4 shmapValA;
+    shmapValA.x = tex2D(lightShmapSamp, shmapCoordAXY.xy).x;
+    shmapValA.y = tex2D(lightShmapSamp, shmapCoordAXY.zw).x;
+    shmapValA.z = tex2D(lightShmapSamp, shmapCoordAZW.xy).x;
+    shmapValA.w = tex2D(lightShmapSamp, shmapCoordAZW.zw).x;
+    float4 shmapCoordBXY = shmapCoordBaseAB.zwzw + shmapDeltaXY.xyzw;
+    float4 shmapCoordBZW = shmapCoordBaseAB.zwzw + shmapDeltaZW.xyzw;
+    float4 shmapValB;
+    shmapValB.x = tex2D(lightShmapSamp, shmapCoordBXY.xy).x;
+    shmapValB.y = tex2D(lightShmapSamp, shmapCoordBXY.zw).x;
+    shmapValB.z = tex2D(lightShmapSamp, shmapCoordBZW.xy).x;
+    shmapValB.w = tex2D(lightShmapSamp, shmapCoordBZW.zw).x;
+    float4 shmapCoordCXY = shmapCoordBaseCD.xyxy + shmapDeltaXY.xyzw;
+    float4 shmapCoordCZW = shmapCoordBaseCD.xyxy + shmapDeltaZW.xyzw;
+    float4 shmapValC;
+    shmapValC.x = tex2D(lightShmapSamp, shmapCoordCXY.xy).x;
+    shmapValC.y = tex2D(lightShmapSamp, shmapCoordCXY.zw).x;
+    shmapValC.z = tex2D(lightShmapSamp, shmapCoordCZW.xy).x;
+    shmapValC.w = tex2D(lightShmapSamp, shmapCoordCZW.zw).x;
+    float4 shmapCoordDXY = shmapCoordBaseCD.zwzw + shmapDeltaXY.xyzw;
+    float4 shmapCoordDZW = shmapCoordBaseCD.zwzw + shmapDeltaZW.xyzw;
+    float4 shmapValD;
+    shmapValD.x = tex2D(lightShmapSamp, shmapCoordDXY.xy).x;
+    shmapValD.y = tex2D(lightShmapSamp, shmapCoordDXY.zw).x;
+    shmapValD.z = tex2D(lightShmapSamp, shmapCoordDZW.xy).x;
+    shmapValD.w = tex2D(lightShmapSamp, shmapCoordDZW.zw).x;
+    
+    float4 brightA = step(lightShmapCoord.zzzz, 
+            (shmapValA + S3D_SHMAP_ZBIAS) * lightShmapCoord.w);
+    float4 brightB = step(lightShmapCoord.zzzz, 
+            (shmapValB + S3D_SHMAP_ZBIAS) * lightShmapCoord.w);
+    float4 brightC = step(lightShmapCoord.zzzz, 
+            (shmapValC + S3D_SHMAP_ZBIAS) * lightShmapCoord.w);
+    float4 brightD = step(lightShmapCoord.zzzz, 
+            (shmapValD + S3D_SHMAP_ZBIAS) * lightShmapCoord.w);
+    float4 sumRow = brightA + brightB + brightC 
+            + shmapCoordFrac.x * (brightD - brightA);
+    float4 colWghBase = float4(1.0 / 9.0, 1.0 / 9.0, 1.0 / 9.0, 0);
+    float4 colWghDelta = float4(-1.0 / 9.0, 0, 0, 1.0 / 9.0);
+    float4 colWgh = colWghBase + shmapCoordFrac.y * colWghDelta;
+    float bright = dot(sumRow, colWgh);
+#else
+#ifdef S3D_SHMAP_FILTER4
+    float2 shmapCoordRaw 
+            = lightShmapCoord.xy * lightShmapSize / lightShmapCoord.w;
+    float2 shmapCoordFull = shmapCoordRaw + float2(0.5, 0.5);
+    float2 shmapCoordBase = floor(shmapCoordFull);
+    float2 shmapCoordFrac = shmapCoordFull - shmapCoordBase;
+    float4 shmapCoordBaseAB = lightShmapRcpSize.xyxy * (
+            shmapCoordBase.xyxy + float4(-0.5, 0, +0.5, 0));
+    float4 shmapDelta = lightShmapRcpSize.xyxy * float4(0, -0.5, 0, +0.5);
+
+    float4 shmapCoordA = shmapCoordBaseAB.xyxy + shmapDelta.xyzw;
+    float4 shmapCoordB = shmapCoordBaseAB.zwzw + shmapDelta.xyzw;
+    float4 shmapVec;
+    shmapVec.x = tex2D(lightShmapSamp, shmapCoordA.xy).x;
+    shmapVec.y = tex2D(lightShmapSamp, shmapCoordA.zw).x;
+    shmapVec.z = tex2D(lightShmapSamp, shmapCoordB.xy).x;
+    shmapVec.w = tex2D(lightShmapSamp, shmapCoordB.zw).x;
+    
+    float4 brightVec 
+        = step(lightShmapCoord.zzzz, 
+            (shmapVec + S3D_SHMAP_ZBIAS) * lightShmapCoord.w);
+    float2 sumRow = brightVec.xy 
+            + shmapCoordFrac.x * (brightVec.zw - brightVec.xy);
+    float bright = sumRow.x 
+            + shmapCoordFrac.y * (sumRow.y - sumRow.x);
+#else
+    float shmapVal = tex2Dproj(lightShmapSamp, lightShmapCoord.xyzw).x;
+    float bright = step(lightShmapCoord.z, 
+            (shmapVal + S3D_SHMAP_ZBIAS) * lightShmapCoord.w);
+#endif
+#endif
+    return bright;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gen_brightclear_d3d9_hlsl_vs1x1.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gen_brightclear_d3d9_hlsl_vs1x1.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gen_brightclear_d3d9_hlsl_vs1x1.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,56 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+    float4 secPosScr: TEXCOORD0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 projMat;
+
+S3D_MATBONE_DECL_STD(matBone)
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 1x1
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    float4x4 matBoneFinal;
+    S3D_BONE_TRANSF_STD(
+            matBoneFinal, matBone, input.boneWgh, input.boneSubscr);
+    float4 posView = mul(input.posObj, matBoneFinal);
+    
+    output.posScr = mul(posView, projMat);
+    output.secPosScr = output.posScr;
+
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/comic_d3d9_hlsl_ps2x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/comic_d3d9_hlsl_ps2x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/comic_d3d9_hlsl_ps2x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,44 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct PS_INPUT
+{
+    float2 mainTexCoord: TEXCOORD0;
+    float4 diffuse: COLOR0;
+    float fogCoord: TEXCOORD1;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4 paramFog;
+
+sampler2D tex0: register(s0);
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+
+float4 main(PS_INPUT input): COLOR0
+{
+    float4 outCol = tex2D(tex0, input.mainTexCoord) * input.diffuse;
+    outCol.rgb = s3d_calcFogExp(
+            outCol.rgb, paramFog.rgb, paramFog.a, input.fogCoord);
+    return outCol;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gen_brightmap_for_softshmap_d3d9_hlsl_ps2x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gen_brightmap_for_softshmap_d3d9_hlsl_ps2x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gen_brightmap_for_softshmap_d3d9_hlsl_ps2x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,57 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_shmap_filter_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct PS_INPUT
+{
+    float4 lightProjCoord: TEXCOORD0;
+    float4 lightShmapCoord: TEXCOORD1;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4 lightIntens;
+
+const float4 lightShmapSize;
+const float4 lightShmapRcpSize;
+
+sampler lightProjSamp: register(s0);
+sampler lightShmapSamp: register(s1);
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+
+float4 main(PS_INPUT input): COLOR0
+{
+    float3 clipVal = input.lightShmapCoord.www 
+            - abs(2 * input.lightShmapCoord.xyz - input.lightShmapCoord.www);
+    clip(clipVal.xyz);
+    
+    float4 outCol = lightIntens;
+
+    float4 texColProjTex = tex2Dproj(lightProjSamp, input.lightProjCoord);
+
+    float bright = s3d_shmapFilter(lightShmapSamp, input.lightShmapCoord,
+            lightShmapSize, lightShmapRcpSize);
+
+    outCol *= texColProjTex * bright;
+
+    return outCol;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/comic_d3d9_hlsl_vs2x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/comic_d3d9_hlsl_vs2x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/comic_d3d9_hlsl_vs2x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,81 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef S3D_LIGHT_CT
+#define S3D_LIGHT_CT 4
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    float3 normalObj: NORMAL;
+    float4 diffuse: COLOR0;
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+    float2 mainTexCoord: TEXCOORD0;
+    float4 diffuse: COLOR0;
+    float fogCoord: TEXCOORD1;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 projMat;
+const float4x4 matView;
+
+const float4 mtrlPower;
+const float4 mtrlEmissive;
+
+const s3d_StdProgLight lightArray[S3D_LIGHT_CT];
+const int activeLights;
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 2x0
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    float4 posView = mul(input.posObj, matView);
+    float3 normalView = normalize(mul(input.normalObj, matView).xyz);
+
+    output.posScr = mul(posView, projMat);
+    output.fogCoord = posView.z / posView.w;
+
+    float4 colDiffuse = mtrlEmissive;
+    float4 colSpecular = (float4)0;
+    for(int i = 0; i < activeLights; i++)
+    {
+        s3d_ColPair lightCol = s3d_calcPointLightTerm(
+                posView.xyz, normalView, mtrlPower.w, lightArray[i]);
+        colDiffuse += lightCol.diffuse;
+        colSpecular += lightCol.specular;
+    }
+
+    output.diffuse = input.diffuse;
+    output.mainTexCoord = dot(colDiffuse.xyz, float3(0.3, 0.5, 0.2));
+
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/standard_d3d9_hlsl_ps2x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/standard_d3d9_hlsl_ps2x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/standard_d3d9_hlsl_ps2x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,49 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct PS_INPUT
+{
+    float2 mainTexCoord: TEXCOORD0;
+    float4 diffuse: COLOR0;
+    float fogCoord: TEXCOORD2;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4 paramFog;
+
+sampler tex0: register(s0);
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+
+float4 main(PS_INPUT input): COLOR0
+{
+    float4 outCol = input.diffuse;
+    float4 texCol0 = tex2D(tex0, input.mainTexCoord);
+    outCol = outCol * texCol0;
+    // Preserve original opacity from texture.
+    outCol.a = texCol0.a;
+    
+    outCol.rgb = s3d_calcFogExp(
+        outCol.rgb, paramFog.rgb, paramFog.a, input.fogCoord);
+    return outCol;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_diffuse_d3d9_hlsl_vs2x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_diffuse_d3d9_hlsl_vs2x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_diffuse_d3d9_hlsl_vs2x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,70 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+    float2 tex0:TEXCOORD0;
+   float3 normal:NORMAL;
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr : POSITION;
+    float3 normal : TEXCOORD1;
+    float3 posView: TEXCOORD0;    
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 matProj;
+const float4x4 matProjView;
+const float4x4 matView;
+const float4x4 matViewInvTrans;
+S3D_MATBONE_DECL_STD(matBone)
+
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 1x1
+float4 last_Center;
+float4x4 worldMat;
+float4x4 worldMatIT;
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    float4x4 matBoneFinal;
+    S3D_BONE_TRANSF_STD(matBoneFinal, matBone, input.boneWgh, input.boneSubscr);
+    // Transform vectors by matBoneFinal
+    float4 posView = mul(input.posObj, matBoneFinal);
+    
+    output.posScr = mul(posView, matProj);
+    
+   
+    output.normal = mul(mul(input.normal, matViewInvTrans), worldMatIT);
+
+    output.posView = mul(posView, worldMat);
+    output.posView -= last_Center;   
+
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gen_brightmap_for_softshmap_d3d9_hlsl_vs1x1.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gen_brightmap_for_softshmap_d3d9_hlsl_vs1x1.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gen_brightmap_for_softshmap_d3d9_hlsl_vs1x1.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,64 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+    float4 lightProjCoord: TEXCOORD0;
+    float4 lightShmapCoord: TEXCOORD1;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 projMat;
+
+S3D_MATBONE_DECL_STD(matBone)
+
+const float4x4 lightProjMat;
+const float4x4 lightShmapMat;
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 1x1
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    float4x4 matBoneFinal;
+    S3D_BONE_TRANSF_STD(
+            matBoneFinal, matBone, input.boneWgh, input.boneSubscr);
+
+    // Transform vectors by matBoneFinal
+    float4 posView = mul(input.posObj, matBoneFinal);
+
+    output.posScr = mul(posView, projMat);
+
+    output.lightProjCoord = mul(posView, lightProjMat);
+    output.lightShmapCoord = mul(posView, lightShmapMat);
+
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/standard_d3d9_hlsl_vs1x1.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/standard_d3d9_hlsl_vs1x1.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/standard_d3d9_hlsl_vs1x1.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,83 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    float3 normalObj: NORMAL;
+    S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+    float2 mainTexCoord: TEXCOORD0;
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+    float2 mainTexCoord: TEXCOORD0;
+    float4 diffuse: COLOR0;
+    float4 specular: COLOR1;
+    float fogCoord: TEXCOORD2;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 projMat;
+
+S3D_MATBONE_DECL_STD(matBone)
+
+const float4 mtrlPower;
+const float4 mtrlEmissive;
+
+const s3d_StdProgLight lightArray[S3D_LIGHT_CNT];
+const int activeLights;
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 1x1
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    float4x4 matBoneFinal;
+    S3D_BONE_TRANSF_STD(
+            matBoneFinal, matBone, input.boneWgh, input.boneSubscr);
+    // Transform vectors by matBoneFinal
+    float4 posView = mul(input.posObj, matBoneFinal);
+    float3 normalView = normalize(mul(input.normalObj, matBoneFinal).xyz);
+
+    output.posScr = mul(posView, projMat);
+    output.mainTexCoord = input.mainTexCoord;
+    output.fogCoord = posView.z / posView.w;
+
+    float4 colDiffuse = mtrlEmissive;
+    float4 colSpecular = (float4)0;
+    for(int i = 0; i < S3D_LIGHT_CNT; i++)
+    {
+        s3d_ColPair lightCol = s3d_calcPointLightTerm(
+                posView.xyz, normalView, mtrlPower.w, lightArray[i]);
+        colDiffuse += lightCol.diffuse;
+        colSpecular += lightCol.specular;
+    }
+
+    output.diffuse = colDiffuse;
+    output.specular = colSpecular;
+
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/standard_d3d9_hlsl_vs2x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/standard_d3d9_hlsl_vs2x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/standard_d3d9_hlsl_vs2x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,83 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    float3 normalObj: NORMAL;
+    S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+    float2 mainTexCoord: TEXCOORD0;
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+    float2 mainTexCoord: TEXCOORD0;
+    float4 diffuse: COLOR0;
+    float4 specular: COLOR1;
+    float fogCoord: TEXCOORD2;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 projMat;
+
+S3D_MATBONE_DECL_STD(matBone)
+
+const float4 mtrlPower;
+const float4 mtrlEmissive;
+
+const s3d_StdProgLight lightArray[S3D_LIGHT_CNT];
+const int activeLights;
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 2x0
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    float4x4 matBoneFinal;
+    S3D_BONE_TRANSF_STD(
+            matBoneFinal, matBone, input.boneWgh, input.boneSubscr);
+    // Transform vectors by matBoneFinal
+    float4 posView = mul(input.posObj, matBoneFinal);
+    float3 normalView = normalize(mul(input.normalObj, matBoneFinal).xyz);
+
+    output.posScr = mul(posView, projMat);
+    output.mainTexCoord = input.mainTexCoord;
+    output.fogCoord = posView.z / posView.w;
+
+    float4 colDiffuse = mtrlEmissive;
+    float4 colSpecular = (float4)0;
+    for(int i = 0; i < activeLights; i++)
+    {
+        s3d_ColPair lightCol = s3d_calcPointLightTerm(
+                posView.xyz, normalView, mtrlPower.w, lightArray[i]);
+        colDiffuse += lightCol.diffuse;
+        colSpecular += lightCol.specular;
+    }
+
+    output.diffuse = colDiffuse;
+    output.specular = colSpecular;
+
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/bloom_presmooth_bright_d3d9_hlsl_ps2x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/bloom_presmooth_bright_d3d9_hlsl_ps2x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/bloom_presmooth_bright_d3d9_hlsl_ps2x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,81 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+struct PS_INPUT
+{
+    float2 mainTexCoord: TEXCOORD0;
+    float2 offsScale: TEXCOORD1;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+sampler tex0: register(s0);
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+
+float4 main(PS_INPUT input): COLOR0
+{
+    float2 mainTexCoord = input.mainTexCoord;
+    float2 offsScale = input.offsScale;
+
+    // Use filtering for additional smoothing effect.
+    // The source-texture should be a filter-texture.
+    // The size (width resp. height) of the destination-texture
+    // should be 2 or 4 smaller than the size of the source-texture.
+    //
+    // Pixel in target-texture: X
+    //
+    // Source-sampling positions: S
+    //                          *---*
+    // Pixel in source-texture: |   |
+    //                          *---*
+    //              downscaling by 2 or more
+    // no downscaling
+    //                  *---*---*---*---*
+    // *---*---*---*    |   |   |   |   |
+    // | S |   | S |    *---S---*---S---*    
+    // *---*---*---*    |   |   |   |   |    
+    // |   | X |   |    *---*---X---*---*    
+    // *---*---*---*    |   |   |   |   |    
+    // | S |   | S |    *---S---*---S---*    
+    // *---*---*---*    |   |   |   |   |    
+    //                  *---*---*---*---*
+    //
+    // Note: Since this filter cannot sample more than a 4x4 neighbourhood,
+    // downscaling factor of 4 cannot be exceeded without skipping pixels.
+    // With downsampling of 1 or less filtering can't be used for smoothing
+    // because it results in an undesirable filter pattern.
+    // Thus a scaling factor of 2 or 4 is recommanded.
+    
+    const float2 offsPix0 = float2(-1.0f,-1.0f);
+    const float2 offsPix1 = float2( 1.0f,-1.0f);
+    const float2 offsPix2 = float2(-1.0f, 1.0f);
+    const float2 offsPix3 = float2( 1.0f, 1.0f);
+
+    // neighbour texture coordinates:
+    float2 neigh0 = offsScale * offsPix0 + mainTexCoord.xy;
+    float2 neigh1 = offsScale * offsPix1 + mainTexCoord.xy;
+    float2 neigh2 = offsScale * offsPix2 + mainTexCoord.xy;
+    float2 neigh3 = offsScale * offsPix3 + mainTexCoord.xy;
+
+    float4 avg =
+        (tex2D(tex0, neigh0)
+        + tex2D(tex0, neigh1)
+        + tex2D(tex0, neigh2)
+        + tex2D(tex0, neigh3)) * 0.25;
+    return clamp(avg - 0.8, 0.0, 1.0) * 5.0; // STD
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_caustic_recieve_d3d9_hlsl_ps2x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_caustic_recieve_d3d9_hlsl_ps2x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_caustic_recieve_d3d9_hlsl_ps2x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,35 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+
+#define NITERATION 5
+
+struct PS_INPUT
+{
+float3 dir     : TEXCOORD0;
+};
+
+sampler cauSamp: register(s0);
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 3x0
+
+
+float4 main(PS_INPUT input): COLOR0
+{
+//return 0.1;
+ return  texCUBE(cauSamp, input.dir); 
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_cau_photonmap_d3d9_hlsl_ps3x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_cau_photonmap_d3d9_hlsl_ps3x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_cau_photonmap_d3d9_hlsl_ps3x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,85 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+
+#define NITERATION 5
+
+struct PS_INPUT
+{
+    float3 worldV     : TEXCOORD0;
+    float3 WNormal   : TEXCOORD1;
+    float3 CUBEPos   : TEXCOORD2;
+    float3 lastCenter :TEXCOORD3;
+};
+
+sampler distanceSamp: register(s0);
+
+
+half3 Hit(samplerCUBE tex, half3 R, half3 p0)
+{
+        float rl = texCUBE(tex, R).r;
+        float dp = rl - dot(p0, R);
+        float3 p = p0 + R * dp;
+        float ppp = length(p) / texCUBE(tex, p).r;
+        float dun = 0, dov = 0, pun = ppp, pov = ppp;
+        if (ppp < 1) dun = dp; else dov = dp;
+        float dl = max( dp + rl * (1 - ppp), 0);
+        float3 RR = p0 + R * dl;
+
+        for(int i = 0; i < NITERATION; i++) {
+                float ddl;
+                float llp = length(RR) / texCUBE(tex, RR).r;
+                if (llp < 1) {
+                        dun = dl; pun = llp;
+                        ddl = (dov == 0) ? rl * (1 - llp) :
+                                (dl - dov) * (1 - llp)/(llp - pov);
+                } else {
+                        dov = dl; pov = llp;
+                        ddl = (dun == 0) ? rl * (1 - llp) :
+                                (dl - dun) * (1 - llp)/(llp - pun);
+                }
+                dl = max(dl + ddl, 0);
+                RR = p0 + R * dl;
+        }
+        return RR;
+}
+
+
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 3x0
+
+
+float4 main(PS_INPUT input): COLOR0
+{
+ const float g_RefractFactor = 0.85;
+
+ // direction vector from light to shaded point in world space
+ float3 V = normalize(input.worldV);
+ // vertex normal in world space
+ float3 N = normalize(input.WNormal);
+ // refraction direction
+ float3 R = refract(V, N, g_RefractFactor);
+ //float3 R = reflect(V, N);
+ // vertex position in cubemap space
+ float3 X = input.CUBEPos;
+ float3 dir = Hit(distanceSamp, R, X);
+ //dir = input.lastCenter;
+ //dir = N;
+ //return float4(input.lastCenter,1);
+// return texCUBE(distanceSamp,X).r;
+ return float4(dir,1);
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/black_d3d9_hlsl_ps1x1.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/black_d3d9_hlsl_ps1x1.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/black_d3d9_hlsl_ps1x1.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,27 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+struct PS_INPUT
+{
+};
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 1x1
+
+float4 main(PS_INPUT input): COLOR0
+{
+    return 0;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/bloom_presmooth_bright_d3d9_hlsl_vs1x1.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/bloom_presmooth_bright_d3d9_hlsl_vs1x1.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/bloom_presmooth_bright_d3d9_hlsl_vs1x1.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,63 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    float2 mainTexCoord: TEXCOORD0;
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+    float fog: FOG;
+    float4 diffuse: COLOR0;
+    float2 mainTexCoord: TEXCOORD0;
+    float2 offsScale: TEXCOORD1;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 matProjView;
+const float4x4 matView;
+const float4 mtrlEmissive;
+const float4 tex0RcpSize;
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 1x1
+
+VS_OUTPUT main( VS_INPUT input )
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    //Transform position to clip space
+    output.posScr = mul(input.posObj, matProjView);
+
+    //Transform position to eye space -> pos
+    float4 posView = mul(input.posObj, matView);
+
+    //fog
+    output.fog = posView.z / posView.w;
+
+    //Color
+    output.diffuse = mtrlEmissive;
+
+    output.mainTexCoord = input.mainTexCoord;
+
+    output.offsScale = tex0RcpSize;
+
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_caustic_recieve_d3d9_hlsl_vs2x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_caustic_recieve_d3d9_hlsl_vs2x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_caustic_recieve_d3d9_hlsl_vs2x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,62 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+    float2 tex0:TEXCOORD0;
+   float3 normal:NORMAL;
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr : POSITION;
+    float3 dir: TEXCOORD0;    
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 matProj;
+const float4x4 matView;
+S3D_MATBONE_DECL_STD(matBone)
+
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 1x1
+float4 last_Center;
+float4x4 worldMat;
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    float4x4 matBoneFinal;
+    S3D_BONE_TRANSF_STD(matBoneFinal, matBone, input.boneWgh, input.boneSubscr);
+    // Transform vectors by matBoneFinal
+    float4 posView = mul(input.posObj, matBoneFinal);    
+    output.posScr = mul(posView, matProj);
+    
+    float4 wPos = mul(posView, worldMat);
+    output.dir = wPos.xyz - last_Center.xyz ;    
+
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_reduce_cubemap_d3d9_hlsl_ps3x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_reduce_cubemap_d3d9_hlsl_ps3x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_reduce_cubemap_d3d9_hlsl_ps3x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,57 @@
+
+struct PS_INPUT
+{
+    float4 posScr: POSITION;
+    float2 texCoord: TEXCOORD0;
+    float nFace: TEXCOORD1;
+};
+
+
+struct PS_OUTPUT
+{
+    float4  color: COLOR0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+sampler tex0: register(s0);
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+const int CUBEMAP_SIZE = 128;
+const int REDUCED_CUBEMAP_SIZE = 4;
+
+PS_OUTPUT main(PS_INPUT input)
+{
+//const int RATE = CUBEMAP_SIZE / REDUCED_CUBEMAP_SIZE;
+const int RATE = 32;
+
+PS_OUTPUT output;
+float3 dir;
+ 
+float4 color = float4(0,0,0,0);
+
+   for (int i = 0; i < RATE; i++)
+     for (int j = 0; j < RATE; j++)
+   {
+float2 pos;
+pos.x = input.texCoord.x + (2*i + 1)/(float)CUBEMAP_SIZE;
+pos.y = input.texCoord.y - (2*j + 1)/(float)CUBEMAP_SIZE;// y=-u
+
+ // "scrambling"
+if (input.nFace == 0) dir = float3(1, pos.y, -pos.x);
+if (input.nFace == 1) dir = float3(-1, pos.y, pos.x);
+if (input.nFace == 2) dir = float3(pos.x, 1, -pos.y);
+if (input.nFace == 3) dir = float3(pos.x, -1, pos.y);
+if (input.nFace == 4) dir = float3(pos.x, pos.y, 1);
+if (input.nFace == 5) dir = float3(-pos.x, pos.y,-1);
+
+color += texCUBElod( tex0, float4(dir,0));
+    }
+
+ output.color = color / (RATE * RATE);
+ return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_cau_photonmap_d3d9_hlsl_vs3x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_cau_photonmap_d3d9_hlsl_vs3x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_cau_photonmap_d3d9_hlsl_vs3x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,78 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+    float2 tex0:TEXCOORD0;
+   float3 normal:NORMAL;
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr    : POSITION;
+    float3 worldV     : TEXCOORD0;
+    float3 WNormal   : TEXCOORD1;
+    float3 CUBEPos   : TEXCOORD2;
+    float3 lastCenter :TEXCOORD3;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+S3D_MATBONE_DECL_STD(matBone)
+
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 1x1
+const float4x4 matView;
+const float4x4 modelViewInv;
+const float4x4 viewToWorld;
+const float4x4 viewToWorldInv;
+const float4x4 lightViewProj;
+const float4 lastCenter;
+const float4 lightPosView;
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    float4x4 matBoneFinal;
+    S3D_BONE_TRANSF_STD(matBoneFinal, matBone, input.boneWgh, input.boneSubscr);
+    // Transform vevertices by matBoneFinal ---> view space
+    float4 posView = mul(input.posObj, matBoneFinal);
+    // light position in world space
+    float3 lightWPos = mul(float4(lightPosView.xyz,1), viewToWorld).xyz;
+    // vertex position in world space
+    float3 WPos = mul(posView, viewToWorld).xyz;
+    // direction vector from light to shaded point in world space
+    output.worldV = WPos - lightWPos;
+    // vertex position in cubemap space
+    output.CUBEPos = WPos - lastCenter;
+    // vertex normal in world space
+    output.WNormal = mul(mul(viewToWorldInv, modelViewInv),input.normal);
+    // vertex position in light space
+    output.posScr = mul(posView, lightViewProj);
+    
+    output.lastCenter = WPos.xyz;
+    
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,201 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef STDDEF_D3D9_HLSL_SC
+#define STDDEF_D3D9_HLSL_SC
+
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stdstate_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+// Compression
+///////////////////////////////////////////////////////////////////////////////
+
+float3 s3d_uncomprNormal(
+        float3 comprNormal)
+{
+#ifdef S3D_COMPR_NORMAL
+    return comprNormal / 127.5 - 1.0;
+#else
+    return comprNormal;
+#endif    
+}
+
+float4 s3d_uncomprBoneWgh(
+        float4 comprBoneWgh)
+{
+#ifdef S3D_COMPR_BONEWGH
+    return  comprBoneWgh / 255.0f;
+#else
+    return comprBoneWgh;
+#endif    
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// Bones
+///////////////////////////////////////////////////////////////////////////////
+
+// default to 4 for bone transformation w/o bone subscriptions
+#ifndef S3D_MATBONE_CNT
+#define S3D_MATBONE_CNT 4
+#endif
+
+// works w/ compressed and uncompressed bone weights.
+void s3d_calcBoneTransfSubscr(
+        out float4x4 matBoneFinal, const float4x4 matBone[S3D_MATBONE_CNT],
+        const float4 boneWgh, const int4 boneSubscr)
+{
+    float4 uncomprBoneWgh = s3d_uncomprBoneWgh(boneWgh);
+
+    matBoneFinal = uncomprBoneWgh.x * matBone[boneSubscr.x];
+    matBoneFinal += uncomprBoneWgh.y * matBone[boneSubscr.y];
+    matBoneFinal += uncomprBoneWgh.z * matBone[boneSubscr.z];
+    matBoneFinal += uncomprBoneWgh.w * matBone[boneSubscr.w];
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+#ifdef S3D_USE_BONESUBSCR
+
+#define S3D_BONE_DECL_STD(boneWgh, boneSubscr) \
+        float4 boneWgh: BLENDWEIGHT; \
+        int4 boneSubscr: BLENDINDICES;
+ 
+#define S3D_MATBONE_DECL_STD(matBone) \
+        const float4x4 matBone[S3D_MATBONE_CNT];
+
+#define S3D_BONE_TRANSF_STD(matBoneFinal, matBone, boneWgh, boneSubscr) \
+        s3d_calcBoneTransfSubscr(matBoneFinal, matBone, boneWgh, boneSubscr);
+
+#else
+#ifdef S3D_USE_BONEWGH
+
+#define S3D_BONE_DECL_STD(boneWgh, boneSubscr) \
+        float4 boneWgh: BLENDWEIGHT;
+
+#define S3D_MATBONE_DECL_STD(matBone) \
+        const float4x4 matBone[S3D_MATBONE_CNT];\
+        static const int4 dummyBoneSubscr = int4(0, 1, 2, 3);
+        
+#define S3D_BONE_TRANSF_STD(matBoneFinal, matBone, boneWgh, boneSubscr) \
+        s3d_calcBoneTransfSubscr( \
+                matBoneFinal, matBone, boneWgh, dummyBoneSubscr);
+
+#else
+
+#define S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+
+#define S3D_MATBONE_DECL_STD(matBone)
+
+#define S3D_BONE_TRANSF_STD(matBoneFinal, matBone, boneWgh, boneSubscr) \
+    matBoneFinal = matView;
+
+#endif
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+// Lighting
+///////////////////////////////////////////////////////////////////////////////
+
+float s3d_calcLightRangeFac(float dist, float range)
+{
+    float lightRsqRange = 1.0 / (range * range);
+    float rangeFac = max(1.0 - dist * dist * lightRsqRange, 0.0);
+    return rangeFac;
+}
+
+float s3d_calcLightRangeFac(float dist, float4 posRange)
+{
+    return s3d_calcLightRangeFac(dist, posRange.w);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+s3d_ColPair s3d_calcPointLightTerm(
+        float3 camToVertView, float3 normalView, float mtrlPower,
+        float4 lightPos, float4 lightAmbient, float4 lightDiffuse,
+        float4 lightSpecular, float4 lightAtten)
+{
+    float3 vertToLightDirView = normalize(lightPos - camToVertView);
+    float normalDotVertToLightDir = dot(normalView, vertToLightDirView);
+    float3 camToVertDirView = normalize(camToVertView);
+    float3 HalfDirView = normalize(vertToLightDirView - camToVertDirView);
+    float normalDotHalfDir = dot(normalView, HalfDirView);
+  
+    float dist = length(lightPos - camToVertView);
+    float rangeFac = s3d_calcLightRangeFac(dist, lightAtten); 
+    float4 litVec = lit(normalDotVertToLightDir,
+            normalDotHalfDir, mtrlPower) * rangeFac;
+    float ambient = litVec.x;
+    float diffuse = litVec.y;
+    float specular = litVec.z;
+
+    s3d_ColPair result;
+    result.diffuse  = lightAmbient * ambient;
+    result.diffuse += lightDiffuse * diffuse;
+    result.specular = lightSpecular * specular;
+
+    return result;
+}
+
+s3d_ColPair s3d_calcPointLightTerm(
+        float3 camToVertView, float3 normalView,
+        float mtrlPower, s3d_StdProgLight light)
+{
+    return s3d_calcPointLightTerm(
+            camToVertView, normalView, mtrlPower, light.pos,
+            light.ambient, light.diffuse, light.specular,
+            light.atten);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+void s3d_calcBump(
+        out float3 diffuseDirSurf, out float3 specularDirSurf,
+        float3 normalView, float3 vertToLightDirView, float3 halfDirView,
+        float3 tangentUView, float3 tangentVView)
+{
+    diffuseDirSurf.x = dot(tangentUView, vertToLightDirView);
+    diffuseDirSurf.y = dot(tangentVView, vertToLightDirView);
+    diffuseDirSurf.z = dot(normalView, vertToLightDirView);
+
+    specularDirSurf.x = dot(tangentUView, halfDirView);
+    specularDirSurf.y = dot(tangentVView, halfDirView);
+    specularDirSurf.z = dot(normalView, halfDirView);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// Fog
+///////////////////////////////////////////////////////////////////////////////
+
+float3 s3d_calcFogExp(
+        float3 color, float3 fogColor, float fogDensity, float fogCoord)
+{
+    float fogFactor = exp(-clamp(fogDensity, 0, 1) * fogCoord);
+    return lerp(fogColor, color, fogFactor);
+}
+
+float3 s3d_calcFogExp2(
+        float3 color, float3 fogColor, float fogDensity, float fogCoord)
+{
+    float fogFactor = exp(-pow(clamp(fogDensity, 0, 1) * fogCoord, 2));
+    return lerp(fogColor, color, fogFactor);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// Tex
+///////////////////////////////////////////////////////////////////////////////
+
+#endif // STDDEF_D3D9_HLSL_SC
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/partic_d3d9_hlsl_ps2x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/partic_d3d9_hlsl_ps2x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/partic_d3d9_hlsl_ps2x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,47 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct PS_INPUT
+{
+    float2 mainTexCoord: TEXCOORD0;
+    float4 diffuse: COLOR0;
+    float fogCoord: TEXCOORD2;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4 paramFog;
+
+sampler tex0: register(s0);
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+
+float4 main(PS_INPUT input): COLOR0
+{
+    float4 outCol = input.diffuse;
+    float4 texCol0 = tex2D(tex0, input.mainTexCoord);
+    outCol = outCol * texCol0;
+    
+    outCol.rgb = s3d_calcFogExp(
+        outCol.rgb, paramFog.rgb, paramFog.a, input.fogCoord);
+    return outCol;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/black_d3d9_hlsl_vs1x1.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/black_d3d9_hlsl_vs1x1.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/black_d3d9_hlsl_vs1x1.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,40 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 matProjView;
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 1x1
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    output.posScr = mul(input.posObj, matProjView);
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gen_shvol_extrude_d3d9_hlsl_ps2x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gen_shvol_extrude_d3d9_hlsl_ps2x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gen_shvol_extrude_d3d9_hlsl_ps2x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,27 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+struct PS_INPUT
+{
+};
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+
+float4 main(PS_INPUT input): COLOR0
+{
+    return 0;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/partic_d3d9_hlsl_vs2x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/partic_d3d9_hlsl_vs2x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/partic_d3d9_hlsl_vs2x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,177 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    float3 normalObj: NORMAL;
+    S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+    float4 diffuse: COLOR0;
+    float2 mainTexCoord: TEXCOORD0;
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+    float2 mainTexCoord: TEXCOORD0;
+    float4 diffuse: COLOR0;
+    float4 specular: COLOR1;
+    float fogCoord: TEXCOORD2;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 projMat;
+
+S3D_MATBONE_DECL_STD(matBone)
+
+const float4 mtrlPower;
+const float4 mtrlEmissive;
+
+#ifdef S3D_LIGHT_CNT
+const s3d_StdProgLight lightArray[S3D_LIGHT_CNT];
+const int activeLights;
+#endif
+
+float4 anim;        // Animation time between 0 and 1
+float4 colorAlpha;  // Color and alpha factor
+float4 param;       // x=Particle radius, y=Move-along-normal-factor
+float4 moveLin;     // Linear movement vector
+float4 moveQuadr;   // Quadratic movement vector
+float4 moveVari;    // Variation amount, see below
+float4 moveJiggle;  // Jiggle amount vector, see below.
+float4 shrink;      // x=fadeIn, y=fadeOut, z=flickerAmp, w=flickerVel
+float4 other;       // x=asyncFactor, y=repeat, z=jiggleVel, w=unused
+
+///////////////////////////////////////////////////////////////////////////////
+// Seed values:
+
+float4 seedVariX = float4(8576, 6968, 8285, 1375);
+float4 seedVariY = float4(9257, 7911, 4491, 4178);
+float4 seedVariZ = float4(9621, 7416, 9166, 1405);
+float4 seedJiggleX = float4(9809, 4760, 6104, 3046);
+float4 seedJiggleY = float4(7590, 5729, 8471, 1556);
+float4 seedJiggleZ = float4(9904, 0636, 4127, 5254);
+float4 seedAnim = float4(8891, 1068, 3747, 5529);
+float4 seedRotU = float4(3147, 0722, 3324, 7158);
+float4 seedRotV = float4(7020, 4337, 7956, 1530);
+
+///////////////////////////////////////////////////////////////////////////////
+// Utility functions:
+
+float quickSin(float phase)
+{
+    float rel = frac(phase) - 0.5;
+    float val = - 16 * rel * (0.5 - abs(rel));
+    return val;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 2x0
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+    
+    float animRandom =  dot(input.posObj, seedAnim);
+    float curAnim = frac(other.x * animRandom + other.y * anim.x);
+    
+    // The movement direction is varied by a pseudo-random value.
+    float3 variRandom;
+    variRandom.x = dot(input.posObj, seedVariX);
+    variRandom.y = dot(input.posObj, seedVariY);
+    variRandom.z = dot(input.posObj, seedVariZ);
+    float3 variUnit = (2 * frac(variRandom) - 1);
+    float3 variDelta = variUnit * moveVari.xyz;
+
+    // The particles jiggle in direction of a pseudo-random value.
+    float3 jiggleRandom;
+    jiggleRandom.x = dot(input.posObj, seedJiggleX);
+    jiggleRandom.y = dot(input.posObj, seedJiggleY);
+    jiggleRandom.z = dot(input.posObj, seedJiggleZ);
+    float3 jiggleUnit = (2 * frac(jiggleRandom) - 1);
+    float3 jiggleDelta = jiggleUnit * moveJiggle 
+                    * quickSin(curAnim * other.z);
+    
+    // Move particle in object coordinates:
+    float3 moveTot = moveLin.xyz;           // Move into constant direction
+    moveTot += input.normalObj * param.y;   // Move along normal vector
+    moveTot += curAnim * moveQuadr.xyz;     // Move along a quadratic curve
+    moveTot += variDelta;                   // Move into a random direction
+    float4 posObj = input.posObj;
+    posObj.xyz += curAnim * moveTot;        // Add move
+    posObj.xyz += jiggleDelta;              // Jitter
+
+    // Transformation from object into view coordinates:
+    float4x4 matBoneFinal;
+    S3D_BONE_TRANSF_STD(
+            matBoneFinal, matBone, input.boneWgh, input.boneSubscr);
+    // Transform vectors by matBoneFinal
+    float4 posView = mul(posObj, matBoneFinal);
+    
+    // Calculate effective particle radius.
+    // This includes fading in, fading out and flickering.
+    float fadeIn = curAnim * shrink.x;
+    float fadeOut = (1 - curAnim) * shrink.y;
+    float fade = min(1, min(fadeIn, fadeOut));
+    float flicker = 1 - shrink.z * quickSin(curAnim * shrink.w); 
+    float radius = param.x * flicker * fade;
+    
+    // Until now we only have the particle center.
+    // Now we alculate the corner coordinates.
+    // The particle is rotated by a pseudo-random angle:
+    float2 rotRandom;
+    rotRandom.x = dot(input.posObj, seedRotU);
+    rotRandom.y = dot(input.posObj, seedRotV);
+    float2 rotDir = normalize(frac(rotRandom) - float2(0.5, 0.5));
+    float2 rotU = radius * 1.4142 * rotDir;
+    float2 rotV = float2(- rotU.y, rotU.x);
+    float2 coord = (input.mainTexCoord.xy - float2(0.5, 0.5));
+    posView.xy += rotU * coord.x + rotV * coord.y;
+
+    // Projection:
+    output.posScr = mul(posView, projMat);
+    output.mainTexCoord = input.mainTexCoord;
+    output.fogCoord = posView.z / posView.w;
+
+//    output.diffuse = input.diffuse;
+//    output.specular = 0;
+    
+    // Calculate vertex color:
+#ifdef S3D_LIGHT_CNT
+    float4 colDiffuse = mtrlEmissive;
+    float4 colSpecular = 0;
+    for(int i = 0; i < activeLights; i++)
+    {
+        s3d_ColPair lightCol = s3d_calcPointLightTerm(
+                posView.xyz, 0, mtrlPower.w, lightArray[i]);
+        colDiffuse.rgb += lightCol.diffuse.rgb;
+        colSpecular.rgb += lightCol.specular.rgb;
+    }
+    output.diffuse = colDiffuse * colorAlpha * input.diffuse;
+    output.specular = colSpecular;
+#else
+    output.diffuse = colorAlpha * input.diffuse;
+    output.specular = 0;
+#endif
+	
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gen_shvol_extrude_d3d9_hlsl_vs1x1.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gen_shvol_extrude_d3d9_hlsl_vs1x1.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gen_shvol_extrude_d3d9_hlsl_vs1x1.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,78 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+    float3 normalObj: NORMAL;
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 projMat;
+const float4x4 matView;
+
+S3D_MATBONE_DECL_STD(matBone)
+
+const float4 lightCenRange;
+const float4 lightExtrude;
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 1x1
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    float4x4 matBoneFinal;
+    S3D_BONE_TRANSF_STD(
+            matBoneFinal, matBone, input.boneWgh, input.boneSubscr);
+    // Transform vectors by matBoneFinal
+    float4 posView = mul(input.posObj, matBoneFinal);
+    float3 normalView = normalize(mul(input.normalObj, matBoneFinal).xyz);
+
+    float3 effLightCenRange = lightCenRange;
+
+#ifdef S3D_USE_BLOAT
+    // Bloat:
+    effLightCenRange.xyz -= normalView * lightExtrude.z;
+#endif
+    
+    // Calculate normalized extrusion direction vector:
+    float3 dirNrm = normalize(posView.xyz - effLightCenRange.xyz);
+
+    // Extrude:
+    float prod = dot(dirNrm, normalView) * lightExtrude.w;
+    // Important! If the product is zero, extrusion must be off.
+    float sign = (prod > 0) ? 1 : 0;
+    float move = sign * lightExtrude.x + lightExtrude.y;
+    posView.xyz = move * dirNrm + posView;
+
+    // Transform:
+    output.posScr = mul(posView, projMat);
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/plain_pointcoltex_d3d9_hlsl_ps2x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/plain_pointcoltex_d3d9_hlsl_ps2x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/plain_pointcoltex_d3d9_hlsl_ps2x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,33 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+struct PS_INPUT
+{
+    float4 diffuse: COLOR0;
+    float2 mainTexCoord: TEXCOORD0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+sampler tex0: register(s0);
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+
+float4 main(PS_INPUT input): COLOR0
+{
+    return tex2D(tex0, input.mainTexCoord) * input.diffuse;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/plain_pointtex_d3d9_hlsl_ps2x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/plain_pointtex_d3d9_hlsl_ps2x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/plain_pointtex_d3d9_hlsl_ps2x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,33 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+struct PS_INPUT
+{
+    float4 diffuse: COLOR0;
+    float2 mainTexCoord: TEXCOORD0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+sampler tex0: register(s0);
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+
+float4 main(PS_INPUT input): COLOR0
+{
+    return tex2D(tex0, input.mainTexCoord) * input.diffuse;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_diffuse_d3d9_hlsl_ps3x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_diffuse_d3d9_hlsl_ps3x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_diffuse_d3d9_hlsl_ps3x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,277 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+
+//#define Poly2Point 
+
+struct PS_INPUT
+{
+float3 normalWorld  : TEXCOORD1;
+float3 posWorld : TEXCOORD0;
+};
+
+sampler colorSamp: register(s0);
+sampler distanceSamp: register(s1);
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 3x0
+
+#ifdef Poly2Point
+
+float4 GetContibution(float3 L, float3 L1, float3 L2, float3 L3, float3 L4, float3 pos, float3 N, samplerCUBE cubemap)
+{
+float d;
+d = texCUBE(cubemap, L1).r;
+L1 = d * normalize(L1);
+d = texCUBE(cubemap, L2).r;
+L2 = d * normalize(L2);
+d = texCUBE(cubemap, L3).r;
+L3 = d * normalize(L3);
+d = texCUBE(cubemap, L4).r;
+L4 = d * normalize(L4);
+
+
+    float3 r1 = normalize(L1 - pos);    
+    float3 r2 = normalize(L2 - pos);
+    float3 r3 = normalize(L3 - pos);
+    float3 r4 = normalize(L4 - pos);
+  
+  float3 crossP = cross(r1, r2);
+  float r = length(crossP);
+  float dd = dot(r1,r2);
+  float tri1 = acos(dd) * dot(crossP/r, N);
+  
+  crossP = cross(r2, r3);
+  r = length(crossP);
+  dd = dot(r1,r2);
+  float tri2 = acos(dd) * dot(crossP/r, N);
+  
+  crossP = cross(r3, r4);
+  r = length(crossP);
+  dd = dot(r1,r2);
+  float tri3 = acos(dd) * dot(crossP/r, N);
+  
+  crossP = cross(r4, r1);
+  r = length(crossP);
+  dd = dot(r1,r2);
+  float tri4= acos(dd) * dot(crossP/r, N);
+  
+  
+   return max(tri1 + tri2 + tri3 + tri4, 0);
+}
+
+float4 main(PS_INPUT input): COLOR0
+{
+    float M = 4;
+
+    float3 N = normalize( input.normalWorld ); 
+    float3 pos = input.posWorld;
+    
+    //return texCUBE(colorSamp, N);
+      
+    float4 I = 0;
+    float3 L1, L2, L3, L4, L;
+    float4 Le;
+    float width = 1.0 / M;
+    float width2 = width * 2;
+    float d; 
+
+    for (float x = 1; x < M; x++)
+ for (float y = 1; y < M; y++)
+ {
+    float2 p, tpos; 
+    tpos.x = x * width;
+    tpos.y = y * width;
+    
+    p = tpos.xy;    
+    p = 2.0 * p - 1.0; //-1..1
+            
+L1 = float3(p.x - width, p.y - width, 1);
+L2 = float3(p.x + width, p.y - width, 1);
+L3 = float3(p.x + width, p.y + width, 1);
+L4 = float3(p.x - width, p.y + width, 1);
+L = float3(p.x, p.y, 1);
+Le = float4(texCUBE(colorSamp, L).rgb, 1);
+
+I += 0.5 * Le * GetContibution( L, L1, L2, L3, L4, pos, N, distanceSamp);
+
+}
+
+for (float x = 1; x < M; x++)
+ for (float y = 1; y < M; y++)
+ {
+float2 p, tpos; 
+    tpos.x = x * width;// 0..1
+    tpos.y = y * width;// 0..1
+    
+    p = tpos.xy;    
+    p = 2.0 * p - 1.0; //-1..1
+            
+L4 = float3(p.x - width, p.y - width, -1);
+L3 = float3(p.x + width, p.y - width, -1);
+L2 = float3(p.x + width, p.y + width, -1);
+L1 = float3(p.x - width, p.y + width, -1);
+L = float3(p.x, p.y, -1);
+Le = float4(texCUBE(colorSamp, L).rgb, 1);
+
+I += 0.5 * Le * GetContibution( L, L1, L2, L3, L4, pos, N, distanceSamp);
+ }
+ 
+for (float x = 1; x < M; x++)
+ for (float y = 1; y < M; y++)
+ {
+float2 p, tpos; 
+    tpos.x = x * width;// 0..1
+    tpos.y = y * width;// 0..1
+    
+    p = tpos.xy;    
+    p = 2.0 * p - 1.0; //-1..1
+            
+L4 = float3(p.x - width, 1, p.y - width);
+L3 = float3(p.x + width, 1, p.y - width);
+L2 = float3(p.x + width, 1, p.y + width);
+L1 = float3(p.x - width, 1, p.y + width);
+L = float3(p.x, 1, p.y);
+Le = float4(texCUBE(colorSamp, L).rgb, 1);
+
+I += 0.5 * Le * GetContibution( L, L1, L2, L3, L4, pos, N, distanceSamp);
+ }
+ 
+for (float x = 1; x < M; x++)
+ for (float y = 1; y < M; y++)
+ {
+float2 p, tpos; 
+    tpos.x = x * width;// 0..1
+    tpos.y = y * width;// 0..1
+    
+    p = tpos.xy;    
+    p = 2.0 * p - 1.0; //-1..1
+            
+L1 = float3(p.x - width, -1, p.y - width);
+L2 = float3(p.x + width, -1, p.y - width);
+L3 = float3(p.x + width, -1, p.y + width);
+L4 = float3(p.x - width, -1, p.y + width);
+L = float3(p.x, -1, p.y);
+Le = float4(texCUBE(colorSamp, L).rgb, 1);
+
+I += 0.5 * Le * GetContibution( L, L1, L2, L3, L4, pos, N, distanceSamp);
+ }
+ 
+ for (float x = 1; x < M; x++)
+ for (float y = 1; y < M; y++)
+{
+float2 p, tpos; 
+    tpos.x = x * width;// 0..1
+    tpos.y = y * width;// 0..1
+    
+    p = tpos.xy;    
+    p = 2.0 * p - 1.0; //-1..1
+            
+L1 = float3(1, p.x - width, p.y - width);
+L2 = float3(1, p.x + width, p.y - width);
+L3 = float3(1, p.x + width, p.y + width);
+L4 = float3(1, p.x - width, p.y + width);
+L = float3(1, p.x, p.y);
+Le = float4(texCUBE(colorSamp, L).rgb, 1);
+
+I += 0.5 * Le * GetContibution( L, L1, L2, L3, L4, pos, N, distanceSamp);
+}
+ 
+for (float x = 1; x < M; x++)
+ for (float y = 1; y < M; y++)
+ {
+float2 p, tpos; 
+    tpos.x = x * width;// 0..1
+    tpos.y = y * width;// 0..1
+    
+    p = tpos.xy;    
+    p = 2.0 * p - 1.0; //-1..1
+            
+L4 = float3(-1, p.x - width, p.y - width);
+L3 = float3(-1, p.x + width, p.y - width);
+L2 = float3(-1, p.x + width, p.y + width);
+L1 = float3(-1, p.x - width, p.y + width);
+L = float3(-1, p.x, p.y);
+Le = float4(texCUBE(colorSamp, L).rgb, 1);
+
+I += 0.5 * Le * GetContibution( L, L1, L2, L3, L4, pos, N, distanceSamp);
+ }
+ float kd = 0.5;
+ return 1;
+return kd * I;
+}
+
+
+
+#else
+
+float4 P2PContr(float3 N, float3 Nl, float3 pos, float3 L, samplerCUBE cubemap, samplerCUBE distmap)
+{
+Nl = normalize(Nl);
+L = normalize(L);
+float4 Le = texCUBE(cubemap, L);
+float d = texCUBE(distmap, L).r;
+float3 Lpos = L * d;
+float3 Ldir = Lpos - pos;
+float dist2 = dot(Ldir, Ldir);
+if (dist2<0.5) dist2 = 0.5;
+float dist = 4 * dist2;
+Ldir = normalize(Ldir);
+
+return Le * (max(dot(N, Ldir),0) * dot(Nl, -1 * Ldir)) / dist;
+}
+
+float4 main(PS_INPUT input): COLOR0
+{
+    float M = 4.0;
+
+    float3 N = normalize( input.normalWorld ); 
+    float3 pos = input.posWorld;
+
+    //return texCUBE(distanceSamp, N).r;
+    
+//return float4(N,1);
+
+    float4 I = 0;
+    float3 L;
+    float4 Le;
+    float width = 1.0 / M;
+    float d;
+
+    float kd = 1.0;
+
+    for (float x = 0.5; x < M; x++)
+ for (float y = 0.5; y < M; y++)
+ {
+    float2 p, tpos; 
+    tpos.x = x * width;
+    tpos.y = y * width;
+    
+    p = tpos.xy;    
+    p = 2.0 * p - 1.0; //-1..1
+            
+I += P2PContr(N, float3(0,0,-1), pos, float3(p.x, p.y, 1), colorSamp, distanceSamp);
+I += P2PContr(N, float3(0,0,1), pos, float3(-p.x, p.y, -1), colorSamp, distanceSamp);
+I += P2PContr(N, float3(-1,0,0), pos, float3(1, p.y, -p.x), colorSamp, distanceSamp);
+I += P2PContr(N, float3(1,0,0), pos, float3(-1, p.y, p.x), colorSamp, distanceSamp);
+I += P2PContr(N, float3(0,-1,0), pos, float3(p.x, 1, -p.y), colorSamp, distanceSamp);
+I += P2PContr(N, float3(0,1,0), pos, float3(p.x, -1, p.y), colorSamp, distanceSamp);
+}
+
+//return 1;
+return kd * I;
+
+}
+#endif
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gen_shmap_d3d9_hlsl_ps2x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gen_shmap_d3d9_hlsl_ps2x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gen_shmap_d3d9_hlsl_ps2x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,30 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+struct PS_INPUT
+{
+    float2 depthScr: TEXCOORD0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+
+float4 main(PS_INPUT input): COLOR0
+{
+    float2 depthScr = input.depthScr;
+    float fragDepth = clamp(depthScr.x / depthScr.y, 0, 1);
+    return fragDepth;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/bloom_smooth_d3d9_hlsl_ps2x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/bloom_smooth_d3d9_hlsl_ps2x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/bloom_smooth_d3d9_hlsl_ps2x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,54 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+struct PS_INPUT
+{
+    float2 mainTexCoord: TEXCOORD0;
+    float4 baseVec: TEXCOORD2;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+sampler tex0: register(s0);
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+
+float4 main(PS_INPUT input): COLOR0
+{
+    float2 mainTexCoord = input.mainTexCoord;
+    float2 offsPix0 = input.baseVec.xy;
+    float2 offsPix1 = input.baseVec.zw;
+    float2 offsPix2 = offsPix0 + offsPix1;
+    float2 offsPix3 = offsPix0 - offsPix1;
+
+    float4 val = tex2D(tex0, mainTexCoord);
+    float4 val0 = tex2D(tex0, mainTexCoord.xy + offsPix0);
+    float4 val1 = tex2D(tex0, mainTexCoord.xy + offsPix1);
+    float4 val2 = tex2D(tex0, mainTexCoord.xy + offsPix2);
+    float4 val3 = tex2D(tex0, mainTexCoord.xy + offsPix3);
+    float4 val4 = tex2D(tex0, mainTexCoord.xy - offsPix0);
+    float4 val5 = tex2D(tex0, mainTexCoord.xy - offsPix1);
+    float4 val6 = tex2D(tex0, mainTexCoord.xy - offsPix2);
+    float4 val7 = tex2D(tex0, mainTexCoord.xy - offsPix3);
+
+    float4 sum
+        = (val * val + val0 * val0 + val1 * val1 + val2 * val2 + val3 * val3
+        + 0.5 * (val4 * val4 + val5 * val5 + val6 * val6 + val7 * val7))
+        * 0.142857f; // = approx. 1.0 / 7.0
+
+    return sqrt(sum);
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_distance_impostor_d3d9_hlsl_ps3x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_distance_impostor_d3d9_hlsl_ps3x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_distance_impostor_d3d9_hlsl_ps3x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,29 @@
+
+struct PS_INPUT
+{
+    float3 viewVec: TEXCOORD1;
+};
+
+
+struct PS_OUTPUT
+{
+    float4  distance: COLOR0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+sampler tex0: register(s0);
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+
+PS_OUTPUT main(PS_INPUT input)
+{
+	PS_OUTPUT output;
+	output.distance = float4(length(input.viewVec), 0, 0, 0);
+	//output.distance = float4(1.0,1.0,1.0,1.0) * 4.0;
+	return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/plain_pointcoltex_d3d9_hlsl_vs2x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/plain_pointcoltex_d3d9_hlsl_vs2x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/plain_pointcoltex_d3d9_hlsl_vs2x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,62 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+    float4 diffuse: COLOR0;
+    float2 mainTexCoord: TEXCOORD0;
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+    float4 diffuse: COLOR0;
+    float2 mainTexCoord: TEXCOORD0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 projMat;
+const float4x4 matView;
+
+S3D_MATBONE_DECL_STD(matBone)
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 2x0
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    float4x4 matBoneFinal;
+    S3D_BONE_TRANSF_STD(
+            matBoneFinal, matBone, input.boneWgh, input.boneSubscr);
+    // Transform vectors by matBoneFinal
+    float4 posView = mul(input.posObj, matBoneFinal);
+
+    output.posScr = mul(posView, projMat);
+    output.diffuse = input.diffuse;
+    output.mainTexCoord.xy = input.mainTexCoord;
+
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/include_stdstate_d3d9_hlsl.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/include_stdstate_d3d9_hlsl.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/include_stdstate_d3d9_hlsl.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,37 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef STDSTATE_D3D9_HLSL_SC
+#define STDSTATE_D3D9_HLSL_SC
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct s3d_StdProgLight
+{
+    float4 pos;
+    float4 ambient;
+    float4 diffuse;
+    float4 specular;
+    float4 atten;
+};
+
+struct s3d_ColPair
+{
+   float4 diffuse: COLOR0;
+   float4 specular: COLOR1;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+#endif // STDSTATE_D3D9_HLSL_SC
+
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/bump_d3d9_hlsl_ps2x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/bump_d3d9_hlsl_ps2x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/bump_d3d9_hlsl_ps2x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,212 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_shmap_filter_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct PS_INPUT
+{
+    float2 mainTexCoord: TEXCOORD0;
+    float3 diffuseDirSurf: TEXCOORD1;
+    float3 specularDirSurf: TEXCOORD2;
+    float3 scaledSurfToLight: TEXCOORD3;
+#ifdef S3D_PARALLAX_MAPPING
+    float3 camToVertSurf: TEXCOORD4;
+#endif
+#ifdef S3D_LIGHT_BRIGHT
+    float4 lightBrightCoord: TEXCOORD5;
+    float4 secPosScr: TEXCOORD6;
+#endif
+#ifdef S3D_LIGHT_PROJ
+    float4 lightProjCoord: TEXCOORD5;
+#endif
+#ifdef S3D_LIGHT_SHMAP
+    float4 lightShmapCoord: TEXCOORD6;
+#endif
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+sampler mainSamp: register(s0);
+sampler normalSamp: register(s1);
+#ifdef S3D_LIGHT_BRIGHT
+sampler lightBrightSamp: register(s2);
+#endif
+#ifdef S3D_LIGHT_PROJ
+sampler lightProjSamp: register(s2);
+#endif
+#ifdef S3D_LIGHT_SHMAP
+sampler lightShmapSamp: register(s3);
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4 lightAmbient;
+const float4 lightDiffuse;
+const float4 lightSpecular;
+
+#ifdef S3D_LIGHT_BRIGHT
+const float4 lightBrightRcpSize;
+#endif
+
+#ifdef S3D_LIGHT_SHMAP
+const float4 lightShmapSize;
+const float4 lightShmapRcpSize;
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+
+#define S3D_INTENS_DISCARD_TRESHOLD 0.001
+#define S3D_BRIGHT_EPS 0.01
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+
+float4 main(PS_INPUT input): COLOR0
+{
+#ifdef S3D_GEOMETRIC_SHADOW
+    // Geometric shadow
+    //clip(input.diffuseDirSurf.z);
+    // ATI Mobility Radeon X1600 workaround:
+    clip(float4(0, 0, 1, 0) * input.diffuseDirSurf); 
+#endif
+
+#ifdef S3D_LIGHT_SHMAP
+    float3 clipVal = input.lightShmapCoord.www 
+            - abs(2 * input.lightShmapCoord.xyz - input.lightShmapCoord.www);
+    clip(clipVal.xyz);
+#endif
+
+#ifdef S3D_LIGHT_BRIGHT
+#ifdef S3D_LIGHT_BRIGHT_CARE
+    float4 brightVecMain = tex2Dproj(
+            lightBrightSamp, input.lightBrightCoord);
+    float brightIdent = frac(100.0 * input.secPosScr.z / input.secPosScr.w);
+    float brightDeltaMain = abs(brightVecMain.w - brightIdent);
+    float brightVal = brightVecMain.x;
+    if(brightDeltaMain > S3D_BRIGHT_EPS)
+    {
+        float2 brightOffs = lightBrightRcpSize.xy * input.lightBrightCoord.w;
+        float4 brightCoordX = float4(
+                input.lightBrightCoord.xy + brightOffs, 
+                input.lightBrightCoord.zw);
+        float4 brightCoordY = float4(
+                input.lightBrightCoord.xy - brightOffs, 
+                input.lightBrightCoord.zw);
+        float4 brightCoordZ = brightCoordX;
+        brightCoordZ.y = brightCoordY.y;
+        float4 brightCoordW = brightCoordY;
+        brightCoordW.y = brightCoordX.y;
+        float4 brightVecX = tex2Dproj(lightBrightSamp, brightCoordX);
+        float4 brightVecY = tex2Dproj(lightBrightSamp, brightCoordY);
+        float4 brightVecZ = tex2Dproj(lightBrightSamp, brightCoordZ);
+        float4 brightVecW = tex2Dproj(lightBrightSamp, brightCoordW);
+        brightVal = min(brightVecMain.x,
+                        min(min(brightVecX.x, brightVecY.x),
+                            min(brightVecZ.x, brightVecW.x)));
+    }
+#else    
+    // Lookup brightness:
+    float brightVal = tex2Dproj(lightBrightSamp, input.lightBrightCoord).x;
+#endif    
+    // Exit if no light:    
+    clip(brightVal - S3D_INTENS_DISCARD_TRESHOLD);
+#endif    
+#ifdef S3D_LIGHT_SHMAP
+    // Shadow map:
+    float shmapVal = s3d_shmapFilter(
+            lightShmapSamp, input.lightShmapCoord,
+            lightShmapSize, lightShmapRcpSize);
+    clip(shmapVal - S3D_INTENS_DISCARD_TRESHOLD);            
+#endif
+    
+    // Texture coordinates:
+    float2 mainTexCoord = input.mainTexCoord;
+#ifdef S3D_PARALLAX_MAPPING
+    float3 camToVertSurfNrm = normalize(input.camToVertSurf);
+    float height = tex2D(normalSamp, mainTexCoord).a;
+    float2 offset = S3D_PARALLAX_SCALE * (S3D_PARALLAX_BIAS - height) 
+            * camToVertSurfNrm.xy;
+    mainTexCoord = mainTexCoord + offset;
+#endif
+
+    // Texture lookups:
+    float4 texCol = tex2D(mainSamp, mainTexCoord);
+    float4 rawNormalView = tex2D(normalSamp, mainTexCoord);
+    float3 normalView = (rawNormalView.xyz - 0.5) * 2;
+
+    // Calculate range-factor:
+    float rangeFac =
+        max(1.0 - dot(input.scaledSurfToLight, input.scaledSurfToLight), 0.0);
+
+    // Diffuse direction:
+    float3 diffuseDirSurfNrm = normalize(input.diffuseDirSurf);
+
+    // Calculate diffuse:
+    float4 diffuse = float4(lightDiffuse.xyz * rangeFac, lightDiffuse.w);
+    diffuse += lightAmbient;
+    float diffDot = dot(normalView, diffuseDirSurfNrm);
+#ifdef S3D_MILD
+    float diffFac = diffDot * (1 - S3D_MILD) + S3D_MILD;
+#else
+    float diffFac = diffDot;
+#endif
+    diffuse *= saturate(diffFac);
+
+    // Calculate specular:
+    float4 specular = float4(lightSpecular.xyz * rangeFac, lightSpecular.w);
+    float3 specularDirSurfNrm = normalize(input.specularDirSurf);
+    float specDot = dot(normalView, specularDirSurfNrm);
+    float specFac = saturate(pow(saturate(specDot), S3D_SPECULAR_EXP));
+    specular *= specFac ;
+
+    float4 outCol;
+    outCol.rgb = saturate(diffuse * texCol 
+            + specular * texCol.a);
+    // Preserve original opacity from texture.
+    outCol.a = texCol.a;
+
+#ifdef S3D_GEOMETRIC_SHADOW
+    // Geometric shadow
+    float geomShadow = saturate(diffuseDirSurfNrm.z * 4);
+    outCol.rgb = saturate(outCol.rgb * geomShadow);
+#endif
+
+#ifdef S3D_LIGHT_BRIGHT
+    // Correct brightness:
+    // The smoothing algorithm generates higher brightness gradients 
+    // near 0 and 1 due to sticking to 0 and 1. 
+    // This is approximately compensated by using a quadratic function 
+    // near 0 and 1.
+    brightVal = 2.0 * brightVal * brightVal * (1.5 - brightVal);
+
+    // Apply brightness:
+    outCol.rgb = outCol.rgb * brightVal;
+#endif
+
+#ifdef S3D_LIGHT_PROJ
+    float4 texColProjTex = tex2Dproj(lightProjSamp, input.lightProjCoord);
+    outCol *= texColProjTex;
+#endif
+
+#ifdef S3D_LIGHT_SHMAP
+    outCol *= shmapVal;
+#endif
+
+    return outCol / dot(input.scaledSurfToLight, input.scaledSurfToLight);
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/plain_pointtex_d3d9_hlsl_vs2x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/plain_pointtex_d3d9_hlsl_vs2x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/plain_pointtex_d3d9_hlsl_vs2x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,61 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+    float2 mainTexCoord: TEXCOORD0;
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+    float4 diffuse: COLOR0;
+    float2 mainTexCoord: TEXCOORD0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 projMat;
+const float4x4 matView;
+const float4 mtrlEmissive;
+
+S3D_MATBONE_DECL_STD(matBone)
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 2x0
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    float4x4 matBoneFinal;
+    S3D_BONE_TRANSF_STD(
+            matBoneFinal, matBone, input.boneWgh, input.boneSubscr);
+    // Transform vectors by matBoneFinal
+    float4 posView = mul(input.posObj, matBoneFinal);
+
+    output.posScr = mul(posView, projMat);
+    output.diffuse = mtrlEmissive;
+    output.mainTexCoord = input.mainTexCoord;
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/bloom_combine_d3d9_hlsl_ps2x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/bloom_combine_d3d9_hlsl_ps2x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/bloom_combine_d3d9_hlsl_ps2x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,34 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+struct PS_INPUT
+{
+    float2 mainTexCoord: TEXCOORD0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+sampler tex0: register(s0);
+sampler tex1: register(s1);
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+
+float4 main(PS_INPUT input): COLOR0
+{
+    float2 mainTexCoord = input.mainTexCoord;
+    return tex2D(tex0, mainTexCoord) + 0.5 *tex2D(tex1, mainTexCoord);
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gen_shmap_d3d9_hlsl_vs2x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gen_shmap_d3d9_hlsl_vs2x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gen_shmap_d3d9_hlsl_vs2x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,53 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+    float2 depthScr: TEXCOORD0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 projMat;
+S3D_MATBONE_DECL_STD(matBone)
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 2x0
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+    float4x4 matBoneFinal;
+    S3D_BONE_TRANSF_STD(
+            matBoneFinal, matBone, input.boneWgh, input.boneSubscr); 
+
+    float4 viewPos = mul(input.posObj, matBoneFinal);
+    output.posScr = mul(viewPos, projMat);
+    output.depthScr.xy = output.posScr.zw;
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/bloom_bright_d3d9_hlsl_ps2x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/bloom_bright_d3d9_hlsl_ps2x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/bloom_bright_d3d9_hlsl_ps2x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,37 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+struct PS_INPUT
+{
+    float2 mainTexCoord: TEXCOORD0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+sampler tex0: register(s0);
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+
+float4 main(PS_INPUT input): COLOR0
+{
+    float2 mainTexCoord = input.mainTexCoord;
+
+    float4 color = tex2D(tex0, mainTexCoord);
+    float intensity = max(color.x, max(color.y, color.z));
+    color = color * intensity;
+    return color;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/bloom_smooth_d3d9_hlsl_vs1x1.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/bloom_smooth_d3d9_hlsl_vs1x1.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/bloom_smooth_d3d9_hlsl_vs1x1.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,89 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    float2 mainTexCoord: TEXCOORD0;
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+    float fog: FOG;
+    float4 diffuse: COLOR0;
+    float2 mainTexCoord: TEXCOORD0;
+    float4 baseVec: TEXCOORD2;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 matProjView;
+const float4x4 matView;
+const float4 mtrlEmissive;
+
+const float4 passInfo;
+const float4 tex0RcpSize;
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 1x1
+
+VS_OUTPUT main( VS_INPUT input )
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    //Transform position to clip space
+    output.posScr = mul(input.posObj, matProjView);
+
+    //Transform position to eye space -> pos
+    float4 posView = mul(input.posObj, matView);
+
+    //fog
+    output.fog = posView.z / posView.w;
+
+    //Color
+    output.diffuse = mtrlEmissive;
+
+    // Texture coordinates
+    output.mainTexCoord = input.mainTexCoord;
+
+    // Scaling offset
+    int iter = passInfo.x;
+
+    // Use fractional basis value to reduce banding:
+    float2 offsScale = tex0RcpSize * pow(2.1, iter) * 0.5;
+
+    float4 dirVec;
+    int fiter = fmod(iter, 4.0);
+    if(fiter < 2.0)
+    {
+        if(fiter < 1.0)
+            dirVec = float4(1, 0, 0, 1); // Vectors (1, 0) and (0, 1)
+        else
+            dirVec = float4(1, 1,-1, 1); // Vectors (1, 1) and (-1, 1)
+    }
+    else
+    {
+        if(fiter < 3.0)
+            dirVec = float4(2, 1,-1, 2); // Vectors (2, 1) and (-1, 2)
+        else
+            dirVec = float4(1, 2,-2, 1); // Vectors (1, 2) and (-2, 1)
+    }
+    
+    output.baseVec = dirVec * offsScale.xyxy;
+
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_distance_impostor_d3d9_hlsl_vs3x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_distance_impostor_d3d9_hlsl_vs3x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_distance_impostor_d3d9_hlsl_vs3x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,47 @@
+
+// gametools
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+    float3 viewVec: TEXCOORD1;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 projMat;
+const float4x4 matView;
+
+S3D_MATBONE_DECL_STD(matBone)
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 2x0
+
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    float4x4 matBoneFinal;
+    S3D_BONE_TRANSF_STD(
+            matBoneFinal, matBone, input.boneWgh, input.boneSubscr);
+    // Transform vectors by matBoneFinal
+
+    float4 posView = mul(input.posObj, matBoneFinal);
+
+    output.posScr = mul(posView, projMat);
+    output.viewVec = posView;
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/bump_d3d9_hlsl_vs1x1.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/bump_d3d9_hlsl_vs1x1.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/bump_d3d9_hlsl_vs1x1.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,123 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    float3 normalObj: NORMAL;
+    S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+    float2 mainTexCoord: TEXCOORD0;
+    float3 tangentUObj: TEXCOORD1;
+    float3 tangentVObj: TEXCOORD2;
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+    float2 mainTexCoord: TEXCOORD0;
+    float3 diffuseDirSurf: TEXCOORD1;
+    float3 specularDirSurf: TEXCOORD2;
+    float3 scaledSurfToLight: TEXCOORD3;
+#ifdef S3D_PARALLAX_MAPPING
+    float3 camToVertSurf: TEXCOORD4;
+#endif
+#ifdef S3D_LIGHT_BRIGHT
+    float4 lightBrightCoord: TEXCOORD5;
+    float4 secPosScr: TEXCOORD6;
+#endif
+#ifdef S3D_LIGHT_PROJ
+    float4 lightProjCoord: TEXCOORD5;
+#endif
+#ifdef S3D_LIGHT_SHMAP
+    float4 lightShmapCoord: TEXCOORD6;
+#endif
+    float fog: FOG;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 projMat;
+S3D_MATBONE_DECL_STD(matBone)
+
+const float4 lightCenRange;
+#ifdef S3D_LIGHT_BRIGHT
+const float4x4 lightBrightMat;
+#endif
+#ifdef S3D_LIGHT_PROJ
+const float4x4 lightProjMat;
+#endif
+#ifdef S3D_LIGHT_SHMAP
+const float4x4 lightShmapMat;
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 1x1
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    float4x4 matBoneFinal;
+    S3D_BONE_TRANSF_STD(
+            matBoneFinal, matBone, input.boneWgh, input.boneSubscr);
+    // Transform vectors by matBoneFinal
+    float4 posView = mul(input.posObj, matBoneFinal);
+    float3 normalView = mul(input.normalObj, matBoneFinal).xyz;
+    float3 tangentUObj = input.tangentUObj.xyz;
+    float3 tangentVObj = input.tangentVObj.xyz;
+    float3 tangentUView = mul(tangentUObj, matBoneFinal);
+    float3 tangentVView = mul(tangentVObj, matBoneFinal);
+
+    output.posScr = mul(posView, projMat);
+    output.mainTexCoord = input.mainTexCoord;
+
+    output.fog = posView.z / posView.w;
+
+    float3 camToVertView = posView.xyz;
+    float3 vertToLightView = lightCenRange - camToVertView;   
+    float3 vertToLightDirView = normalize(vertToLightView);
+    float3 halfDirView = vertToLightDirView - camToVertView;
+    s3d_calcBump(
+            output.diffuseDirSurf, output.specularDirSurf, normalView,
+            vertToLightDirView, halfDirView, tangentUView, tangentVView);
+    // Lightrange-factor: 1 - (lightpos - surfacepos)^2 / range^2
+    output.scaledSurfToLight = vertToLightView / lightCenRange.w;
+
+#ifdef S3D_PARALLAX_MAPPING
+    output.camToVertSurf.x = dot(tangentUView, camToVertView);
+    output.camToVertSurf.y = dot(tangentVView, camToVertView);
+    output.camToVertSurf.z = dot(normalView, camToVertView);
+#endif
+
+#ifdef S3D_LIGHT_BRIGHT
+    output.lightBrightCoord = mul(posView, lightBrightMat);
+    output.secPosScr = output.posScr;
+#endif
+
+#ifdef S3D_LIGHT_PROJ
+    output.lightProjCoord = mul(posView, lightProjMat);
+#endif    
+#ifdef S3D_LIGHT_SHMAP
+    output.lightShmapCoord = mul(posView, lightShmapMat);
+#endif
+
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/bloom_combine_d3d9_hlsl_vs1x1.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/bloom_combine_d3d9_hlsl_vs1x1.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/bloom_combine_d3d9_hlsl_vs1x1.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,59 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    float2 mainTexCoord: TEXCOORD0;
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+    float fog: FOG;
+    float4 diffuse: COLOR0;
+    float2 mainTexCoord: TEXCOORD0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 matProjView;
+const float4x4 matView;
+const float4 mtrlEmissive;
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 1x1
+
+VS_OUTPUT main( VS_INPUT input )
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    //Transform position to clip space
+    output.posScr = mul(input.posObj, matProjView);
+
+    //Transform position to eye space -> pos
+    float4 posView = mul(input.posObj, matView);
+
+    //fog
+    output.fog = posView.z / posView.w;
+
+    //Color
+    output.diffuse = mtrlEmissive;
+
+    output.mainTexCoord = input.mainTexCoord;
+
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_envmapSimple_d3d9_hlsl_ps1x1.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_envmapSimple_d3d9_hlsl_ps1x1.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_envmapSimple_d3d9_hlsl_ps1x1.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,151 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+
+#define NITERATION 4
+
+struct PS_INPUT
+{
+float3 eye     : TEXCOORD0;
+float3 normal  : TEXCOORD1;
+float3 posView : TEXCOORD2;
+};
+
+sampler colorSamp: register(s0);
+sampler distanceSamp: register(s1);
+
+float readDistanceCubeMap(samplerCUBE m, float3 r)
+{
+ float dist = texCUBE(m, r).r;
+ if(dist == 0) dist = 10;
+ return dist;
+}
+
+half3 Hit(samplerCUBE tex, half3 R, half3 p0)
+{
+        float rl = texCUBE(tex, R).r;
+        float dp = rl - dot(p0, R);
+        float3 p = p0 + R * dp;
+        float ppp = length(p) / texCUBE(tex, p).r;
+        float dun = 0, dov = 0, pun = ppp, pov = ppp;
+        if (ppp < 1) dun = dp; else dov = dp;
+        float dl = max( dp + rl * (1 - ppp), 0);
+        float3 RR = p0 + R * dl;
+
+        for(int i = 0; i < NITERATION; i++) {
+                float ddl;
+                float llp = length(RR) / readDistanceCubeMap(tex, RR);
+                if (llp < 1) {
+                        dun = dl; pun = llp;
+                        ddl = (dov == 0) ? rl * (1 - llp) :
+                                (dl - dov) * (1 - llp)/(llp - pov);
+                } else {
+                        dov = dl; pov = llp;
+                        ddl = (dun == 0) ? rl * (1 - llp) :
+                                (dl - dun) * (1 - llp)/(llp - pun);
+                }
+                dl = max(dl + ddl, 0);
+                RR = p0 + R * dl;
+        }
+        return RR;
+}
+
+
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 3x0
+// reflective
+
+
+float4 main(PS_INPUT input): COLOR0
+{
+// return  texCUBE(colorSamp, input.normal);
+//return float4(input.normal, 1);
+
+const float g_FresnelCoeff = 1.0;
+const float g_Transparency = 0.0;
+const float g_RefractFactor = 1.0f;
+
+float3 normal = normalize(input.normal);
+float3 eye = normalize(input.eye);
+
+float3 r1 = reflect(eye, normal);
+float3 RR1 = Hit(distanceSamp, r1, input.posView);
+
+// fresnel
+float3 fresnel = saturate(g_FresnelCoeff + (1.0f - g_FresnelCoeff) * pow(1 - dot(normal, -eye), 5));
+ 
+return texCUBE(colorSamp,RR1) * float4(fresnel, 1);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 3x0
+// refractive
+
+float4 refract(PS_INPUT input): COLOR0
+{
+// return  texCUBE(colorSamp, input.normal);
+//return float4(input.normal, 1);
+
+const float3 g_FresnelCoeff = 0.0;
+const float g_Transparency = 0.3;
+const float g_RefractFactor = 0.8f;
+
+float3 normal = normalize(input.normal);
+float3 eye = normalize(input.eye);
+
+float3 r1 = reflect(eye, normal);
+float3 r2 = refract(eye, normal, g_RefractFactor);
+float3 RR1 = Hit(distanceSamp, r1, input.posView);
+float3 RR2 = Hit(distanceSamp, r2, input.posView);
+
+// fresnel
+float3 fresnel = saturate(g_FresnelCoeff + (1.0f - g_FresnelCoeff) * pow(1 - dot(normal, -eye), 5));
+ 
+//return 1;
+return texCUBE(colorSamp,RR2)*(1- g_Transparency) + texCUBE(colorSamp, RR1) * g_Transparency;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 3x0
+// metal
+float4 Fresnel;
+
+float4 metal(PS_INPUT input): COLOR0
+{
+
+//const float3 g_FresnelCoeff = 0.7;
+const float g_Transparency = 0.0;
+const float g_RefractFactor = 1.0f;
+
+float3 normal = normalize(input.normal);
+float3 eye = normalize(input.eye);
+
+float3 r1 = reflect(eye, normal);
+float3 RR1 = Hit(distanceSamp, r1, input.posView);
+
+
+// fresnel
+float4 fresnel = saturate(Fresnel + (1.0f - Fresnel) * pow(1 - dot(normal, -eye), 5));
+// fresnel = float4(0.95, 0.63, 0.54,1);
+return texCUBE(colorSamp,RR1) * fresnel;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/plain_pointcol_d3d9_hlsl_ps2x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/plain_pointcol_d3d9_hlsl_ps2x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/plain_pointcol_d3d9_hlsl_ps2x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,28 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+struct PS_INPUT
+{
+    float4 diffuse: COLOR0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+
+float4 main(PS_INPUT input): COLOR0
+{
+    return input.diffuse;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_caustic_cubemap_point_d3d9_hlsl_ps3x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_caustic_cubemap_point_d3d9_hlsl_ps3x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_caustic_cubemap_point_d3d9_hlsl_ps3x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,47 @@
+
+struct PS_INPUT
+{
+    float2 center: TEXCOORD0;
+    float radius :TEXCOORD1;
+    float4 color :TEXCOORD2;
+    float2 screenPos : VPOS;
+};
+
+
+struct PS_OUTPUT
+{
+    float4  color: COLOR0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+sampler tex0: register(s0);
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 3x0
+
+
+
+PS_OUTPUT main(PS_INPUT input)
+{
+
+float2 targetResolution = 128.0;
+
+PS_OUTPUT output;
+
+float2 screen = input.screenPos / targetResolution;
+screen *= float2(2, 2);
+screen -= float2(1, 1);
+screen.y *= -1;
+
+float d = 1.0 - saturate(length(input.center - screen) / input.radius);
+//d= d*d;
+d*=0.0035;
+output.color = float4(d, d, d, 1);
+//output.color = float4(screen.x, 0, 0, 1);
+//output.color = 1.0;
+return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/plain_point_d3d9_hlsl_ps2x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/plain_point_d3d9_hlsl_ps2x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/plain_point_d3d9_hlsl_ps2x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,28 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+struct PS_INPUT
+{
+    float4 diffuse: COLOR0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+
+float4 main(PS_INPUT input): COLOR0
+{
+    return input.diffuse;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/bloom_bright_d3d9_hlsl_vs1x1.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/bloom_bright_d3d9_hlsl_vs1x1.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/bloom_bright_d3d9_hlsl_vs1x1.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,59 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 pos: POSITION;
+    float2 mainTexCoord: TEXCOORD0;
+};
+
+struct VS_OUTPUT
+{
+    float4 pos :POSITION;
+    float fog: FOG;
+    float4 diffuse: COLOR0;
+    float2 mainTexCoord: TEXCOORD0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 matProjView;
+const float4x4 matView;
+const float4 mtrlEmissive;
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 1x1
+
+VS_OUTPUT main( VS_INPUT input )
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    //Transform position to clip space
+    output.pos = mul(input.pos, matProjView);
+
+    //Transform position to eye space -> pos
+    float4 pos = mul(input.pos, matView);
+
+    //fog
+    output.fog = pos.z / pos.w;
+
+    //Color
+    output.diffuse = mtrlEmissive;
+
+    output.mainTexCoord = input.mainTexCoord;
+
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/lightfilter_d3d9_hlsl_ps2x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/lightfilter_d3d9_hlsl_ps2x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/lightfilter_d3d9_hlsl_ps2x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,72 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+struct PS_INPUT
+{
+    float2 screen: TEXCOORD0;
+    float2 scale: TEXCOORD1;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+sampler brightTex: register(s0);
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float2 offsPix0 = float2( 1,  0);
+const float2 offsPix1 = float2( 0,  1);
+const float2 offsPix2 = float2( 1,  1);
+const float2 offsPix3 = float2(-1,  1);
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+
+float4 main(PS_INPUT input): COLOR0
+{
+    // Main color:
+    
+    float4 result = tex2D(brightTex, input.screen.xy);
+    
+    float full = abs(2 * result.x - 1);
+    float treshold = 0.99;
+    float delta = treshold - full;
+
+    if(delta >= 0)
+    {
+        // Lookup colors:
+        
+        float4 colA, colB;
+        float2 offs0 = offsPix0 * input.scale.xy;
+        colA.x = tex2D(brightTex, input.screen.xy + offs0).x;
+        colB.x = tex2D(brightTex, input.screen.xy - offs0).x;
+        float2 offs1 = offsPix1 * input.scale.xy;
+        colA.y = tex2D(brightTex, input.screen.xy + offs1).x;
+        colB.y = tex2D(brightTex, input.screen.xy - offs1).x;
+        float2 offs2 = offsPix2 * input.scale.xy;
+        colA.z = tex2D(brightTex, input.screen.xy + offs2).x;
+        colB.z = tex2D(brightTex, input.screen.xy - offs2).x;
+        float2 offs3 = offsPix3 * input.scale.xy;
+        colA.w = tex2D(brightTex, input.screen.xy + offs3).x;
+        colB.w = tex2D(brightTex, input.screen.xy - offs3).x;
+           
+        // Calculate average:
+        
+        float sum = result.x + dot(colA + colB, float4(1, 1, 1, 1));
+        result.xyz = sum * 0.11111111;
+    }
+        
+    return result;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gen_shvol_view_d3d9_hlsl_ps2x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gen_shvol_view_d3d9_hlsl_ps2x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gen_shvol_view_d3d9_hlsl_ps2x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,27 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+struct PS_INPUT
+{
+};
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+
+float4 main(PS_INPUT input): COLOR0
+{
+    return 0;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gen_brightclear_d3d9_hlsl_ps2x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gen_brightclear_d3d9_hlsl_ps2x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gen_brightclear_d3d9_hlsl_ps2x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,35 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_shmap_filter_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct PS_INPUT
+{
+    float4 secPosScr: TEXCOORD0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+// Pixelshader
+// Profile: 2x0
+
+float4 main(PS_INPUT input): COLOR0
+{
+    float4 outCol = 0;
+    outCol.w = frac(100 * input.secPosScr.z / input.secPosScr.w);
+    return outCol;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_envmapSimple_d3d9_hlsl_vs1x1.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_envmapSimple_d3d9_hlsl_vs1x1.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/gtp_envmapSimple_d3d9_hlsl_vs1x1.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,75 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+    float2 tex0:TEXCOORD0;
+   float3 normal:NORMAL;
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr : POSITION;
+    float3 eye    : TEXCOORD0;
+    float3 normal : TEXCOORD1;
+    float3 posView: TEXCOORD2;    
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 matProj;
+const float4x4 matProjView;
+const float4x4 matView;
+const float4x4 matViewInvTrans;
+S3D_MATBONE_DECL_STD(matBone)
+
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 1x1
+float4 last_Center;
+float4x4 worldMat;
+float4x4 worldMatIT;
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    float4x4 matBoneFinal;
+    S3D_BONE_TRANSF_STD(matBoneFinal, matBone, input.boneWgh, input.boneSubscr);
+    // Transform vectors by matBoneFinal
+    float4 posView = mul(input.posObj, matBoneFinal);
+    
+    output.posScr = mul(posView, matProj);
+    
+    // vector from vertex to the eye in view-space
+    //output.eye = mul(input.posObj, matView);    
+    //output.normal = mul(input.normal, matViewInvTrans);
+    //output.posView = mul(float4(input.posObj.xyz, 0), matView);
+
+    output.normal = mul(mul(input.normal, matViewInvTrans), worldMatIT);
+    output.eye = mul(posView, worldMatIT).xyz; 
+    output.posView = mul(posView, worldMat);
+    output.posView -= last_Center;   
+
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/plain_pointcol_d3d9_hlsl_vs2x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/plain_pointcol_d3d9_hlsl_vs2x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/d3d9_hlsl/plain_pointcol_d3d9_hlsl_vs2x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,59 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include \
+    <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct VS_INPUT
+{
+    float4 posObj: POSITION;
+    S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+    float4 diffuse: COLOR0;
+};
+
+struct VS_OUTPUT
+{
+    float4 posScr: POSITION;
+    float4 diffuse: COLOR0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+const float4x4 projMat;
+const float4x4 matView;
+
+S3D_MATBONE_DECL_STD(matBone)
+
+///////////////////////////////////////////////////////////////////////////////
+// Vertexshader
+// Profile: 2x0
+
+VS_OUTPUT main(VS_INPUT input)
+{
+    VS_OUTPUT output = (VS_OUTPUT)0;
+
+    float4x4 matBoneFinal;
+    S3D_BONE_TRANSF_STD(
+            matBoneFinal, matBone, input.boneWgh, input.boneSubscr);
+    // Transform vectors by matBoneFinal
+    float4 posView = mul(input.posObj, matBoneFinal);
+
+    output.posScr = mul(posView, projMat);
+    output.diffuse = input.diffuse;
+
+    return output;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/plain_pointcoltex.s3d_shaderprog_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/plain_pointcoltex.s3d_shaderprog_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/plain_pointcoltex.s3d_shaderprog_run	(revision 2453)
@@ -0,0 +1,157 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+ogl
+{
+    glsl
+    {
+        vertshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "plain_ogl_glsl_vs1x0.s3d_shadercode_run"
+            }
+
+            tracking
+            {
+                cnt 4
+                codevar "matBone[$]"
+                chan "bone"
+                trans "identity"
+            }
+
+            //  attribute vec4 bone_wgh;
+            bone_wgh "boneWgh"
+            //bone_subscr "boneSubscr"
+
+            predefine_array
+            {
+                name "S3D_USE_BONEWGH"
+            }
+        }
+    }
+}
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "plain_pointcoltex_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "plain_pointcoltex_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "plain_pointcoltex_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "plain_pointcoltex_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+
+        //fog_codevar "paramFog"
+    }
+}
+//#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/bump_shmap.s3d_shaderprog_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/bump_shmap.s3d_shaderprog_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/bump_shmap.s3d_shaderprog_run	(revision 2453)
@@ -0,0 +1,425 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Shader program configuration.
+// Different drivers access different parameters.
+
+// Opengl Highlevel Shaderlanguage
+ogl
+{
+    samp_depth_test_array "" "" ""
+
+    glsl
+    {
+        vertshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "bump_ogl_glsl_vs1x0.s3d_shadercode_run"
+            }
+            tracking
+            {
+                // uniform mat4 matBone[4];
+                cnt 4
+                codevar "matBone[$]"
+                chan "bone"
+                trans "identity"
+            }
+
+            //  attribute vec4 bone_wgh;
+            bone_wgh "boneWgh"
+            //bone_subscr "boneSubscr"
+
+            predefine_array
+            {
+                name "S3D_USE_BONEWGH"
+            }
+            {
+                name "S3D_PARALLAX_MAPPING"
+            }
+            {
+                name "S3D_LIGHT_PROJ"
+            }
+            {
+                name "S3D_LIGHT_SHMAP"
+            }
+        }
+
+        fragshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "bump_ogl_glsl_fs1x0.s3d_shadercode_run"
+            }
+            predefine_array
+            {
+                name "S3D_SPECULAR_EXP"
+                val "4.0"
+            }
+            {
+                name "S3D_GEOMETRIC_SHADOW"
+            }
+            {
+                name "S3D_PARALLAX_MAPPING"
+            }
+            {
+                name "S3D_PARALLAX_SCALE"
+                val "0.07"
+            }
+            {
+                name "S3D_PARALLAX_BIAS"
+                val "0.50196078431372549" // = 128/255
+            }
+            {
+                name "S3D_LIGHT_PROJ"
+            }
+            {
+                name "S3D_LIGHT_SHMAP"
+            }
+            {
+                name "S3D_SHMAP_FILTER16"
+            }
+            {
+                name "S3D_SHMAP_ZBIAS"
+                //val "0.0003" // For no-filtering
+                val "0.0010" // For 4-filtering
+                //val "0.0010" // For 16-filtering
+            }
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_cenrange"
+            dest_codevar "lightCenRange"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_ambient"
+            dest_codevar "lightAmbient"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_diffuse"
+            dest_codevar "lightDiffuse"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_specular"
+            dest_codevar "lightSpecular"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_projmat"
+            dest_codevar "lightProjMat"
+            type "float4x4"
+        }
+        {
+            src_progvar "prog_light_shmapmat"
+            dest_codevar "lightShmapMat"
+            type "float4x4"
+        }
+
+        sampler_array "tex0" "normalSamp" "lightProjSamp" "lightShmapSamp"
+
+        tex_size_codevar_array "" "" "lightShmapSize"
+        tex_rcpsize_codevar_array "" "" "lightShmapRcpSize"
+    }
+}
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        // Code of the pixel program
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bump_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+            //debug_code_file "src/res/levelutil/shader/prog/d3d9_hlsl/"
+            //      & "bump_d3d9_hlsl_vs1x1.s3d_shadercode"
+        }
+
+
+        // Copy matrices into vertex program constants.
+        // The field "chan" can be one
+        // of "identity", "proj", "view" or "projview" "bone"
+        // The field "trans" can be one
+        // of "identity", "inv", "transp" or "invtransp"
+        // One matrix needs 4 constants.
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_cenrange"
+            dest_codevar "lightCenRange"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_projmat"
+            dest_codevar "lightProjMat"
+            type "float4x4"
+        }
+        {
+            src_progvar "prog_light_shmapmat"
+            dest_codevar "lightShmapMat"
+            type "float4x4"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+        {
+            name "S3D_PARALLAX_MAPPING"
+        }
+        {
+            name "S3D_LIGHT_PROJ"
+        }
+        {
+            name "S3D_LIGHT_SHMAP"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bump_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+        
+        param_array
+        {
+            src_progvar "prog_light_ambient"
+            dest_codevar "lightAmbient"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_diffuse"
+            dest_codevar "lightDiffuse"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_specular"
+            dest_codevar "lightSpecular"
+            type "float4"
+        }
+
+        tex_size_codevar_array "" "" "lightShmapSize"
+        tex_rcpsize_codevar_array "" "" "lightShmapRcpSize"
+
+        predefine_array
+        {
+            name "S3D_SPECULAR_EXP"
+            val "4.0"
+        }
+        {
+            name "S3D_GEOMETRIC_SHADOW"
+        }
+        {
+            name "S3D_PARALLAX_MAPPING"
+        }
+        {
+            name "S3D_PARALLAX_SCALE"
+            val "0.07"
+        }
+        {
+            name "S3D_PARALLAX_BIAS"
+            val "0.50196078431372549" // = 128/255
+        }
+        {
+            name "S3D_LIGHT_PROJ"
+        }
+        {
+            name "S3D_LIGHT_SHMAP"
+        }
+        /*
+        {
+            name "S3D_SHMAP_FILTER16"
+            val ""
+        }
+        */
+        {
+            name "S3D_SHMAP_ZBIAS"
+            //val "0.0003" // For no-filtering
+            val "0.0010" // For 4-filtering
+            //val "0.0010" // For 16-filtering
+        }
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        // Code of the pixel program
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bump_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+            //debug_code_file "src/res/levelutil/shader/prog/d3d9_hlsl/"
+            //      & "bump_d3d9_hlsl_vs1x1.s3d_shadercode"
+        }
+
+
+        // Copy matrices into vertex program constants.
+        // The field "chan" can be one
+        // of "identity", "proj", "view" or "projview" "bone"
+        // The field "trans" can be one
+        // of "identity", "inv", "transp" or "invtransp"
+        // One matrix needs 4 constants.
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_cenrange"
+            dest_codevar "lightCenRange"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_projmat"
+            dest_codevar "lightProjMat"
+            type "float4x4"
+        }
+        {
+            src_progvar "prog_light_shmapmat"
+            dest_codevar "lightShmapMat"
+            type "float4x4"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+        {
+            name "S3D_PARALLAX_MAPPING"
+        }
+        {
+            name "S3D_LIGHT_PROJ"
+        }
+        {
+            name "S3D_LIGHT_SHMAP"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bump_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_ambient"
+            dest_codevar "lightAmbient"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_diffuse"
+            dest_codevar "lightDiffuse"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_specular"
+            dest_codevar "lightSpecular"
+            type "float4"
+        }
+
+        tex_size_codevar_array "" "" "" "lightShmapSize"
+        tex_rcpsize_codevar_array "" "" "" "lightShmapRcpSize"
+
+        predefine_array
+        {
+            name "S3D_SPECULAR_EXP"
+            val "4.0"
+        }
+        {
+            name "S3D_GEOMETRIC_SHADOW"
+        }
+        {
+            name "S3D_PARALLAX_MAPPING"
+        }
+        {
+            name "S3D_PARALLAX_SCALE"
+            val "0.07"
+        }
+        {
+            name "S3D_PARALLAX_BIAS"
+            val "0.50196078431372549" // = 128/255
+        }
+        {
+            name "S3D_LIGHT_PROJ"
+        }
+        {
+            name "S3D_LIGHT_SHMAP"
+        }
+        {
+            name "S3D_SHMAP_FILTER16"
+            val ""
+        }
+        {
+            name "S3D_SHMAP_ZBIAS"
+            //val "0.0003" // For no-filtering
+            //val "0.0010" // For 4-filtering
+            val "0.0010" // For 16-filtering
+        }
+    }
+}
+//#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/plain_pointtex.s3d_shaderprog_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/plain_pointtex.s3d_shaderprog_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/plain_pointtex.s3d_shaderprog_run	(revision 2453)
@@ -0,0 +1,174 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Shader program configuration.
+// Different drivers access different parameters.
+
+ogl
+{
+    glsl
+    {
+        vertshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "plain_ogl_glsl_vs1x0.s3d_shadercode_run"
+            }
+
+            tracking
+            {
+                cnt 4
+                codevar "matBone[$]"
+                chan "bone"
+                trans "identity"
+            }
+
+            //  attribute vec4 bone_wgh;
+            bone_wgh "boneWgh"
+            //bone_subscr "boneSubscr"
+
+            predefine_array
+            {
+                name "S3D_USE_BONEWGH"
+            }
+        }
+    }
+}
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "plain_pointtex_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+
+        mtl
+        {
+            power_codevar ""
+            emissive_codevar "mtrlEmissive"
+        }
+
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "plain_pointtex_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "plain_pointtex_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+
+        mtl
+        {
+            power_codevar ""
+            emissive_codevar "mtrlEmissive"
+        }
+
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "plain_pointtex_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+
+        //fog_codevar "paramFog"
+    }
+}
+//#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gen_shmap.s3d_shaderprog_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gen_shmap.s3d_shaderprog_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gen_shmap.s3d_shaderprog_run	(revision 2453)
@@ -0,0 +1,108 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                & "gen_shmap_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            chan "bone"
+            trans "identity"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                & "gen_shmap_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                & "gen_shmap_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            chan "proj"
+            trans "identity"
+            slot 0
+        }
+        {
+            codevar "matBone"
+            chan "bone"
+            trans "identity"
+            slot 0
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                & "gen_shmap_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+    }
+}
+//#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/bloom_smooth.s3d_shaderprog_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/bloom_smooth.s3d_shaderprog_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/bloom_smooth.s3d_shaderprog_run	(revision 2453)
@@ -0,0 +1,148 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+ogl
+{
+    glsl
+    {
+        vertshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "bloom_smooth_ogl_glsl_vs1x0.s3d_shadercode_run"
+            }
+        }
+        fragshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "bloom_smooth_ogl_glsl_fs1x0.s3d_shadercode_run"
+            }
+        }
+
+        sampler_array "tex0"
+        tex_rcpsize_codevar_array "tex0RcpSize"
+
+        param_array
+        {
+            src_progvar "prog_passinfo"
+            dest_codevar "passInfo"
+            type "float4"
+        }
+    }
+}
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bloom_smooth_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+        }
+        tracking
+        {
+            codevar "matProjView"
+            slot 0
+            chan "projview"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+        param_array
+        {
+            src_progvar "prog_passinfo"
+            dest_codevar "passInfo"
+            type "float4"
+        }
+        mtl
+        {
+            emissive_codevar "mtrlEmissive"
+        }
+        tex_rcpsize_codevar_array "tex0RcpSize"
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bloom_smooth_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bloom_smooth_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+        }
+        tracking
+        {
+            codevar "matProjView"
+            slot 0
+            chan "projview"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+        param_array
+        {
+            src_progvar "prog_passinfo"
+            dest_codevar "passInfo"
+            type "float4"
+        }
+        mtl
+        {
+            emissive_codevar "mtrlEmissive"
+        }
+        tex_rcpsize_codevar_array "tex0RcpSize"
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bloom_smooth_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+    }
+}
+//#endif
+
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/bump.s3d_shaderprog_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/bump.s3d_shaderprog_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/bump.s3d_shaderprog_run	(revision 2453)
@@ -0,0 +1,328 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Shader program configuration.
+// Different drivers access different parameters.
+
+// Opengl Highlevel Shaderlanguage
+ogl
+{
+    glsl
+    {
+        vertshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "bump_ogl_glsl_vs1x0.s3d_shadercode_run"
+            }
+            tracking
+            {
+                cnt 4
+                codevar "matBone[$]"
+                chan "bone"
+                trans "identity"
+            }
+
+            //  attribute vec4 bone_wgh;
+            bone_wgh "boneWgh"
+            //bone_subscr "boneSubscr"
+
+            predefine_array
+            {
+                name "S3D_USE_BONEWGH"
+            }
+            {
+                name "S3D_PARALLAX_MAPPING"
+            }
+        }
+
+        fragshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "bump_ogl_glsl_fs1x0.s3d_shadercode_run"
+            }
+            predefine_array
+            {
+                name "S3D_SPECULAR_EXP"
+                val "4.0"
+            }
+            {
+                name "S3D_GEOMETRIC_SHADOW"
+            }
+            {
+                name "S3D_PARALLAX_MAPPING"
+            }
+            {
+                name "S3D_PARALLAX_SCALE"
+                val "0.07"
+            }
+            {
+                name "S3D_PARALLAX_BIAS"
+                val "0.50196078431372549" // = 128/255
+            }
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_cenrange"
+            dest_codevar "lightCenRange"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_ambient"
+            dest_codevar "lightAmbient"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_diffuse"
+            dest_codevar "lightDiffuse"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_specular"
+            dest_codevar "lightSpecular"
+            type "float4"
+        }
+
+        sampler_array "tex0" "normalSamp"
+    }
+}
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        // Code of the pixel program
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bump_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+            //debug_code_file "src/res/levelutil/shader/prog/d3d9_hlsl/"
+            //      & "bump_d3d9_hlsl_vs1x1.s3d_shadercode"
+        }
+
+
+        // Copy matrices into vertex program constants.
+        // The field "chan" can be one
+        // of "identity", "proj", "view" or "projview" "bone"
+        // The field "trans" can be one
+        // of "identity", "inv", "transp" or "invtransp"
+        // One matrix needs 4 constants.
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_cenrange"
+            dest_codevar "lightCenRange"
+            type "float4"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+        {
+            name "S3D_PARALLAX_MAPPING"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bump_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+        
+        param_array
+        {
+            src_progvar "prog_light_ambient"
+            dest_codevar "lightAmbient"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_diffuse"
+            dest_codevar "lightDiffuse"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_specular"
+            dest_codevar "lightSpecular"
+            type "float4"
+        }
+
+        predefine_array
+        {
+            name "S3D_SPECULAR_EXP"
+            val "4.0"
+        }
+        {
+            name "S3D_GEOMETRIC_SHADOW"
+        }
+        {
+            name "S3D_PARALLAX_MAPPING"
+        }
+        {
+            name "S3D_PARALLAX_SCALE"
+            val "0.07"
+        }
+        {
+            name "S3D_PARALLAX_BIAS"
+            val "0.50196078431372549" // = 128/255
+        }
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        // Code of the pixel program
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bump_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+            //debug_code_file "src/res/levelutil/shader/prog/d3d9_hlsl/"
+            //      & "bump_d3d9_hlsl_vs1x1.s3d_shadercode"
+        }
+
+
+        // Copy matrices into vertex program constants.
+        // The field "chan" can be one
+        // of "identity", "proj", "view" or "projview" "bone"
+        // The field "trans" can be one
+        // of "identity", "inv", "transp" or "invtransp"
+        // One matrix needs 4 constants.
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_cenrange"
+            dest_codevar "lightCenRange"
+            type "float4"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+        {
+            name "S3D_PARALLAX_MAPPING"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bump_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_ambient"
+            dest_codevar "lightAmbient"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_diffuse"
+            dest_codevar "lightDiffuse"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_specular"
+            dest_codevar "lightSpecular"
+            type "float4"
+        }
+
+        predefine_array
+        {
+            name "S3D_SPECULAR_EXP"
+            val "4.0"
+        }
+        {
+            name "S3D_GEOMETRIC_SHADOW"
+        }
+        {
+            name "S3D_PARALLAX_MAPPING"
+        }
+        {
+            name "S3D_PARALLAX_SCALE"
+            val "0.07"
+        }
+        {
+            name "S3D_PARALLAX_BIAS"
+            val "0.50196078431372549" // = 128/255
+        }
+    }
+}
+//#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/bloom_combine.s3d_shaderprog_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/bloom_combine.s3d_shaderprog_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/bloom_combine.s3d_shaderprog_run	(revision 2453)
@@ -0,0 +1,130 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+ogl
+{
+    glsl
+    {
+        vertshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "bloom_combine_ogl_glsl_vs1x0.s3d_shadercode_run"
+            }
+        }
+        fragshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "bloom_combine_ogl_glsl_fs1x0.s3d_shadercode_run"
+            }
+        }
+
+        sampler_array "tex0" "tex1"
+    }
+}
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bloom_combine_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+        }
+        tracking
+        {
+            codevar "matProjView"
+            slot 0
+            chan "projview"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+        mtl
+        {
+            emissive_codevar "mtrlEmissive"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bloom_combine_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+
+        param_array
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bloom_combine_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+        }
+        tracking
+        {
+            codevar "matProjView"
+            slot 0
+            chan "projview"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+        mtl
+        {
+            emissive_codevar "mtrlEmissive"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bloom_combine_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+
+        param_array
+    }
+}
+//#endif
+
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gtp_envmap_refract.s3d_shaderprog_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gtp_envmap_refract.s3d_shaderprog_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gtp_envmap_refract.s3d_shaderprog_run	(revision 2453)
@@ -0,0 +1,82 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                & "gtp_envmapSimple_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+        }
+        tracking
+        {
+            codevar "matProj"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matProjView"
+            slot 0
+            chan "projview"
+            trans "identity"
+        }
+{
+    codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+}
+{
+    codevar "matViewInvTrans"
+            slot 0
+            chan "view"
+            trans "invtransp"
+}
+
+param_array
+{
+    src_progvar "lastCenter"
+    dest_codevar "last_Center"
+    type "float4"
+}
+{
+    src_progvar "worldMat"
+    dest_codevar "worldMat"
+    type "float4x4"
+}
+{
+    src_progvar "worldMatIT"
+    dest_codevar "worldMatIT"
+    type "float4x4"
+}
+
+
+
+    }
+
+    hlsl_pixshader
+    {
+      code_variant_array
+      {
+            profile "3x0"
+            entry_point "refract"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gtp_envmapSimple_d3d9_hlsl_ps1x1.s3d_shadercode_run"
+      }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/bloom_bright.s3d_shaderprog_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/bloom_bright.s3d_shaderprog_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/bloom_bright.s3d_shaderprog_run	(revision 2453)
@@ -0,0 +1,126 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+ogl
+{
+    glsl
+    {
+        vertshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "bloom_bright_ogl_glsl_vs1x0.s3d_shadercode_run"
+            }
+        }
+        fragshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "bloom_bright_ogl_glsl_fs1x0.s3d_shadercode_run"
+            }
+        }
+
+        sampler_array "tex0"
+    }
+}
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile"1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bloom_bright_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+        }
+        tracking
+        {
+            codevar "matProjView"
+            slot 0
+            chan "projview"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+        mtl
+        {
+            emissive_codevar "mtrlEmissive"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bloom_bright_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile"1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bloom_bright_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+        }
+        tracking
+        {
+            codevar "matProjView"
+            slot 0
+            chan "projview"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+        mtl
+        {
+            emissive_codevar "mtrlEmissive"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bloom_bright_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+    }
+}
+//#endif
+
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gtp_cau_photonmap.s3d_shaderprog_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gtp_cau_photonmap.s3d_shaderprog_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gtp_cau_photonmap.s3d_shaderprog_run	(revision 2453)
@@ -0,0 +1,85 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "3x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                & "gtp_cau_photonmap_d3d9_hlsl_vs3x0.s3d_shadercode_run"
+        }
+        tracking
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+           // trans "invtransp"
+            trans "identity"
+        }       
+         {
+            codevar "modelViewInv"
+            slot 0
+            chan "view"
+           // trans "invtransp"
+            trans "inv"
+        }
+         param_array
+        //transforms from world space to light space
+        {
+            src_progvar "lightViewProj"
+            dest_codevar "lightViewProj"
+            type "float4x4"
+        }
+        //transforms from camera view to world space
+        {
+            src_progvar "viewToWorld"
+            dest_codevar "viewToWorld"
+            type "float4x4"
+        }
+        //inverse transpose of camera view to world space
+        {
+            src_progvar "viewToWorldInv"
+            dest_codevar "viewToWorldInv"
+            type "float4x4"
+        }
+        //light posiion in camera view space
+        {
+            src_progvar "lightPosView"
+            dest_codevar "lightPosView"
+            type "float4"
+        }
+        //center point of the distance cubemap in world space
+        {
+            src_progvar "lastCenter"
+            dest_codevar "lastCenter"
+            type "float4"
+        }
+        
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "3x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gtp_cau_photonmap_d3d9_hlsl_ps3x0.s3d_shadercode_run"
+        }
+        
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/bump_mild.s3d_shaderprog_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/bump_mild.s3d_shaderprog_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/bump_mild.s3d_shaderprog_run	(revision 2453)
@@ -0,0 +1,320 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Shader program configuration.
+// Different drivers access different parameters.
+
+// Opengl Highlevel Shaderlanguage
+ogl
+{
+    glsl
+    {
+        vertshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "bump_ogl_glsl_vs1x0.s3d_shadercode_run"
+            }
+            tracking
+            {
+                // uniform mat4 matBone[4];
+                cnt 4
+                codevar "matBone[$]"
+                chan "bone"
+                trans "identity"
+            }
+
+            //  attribute vec4 bone_wgh;
+            bone_wgh "boneWgh"
+            //bone_subscr "boneSubscr"
+
+            predefine_array
+            {
+                name "S3D_USE_BONEWGH"
+            }
+            {
+                name "S3D_PARALLAX_MAPPING"
+            }
+        }
+
+        fragshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "bump_ogl_glsl_fs1x0.s3d_shadercode_run"
+            }
+            predefine_array
+            {
+                name "S3D_SPECULAR_EXP"
+                val "4.0"
+            }
+            {
+                name "S3D_PARALLAX_MAPPING"
+            }
+            {
+                name "S3D_PARALLAX_SCALE"
+                val "0.07"
+            }
+            {
+                name "S3D_PARALLAX_BIAS"
+                val "0.50196078431372549" // = 128/255
+            }
+            {
+                name "S3D_MILD"
+                val "0.66666666"
+            }
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_cenrange"
+            dest_codevar "lightCenRange"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_ambient"
+            dest_codevar "lightAmbient"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_diffuse"
+            dest_codevar "lightDiffuse"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_specular"
+            dest_codevar "lightSpecular"
+            type "float4"
+        }
+
+        sampler_array "tex0" "normalSamp"
+    }
+}
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        // Code of the pixel program
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bump_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+            //debug_code_file "src/res/levelutil/shader/prog/d3d9_hlsl/"
+            //      & "bump_d3d9_hlsl_vs1x1.s3d_shadercode"
+        }
+
+
+        // Copy matrices into vertex program constants.
+        // The field "chan" can be one
+        // of "identity", "proj", "view" or "projview" "bone"
+        // The field "trans" can be one
+        // of "identity", "inv", "transp" or "invtransp"
+        // One matrix needs 4 constants.
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_cenrange"
+            dest_codevar "lightCenRange"
+            type "float4"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+        {
+            name "S3D_PARALLAX_MAPPING"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bump_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+        
+        param_array
+        {
+            src_progvar "prog_light_ambient"
+            dest_codevar "lightAmbient"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_diffuse"
+            dest_codevar "lightDiffuse"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_specular"
+            dest_codevar "lightSpecular"
+            type "float4"
+        }
+
+        predefine_array
+        {
+            name "S3D_SPECULAR_EXP"
+            val "4.0"
+        }
+        {
+            name "S3D_PARALLAX_MAPPING"
+        }
+        {
+            name "S3D_PARALLAX_SCALE"
+            val "0.07"
+        }
+        {
+            name "S3D_PARALLAX_BIAS"
+            val "0.50196078431372549" // = 128/255
+        }
+        {
+            name "S3D_MILD"
+            val "0.66666666"
+        }
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        // Code of the pixel program
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bump_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+            //debug_code_file "src/res/levelutil/shader/prog/d3d9_hlsl/"
+            //      & "bump_d3d9_hlsl_vs1x1.s3d_shadercode"
+        }
+
+
+        // Copy matrices into vertex program constants.
+        // The field "chan" can be one
+        // of "identity", "proj", "view" or "projview" "bone"
+        // The field "trans" can be one
+        // of "identity", "inv", "transp" or "invtransp"
+        // One matrix needs 4 constants.
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_cenrange"
+            dest_codevar "lightCenRange"
+            type "float4"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+        {
+            name "S3D_PARALLAX_MAPPING"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "bump_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_ambient"
+            dest_codevar "lightAmbient"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_diffuse"
+            dest_codevar "lightDiffuse"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_specular"
+            dest_codevar "lightSpecular"
+            type "float4"
+        }
+
+        predefine_array
+        {
+            name "S3D_SPECULAR_EXP"
+            val "4.0"
+        }
+        {
+            name "S3D_PARALLAX_MAPPING"
+        }
+        {
+            name "S3D_PARALLAX_SCALE"
+            val "0.07"
+        }
+        {
+            name "S3D_PARALLAX_BIAS"
+            val "0.50196078431372549" // = 128/255
+        }
+        {
+            name "S3D_MILD"
+            val "0.66666666"
+        }
+    }
+}
+//#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/gen_brightclear_ogl_glsl_fs1x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/gen_brightclear_ogl_glsl_fs1x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/gen_brightclear_ogl_glsl_fs1x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,19 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+void main (void)
+{
+    vec4 outCol = 0.0;
+    outCol.w = frac(100 * mainTexCoord[0].z / mainTexCoord[0].w);
+    gl_FragColor = outCol;
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/standard_ogl_glsl_vs1x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/standard_ogl_glsl_vs1x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/standard_ogl_glsl_vs1x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,76 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+@include "levelutil/shader/prog/ogl_glsl/" \
+        "include_stddef_ogl_glsl_vs1x0.s3d_shadercode_run"
+
+///////////////////////////////////////////////////////////////////////////////
+
+S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+S3D_MATBONE_DECL_STD(matBone)
+
+///////////////////////////////////////////////////////////////////////////////
+
+
+void main(void)
+{
+    S3D_BONE_TRANSF_STD(matBoneFinal, matBone, boneWgh, boneSubscr);
+    vec4 posView = matBoneFinal * gl_Vertex;
+    vec3 normalView = normalize((matBoneFinal * vec4(gl_Normal, 0.0)).xyz);
+
+    gl_Position = gl_ProjectionMatrix * posView; //
+    gl_FogFragCoord = posView.z / posView.w;
+
+    vec4 diffuseOut = gl_FrontMaterial.emission;
+    vec4 specularOut = vec4(0);
+
+//!!! hack to detect nvidia
+#ifdef __GLSL_CG_DATA_TYPES
+    for(int i = 0; i < gl_MaxLights; i++)
+    {
+        s3d_ColPair result;
+        s3d_calcPointLightTerm(
+                result, posView.xyz, normalView, gl_FrontMaterial.shininess, 
+                gl_LightSource[i], gl_FrontLightProduct[i]);
+        diffuseOut += result.diffuse;    
+        specularOut += result.specular;    
+    }
+#else
+    s3d_ColPair result;
+    s3d_calcPointLightTerm(
+            result, posView.xyz, normalView, gl_FrontMaterial.shininess, 
+            gl_LightSource[0], gl_FrontLightProduct[0]);
+    diffuseOut += result.diffuse;    
+    specularOut += result.specular;    
+    
+    s3d_calcPointLightTerm(
+            result, posView.xyz, normalView, gl_FrontMaterial.shininess, 
+            gl_LightSource[1], gl_FrontLightProduct[1]);
+    diffuseOut += result.diffuse;    
+    specularOut += result.specular;    
+    
+    s3d_calcPointLightTerm(
+            result, posView.xyz, normalView, gl_FrontMaterial.shininess, 
+            gl_LightSource[2], gl_FrontLightProduct[2]);
+    diffuseOut += result.diffuse;    
+    specularOut += result.specular;    
+         
+#endif
+
+    gl_FrontColor = diffuseOut;
+    gl_FrontSecondaryColor = specularOut;
+    gl_TexCoord[0] = gl_MultiTexCoord0;
+    gl_TexCoord[1] = gl_MultiTexCoord1;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/bloom_smooth_ogl_glsl_vs1x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/bloom_smooth_ogl_glsl_vs1x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/bloom_smooth_ogl_glsl_vs1x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,55 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+uniform vec4 passInfo;
+uniform vec4 tex0RcpSize;
+
+varying vec4 baseVec;
+
+void main(void)
+{
+    gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
+
+    vec4 posView = gl_ModelViewMatrix * gl_Vertex;
+    gl_FogFragCoord = posView.z / posView.w;
+
+    gl_FrontColor = gl_Color;
+    gl_TexCoord[0].xy = gl_MultiTexCoord0.xy;
+
+    // Scaling offset
+    float iter = passInfo.x;
+
+    // Use fractional basis value to reduce banding:
+    vec2 offsScale = tex0RcpSize.xy * pow(2.1, iter) * 0.5;
+
+    vec4 dirVec;
+    float fiter = mod(iter, 4.0);
+    if(fiter < 2.0)
+    {
+        if(fiter < 1.0)
+            dirVec = vec4(1.0, 0.0, 0.0, 1.0); // Vectors (1, 0) and (0, 1)
+        else
+            dirVec = vec4(1.0, 1.0,-1.0, 1.0); // Vectors (1, 1) and (-1, 1)
+    }
+    else
+    {
+        if(fiter < 3.0)
+            dirVec = vec4(2.0, 1.0, -1.0, 2.0); // Vectors (2, 1) and (-1, 2)
+        else
+            dirVec = vec4(1.0, 2.0, -2.0, 1.0); // Vectors (1, 2) and (-2, 1)
+    }
+
+    baseVec = dirVec * offsScale.xyxy;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/partic_ogl_glsl_fs1x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/partic_ogl_glsl_fs1x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/partic_ogl_glsl_fs1x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+uniform sampler2D tex0;
+
+void main (void)
+{
+    vec4 outCol = gl_Color;
+    vec4 texCol = texture2D(tex0, vec2(gl_TexCoord[0]));
+    gl_FragColor = texCol * outCol;
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/plain_ogl_glsl_vs1x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/plain_ogl_glsl_vs1x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/plain_ogl_glsl_vs1x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,36 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+@include "levelutil/shader/prog/ogl_glsl/" \
+    "include_stddef_ogl_glsl_vs1x0.s3d_shadercode_run"
+
+///////////////////////////////////////////////////////////////////////////////
+
+S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+S3D_MATBONE_DECL_STD(matBone)
+
+///////////////////////////////////////////////////////////////////////////////
+
+void main(void)
+{
+    S3D_BONE_TRANSF_STD(matBoneFinal, matBone, boneWgh, boneSubscr);
+
+    vec4 posView = matBoneFinal * gl_Vertex;
+
+    gl_Position = gl_ProjectionMatrix * posView;
+    gl_FrontColor = gl_Color;
+    gl_TexCoord[0] = gl_MultiTexCoord0;
+
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/bump_ogl_glsl_vs1x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/bump_ogl_glsl_vs1x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/bump_ogl_glsl_vs1x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,87 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+@include "levelutil/shader/prog/ogl_glsl/" \
+    "include_stddef_ogl_glsl_vs1x0.s3d_shadercode_run"
+
+///////////////////////////////////////////////////////////////////////////////
+
+S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+S3D_MATBONE_DECL_STD(matBone)
+
+uniform vec4 lightCenRange;
+@ifdef S3D_LIGHT_BRIGHT
+uniform mat4 lightBrightMat;
+@endif
+@ifdef S3D_LIGHT_PROJ
+uniform mat4 lightProjMat;
+@endif
+@ifdef S3D_LIGHT_SHMAP
+uniform mat4 lightShmapMat;
+@endif
+
+///////////////////////////////////////////////////////////////////////////////
+
+@define S3D_NORMALIZE(v) normalize(v)
+//@define S3D_NORMALIZE(v) (v)
+
+///////////////////////////////////////////////////////////////////////////////
+
+void main(void)
+{
+    S3D_BONE_TRANSF_STD(matBoneFinal, matBone, boneWgh, boneSubscr);
+
+    vec4 posView = matBoneFinal * gl_Vertex;
+    vec3 normalView = (matBoneFinal * vec4(gl_Normal, 0.0)).xyz;
+    vec3 tangentUObj = S3D_NORMALIZE(gl_MultiTexCoord1.xyz);
+    vec3 tangentVObj = S3D_NORMALIZE(gl_MultiTexCoord2.xyz);
+    vec3 tangentUView = (matBoneFinal * vec4(tangentUObj, 0)).xyz;
+    vec3 tangentVView = (matBoneFinal * vec4(tangentVObj, 0)).xyz;
+
+    gl_Position = gl_ProjectionMatrix * posView;
+    gl_TexCoord[0] = gl_MultiTexCoord0;
+
+    gl_FogFragCoord = posView.z / posView.w;
+
+    vec3 camToVertView = posView.xyz;
+    vec3 vertToLightView = lightCenRange.xyz - camToVertView;    
+    vec3 vertToLightDirView = S3D_NORMALIZE(vertToLightView);
+    vec3 halfDirView = S3D_NORMALIZE(vertToLightDirView - camToVertView);
+    // ATI workaround: Don't use x component of gl_TexCoord[2]:
+    s3d_calcBump(
+            gl_TexCoord[1].xyz, gl_TexCoord[2].yzw,
+            normalView, vertToLightDirView, halfDirView,
+            tangentUView, tangentVView);
+    // Lightrange-factor: 1 - (lightpos - surfacepos)^2 / range^2
+    gl_TexCoord[3].xyz = vertToLightView / lightCenRange.w;
+
+@ifdef S3D_PARALLAX_MAPPING
+    gl_TexCoord[4].x = dot(tangentUView, camToVertView);
+    gl_TexCoord[4].y = dot(tangentVView, camToVertView);
+    gl_TexCoord[4].z = dot(normalView, camToVertView);
+@endif
+
+@ifdef S3D_LIGHT_BRIGHT
+    gl_TexCoord[5] = lightBrightMat * posView;
+    gl_TexCoord[6] = gl_Position;
+@endif
+
+@ifdef S3D_LIGHT_PROJ
+    gl_TexCoord[5] = lightProjMat * posView;
+@endif    
+@ifdef S3D_LIGHT_SHMAP
+    gl_TexCoord[6] = lightShmapMat * posView;
+@endif
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/bloom_combine_ogl_glsl_vs1x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/bloom_combine_ogl_glsl_vs1x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/bloom_combine_ogl_glsl_vs1x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,25 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+void main(void)
+{
+    gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
+
+    vec4 posView = gl_ModelViewMatrix * gl_Vertex;
+    gl_FogFragCoord = posView.z / posView.w;
+
+    gl_FrontColor = gl_Color;
+    gl_TexCoord[0].xy = gl_MultiTexCoord0.xy;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/bloom_bright_ogl_glsl_vs1x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/bloom_bright_ogl_glsl_vs1x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/bloom_bright_ogl_glsl_vs1x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,25 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+void main(void)
+{
+    gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
+
+    vec4 posView = gl_ModelViewMatrix * gl_Vertex;
+    gl_FogFragCoord = posView.z / posView.w;
+
+    gl_FrontColor = gl_Color;
+    gl_TexCoord[0].xy = gl_MultiTexCoord0.xy;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/comic_ogl_glsl_fs1x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/comic_ogl_glsl_fs1x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/comic_ogl_glsl_fs1x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,20 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+uniform sampler2D tex0;
+
+void main (void)
+{
+    vec4 texCol = texture2D(tex0, vec2(gl_TexCoord[0]));
+    gl_FragColor = texCol * gl_Color;
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/include_stddef_ogl_glsl_vs1x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/include_stddef_ogl_glsl_vs1x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/include_stddef_ogl_glsl_vs1x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,160 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+@ifndef STDDEF_OGL_GLSL_SC
+@define STDDEF_OGL_GLSL_SC
+
+///////////////////////////////////////////////////////////////////////////////
+
+// default to 4 for bone transformation w/o bone subcriptions
+@ifndef S3D_MATBONE_CNT
+@define S3D_MATBONE_CNT 4
+@endif
+
+@ifdef S3D_USE_BONESUBSCR    
+
+@define S3D_BONE_TRANSF_SUBSCR(matBoneFinal, matBone, boneWgh, boneSubscr) \
+    matBoneFinal \
+        = boneWgh.x * matBone[int(boneSubscr.x)] \
+        + boneWgh.y * matBone[int(boneSubscr.y)] \
+        + boneWgh.z * matBone[int(boneSubscr.z)] \
+        + boneWgh.w * matBone[int(boneSubscr.w)];
+
+@define S3D_BONE_DECL_STD(boneWgh, boneSubscr) \
+        attribute vec4 boneWgh; \
+        attribute vec4 boneSubscr;
+
+@define S3D_MATBONE_DECL_STD(matBone) \
+        uniform mat4 matBone[S3D_MATBONE_CNT];
+
+@define S3D_BONE_TRANSF_STD(matBoneFinal, matBone, boneWgh, boneSubscr) \
+        mat4 matBoneFinal; \
+        S3D_BONE_TRANSF_SUBSCR(matBoneFinal, matBone, boneWgh, boneSubscr)
+        
+@else
+
+@ifdef S3D_USE_BONEWGH
+
+@define S3D_BONE_TRANSF_WGH(matBoneFinal, matBone, boneWgh) \
+    matBoneFinal \
+        = boneWgh.x * matBone[0] \
+        + boneWgh.y * matBone[1] \
+        + boneWgh.z * matBone[2] \
+        + boneWgh.w * matBone[3];
+
+@define S3D_BONE_DECL_STD(boneWgh, boneSubscr) \
+        attribute vec4 boneWgh;
+
+@define S3D_MATBONE_DECL_STD(matBone) \
+        uniform mat4 matBone[S3D_MATBONE_CNT];
+
+@define S3D_BONE_TRANSF_STD(matBoneFinal, matBone, boneWgh, boneSubscr) \
+        mat4 matBoneFinal; \
+        S3D_BONE_TRANSF_WGH(matBoneFinal, matBone, boneWgh)
+        
+@else
+
+@define S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+
+@define S3D_MATBONE_DECL_STD(matBone)
+
+@define S3D_BONE_TRANSF_STD(matBoneFinal, matBone, boneWgh, boneSubscr) \
+        mat4 matBoneFinal = gl_ModelViewMatrix
+
+@endif
+
+@endif
+
+///////////////////////////////////////////////////////////////////////////////
+
+float s3d_calcLightRangeFac(float dist, vec4 posRange)
+{
+    float lightRsqRange = 1.0 / (posRange.w * posRange.w);
+    float rangeFac = max(1.0 - dist * dist * lightRsqRange, 0.0);
+    return rangeFac;
+}
+
+float s3d_calcLightRangeFac(float dist, float quadraticAtten)
+{
+    float lightRsqRange = quadraticAtten * 0.25;
+    float rangeFac = max(1.0 - dist * dist * lightRsqRange, 0.0);
+    return rangeFac;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct s3d_ColPair
+{
+   vec4 diffuse;
+   vec4 specular;
+};
+
+@define s3d_calcPointLightTermImpl( \
+        result, camToVertView, normalView, mtrlPower, \
+        lightPos, lightAmbient, lightDiffuse, lightSpecular, quadraticAtten) \
+{ \
+    vec3 vertToLightDirView = normalize(lightPos.xyz - camToVertView.xyz); \
+    float normalDotVertToLightDir = dot(normalView, vertToLightDirView); \
+    vec3 camToVertDirView = normalize(camToVertView.xyz); \
+    vec3 HalfDirView = normalize(vertToLightDirView - camToVertDirView); \
+    float normalDotHalfDir= dot(normalView, HalfDirView); \
+\
+    float dist = length(lightPos.xyz - camToVertView.xyz); \
+    float rangeFac = s3d_calcLightRangeFac(dist, quadraticAtten); \
+    float specular = pow(max(0.0, normalDotHalfDir), mtrlPower) * rangeFac; \
+\
+    result.diffuse = lightAmbient * rangeFac; \
+    float diffuse = normalDotVertToLightDir * rangeFac; \
+    result.diffuse += lightDiffuse * diffuse; \
+    result.specular = lightSpecular * specular; \
+}
+
+@define s3d_calcPointLightTerm( \
+        result, camToVertView, normalView, mtrlPower, light, lightProd) \
+{ \
+    s3d_calcPointLightTermImpl( \
+            result, camToVertView, normalView, mtrlPower, light.position, \
+            lightProd.ambient, lightProd.diffuse, \
+            lightProd.specular, light.quadraticAttenuation); \
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+void s3d_calcBump(
+    out vec3 diffuseDirSurf, out vec3 specularDirSurf,
+    vec3 normalView, vec3 vertToLightDirView, vec3 halfDirView,
+    vec3 tangentUView, vec3 tangentVView)
+{
+    diffuseDirSurf.x = dot(tangentUView, vertToLightDirView);
+    diffuseDirSurf.y = dot(tangentVView, vertToLightDirView);
+    diffuseDirSurf.z = dot(normalView, vertToLightDirView);
+
+    specularDirSurf.x = dot(tangentUView, halfDirView);
+    specularDirSurf.y = dot(tangentVView, halfDirView);
+    specularDirSurf.z = dot(normalView, halfDirView);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+vec3 s3d_uncomprNormal(vec3 comprNormal)
+{
+@ifdef S3D_COMPR_NORMAL
+    return comprNormal / 127.5 - 1;
+@else
+    return comprNormal;
+@endif    
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+@endif // STDDEF_OGL_GLSL_SC
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/black_ogl_glsl_vs1x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/black_ogl_glsl_vs1x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/black_ogl_glsl_vs1x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,19 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+void main(void)
+{
+    gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/lightfilter_ogl_glsl_vs1x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/lightfilter_ogl_glsl_vs1x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/lightfilter_ogl_glsl_vs1x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,38 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+uniform vec4 tex0RcpSize;
+uniform vec4 passInfo;
+
+varying vec2 screen;
+varying vec2 scale;
+
+///////////////////////////////////////////////////////////////////////////////
+
+void main(void)
+{
+    // Transform position to clip space
+    gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
+
+    // Smoothing parameters:
+    // Go from wide to small to avoid artifacts in case of depth jumps.
+    // Use pow(2,iter) instead of pow(3,iter), 
+    // because this gives a better quality:
+    float iter = passInfo.x;
+    float smooth = exp2(iter);
+    
+    screen.xy = gl_MultiTexCoord0.xy;
+    scale.xy = tex0RcpSize.xy * smooth;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/gen_shvol_view_ogl_glsl_vs1x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/gen_shvol_view_ogl_glsl_vs1x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/gen_shvol_view_ogl_glsl_vs1x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,29 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+@include "levelutil/shader/prog/ogl_glsl/" \
+        "include_stddef_ogl_glsl_vs1x0.s3d_shadercode_run"
+
+///////////////////////////////////////////////////////////////////////////////
+
+void main(void)
+{
+    // Transform:
+    gl_Position = gl_ProjectionMatrix * gl_Vertex;
+
+    // Colors for inspecting:    
+    gl_FrontColor = vec4(1.0);
+    gl_BackColor = vec4(1.0);
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/include_shmap_filter_ogl_glsl.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/include_shmap_filter_ogl_glsl.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/include_shmap_filter_ogl_glsl.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,123 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef SHMAP_FILTER_D3D9_HLSL_SC
+#define SHMAP_FILTER_D3D9_HLSL_SC
+
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef S3D_SHMAP_ZBIAS
+#define S3D_SHMAP_ZBIAS 0
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+
+float s3d_shmapFilter(
+        sampler lightShmapSamp,
+        float4 lightShmapCoord,
+        float4 lightShmapSize,
+        float4 lightShmapRcpSize)
+{
+@ifdef S3D_LIGHT_SHMAP
+    float shmapVal = s3d_shmapFilter(
+            lightShmapSamp, lightShmapCoord,
+            lightShmapSize, lightShmapRcpSize);
+@ifdef S3D_SHMAP_FILTER16
+    vec2 shmapCoordRaw 
+            = lightShmapCoord.xy * lightShmapSize.xy / lightShmapCoord.w;
+    vec2 shmapCoordFull = shmapCoordRaw + vec2(0.5, 0.5);
+    vec2 shmapCoordBase = floor(shmapCoordFull);
+    vec2 shmapCoordFrac = shmapCoordFull - shmapCoordBase;
+    vec4 shmapCoordBaseAB = lightShmapRcpSize.xyxy * (
+            shmapCoordBase.xyxy + vec4(-1.5, 0, -0.5, 0));
+    vec4 shmapCoordBaseCD = lightShmapRcpSize.xyxy * (
+            shmapCoordBase.xyxy + vec4(+0.5, 0, +1.5, 0));
+    vec4 shmapDeltaXY = lightShmapRcpSize.xyxy * vec4(0, -1.5, 0, -0.5);
+    vec4 shmapDeltaZW = lightShmapRcpSize.xyxy * vec4(0, +0.5, 0, +1.5);
+
+    vec4 shmapCoordAXY = shmapCoordBaseAB.xyxy + shmapDeltaXY.xyzw;
+    vec4 shmapCoordAZW = shmapCoordBaseAB.xyxy + shmapDeltaZW.xyzw;
+    vec4 shmapValA;
+    shmapValA.x = texture2D(lightShmapSamp, shmapCoordAXY.xy).x;
+    shmapValA.y = texture2D(lightShmapSamp, shmapCoordAXY.zw).x;
+    shmapValA.z = texture2D(lightShmapSamp, shmapCoordAZW.xy).x;
+    shmapValA.w = texture2D(lightShmapSamp, shmapCoordAZW.zw).x;
+    vec4 shmapCoordBXY = shmapCoordBaseAB.zwzw + shmapDeltaXY.xyzw;
+    vec4 shmapCoordBZW = shmapCoordBaseAB.zwzw + shmapDeltaZW.xyzw;
+    vec4 shmapValB;
+    shmapValB.x = texture2D(lightShmapSamp, shmapCoordBXY.xy).x;
+    shmapValB.y = texture2D(lightShmapSamp, shmapCoordBXY.zw).x;
+    shmapValB.z = texture2D(lightShmapSamp, shmapCoordBZW.xy).x;
+    shmapValB.w = texture2D(lightShmapSamp, shmapCoordBZW.zw).x;
+    vec4 shmapCoordCXY = shmapCoordBaseCD.xyxy + shmapDeltaXY.xyzw;
+    vec4 shmapCoordCZW = shmapCoordBaseCD.xyxy + shmapDeltaZW.xyzw;
+    vec4 shmapValC;
+    shmapValC.x = texture2D(lightShmapSamp, shmapCoordCXY.xy).x;
+    shmapValC.y = texture2D(lightShmapSamp, shmapCoordCXY.zw).x;
+    shmapValC.z = texture2D(lightShmapSamp, shmapCoordCZW.xy).x;
+    shmapValC.w = texture2D(lightShmapSamp, shmapCoordCZW.zw).x;
+    vec4 shmapCoordDXY = shmapCoordBaseCD.zwzw + shmapDeltaXY.xyzw;
+    vec4 shmapCoordDZW = shmapCoordBaseCD.zwzw + shmapDeltaZW.xyzw;
+    vec4 shmapValD;
+    shmapValD.x = texture2D(lightShmapSamp, shmapCoordDXY.xy).x;
+    shmapValD.y = texture2D(lightShmapSamp, shmapCoordDXY.zw).x;
+    shmapValD.z = texture2D(lightShmapSamp, shmapCoordDZW.xy).x;
+    shmapValD.w = texture2D(lightShmapSamp, shmapCoordDZW.zw).x;
+    
+    vec4 brightA = step(lightShmapCoord.zzzz, shmapValA * lightShmapCoord.w);
+    vec4 brightB = step(lightShmapCoord.zzzz, shmapValB * lightShmapCoord.w);
+    vec4 brightC = step(lightShmapCoord.zzzz, shmapValC * lightShmapCoord.w);
+    vec4 brightD = step(lightShmapCoord.zzzz, shmapValD * lightShmapCoord.w);
+    vec4 sumRow = brightA + brightB + brightC 
+            + shmapCoordFrac.x * (brightD - brightA);
+    vec4 colWgh = vec4(1, 1, 1, 0) 
+            + shmapCoordFrac.y * vec4(-1, 0, 0, 1);
+    float sum = dot(sumRow, colWgh);
+    float shmapVal = sum * (1.0 / 9.0);
+@else
+@ifdef S3D_SHMAP_FILTER4
+    vec2 shmapCoordRaw
+            = lightShmapCoord.xy * lightShmapSize.xy / lightShmapCoord.w;
+    vec2 shmapCoordFull = shmapCoordRaw + vec2(0.5, 0.5);
+    vec2 shmapCoordBase = floor(shmapCoordFull);
+    vec2 shmapCoordFrac = shmapCoordFull - shmapCoordBase;
+    vec4 shmapCoordBaseAB = lightShmapRcpSize.xyxy * (
+            shmapCoordBase.xyxy + vec4(-0.5, 0, +0.5, 0));
+    vec4 shmapDelta = lightShmapRcpSize.xyxy * vec4(0, -0.5, 0, +0.5);
+
+    vec4 shmapCoordA = shmapCoordBaseAB.xyxy + shmapDelta.xyzw;
+    vec4 shmapCoordB = shmapCoordBaseAB.zwzw + shmapDelta.xyzw;
+    vec4 shmapVec;
+    shmapVec.x = texture2D(lightShmapSamp, shmapCoordA.xy).x;
+    shmapVec.y = texture2D(lightShmapSamp, shmapCoordA.zw).x;
+    shmapVec.z = texture2D(lightShmapSamp, shmapCoordB.xy).x;
+    shmapVec.w = texture2D(lightShmapSamp, shmapCoordB.zw).x;
+    
+    vec4 brightVec 
+        = step(lightShmapCoord.zzzz, shmapVec * lightShmapCoord.w);
+    vec2 sumRow = brightVec.xy 
+            + shmapCoordFrac.x * (brightVec.zw - brightVec.xy);
+    float shmapVal = sumRow.x 
+            + shmapCoordFrac.y * (sumRow.y - sumRow.x);
+@else
+    float shmapVal = texture2DProj(lightShmapSamp, lightShmapCoord.xyw).x;
+    float shmapVal = step(lightShmapCoord.z, 
+            shmapVal * lightShmapCoord.w);
+@endif
+@endif
+@endif
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/gen_brightclear_ogl_glsl_vs1x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/gen_brightclear_ogl_glsl_vs1x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/gen_brightclear_ogl_glsl_vs1x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,33 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+@include "levelutil/shader/prog/ogl_glsl/" \
+        "include_stddef_ogl_glsl_vs1x0.s3d_shadercode_run"
+
+///////////////////////////////////////////////////////////////////////////////
+
+S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+S3D_MATBONE_DECL_STD(matBone)
+
+///////////////////////////////////////////////////////////////////////////////
+
+void main(void)
+{
+    S3D_BONE_TRANSF_STD(matBoneFinal, matBone, boneWgh, boneSubscr);
+    vec4 posView = matBoneFinal * gl_Vertex;
+
+    gl_Position = gl_ProjectionMatrix * posView;
+    gl_TexCoord[0] = gl_Position;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/include_shmap_filter_ogl_glsl_vs1x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/include_shmap_filter_ogl_glsl_vs1x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/include_shmap_filter_ogl_glsl_vs1x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,124 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+@ifndef SHMAP_FILTER_OGL_GLSL_SC
+@define SHMAP_FILTER_OGL_GLSL_SC
+
+///////////////////////////////////////////////////////////////////////////////
+
+@ifndef S3D_SHMAP_ZBIAS
+@define S3D_SHMAP_ZBIAS 0.0
+@endif
+
+///////////////////////////////////////////////////////////////////////////////
+
+float s3d_shmapFilter(
+        sampler2D lightShmapSamp,
+        vec4 lightShmapCoord,
+        vec4 lightShmapSize,
+        vec4 lightShmapRcpSize)
+{
+@ifdef S3D_SHMAP_FILTER16
+    vec2 shmapCoordRaw 
+            = lightShmapCoord.xy * lightShmapSize.xy / lightShmapCoord.w;
+    vec2 shmapCoordFull = shmapCoordRaw + vec2(0.5, 0.5);
+    vec2 shmapCoordBase = floor(shmapCoordFull);
+    vec2 shmapCoordFrac = shmapCoordFull - shmapCoordBase;
+    vec4 shmapCoordBaseAB = lightShmapRcpSize.xyxy * (
+            shmapCoordBase.xyxy + vec4(-1.5, 0, -0.5, 0));
+    vec4 shmapCoordBaseCD = lightShmapRcpSize.xyxy * (
+            shmapCoordBase.xyxy + vec4(+0.5, 0, +1.5, 0));
+    vec4 shmapDeltaXY = lightShmapRcpSize.xyxy * vec4(0, -1.5, 0, -0.5);
+    vec4 shmapDeltaZW = lightShmapRcpSize.xyxy * vec4(0, +0.5, 0, +1.5);
+
+    vec4 shmapCoordAXY = shmapCoordBaseAB.xyxy + shmapDeltaXY.xyzw;
+    vec4 shmapCoordAZW = shmapCoordBaseAB.xyxy + shmapDeltaZW.xyzw;
+    vec4 shmapValA;
+    shmapValA.x = texture2D(lightShmapSamp, shmapCoordAXY.xy).x;
+    shmapValA.y = texture2D(lightShmapSamp, shmapCoordAXY.zw).x;
+    shmapValA.z = texture2D(lightShmapSamp, shmapCoordAZW.xy).x;
+    shmapValA.w = texture2D(lightShmapSamp, shmapCoordAZW.zw).x;
+    vec4 shmapCoordBXY = shmapCoordBaseAB.zwzw + shmapDeltaXY.xyzw;
+    vec4 shmapCoordBZW = shmapCoordBaseAB.zwzw + shmapDeltaZW.xyzw;
+    vec4 shmapValB;
+    shmapValB.x = texture2D(lightShmapSamp, shmapCoordBXY.xy).x;
+    shmapValB.y = texture2D(lightShmapSamp, shmapCoordBXY.zw).x;
+    shmapValB.z = texture2D(lightShmapSamp, shmapCoordBZW.xy).x;
+    shmapValB.w = texture2D(lightShmapSamp, shmapCoordBZW.zw).x;
+    vec4 shmapCoordCXY = shmapCoordBaseCD.xyxy + shmapDeltaXY.xyzw;
+    vec4 shmapCoordCZW = shmapCoordBaseCD.xyxy + shmapDeltaZW.xyzw;
+    vec4 shmapValC;
+    shmapValC.x = texture2D(lightShmapSamp, shmapCoordCXY.xy).x;
+    shmapValC.y = texture2D(lightShmapSamp, shmapCoordCXY.zw).x;
+    shmapValC.z = texture2D(lightShmapSamp, shmapCoordCZW.xy).x;
+    shmapValC.w = texture2D(lightShmapSamp, shmapCoordCZW.zw).x;
+    vec4 shmapCoordDXY = shmapCoordBaseCD.zwzw + shmapDeltaXY.xyzw;
+    vec4 shmapCoordDZW = shmapCoordBaseCD.zwzw + shmapDeltaZW.xyzw;
+    vec4 shmapValD;
+    shmapValD.x = texture2D(lightShmapSamp, shmapCoordDXY.xy).x;
+    shmapValD.y = texture2D(lightShmapSamp, shmapCoordDXY.zw).x;
+    shmapValD.z = texture2D(lightShmapSamp, shmapCoordDZW.xy).x;
+    shmapValD.w = texture2D(lightShmapSamp, shmapCoordDZW.zw).x;
+    
+    vec4 brightA = step(lightShmapCoord.zzzz, 
+            (shmapValA + S3D_SHMAP_ZBIAS) * lightShmapCoord.w);
+    vec4 brightB = step(lightShmapCoord.zzzz, 
+            (shmapValB + S3D_SHMAP_ZBIAS) * lightShmapCoord.w);
+    vec4 brightC = step(lightShmapCoord.zzzz, 
+            (shmapValC + S3D_SHMAP_ZBIAS) * lightShmapCoord.w);
+    vec4 brightD = step(lightShmapCoord.zzzz, 
+            (shmapValD + S3D_SHMAP_ZBIAS) * lightShmapCoord.w);
+    vec4 sumRow = brightA + brightB + brightC 
+            + shmapCoordFrac.x * (brightD - brightA);
+    vec4 colWghBase = vec4(1.0 / 9.0, 1.0 / 9.0, 1.0 / 9.0, 0);
+    vec4 colWghDelta = vec4(-1.0 / 9.0, 0, 0, 1.0 / 9.0);
+    vec4 colWgh = colWghBase + shmapCoordFrac.y * colWghDelta;
+    float bright = dot(sumRow, colWgh);
+@else
+@ifdef S3D_SHMAP_FILTER4
+    vec4 shmapCoordRaw 
+            = lightShmapCoord.xy * lightShmapSize / lightShmapCoord.w;
+    vec4 shmapCoordFull = shmapCoordRaw + vec4(0.5, 0.5);
+    vec4 shmapCoordBase = floor(shmapCoordFull);
+    vec4 shmapCoordFrac = shmapCoordFull - shmapCoordBase;
+    vec4 shmapCoordBaseAB = lightShmapRcpSize.xyxy * (
+            shmapCoordBase.xyxy + vec4(-0.5, 0, +0.5, 0));
+    vec4 shmapDelta = lightShmapRcpSize.xyxy * vec4(0, -0.5, 0, +0.5);
+
+    vec4 shmapCoordA = shmapCoordBaseAB.xyxy + shmapDelta.xyzw;
+    vec4 shmapCoordB = shmapCoordBaseAB.zwzw + shmapDelta.xyzw;
+    vec4 shmapVec;
+    shmapVec.x = texture2D(lightShmapSamp, shmapCoordA.xy).x;
+    shmapVec.y = texture2D(lightShmapSamp, shmapCoordA.zw).x;
+    shmapVec.z = texture2D(lightShmapSamp, shmapCoordB.xy).x;
+    shmapVec.w = texture2D(lightShmapSamp, shmapCoordB.zw).x;
+    
+    vec4 brightVec 
+        = step(lightShmapCoord.zzzz, 
+            (shmapVec + S3D_SHMAP_ZBIAS) * lightShmapCoord.w);
+    vec4 sumRow = brightVec.xy 
+            + shmapCoordFrac.x * (brightVec.zw - brightVec.xy);
+    float bright = sumRow.x 
+            + shmapCoordFrac.y * (sumRow.y - sumRow.x);
+@else
+    float shmapVal = texture2DProj(lightShmapSamp, lightShmapCoord.xyzw).x;
+    float bright = step(lightShmapCoord.z, 
+            (shmapVal + S3D_SHMAP_ZBIAS) * lightShmapCoord.w);
+@endif
+@endif
+    return bright;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+@endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/standard_ogl_glsl_fs1x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/standard_ogl_glsl_fs1x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/standard_ogl_glsl_fs1x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,20 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+uniform sampler2D tex0;
+
+void main (void)
+{
+    vec4 texCol = texture2D(tex0, vec2(gl_TexCoord[0]));
+    gl_FragColor = texCol * gl_Color;
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/bloom_smooth_ogl_glsl_fs1x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/bloom_smooth_ogl_glsl_fs1x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/bloom_smooth_ogl_glsl_fs1x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,46 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+uniform sampler2D tex0;
+
+uniform vec4 passInfo;
+
+varying vec4 baseVec;
+
+void main(void)
+{
+    vec2 mainTexCoord = gl_TexCoord[0].xy;
+    vec2 offsPix0 = baseVec.xy;
+    vec2 offsPix1 = baseVec.zw;
+    vec2 offsPix2 = offsPix0 + offsPix1;
+    vec2 offsPix3 = offsPix0 - offsPix1;
+
+    vec4 val = texture2D(tex0, mainTexCoord);
+    vec4 val0 = texture2D(tex0, mainTexCoord.xy + offsPix0);
+    vec4 val1 = texture2D(tex0, mainTexCoord.xy + offsPix1);
+    vec4 val2 = texture2D(tex0, mainTexCoord.xy + offsPix2);
+    vec4 val3 = texture2D(tex0, mainTexCoord.xy + offsPix3);
+    vec4 val4 = texture2D(tex0, mainTexCoord.xy - offsPix0);
+    vec4 val5 = texture2D(tex0, mainTexCoord.xy - offsPix1);
+    vec4 val6 = texture2D(tex0, mainTexCoord.xy - offsPix2);
+    vec4 val7 = texture2D(tex0, mainTexCoord.xy - offsPix3);
+
+    vec4 sum
+        = (val * val + val0 * val0 + val1 * val1 + val2 * val2 + val3 * val3
+        + 0.5 * (val4 * val4 + val5 * val5 + val6 * val6 + val7 * val7))
+        * 0.142857; // = approx. 1.0 / 7.0
+
+   gl_FragColor = sqrt(sum);
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/partic_ogl_glsl_vs1x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/partic_ogl_glsl_vs1x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/partic_ogl_glsl_vs1x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,163 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+@include "levelutil/shader/prog/ogl_glsl/" \
+        "include_stddef_ogl_glsl_vs1x0.s3d_shadercode_run"
+
+///////////////////////////////////////////////////////////////////////////////
+
+S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+S3D_MATBONE_DECL_STD(matBone)
+
+uniform vec4 anim;        // Animation time between 0 and 1
+uniform vec4 colorAlpha;  // Color and alpha factor
+uniform vec4 param;       // x=Particle radius, y=Move-along-normal-factor
+uniform vec4 moveLin;     // Linear movement vector
+uniform vec4 moveQuadr;   // Quadratic movement vector
+uniform vec4 moveVari;    // Variation amount, see below
+uniform vec4 moveJiggle;  // Jiggle amount vector, see below.
+uniform vec4 shrink;      // x=fadeIn, y=fadeOut, z=flickerAmp, w=flickerVel
+uniform vec4 other;       // x=asyncFactor, y=repeat, z=jiggleVel, w=unused
+
+///////////////////////////////////////////////////////////////////////////////
+// Seed values:
+
+vec4 seedVariX = vec4(8576, 6968, 8285, 1375);
+vec4 seedVariY = vec4(9257, 7911, 4491, 4178);
+vec4 seedVariZ = vec4(9621, 7416, 9166, 1405);
+vec4 seedJiggleX = vec4(9809, 4760, 6104, 3046);
+vec4 seedJiggleY = vec4(7590, 5729, 8471, 1556);
+vec4 seedJiggleZ = vec4(9904, 0636, 4127, 5254);
+vec4 seedAnim = vec4(8891, 1068, 3747, 5529);
+vec4 seedRotU = vec4(3147, 0722, 3324, 7158);
+vec4 seedRotV = vec4(7020, 4337, 7956, 1530);
+
+///////////////////////////////////////////////////////////////////////////////
+// Utility functions:
+
+float quickSin(float phase)
+{
+    float rel = fract(phase) - 0.5;
+    float val = - 16.0 * rel * (0.5 - abs(rel));
+    return val;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+void main(void)
+{
+    float animRandom =  dot(gl_Vertex, seedAnim);
+    float curAnim = fract(other.x * animRandom + other.y * anim.x);
+    
+    // The movement direction is varied by a pseudo-random value.
+    vec3 variRandom;
+    variRandom.x = dot(gl_Vertex, seedVariX);
+    variRandom.y = dot(gl_Vertex, seedVariY);
+    variRandom.z = dot(gl_Vertex, seedVariZ);
+    vec3 variUnit = (2.0 * fract(variRandom) - 1.0);
+    vec3 variDelta = variUnit * moveVari.xyz;
+
+    // The particles jiggle in direction of a pseudo-random value.
+    vec3 jiggleRandom;
+    jiggleRandom.x = dot(gl_Vertex, seedJiggleX);
+    jiggleRandom.y = dot(gl_Vertex, seedJiggleY);
+    jiggleRandom.z = dot(gl_Vertex, seedJiggleZ);
+    vec3 jiggleUnit = (2.0 * fract(jiggleRandom) - 1.0);
+    vec3 jiggleDelta = jiggleUnit * moveJiggle.xyz 
+                    * quickSin(curAnim * other.z);
+    
+    // Move particle in object coordinates:
+    vec3 moveTot = moveLin.xyz;             // Move into constant direction
+    moveTot += gl_Normal * param.y;         // Move along normal vector
+    moveTot += curAnim * moveQuadr.xyz;     // Move along a quadratic curve
+    moveTot += variDelta;                   // Move into a random direction
+    vec4 posObj = gl_Vertex;
+    posObj.xyz += curAnim * moveTot;           // Add move
+    posObj.xyz += jiggleDelta;              // Jitter
+
+    // Transformation from object into view coordinates:
+    S3D_BONE_TRANSF_STD(matBoneFinal, matBone, boneWgh, boneSubscr);
+    vec4 posView = matBoneFinal * posObj;
+    
+    // Calculate effective particle radius.
+    // This includes fading in, fading out and flickering.
+    float fadeIn = curAnim * shrink.x;
+    float fadeOut = (1.0 - curAnim) * shrink.y;
+    float fade = min(1.0, min(fadeIn, fadeOut));
+    float flicker = 1.0 - shrink.z * quickSin(curAnim * shrink.w); 
+    float radius = param.x * flicker * fade;
+    
+    // Until now we only have the particle center.
+    // Now we alculate the corner coordinates.
+    // The particle is rotated by a pseudo-random angle:
+    vec2 rotRandom;
+    rotRandom.x = dot(gl_Vertex, seedRotU);
+    rotRandom.y = dot(gl_Vertex, seedRotV);
+    vec2 rotDir = normalize(fract(rotRandom) - vec2(0.5, 0.5));
+    vec2 rotU = radius * 1.4142 * rotDir;
+    vec2 rotV = vec2(- rotU.y, rotU.x);
+    vec2 coord = (gl_MultiTexCoord0.xy - vec2(0.5, 0.5));
+    posView.xy += rotU * coord.x + rotV * coord.y;
+
+    // Projection:
+    gl_Position = gl_ProjectionMatrix * posView; //
+    gl_TexCoord[0] = gl_MultiTexCoord0;
+    gl_FogFragCoord = posView.z / posView.w;
+
+    vec4 diffuseOut = gl_FrontMaterial.emission;
+    vec4 specularOut = vec4(0);
+
+@ifdef S3D_LIGHT_CNT
+// Work-around to detect nvidia:
+#ifdef __GLSL_CG_DATA_TYPES
+    for(int i = 0; i < gl_MaxLights; i++)
+    {
+        s3d_ColPair result;
+        s3d_calcPointLightTerm(
+                result, posView.xyz, normalView, gl_FrontMaterial.shininess, 
+                gl_LightSource[i], gl_FrontLightProduct[i]);
+        diffuseOut.rgb += result.diffuse.rgb;
+        specularOut.rgb += result.specular.rgb;
+    }
+#else
+    s3d_ColPair result;
+    s3d_calcPointLightTerm(
+            result, posView.xyz, vec3(0.0, 0.0, 0.0), 
+            gl_FrontMaterial.shininess, 
+            gl_LightSource[0], gl_FrontLightProduct[0]);
+    diffuseOut.rgb += result.diffuse.rgb;
+    specularOut.rgb += result.specular.rgb;
+    
+    s3d_calcPointLightTerm(
+            result, posView.xyz, vec3(0.0, 0.0, 0.0), 
+            gl_FrontMaterial.shininess, 
+            gl_LightSource[1], gl_FrontLightProduct[1]);
+    diffuseOut.rgb += result.diffuse.rgb;
+    specularOut.rgb += result.specular.rgb;
+    
+    s3d_calcPointLightTerm(
+            result, posView.xyz, vec3(0.0, 0.0, 0.0), 
+            gl_FrontMaterial.shininess, 
+            gl_LightSource[2], gl_FrontLightProduct[2]);
+    diffuseOut.rgb += result.diffuse.rgb;
+    specularOut.rgb += result.specular.rgb;         
+#endif
+    gl_FrontColor = diffuseOut * colorAlpha * gl_Color;
+    gl_FrontSecondaryColor = specularOut;
+@else
+    gl_FrontColor = colorAlpha * gl_Color;
+    gl_FrontSecondaryColor = vec4(0.0);
+@endif
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/bump_ogl_glsl_fs1x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/bump_ogl_glsl_fs1x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/bump_ogl_glsl_fs1x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,199 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+@include "levelutil/shader/prog/ogl_glsl/" \
+        "include_shmap_filter_ogl_glsl_vs1x0.s3d_shadercode_run"
+
+///////////////////////////////////////////////////////////////////////////////
+
+@define S3D_NORMALIZE(v) (v)
+
+///////////////////////////////////////////////////////////////////////////////
+
+uniform sampler2D tex0;
+uniform sampler2D normalSamp;
+
+///////////////////////////////////////////////////////////////////////////////
+
+@ifdef S3D_LIGHT_BRIGHT
+uniform sampler2D lightBrightSamp;
+@endif
+@ifdef S3D_LIGHT_PROJ
+uniform sampler2D lightProjSamp;
+@endif
+@ifdef S3D_LIGHT_SHMAP
+uniform sampler2D lightShmapSamp;
+@endif
+
+///////////////////////////////////////////////////////////////////////////////
+
+uniform vec4 lightAmbient;
+uniform vec4 lightDiffuse;
+uniform vec4 lightSpecular;
+
+@ifdef S3D_LIGHT_BRIGHT
+uniform vec4 lightBrightRcpSize;
+@endif
+
+@ifdef S3D_LIGHT_SHMAP
+uniform vec4 lightShmapSize;
+uniform vec4 lightShmapRcpSize;
+@endif
+
+///////////////////////////////////////////////////////////////////////////////
+
+@define S3D_INTENS_DISCARD_TRESHOLD 0.001
+@define S3D_BRIGHT_EPS 0.01
+
+///////////////////////////////////////////////////////////////////////////////
+
+void main(void)
+{
+@ifdef S3D_GEOMETRIC_SHADOW
+    // Geometric shadow
+    if(gl_TexCoord[1].z < 0.0)
+        discard;
+@endif
+
+@ifdef S3D_LIGHT_SHMAP
+    vec3 clipVal = gl_TexCoord[6].www 
+            - abs(2.0 * gl_TexCoord[6].xyz - gl_TexCoord[6].www);
+    if(clipVal.x < 0.0 || clipVal.y < 0.0 || clipVal.z < 0.0)
+        discard;
+@endif
+
+@ifdef S3D_LIGHT_BRIGHT
+@ifdef S3D_LIGHT_BRIGHT_CARE
+    vec4 brightVecMain = texture2DProj(
+            lightBrightSamp, gl_TexCoord[5]);
+    float brightIdent = fract(100.0 * gl_TexCoord[6].z / gl_TexCoord[6].w);
+    float brightDeltaMain = abs(brightVecMain.w - brightIdent);
+    float brightVal = brightVecMain.x;
+    if(brightDeltaMain > S3D_BRIGHT_EPS)
+    {
+        vec2 brightOffs = lightBrightRcpSize.xy * gl_TexCoord[5].w;
+        vec4 brightCoordX = vec4(
+                gl_TexCoord[5].xy + brightOffs, 
+                gl_TexCoord[5].zw);
+        vec4 brightCoordY = vec4(
+                gl_TexCoord[5].xy - brightOffs, 
+                gl_TexCoord[5].zw);
+        vec4 brightCoordZ = brightCoordX;
+        brightCoordZ.y = brightCoordY.y;
+        vec4 brightCoordW = brightCoordY;
+        brightCoordW.y = brightCoordX.y;
+        vec4 brightVecX = texture2DProj(lightBrightSamp, brightCoordX);
+        vec4 brightVecY = texture2DProj(lightBrightSamp, brightCoordY);
+        vec4 brightVecZ = texture2DProj(lightBrightSamp, brightCoordZ);
+        vec4 brightVecW = texture2DProj(lightBrightSamp, brightCoordW);
+        brightVal = min(brightVecMain.x,
+                        min(min(brightVecX.x, brightVecY.x),
+                            min(brightVecZ.x, brightVecW.x)));
+    }
+@else    
+    // Lookup brightness:
+    float brightVal = texture2DProj(lightBrightSamp, gl_TexCoord[5]).x;
+@endif    
+    // Exit if no light:
+    if(brightVal <= S3D_INTENS_DISCARD_TRESHOLD)
+        discard;
+@endif
+    
+@ifdef S3D_LIGHT_SHMAP
+    // Shadow map:
+    float shmapVal = s3d_shmapFilter(
+            lightShmapSamp, gl_TexCoord[6],
+            lightShmapSize, lightShmapRcpSize);
+    if(shmapVal <= S3D_INTENS_DISCARD_TRESHOLD)
+        discard;
+@endif
+
+    // Texture coordinates:
+    vec2 mainTexCoord = gl_TexCoord[0].xy;
+@ifdef S3D_PARALLAX_MAPPING
+    vec3 camToVertSurfNrm = normalize(gl_TexCoord[4].xyz);
+    float height = texture2D(normalSamp, mainTexCoord).a;
+    vec2 offset = S3D_PARALLAX_SCALE * (S3D_PARALLAX_BIAS - height) 
+            * camToVertSurfNrm.xy;
+    mainTexCoord = mainTexCoord + offset;
+@endif
+
+    // Texture lookups:
+    vec4 texCol = texture2D(tex0, mainTexCoord.xy);
+    vec4 rawNormalView = texture2D(normalSamp, mainTexCoord.xy);
+    vec3 normalView = (rawNormalView.xyz - 0.5) * 2.0;
+
+    // Calculate range-factor from scaled surface-to-light vector:
+    float rangeFac =
+        max(1.0 - dot(gl_TexCoord[3].xyz, gl_TexCoord[3].xyz), 0.0);
+
+    // Diffuse direction:
+    vec3 diffuseDirSurfNrm = S3D_NORMALIZE(gl_TexCoord[1].xyz);
+
+    // Calculate diffuse:    
+    vec4 diffuse = vec4(lightDiffuse.xyz * rangeFac, lightDiffuse.w);
+    diffuse += lightAmbient;
+    float diffDot = dot(normalView, diffuseDirSurfNrm);
+@ifdef S3D_MILD
+    float diffFac = diffDot * (1.0 - S3D_MILD) + S3D_MILD;
+@else
+    float diffFac = diffDot;
+@endif
+    diffuse *= clamp(diffFac, 0.0, 1.0);;
+    
+    // Calculate specular:
+    vec4 specular = vec4(lightSpecular.xyz * rangeFac, lightSpecular.w);
+    // ATI workaround: Don't use x component of gl_TexCoord[2]:
+    vec3 specularDirSurfNrm = S3D_NORMALIZE(gl_TexCoord[2].yzw);
+    float specDot = dot(normalView, specularDirSurfNrm);
+    float specFac = clamp(pow(clamp(specDot, 0.0, 1.0), 
+            S3D_SPECULAR_EXP), 0.0, 1.0);
+    specular *= specFac;
+
+    vec4 outCol;
+    outCol.rgb = clamp(diffuse.rgb * texCol.rgb 
+            + specular.rgb * texCol.a, 0.0, 1.0);
+    // Preserve original opacity from texture.
+    outCol.a = texCol.a;
+
+@ifdef S3D_GEOMETRIC_SHADOW
+    // Geometric shadow
+    float geomShadow = clamp(diffuseDirSurfNrm.z * 4.0, 0.0, 1.0);
+    outCol.rgb = clamp(outCol.rgb * geomShadow, 0.0, 1.0);
+@endif
+
+@ifdef S3D_LIGHT_BRIGHT
+    // Correct brightness:
+    // The smoothing algorithm generates higher brightness gradients 
+    // near 0 and 1 due to sticking to 0 and 1. 
+    // This is approximately compensated by using a quadratic function 
+    // near 0 and 1.
+    brightVal = 2.0 * brightVal * brightVal * (1.5 - brightVal);
+
+    // Apply brightness:
+    outCol.rgb = outCol.rgb * brightVal;
+@endif
+
+@ifdef S3D_LIGHT_PROJ
+    vec4 texColProjTex = texture2DProj(lightProjSamp, gl_TexCoord[5]);
+    outCol *= texColProjTex;
+@endif
+
+@ifdef S3D_LIGHT_SHMAP
+    outCol *= shmapVal;
+@endif
+
+    gl_FragColor = outCol;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/gen_shvol_extrude_ogl_glsl_vs1x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/gen_shvol_extrude_ogl_glsl_vs1x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/gen_shvol_extrude_ogl_glsl_vs1x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,54 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+@include "levelutil/shader/prog/ogl_glsl/" \
+        "include_stddef_ogl_glsl_vs1x0.s3d_shadercode_run"
+
+///////////////////////////////////////////////////////////////////////////////
+
+uniform vec4 lightCenRange;
+uniform vec4 lightExtrude;
+
+S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+S3D_MATBONE_DECL_STD(matBone)
+
+///////////////////////////////////////////////////////////////////////////////
+
+void main(void)
+{
+    S3D_BONE_TRANSF_STD(matBoneFinal, matBone, boneWgh, boneSubscr);
+    vec4 posView = matBoneFinal * gl_Vertex;
+    vec3 normalView = normalize((matBoneFinal * vec4(gl_Normal, 0.0)).xyz);
+
+    vec3 effLightCenRange = lightCenRange.xyz;
+
+@ifdef S3D_USE_BLOAT
+    // Bloat:
+    effLightCenRange.xyz -= normalView * lightExtrude.z;
+@endif    
+
+    // Calculate normalized extrusion direction vector:
+    vec3 dirNrm = normalize(posView.xyz - effLightCenRange.xyz);
+
+    // Extrude:
+    float prod = dot(dirNrm, normalView) * lightExtrude.w;
+    // Important! If the product is zero, extrusion must be off.
+    float sign = (prod > 0.0) ? 1.0 : 0.0;
+    float move = sign * lightExtrude.x + lightExtrude.y;
+    posView.xyz = move * dirNrm + posView.xyz;
+
+    // Transform:
+    gl_Position = gl_ProjectionMatrix * posView;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/bloom_combine_ogl_glsl_fs1x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/bloom_combine_ogl_glsl_fs1x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/bloom_combine_ogl_glsl_fs1x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,25 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+uniform sampler2D tex0;
+uniform sampler2D tex1;
+
+void main(void)
+{
+    vec4 texCol0 = texture2D(tex0, gl_TexCoord[0].xy);
+    vec4 texCol1 = texture2D(tex1, gl_TexCoord[0].xy);
+    
+    gl_FragColor = texCol0 + 2.0 * texCol1;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/bloom_bright_ogl_glsl_fs1x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/bloom_bright_ogl_glsl_fs1x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/bloom_bright_ogl_glsl_fs1x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,26 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+uniform sampler2D tex0;
+
+void main(void)
+{
+    vec2 mainTexCoord = gl_TexCoord[0].xy;
+
+    vec4 color = texture2D(tex0, mainTexCoord);
+    float intensity = max(color.x, max(color.y, color.z));
+    color = color * intensity;
+    gl_FragColor = color;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/comic_ogl_glsl_vs1x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/comic_ogl_glsl_vs1x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/comic_ogl_glsl_vs1x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,66 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+@include "levelutil/shader/prog/ogl_glsl/" \
+        "include_stddef_ogl_glsl_vs1x0.s3d_shadercode_run"
+
+///////////////////////////////////////////////////////////////////////////////
+
+void main(void)
+{
+    gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
+
+    vec4 posView = gl_ModelViewMatrix * gl_Vertex;
+    gl_FogFragCoord = posView.z / posView.w;
+
+    vec3 normalView = normalize(gl_NormalMatrix * gl_Normal);
+    vec4 diffuseOut = gl_FrontMaterial.emission;
+    vec4 specularOut = vec4(0);
+//!!! hack to detect nvidia
+#ifdef __GLSL_CG_DATA_TYPES
+    for(int i = 0; i < gl_MaxLights; i++)
+    {
+        s3d_ColPair result;
+        s3d_calcPointLightTerm(
+                result, posView.xyz, normalView, gl_FrontMaterial.shininess, 
+                gl_LightSource[i], gl_FrontLightProduct[i]);
+        diffuseOut += result.diffuse;    
+        specularOut += result.specular;    
+    }
+#else
+    s3d_ColPair result;
+    s3d_calcPointLightTerm(
+            result, posView.xyz, normalView, gl_FrontMaterial.shininess, 
+            gl_LightSource[0], gl_FrontLightProduct[0]);
+    diffuseOut += result.diffuse;    
+    specularOut += result.specular;    
+    
+    s3d_calcPointLightTerm(
+            result, posView.xyz, normalView, gl_FrontMaterial.shininess, 
+            gl_LightSource[1], gl_FrontLightProduct[1]);
+    diffuseOut += result.diffuse;    
+    specularOut += result.specular;    
+    
+    s3d_calcPointLightTerm(
+            result, posView.xyz, normalView, gl_FrontMaterial.shininess, 
+            gl_LightSource[2], gl_FrontLightProduct[2]);
+    diffuseOut += result.diffuse;    
+    specularOut += result.specular;    
+#endif
+         
+    gl_FrontColor = vec4(0,1,0,0);//gl_Color;
+    gl_TexCoord[0].x = dot(diffuseOut.xyz, vec3(0.3, 0.5, 0.2));
+    gl_TexCoord[0].y = 0.0;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/shvol_ogl_glsl_vs1x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/shvol_ogl_glsl_vs1x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/shvol_ogl_glsl_vs1x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,47 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+@include "levelutil/shader/prog/ogl_glsl/" \
+        "stddef_ogl_glsl_vs1x0.s3d_shadercode_run"
+
+///////////////////////////////////////////////////////////////////////////////
+
+uniform vec4 lightCenRange;
+uniform vec4 lightExtrude;
+
+S3D_BONE_DECL_STD(boneWgh, boneSubscr)
+S3D_MATBONE_DECL_STD(matBone)
+
+///////////////////////////////////////////////////////////////////////////////
+
+void main(void)
+{
+    S3D_BONE_TRANSF_STD(matBoneFinal, matBone, boneWgh, boneSubscr);
+    vec4 posView = matBoneFinal * gl_Vertex;
+    vec3 normalView = normalize((matBoneFinal * vec4(gl_Normal, 0.0)).xyz);
+
+    // Calculate normalized extrusion direction vector:
+    vec3 dirNrm = normalize(posView.xyz - lightCenRange.xyz);
+
+    // Extrude:
+    float prod = dot(dirNrm, normalView) * lightExtrude.z;
+    // Important! If the product is zero, extrusion must be off.
+    float sign = (prod > 0.0) ? 1.0 : 0.0;
+    float move = sign * lightExtrude.x + lightExtrude.y;
+    posView.xyz = move * dirNrm + posView.xyz;
+
+    // Transform:
+    gl_Position = gl_ProjectionMatrix * posView;
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/black_ogl_glsl_fs1x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/black_ogl_glsl_fs1x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/black_ogl_glsl_fs1x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,19 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+void main(void)
+{
+    gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/lightfilter_ogl_glsl_fs1x0.s3d_shadercode_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/lightfilter_ogl_glsl_fs1x0.s3d_shadercode_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/ogl_glsl/lightfilter_ogl_glsl_fs1x0.s3d_shadercode_run	(revision 2453)
@@ -0,0 +1,74 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+uniform sampler2D brightTex;
+
+uniform vec4 filterInfo;
+
+varying vec2 screen;
+varying vec2 scale;
+
+///////////////////////////////////////////////////////////////////////////////
+
+const vec2 offsPix0 = vec2( 1,  0);
+const vec2 offsPix1 = vec2(-1,  0);
+const vec2 offsPix2 = vec2( 0,  1);
+const vec2 offsPix3 = vec2( 0, -1);
+const vec2 offsPix4 = vec2( 1,  1);
+const vec2 offsPix5 = vec2(-1,  1);
+const vec2 offsPix6 = vec2( 1, -1);
+const vec2 offsPix7 = vec2(-1, -1);
+
+///////////////////////////////////////////////////////////////////////////////
+
+void main(void)
+{
+    // Main depth and color:
+
+    gl_FragColor = texture2D(brightTex, screen.xy);
+
+    float full = 2.0 * abs(gl_FragColor.x - 0.5);
+    float treshold = 0.99;
+    float delta = treshold - full;
+
+    if(delta >= 0.0)
+    {
+        // neightbor texture coordinates:
+        vec2 neigh0 = offsPix0 * scale.xy + screen.xy;
+        vec2 neigh1 = offsPix1 * scale.xy + screen.xy;
+        vec2 neigh2 = offsPix2 * scale.xy + screen.xy;
+        vec2 neigh3 = offsPix3 * scale.xy + screen.xy;
+        vec2 neigh4 = offsPix4 * scale.xy + screen.xy;
+        vec2 neigh5 = offsPix5 * scale.xy + screen.xy;
+        vec2 neigh6 = offsPix6 * scale.xy + screen.xy;
+        vec2 neigh7 = offsPix7 * scale.xy + screen.xy;
+
+        // Lookup colors:
+        
+        vec4 colA, colB;
+        colA.x = texture2D(brightTex, neigh0).x;
+        colA.y = texture2D(brightTex, neigh1).x;
+        colA.z = texture2D(brightTex, neigh2).x;
+        colA.w = texture2D(brightTex, neigh3).x;
+        colB.x = texture2D(brightTex, neigh4).x;
+        colB.y = texture2D(brightTex, neigh5).x;
+        colB.z = texture2D(brightTex, neigh6).x;
+        colB.w = texture2D(brightTex, neigh7).x;
+
+        float sum = gl_FragColor.x 
+                + dot(colA + colB, vec4(1.0, 1.0, 1.0, 1.0));
+        gl_FragColor = vec4(sum * 0.11111111);
+    }
+}
+
+///////////////////////////////////////////////////////////////////////////////
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/plain_pointcol.s3d_shaderprog_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/plain_pointcol.s3d_shaderprog_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/plain_pointcol.s3d_shaderprog_run	(revision 2453)
@@ -0,0 +1,157 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+ogl
+{
+    glsl
+    {
+        vertshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "plain_ogl_glsl_vs1x0.s3d_shadercode_run"
+            }
+
+            tracking
+            {
+                cnt 4
+                codevar "matBone[$]"
+                chan "bone"
+                trans "identity"
+            }
+
+            //  attribute vec4 bone_wgh;
+            bone_wgh "boneWgh"
+            //bone_subscr "boneSubscr"
+
+            predefine_array
+            {
+                name "S3D_USE_BONEWGH"
+            }
+        }
+    }
+}
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "plain_pointcol_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "plain_pointcol_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "plain_pointcol_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "plain_pointcol_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+
+        //fog_codevar "paramFog"
+    }
+}
+//#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gen_shvol_strict.s3d_shaderprog_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gen_shvol_strict.s3d_shaderprog_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gen_shvol_strict.s3d_shaderprog_run	(revision 2453)
@@ -0,0 +1,119 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+ogl
+{
+    univprog
+    {
+        ident "drv_univprog_std.shvol"
+        param
+        {
+            env "env"
+            cenrange_progvar "prog_light_cenrange"
+            extrude_progvar "prog_light_extrude"
+        }
+    }
+    
+    glsl
+    {
+        vertshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "gen_shvol_view_ogl_glsl_vs1x0.s3d_shadercode_run"
+            }
+
+            tracking
+
+            predefine_array
+        }
+
+        param_array
+    }
+}
+
+d3d9
+{
+    univprog
+    {
+        ident "drv_univprog_std.shvol"
+        param
+        {
+            env "env"
+            cenrange_progvar "prog_light_cenrange"
+            extrude_progvar "prog_light_extrude"
+        }
+    }
+    
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gen_shvol_view_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+
+        param_array
+        predefine_array
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    xps
+    {
+        ident "drv_xexps_std.shvol"
+        param
+        {
+            env "env"
+            cenrange_progvar "prog_light_cenrange"
+            extrude_progvar "prog_light_extrude"
+        }
+    }
+    
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gen_shvol_view_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+
+        param_array
+        predefine_array
+    }
+}
+//#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/plain_point.s3d_shaderprog_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/plain_point.s3d_shaderprog_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/plain_point.s3d_shaderprog_run	(revision 2453)
@@ -0,0 +1,174 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Shader program configuration.
+// Different drivers access different parameters.
+
+ogl
+{
+    glsl
+    {
+        vertshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "plain_ogl_glsl_vs1x0.s3d_shadercode_run"
+            }
+
+            tracking
+            {
+                cnt 4
+                codevar "matBone[$]"
+                chan "bone"
+                trans "identity"
+            }
+
+            //  attribute vec4 bone_wgh;
+            bone_wgh "boneWgh"
+            //bone_subscr "boneSubscr"
+
+            predefine_array
+            {
+                name "S3D_USE_BONEWGH"
+            }
+        }
+    }
+}
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "plain_point_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+
+        mtl
+        {
+            power_codevar ""
+            emissive_codevar "mtrlEmissive"
+        }
+
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "plain_point_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "plain_point_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matView"
+            slot 0
+            chan "view"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+
+        mtl
+        {
+            power_codevar ""
+            emissive_codevar "mtrlEmissive"
+        }
+
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "plain_point_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+
+        //fog_codevar "paramFog"
+    }
+}
+//#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gtp_reduce_cubemap.s3d_shaderprog_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gtp_reduce_cubemap.s3d_shaderprog_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gtp_reduce_cubemap.s3d_shaderprog_run	(revision 2453)
@@ -0,0 +1,37 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                & "gtp_reduce_cubemap_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+        }      
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "3x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gtp_reduce_cubemap_d3d9_hlsl_ps3x0.s3d_shadercode_run"
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/lightfilter.s3d_shaderprog_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/lightfilter.s3d_shaderprog_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/lightfilter.s3d_shaderprog_run	(revision 2453)
@@ -0,0 +1,145 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+ogl
+{
+    glsl
+    {
+        vertshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "lightfilter_ogl_glsl_vs1x0.s3d_shadercode_run"
+            }
+        }
+
+        fragshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "lightfilter_ogl_glsl_fs1x0.s3d_shadercode_run"
+            }
+
+            predefine_array
+        }
+
+        param_array
+        {
+            src_progvar "prog_passinfo"
+            dest_codevar "passInfo"
+            type "float4"
+        }
+
+        tex_rcpsize_codevar_array "tex0RcpSize"
+
+        sampler_array "brightTex"
+    }
+}
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "lightfilter_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "matProjView"
+            slot 0
+            chan "projview"
+            trans "identity"
+        }
+
+        param_array
+        {
+            src_progvar "prog_passinfo"
+            dest_codevar "passInfo"
+            type "float4"
+        }
+
+        tex_rcpsize_codevar_array "tex0RcpSize"
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "lightfilter_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+
+        param_array
+        
+        predefine_array
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "lightfilter_d3d9_hlsl_vs2x0.s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "matProjView"
+            slot 0
+            chan "projview"
+            trans "identity"
+        }
+
+        param_array
+        {
+            src_progvar "prog_passinfo"
+            dest_codevar "passInfo"
+            type "float4"
+        }
+
+        tex_rcpsize_codevar_array "tex0RcpSize"
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "lightfilter_d3d9_hlsl_ps2x0.s3d_shadercode_run"
+        }
+
+        param_array
+        
+        predefine_array
+    }
+}
+//#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gen_brightclear.s3d_shaderprog_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gen_brightclear.s3d_shaderprog_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gen_brightclear.s3d_shaderprog_run	(revision 2453)
@@ -0,0 +1,150 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gen_brightclear_d3d9_hlsl_vs1x1."
+                    & "s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        param_array
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gen_brightclear_d3d9_hlsl_ps2x0."
+                    & "s3d_shadercode_run"
+        }
+        
+        param_array
+
+        tex_size_codevar_array
+        tex_rcpsize_codevar_array
+
+        predefine_array
+        {
+            name "S3D_SHMAP_ZBIAS"
+            //val "0.0003" // For no-filtering
+            val "0.0010" // For 4-filtering
+            //val "0.0010" // For 16-filtering
+        }
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gen_brightclear_d3d9_hlsl_vs1x1."
+                    & "s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        param_array
+
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+    }
+
+    hlsl_pixshader
+    {
+        code_variant_array
+        {
+            profile "2x0"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gen_brightclear_d3d9_hlsl_ps2x0."
+                    & "s3d_shadercode_run"
+        }
+
+        param_array
+        
+        tex_size_codevar_array
+        tex_rcpsize_codevar_array
+
+        predefine_array
+        /*
+        {
+            name "S3D_SHMAP_FILTER4"
+            val ""
+        }
+        */
+        {
+            name "S3D_SHMAP_ZBIAS"
+            //val "0.0003" // For no-filtering
+            //val "0.0010" // For 4-filtering
+            val "0.0010" // For 16-filtering
+        }
+    }
+}
+//#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gen_shvol_quick.s3d_shaderprog_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gen_shvol_quick.s3d_shaderprog_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/prog/gen_shvol_quick.s3d_shaderprog_run	(revision 2453)
@@ -0,0 +1,165 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+ogl
+{
+    glsl
+    {
+        vertshader
+        {
+            code_variant_array
+            {
+                req_ver "1x0"
+                code_array "levelutil/shader/prog/ogl_glsl/"
+                        & "gen_shvol_extrude_ogl_glsl_vs1x0.s3d_shadercode_run"
+            }
+
+            tracking
+            {
+                // uniform mat4 matBone[4];
+                cnt 4
+                codevar "matBone[$]"
+                chan "bone"
+                trans "identity"
+            }
+
+            //  attribute vec4 bone_wgh;
+            bone_wgh "boneWgh"
+            //bone_subscr "boneSubscr"
+
+            predefine_array
+            {
+                name "S3D_USE_BONEWGH"
+            }
+            {
+                name "S3D_USE_BLOAT"
+            }
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_cenrange"
+            dest_codevar "lightCenRange"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_extrude"
+            dest_codevar "lightExtrude"
+            type "float4"
+        }
+    }
+}
+
+d3d9
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gen_shvol_extrude_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_cenrange"
+            dest_codevar "lightCenRange"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_extrude"
+            dest_codevar "lightExtrude"
+            type "float4"
+        }
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+        {
+            name "S3D_USE_BLOAT"
+        }
+    }
+}
+
+//#ifdef S3D_GENERAL_PLATFORM_XE
+xe
+{
+    hlsl_vertshader
+    {
+        code_variant_array
+        {
+            profile "1x1"
+            entry_point "main"
+            code "levelutil/shader/prog/d3d9_hlsl/"
+                    & "gen_shvol_extrude_d3d9_hlsl_vs1x1.s3d_shadercode_run"
+        }
+
+        tracking
+        {
+            codevar "projMat"
+            slot 0
+            chan "proj"
+            trans "identity"
+        }
+        {
+            codevar "matBone"
+            slot 0
+            chan "bone"
+            trans "identity"
+        }
+
+        param_array
+        {
+            src_progvar "prog_light_cenrange"
+            dest_codevar "lightCenRange"
+            type "float4"
+        }
+        {
+            src_progvar "prog_light_extrude"
+            dest_codevar "lightExtrude"
+            type "float4"
+        }
+        predefine_array
+        {
+            name "S3D_USE_BONESUBSCR"
+        }
+        {
+            name "S3D_MATBONE_CNT"
+            val "32"
+        }
+        {
+            name "S3D_USE_BLOAT"
+        }
+    }
+}
+//#endif
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/sky.s3d_shader_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/sky.s3d_shader_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/sky.s3d_shader_run	(revision 2453)
@@ -0,0 +1,84 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Definition of the shaders.
+// A shader is an object responsible for drawing objects.
+
+shader_array
+{
+    name "plain"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                usage "render"
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                insp_ident "showmesh"
+                insp_rank 80000
+                insp_color 1.0 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 12000
+                insp_ident "showwire"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+
+                lightarray_var ""
+
+                shaderprog_ident "levelutil/shader/prog/"
+                        & "plain_pointtex.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/ordinary.s3d_shader_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/ordinary.s3d_shader_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/ordinary.s3d_shader_run	(revision 2453)
@@ -0,0 +1,3414 @@
+// Machine-made Shark 3D Snake Text 2x0 Stream. Format: ascii.
+shader_array
+{
+    name "ordinary"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                mesh_var "mesh"
+                texchan_var_array "tex0" "normalmap"
+                tex_attr_var_array "attr0"
+                usage "render"
+                tangentu_attr_var "tangentu"
+                tangentv_attr_var "tangentv"
+                insp_ident "showmesh"
+                insp_rank 80000
+                insp_color 1.0 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                usage "shvol_occl"
+                mesh_var "mesh_shvol_occl"
+                texchan_var_array
+                tex_attr_var_array
+                insp_ident "showocclmesh"
+                insp_rank 80000
+                insp_color 0.5 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+                {
+                    triggers "gtp_distance_impostor_trigger"
+                    method "gtp_distance_impostor_method"
+                }
+                {
+                    triggers "gen_shmap_trigger"
+                    method "gen_shmap_method"
+                }
+                {
+                    triggers "light_trigger"
+                    method "light_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                }
+                {
+                    triggers "lightmild_trigger"
+                    method "lightmild_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                }
+                {
+                    triggers "lightbright_trigger"
+                    method "lightbright_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                    {
+                        src_extvar "ext_light_brighttex"
+                        dest_var "light_brighttex"
+                    }
+                    {
+                        src_extvar "ext_light_brightmat"
+                        dest_var "light_brightmat"
+                    }
+                }
+                {
+                    triggers "lightshmap_trigger"
+                    method "lightshmap_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                    {
+                        src_extvar "ext_light_projmat"
+                        dest_var "light_projmat"
+                    }
+                    {
+                        src_extvar "ext_light_shmapmat"
+                        dest_var "light_shmapmat"
+                    }
+                    {
+                        src_extvar "ext_light_projtex"
+                        dest_var "light_projtex"
+                    }
+                    {
+                        src_extvar "ext_light_shmap"
+                        dest_var "light_shmap"
+                    }
+                }
+                {
+                    triggers "gen_brightmap_for_softshmap_trigger"
+                    method "gen_brightmap_for_softshmap_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_intens"
+                        dest_var "light_intens"
+                    }
+                    {
+                        src_extvar "ext_light_projmat"
+                        dest_var "light_projmat"
+                    }
+                    {
+                        src_extvar "ext_light_shmapmat"
+                        dest_var "light_shmapmat"
+                    }
+                    {
+                        src_extvar "ext_light_projtex"
+                        dest_var "light_projtex"
+                    }
+                    {
+                        src_extvar "ext_light_shmap"
+                        dest_var "light_shmap"
+                    }
+                }
+                {
+                    triggers "gen_brightclear_trigger"
+                    method "gen_brightclear_method"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh_shvol_occl"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "shvol_mark_trigger"
+                    method "shvol_mark_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_shvolparam"
+                        dest_var "light_shvolparam"
+                    }
+                }
+            }
+        }
+        {
+            ident "eng_shader_shvol.occluder"
+            param
+            {
+                env "shaderenv"
+                methods "shvol_mark_method"
+                reverse_rank 90010
+                nonreverse_rank 90000
+                insp_ident "showocclwire"
+                rel_gap 0.01
+                backface 0
+                mesh_var "mesh_shvol_occl"
+                cenrange_var "light_cenrange"
+                shvolparam_var "light_shvolparam"
+                extrude_var "light_extrude"
+                strict_shaderprog_ident
+                    "levelutil/shader/prog/gen_shvol_strict.s3d_shaderprog_run"
+                strict_shaderprog_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_progvar "prog_light_cenrange"
+                }
+                {
+                    src_var "light_extrude"
+                    dest_progvar "prog_light_extrude"
+                }
+                quick_shaderprog_ident
+                    "levelutil/shader/prog/gen_shvol_quick.s3d_shaderprog_run"
+                quick_shaderprog_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_progvar "prog_light_cenrange"
+                }
+                {
+                    src_var "light_extrude"
+                    dest_progvar "prog_light_extrude"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                rank 99999
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                methods "gen_shmap_method"
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                shaderprog_ident
+                    "levelutil/shader/prog/gen_shmap.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 12000
+                insp_ident "showwire"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 0
+                color 0.0 0.0 0.0
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array
+                attrmat_var_array
+                lightarray_var ""
+                shaderprog_ident
+                    "levelutil/shader/prog/plain_point.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "light_method"
+                rank 99999
+                insp_ident "showwire"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+                mesh_var "mesh"
+                texchan_var_array "tex0" "normalmap"
+                tex_attr_var_array "attr0" "tangentu" "tangentv"
+                attrmat_var_array ""
+                blend_col_src_fac "one"
+                blend_col_dest_fac "inv_src_col"
+                lightarray_var ""
+                shaderprog_ident
+                    "levelutil/shader/prog/bump.s3d_shaderprog_run"
+                shaderprog_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_progvar "prog_light_cenrange"
+                }
+                {
+                    src_var "light_ambient"
+                    dest_progvar "prog_light_ambient"
+                }
+                {
+                    src_var "light_diffuse"
+                    dest_progvar "prog_light_diffuse"
+                }
+                {
+                    src_var "light_specular"
+                    dest_progvar "prog_light_specular"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "lightmild_method"
+                rank 99999
+                insp_ident "showwire"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+                mesh_var "mesh"
+                texchan_var_array "tex0" "normalmap"
+                tex_attr_var_array "attr0" "tangentu" "tangentv"
+                attrmat_var_array ""
+                blend_col_src_fac "one"
+                blend_col_dest_fac "inv_src_col"
+                lightarray_var ""
+                shaderprog_ident
+                    "levelutil/shader/prog/bump_mild.s3d_shaderprog_run"
+                shaderprog_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_progvar "prog_light_cenrange"
+                }
+                {
+                    src_var "light_ambient"
+                    dest_progvar "prog_light_ambient"
+                }
+                {
+                    src_var "light_diffuse"
+                    dest_progvar "prog_light_diffuse"
+                }
+                {
+                    src_var "light_specular"
+                    dest_progvar "prog_light_specular"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "lightbright_method"
+                rank 12000
+                insp_ident "showwire"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 0
+                mesh_var "mesh"
+                texchan_var_array "tex0" "normalmap" "light_brighttex"
+                tex_attr_var_array "attr0" "tangentu" "tangentv"
+                attrmat_var_array "" "" ""
+                blend_col_src_fac "one"
+                blend_col_dest_fac "inv_src_col"
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+                shaderprog_ident
+                    "levelutil/shader/prog/bump_bright.s3d_shaderprog_run"
+                shaderprog_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_progvar "prog_light_cenrange"
+                }
+                {
+                    src_var "light_ambient"
+                    dest_progvar "prog_light_ambient"
+                }
+                {
+                    src_var "light_diffuse"
+                    dest_progvar "prog_light_diffuse"
+                }
+                {
+                    src_var "light_specular"
+                    dest_progvar "prog_light_specular"
+                }
+                {
+                    src_var "light_brightmat"
+                    dest_progvar "prog_light_brightmat"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "lightshmap_method"
+                rank 99999
+                insp_ident "showwire"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 0
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+                mesh_var "mesh"
+                texchan_var_array "tex0" "normalmap" "light_projtex"
+                    "light_shmap"
+                tex_attr_var_array "attr0" "tangentu" "tangentv"
+                attrmat_var_array ""
+                blend_col_src_fac "one"
+                blend_col_dest_fac "inv_src_col"
+                lightarray_var ""
+                shaderprog_ident
+                    "levelutil/shader/prog/bump_shmap.s3d_shaderprog_run"
+                shaderprog_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_progvar "prog_light_cenrange"
+                }
+                {
+                    src_var "light_ambient"
+                    dest_progvar "prog_light_ambient"
+                }
+                {
+                    src_var "light_diffuse"
+                    dest_progvar "prog_light_diffuse"
+                }
+                {
+                    src_var "light_specular"
+                    dest_progvar "prog_light_specular"
+                }
+                {
+                    src_var "light_projmat"
+                    dest_progvar "prog_light_projmat"
+                }
+                {
+                    src_var "light_shmapmat"
+                    dest_progvar "prog_light_shmapmat"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "gen_brightmap_for_softshmap_method"
+                rank 99999
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 0
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+                mesh_var "mesh"
+                texchan_var_array "light_projtex" "light_shmap"
+                tex_attr_var_array ""
+                attrmat_var_array ""
+                blend_col_src_fac "one"
+                blend_col_dest_fac "inv_src_col"
+                lightarray_var ""
+                shaderprog_ident
+                    "levelutil/shader/prog/gen_brightmap_for_softshmap.s3d_sha"
+                    & "derprog_run"
+                shaderprog_param_array
+                {
+                    src_var "light_intens"
+                    dest_progvar "prog_light_intens"
+                }
+                {
+                    src_var "light_projmat"
+                    dest_progvar "prog_light_projmat"
+                }
+                {
+                    src_var "light_shmapmat"
+                    dest_progvar "prog_light_shmapmat"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "gen_brightclear_method"
+                rank 12000
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array
+                attrmat_var_array
+                fog_enabled 0
+                blend_col_src_fac "one"
+                blend_col_dest_fac "zero"
+                color 0.0 0.0 0.0
+                alpha 0.0
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                shaderprog_ident
+                    "levelutil/shader/prog/gen_brightclear.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "gtp_distance_impostor_method"
+                rank 12000
+                insp_ident "insp_shader_mesh"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                color 1.0 1.0 1.0
+                shaderprog_ident
+                    "levelutil/shader/prog/gtp_distance_impostor.s3d_shaderpro"
+                    & "g_run"
+                shaderprog_param_array
+            }
+        }
+    }
+}
+{
+    name "ordinary_diffuse"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                mesh_var "mesh"
+                texchan_var_array "tex0" "normalmap"
+                tex_attr_var_array "attr0"
+                usage "render"
+                tangentu_attr_var "tangentu"
+                tangentv_attr_var "tangentv"
+            }
+        }
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                usage "shvol_occl"
+                mesh_var "mesh_shvol_occl"
+                texchan_var_array
+                tex_attr_var_array
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh"
+                insp_ident "insp_shader_bound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+                {
+                    triggers "gtp_distance_impostor_trigger"
+                    method "gtp_distance_impostor_method"
+                }
+                {
+                    triggers "gen_shmap_trigger"
+                    method "gen_shmap_method"
+                }
+                {
+                    triggers "light_trigger"
+                    method "light_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                }
+                {
+                    triggers "lightmild_trigger"
+                    method "lightmild_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                }
+                {
+                    triggers "lightbright_trigger"
+                    method "lightbright_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                    {
+                        src_extvar "ext_light_brighttex"
+                        dest_var "light_brighttex"
+                    }
+                    {
+                        src_extvar "ext_light_brightmat"
+                        dest_var "light_brightmat"
+                    }
+                }
+                {
+                    triggers "lightshmap_trigger"
+                    method "lightshmap_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                    {
+                        src_extvar "ext_light_projmat"
+                        dest_var "light_projmat"
+                    }
+                    {
+                        src_extvar "ext_light_shmapmat"
+                        dest_var "light_shmapmat"
+                    }
+                    {
+                        src_extvar "ext_light_projtex"
+                        dest_var "light_projtex"
+                    }
+                    {
+                        src_extvar "ext_light_shmap"
+                        dest_var "light_shmap"
+                    }
+                }
+                {
+                    triggers "gen_brightmap_for_softshmap_trigger"
+                    method "gen_brightmap_for_softshmap_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_intens"
+                        dest_var "light_intens"
+                    }
+                    {
+                        src_extvar "ext_light_projmat"
+                        dest_var "light_projmat"
+                    }
+                    {
+                        src_extvar "ext_light_shmapmat"
+                        dest_var "light_shmapmat"
+                    }
+                    {
+                        src_extvar "ext_light_projtex"
+                        dest_var "light_projtex"
+                    }
+                    {
+                        src_extvar "ext_light_shmap"
+                        dest_var "light_shmap"
+                    }
+                }
+                {
+                    triggers "gen_brightclear_trigger"
+                    method "gen_brightclear_method"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh_shvol_occl"
+                insp_ident "insp_shader_bound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "shvol_mark_trigger"
+                    method "shvol_mark_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_shvolparam"
+                        dest_var "light_shvolparam"
+                    }
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 12000
+                insp_ident "insp_shader_mesh"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 0
+                color 0.0 0.0 0.0
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array
+                attrmat_var_array
+                lightarray_var ""
+                shaderprog_ident
+                    "levelutil/shader/prog/plain_point.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+        {
+            ident "gtp_shader.createtex"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                texchan_var "envmap0"
+                width 128
+                height 128
+                texprop_rendertarget 1
+                texprop_cube 1
+                texprop_float 0
+                texprop_comp 4
+                texprop_bitspercomp 8
+                samplermode_clamp 0
+                samplermode_filter 1
+            }
+        }
+        {
+            ident "gtp_shader.envmap"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank -9000
+                max_ext 256
+                max_recursion 1
+                ext_dist_scale 20.0
+                proj_neg_z 0.1
+                proj_pos_z 100.0
+                enum_trigger "mirror_trigger"
+                destprop_antialias 0
+                mesh_var "mesh"
+                update_interval 1
+                update_all_face 1
+                start_frame 0
+                last_center_var "lastCenter"
+                world_space 1
+                dest_array
+                {
+                    from_var "envmap0"
+                    to_var "envmap0"
+                    texprop_restrusage 0
+                    texprop_depth 0
+                    texprop_comp 3
+                    texprop_float 0
+                    samplermode_filter 0
+                    samplermode_clamp 1
+                }
+            }
+        }
+        {
+            ident "gtp_shader.createtex"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                texchan_var "dist"
+                width 128
+                height 128
+                texprop_rendertarget 1
+                texprop_cube 1
+                texprop_float 1
+                texprop_comp 2
+                texprop_bitspercomp 16
+                samplermode_clamp 0
+                samplermode_filter 0
+            }
+        }
+        {
+            ident "gtp_shader.envmap"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank -9000
+                max_ext 128
+                max_recursion 1
+                ext_dist_scale 20.0
+                proj_neg_z 0.1
+                proj_pos_z 100.0
+                enum_trigger "gtp_distance_impostor_trigger"
+                destprop_antialias 0
+                mesh_var "mesh"
+                update_interval 1
+                update_all_face 1
+                start_frame 0
+                last_center_var ""
+                world_space 1
+                dest_array
+                {
+                    from_var "dist"
+                    to_var "dist"
+                    texprop_restrusage 0
+                    texprop_depth 0
+                    texprop_comp 1
+                    texprop_float 1
+                    samplermode_filter 0
+                    samplermode_clamp 1
+                }
+            }
+        }
+        {
+            ident "gtp_shader.createtex"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                texchan_var "filteredenvmap"
+                width 4
+                height 4
+                texprop_rendertarget 1
+                texprop_cube 1
+                texprop_float 0
+                texprop_comp 4
+                texprop_bitspercomp 8
+                samplermode_clamp 0
+                samplermode_filter 1
+            }
+        }
+        {
+            ident "gtp_shader.cubetexfilter"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank -8000
+                iter_start 0
+                iter_end 0
+                iter_step 0
+                width_scale 1.0
+                height_scale 1.0
+                destprop_antialias 0
+                passinfo_var ""
+                src_array "envmap0"
+                update_interval 1
+                dest_array
+                {
+                    from_var "filteredenvmap"
+                    to_var "filteredenvmap"
+                    texprop_restrusage 0
+                    texprop_depth 0
+                    texprop_float 0
+                    texprop_comp 4
+                    texprop_bitspercomp 0
+                    samplermode_filter 1
+                    samplermode_clamp 1
+                }
+                shaderprog_ident
+                    "levelutil/shader/prog/gtp_reduce_cubemap.s3d_shaderprog_r"
+                    & "un"
+                shaderprog_param_array
+                {
+                }
+            }
+        }
+        {
+            ident "gtp_shader.worldmat"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                worldmat_var "worldMat"
+            }
+        }
+        {
+            ident "gtp_shader.worldmat"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                worldmat_var "worldMatIT"
+                inverse 1
+                transpose 1
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 12000
+                insp_ident "insp_shader_mesh"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 0
+                mesh_var "mesh"
+                texchan_var_array "filteredenvmap" "dist"
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+                use_vertex_coloralpha 0
+                blend_col_src_fac "one"
+                blend_col_dest_fac "zero"
+                shaderprog_ident
+                    "levelutil/shader/prog/gtp_diffuse.s3d_shaderprog_run"
+                shaderprog_param_array
+                {
+                    src_var "lastCenter"
+                    dest_progvar "lastCenter"
+                }
+                {
+                    src_var "worldMat"
+                    dest_progvar "worldMat"
+                }
+                {
+                    src_var "worldMatIT"
+                    dest_progvar "worldMatIT"
+                }
+            }
+        }
+    }
+}
+{
+    name "ordinary_caustic_receiver"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                mesh_var "mesh"
+                texchan_var_array "tex0" "normalmap"
+                tex_attr_var_array "attr0"
+                usage "render"
+                tangentu_attr_var "tangentu"
+                tangentv_attr_var "tangentv"
+                insp_ident "showmesh"
+                insp_rank 80000
+                insp_color 1.0 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                usage "shvol_occl"
+                mesh_var "mesh_shvol_occl"
+                texchan_var_array
+                tex_attr_var_array
+                insp_ident "showocclmesh"
+                insp_rank 80000
+                insp_color 0.5 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+                {
+                    triggers "gtp_distance_impostor_trigger"
+                    method "gtp_distance_impostor_method"
+                }
+                {
+                    triggers "caustic_recieve_trigger"
+                    method "caustic_recieve_method"
+                    param_array
+                    {
+                        src_extvar "lastCenter"
+                        dest_var "cauCubeLastCenter"
+                    }
+                    {
+                        src_extvar "cauCubeMap"
+                        dest_var "cauCubeMap"
+                    }
+                }
+                {
+                    triggers "gen_shmap_trigger"
+                    method "gen_shmap_method"
+                }
+                {
+                    triggers "light_trigger"
+                    method "light_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                }
+                {
+                    triggers "lightmild_trigger"
+                    method "lightmild_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                }
+                {
+                    triggers "lightbright_trigger"
+                    method "lightbright_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                    {
+                        src_extvar "ext_light_brighttex"
+                        dest_var "light_brighttex"
+                    }
+                    {
+                        src_extvar "ext_light_brightmat"
+                        dest_var "light_brightmat"
+                    }
+                }
+                {
+                    triggers "lightshmap_trigger"
+                    method "lightshmap_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                    {
+                        src_extvar "ext_light_projmat"
+                        dest_var "light_projmat"
+                    }
+                    {
+                        src_extvar "ext_light_shmapmat"
+                        dest_var "light_shmapmat"
+                    }
+                    {
+                        src_extvar "ext_light_projtex"
+                        dest_var "light_projtex"
+                    }
+                    {
+                        src_extvar "ext_light_shmap"
+                        dest_var "light_shmap"
+                    }
+                }
+                {
+                    triggers "gen_brightmap_for_softshmap_trigger"
+                    method "gen_brightmap_for_softshmap_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_intens"
+                        dest_var "light_intens"
+                    }
+                    {
+                        src_extvar "ext_light_projmat"
+                        dest_var "light_projmat"
+                    }
+                    {
+                        src_extvar "ext_light_shmapmat"
+                        dest_var "light_shmapmat"
+                    }
+                    {
+                        src_extvar "ext_light_projtex"
+                        dest_var "light_projtex"
+                    }
+                    {
+                        src_extvar "ext_light_shmap"
+                        dest_var "light_shmap"
+                    }
+                }
+                {
+                    triggers "gen_brightclear_trigger"
+                    method "gen_brightclear_method"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh_shvol_occl"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "shvol_mark_trigger"
+                    method "shvol_mark_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_shvolparam"
+                        dest_var "light_shvolparam"
+                    }
+                }
+            }
+        }
+        {
+            ident "eng_shader_shvol.occluder"
+            param
+            {
+                env "shaderenv"
+                methods "shvol_mark_method"
+                reverse_rank 90010
+                nonreverse_rank 90000
+                insp_ident "showocclwire"
+                rel_gap 0.01
+                backface 0
+                mesh_var "mesh_shvol_occl"
+                cenrange_var "light_cenrange"
+                shvolparam_var "light_shvolparam"
+                extrude_var "light_extrude"
+                strict_shaderprog_ident
+                    "levelutil/shader/prog/gen_shvol_strict.s3d_shaderprog_run"
+                strict_shaderprog_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_progvar "prog_light_cenrange"
+                }
+                {
+                    src_var "light_extrude"
+                    dest_progvar "prog_light_extrude"
+                }
+                quick_shaderprog_ident
+                    "levelutil/shader/prog/gen_shvol_quick.s3d_shaderprog_run"
+                quick_shaderprog_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_progvar "prog_light_cenrange"
+                }
+                {
+                    src_var "light_extrude"
+                    dest_progvar "prog_light_extrude"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                rank 99999
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                methods "gen_shmap_method"
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                shaderprog_ident
+                    "levelutil/shader/prog/gen_shmap.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 12000
+                insp_ident "showwire"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 0
+                color 0.0 0.0 0.0
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array
+                attrmat_var_array
+                lightarray_var ""
+                shaderprog_ident
+                    "levelutil/shader/prog/plain_point.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "light_method"
+                rank 99999
+                insp_ident "showwire"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+                mesh_var "mesh"
+                texchan_var_array "tex0" "normalmap"
+                tex_attr_var_array "attr0" "tangentu" "tangentv"
+                attrmat_var_array ""
+                blend_col_src_fac "one"
+                blend_col_dest_fac "inv_src_col"
+                lightarray_var ""
+                shaderprog_ident
+                    "levelutil/shader/prog/bump.s3d_shaderprog_run"
+                shaderprog_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_progvar "prog_light_cenrange"
+                }
+                {
+                    src_var "light_ambient"
+                    dest_progvar "prog_light_ambient"
+                }
+                {
+                    src_var "light_diffuse"
+                    dest_progvar "prog_light_diffuse"
+                }
+                {
+                    src_var "light_specular"
+                    dest_progvar "prog_light_specular"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "lightmild_method"
+                rank 99999
+                insp_ident "showwire"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+                mesh_var "mesh"
+                texchan_var_array "tex0" "normalmap"
+                tex_attr_var_array "attr0" "tangentu" "tangentv"
+                attrmat_var_array ""
+                blend_col_src_fac "one"
+                blend_col_dest_fac "inv_src_col"
+                lightarray_var ""
+                shaderprog_ident
+                    "levelutil/shader/prog/bump_mild.s3d_shaderprog_run"
+                shaderprog_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_progvar "prog_light_cenrange"
+                }
+                {
+                    src_var "light_ambient"
+                    dest_progvar "prog_light_ambient"
+                }
+                {
+                    src_var "light_diffuse"
+                    dest_progvar "prog_light_diffuse"
+                }
+                {
+                    src_var "light_specular"
+                    dest_progvar "prog_light_specular"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "lightbright_method"
+                rank 12000
+                insp_ident "showwire"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 0
+                mesh_var "mesh"
+                texchan_var_array "tex0" "normalmap" "light_brighttex"
+                tex_attr_var_array "attr0" "tangentu" "tangentv"
+                attrmat_var_array "" "" ""
+                blend_col_src_fac "one"
+                blend_col_dest_fac "inv_src_col"
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+                shaderprog_ident
+                    "levelutil/shader/prog/bump_bright.s3d_shaderprog_run"
+                shaderprog_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_progvar "prog_light_cenrange"
+                }
+                {
+                    src_var "light_ambient"
+                    dest_progvar "prog_light_ambient"
+                }
+                {
+                    src_var "light_diffuse"
+                    dest_progvar "prog_light_diffuse"
+                }
+                {
+                    src_var "light_specular"
+                    dest_progvar "prog_light_specular"
+                }
+                {
+                    src_var "light_brightmat"
+                    dest_progvar "prog_light_brightmat"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "lightshmap_method"
+                rank 99999
+                insp_ident "showwire"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 0
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+                mesh_var "mesh"
+                texchan_var_array "tex0" "normalmap" "light_projtex"
+                    "light_shmap"
+                tex_attr_var_array "attr0" "tangentu" "tangentv"
+                attrmat_var_array ""
+                blend_col_src_fac "one"
+                blend_col_dest_fac "inv_src_col"
+                lightarray_var ""
+                shaderprog_ident
+                    "levelutil/shader/prog/bump_shmap.s3d_shaderprog_run"
+                shaderprog_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_progvar "prog_light_cenrange"
+                }
+                {
+                    src_var "light_ambient"
+                    dest_progvar "prog_light_ambient"
+                }
+                {
+                    src_var "light_diffuse"
+                    dest_progvar "prog_light_diffuse"
+                }
+                {
+                    src_var "light_specular"
+                    dest_progvar "prog_light_specular"
+                }
+                {
+                    src_var "light_projmat"
+                    dest_progvar "prog_light_projmat"
+                }
+                {
+                    src_var "light_shmapmat"
+                    dest_progvar "prog_light_shmapmat"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "gen_brightmap_for_softshmap_method"
+                rank 99999
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 0
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+                mesh_var "mesh"
+                texchan_var_array "light_projtex" "light_shmap"
+                tex_attr_var_array ""
+                attrmat_var_array ""
+                blend_col_src_fac "one"
+                blend_col_dest_fac "inv_src_col"
+                lightarray_var ""
+                shaderprog_ident
+                    "levelutil/shader/prog/gen_brightmap_for_softshmap.s3d_sha"
+                    & "derprog_run"
+                shaderprog_param_array
+                {
+                    src_var "light_intens"
+                    dest_progvar "prog_light_intens"
+                }
+                {
+                    src_var "light_projmat"
+                    dest_progvar "prog_light_projmat"
+                }
+                {
+                    src_var "light_shmapmat"
+                    dest_progvar "prog_light_shmapmat"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "gen_brightclear_method"
+                rank 12000
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array
+                attrmat_var_array
+                fog_enabled 0
+                blend_col_src_fac "one"
+                blend_col_dest_fac "zero"
+                color 0.0 0.0 0.0
+                alpha 0.0
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                shaderprog_ident
+                    "levelutil/shader/prog/gen_brightclear.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "gtp_distance_impostor_method"
+                rank 12000
+                insp_ident "insp_shader_mesh"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                color 1.0 1.0 1.0
+                shaderprog_ident
+                    "levelutil/shader/prog/gtp_distance_impostor.s3d_shaderpro"
+                    & "g_run"
+                shaderprog_param_array
+            }
+        }
+        {
+            ident "gtp_shader.worldmat"
+            param
+            {
+                env "shaderenv"
+                methods "caustic_recieve_method"
+                worldmat_var "worldMat"
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "caustic_recieve_method"
+                rank 14000
+                insp_ident "insp_shader_mesh"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                depth_bias_overlay 1
+                depth_bias_offs 1
+                mesh_var "mesh"
+                texchan_var_array "cauCubeMap"
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                blend_col_dest_fac "one"
+                blend_col_src_fac "one"
+                blend_col_op "src_plus_dest"
+                color 1.0 1.0 1.0
+                shaderprog_ident
+                    "levelutil/shader/prog/gtp_caustic_recieve.s3d_shaderprog_"
+                    & "run"
+                shaderprog_param_array
+                {
+                    src_var "cauCubeLastCenter"
+                    dest_progvar "lastCenter"
+                }
+                {
+                    src_var "worldMat"
+                    dest_progvar "worldMat"
+                }
+            }
+        }
+    }
+}
+{
+    name "ordinary_copper"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                mesh_var "mesh"
+                texchan_var_array "tex0" "normalmap"
+                tex_attr_var_array "attr0"
+                usage "render"
+                tangentu_attr_var "tangentu"
+                tangentv_attr_var "tangentv"
+                insp_ident "showmesh"
+                insp_rank 80000
+                insp_color 1.0 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                usage "shvol_occl"
+                mesh_var "mesh_shvol_occl"
+                texchan_var_array
+                tex_attr_var_array
+                insp_ident "showocclmesh"
+                insp_rank 80000
+                insp_color 0.5 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+                {
+                    triggers "gtp_distance_impostor_trigger"
+                    method "gtp_distance_impostor_method"
+                }
+                {
+                    triggers "gen_shmap_trigger"
+                    method "gen_shmap_method"
+                }
+                {
+                    triggers "light_trigger"
+                    method "light_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                }
+                {
+                    triggers "lightmild_trigger"
+                    method "lightmild_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                }
+                {
+                    triggers "lightbright_trigger"
+                    method "lightbright_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                    {
+                        src_extvar "ext_light_brighttex"
+                        dest_var "light_brighttex"
+                    }
+                    {
+                        src_extvar "ext_light_brightmat"
+                        dest_var "light_brightmat"
+                    }
+                }
+                {
+                    triggers "lightshmap_trigger"
+                    method "lightshmap_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                    {
+                        src_extvar "ext_light_projmat"
+                        dest_var "light_projmat"
+                    }
+                    {
+                        src_extvar "ext_light_shmapmat"
+                        dest_var "light_shmapmat"
+                    }
+                    {
+                        src_extvar "ext_light_projtex"
+                        dest_var "light_projtex"
+                    }
+                    {
+                        src_extvar "ext_light_shmap"
+                        dest_var "light_shmap"
+                    }
+                }
+                {
+                    triggers "gen_brightmap_for_softshmap_trigger"
+                    method "gen_brightmap_for_softshmap_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_intens"
+                        dest_var "light_intens"
+                    }
+                    {
+                        src_extvar "ext_light_projmat"
+                        dest_var "light_projmat"
+                    }
+                    {
+                        src_extvar "ext_light_shmapmat"
+                        dest_var "light_shmapmat"
+                    }
+                    {
+                        src_extvar "ext_light_projtex"
+                        dest_var "light_projtex"
+                    }
+                    {
+                        src_extvar "ext_light_shmap"
+                        dest_var "light_shmap"
+                    }
+                }
+                {
+                    triggers "gen_brightclear_trigger"
+                    method "gen_brightclear_method"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh_shvol_occl"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "shvol_mark_trigger"
+                    method "shvol_mark_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_shvolparam"
+                        dest_var "light_shvolparam"
+                    }
+                }
+            }
+        }
+        {
+            ident "eng_shader_shvol.occluder"
+            param
+            {
+                env "shaderenv"
+                methods "shvol_mark_method"
+                reverse_rank 90010
+                nonreverse_rank 90000
+                insp_ident "showocclwire"
+                rel_gap 0.01
+                backface 0
+                mesh_var "mesh_shvol_occl"
+                cenrange_var "light_cenrange"
+                shvolparam_var "light_shvolparam"
+                extrude_var "light_extrude"
+                strict_shaderprog_ident
+                    "levelutil/shader/prog/gen_shvol_strict.s3d_shaderprog_run"
+                strict_shaderprog_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_progvar "prog_light_cenrange"
+                }
+                {
+                    src_var "light_extrude"
+                    dest_progvar "prog_light_extrude"
+                }
+                quick_shaderprog_ident
+                    "levelutil/shader/prog/gen_shvol_quick.s3d_shaderprog_run"
+                quick_shaderprog_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_progvar "prog_light_cenrange"
+                }
+                {
+                    src_var "light_extrude"
+                    dest_progvar "prog_light_extrude"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                rank 99999
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                methods "gen_shmap_method"
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                shaderprog_ident
+                    "levelutil/shader/prog/gen_shmap.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 12000
+                insp_ident "showwire"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 0
+                color 0.0 0.0 0.0
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array
+                attrmat_var_array
+                lightarray_var ""
+                shaderprog_ident
+                    "levelutil/shader/prog/plain_point.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "lightshmap_method"
+                rank 99999
+                insp_ident "showwire"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 0
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+                mesh_var "mesh"
+                texchan_var_array "tex0" "normalmap" "light_projtex"
+                    "light_shmap"
+                tex_attr_var_array "attr0" "tangentu" "tangentv"
+                attrmat_var_array ""
+                blend_col_src_fac "one"
+                blend_col_dest_fac "inv_src_col"
+                lightarray_var ""
+                shaderprog_ident
+                    "levelutil/shader/prog/bump_shmap.s3d_shaderprog_run"
+                shaderprog_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_progvar "prog_light_cenrange"
+                }
+                {
+                    src_var "light_ambient"
+                    dest_progvar "prog_light_ambient"
+                }
+                {
+                    src_var "light_diffuse"
+                    dest_progvar "prog_light_diffuse"
+                }
+                {
+                    src_var "light_specular"
+                    dest_progvar "prog_light_specular"
+                }
+                {
+                    src_var "light_projmat"
+                    dest_progvar "prog_light_projmat"
+                }
+                {
+                    src_var "light_shmapmat"
+                    dest_progvar "prog_light_shmapmat"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "gen_brightmap_for_softshmap_method"
+                rank 99999
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 0
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+                mesh_var "mesh"
+                texchan_var_array "light_projtex" "light_shmap"
+                tex_attr_var_array ""
+                attrmat_var_array ""
+                blend_col_src_fac "one"
+                blend_col_dest_fac "inv_src_col"
+                lightarray_var ""
+                shaderprog_ident
+                    "levelutil/shader/prog/gen_brightmap_for_softshmap.s3d_sha"
+                    & "derprog_run"
+                shaderprog_param_array
+                {
+                    src_var "light_intens"
+                    dest_progvar "prog_light_intens"
+                }
+                {
+                    src_var "light_projmat"
+                    dest_progvar "prog_light_projmat"
+                }
+                {
+                    src_var "light_shmapmat"
+                    dest_progvar "prog_light_shmapmat"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "gen_brightclear_method"
+                rank 12000
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array
+                attrmat_var_array
+                fog_enabled 0
+                blend_col_src_fac "one"
+                blend_col_dest_fac "zero"
+                color 0.0 0.0 0.0
+                alpha 0.0
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                shaderprog_ident
+                    "levelutil/shader/prog/gen_brightclear.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+        {
+            ident "gtp_shader.createtex"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                texchan_var "envmap0"
+                width 128
+                height 128
+                texprop_rendertarget 1
+                texprop_cube 1
+                texprop_float 0
+                texprop_comp 4
+                texprop_bitspercomp 8
+                samplermode_clamp 0
+                samplermode_filter 1
+            }
+        }
+        {
+            ident "gtp_shader.envmap"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank -90000
+                max_ext 256
+                max_recursion 2
+                ext_dist_scale 20.0
+                proj_neg_z 0.1
+                proj_pos_z 100.0
+                enum_trigger "mirror_trigger"
+                destprop_antialias 0
+                mesh_var "mesh"
+                update_interval 6
+                update_all_face 1
+                start_frame 1
+                last_center_var "lastCenter"
+                world_space 1
+                dest_array
+                {
+                    from_var "envmap0"
+                    to_var "envmap0"
+                    texprop_restrusage 0
+                    texprop_depth 0
+                    texprop_comp 3
+                    texprop_float 0
+                    samplermode_filter 0
+                    samplermode_clamp 1
+                }
+            }
+        }
+        {
+            ident "gtp_shader.createtex"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                texchan_var "dist"
+                width 128
+                height 128
+                texprop_rendertarget 1
+                texprop_cube 1
+                texprop_float 1
+                texprop_comp 2
+                texprop_bitspercomp 16
+                samplermode_clamp 0
+                samplermode_filter 1
+            }
+        }
+        {
+            ident "gtp_shader.envmap"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank -90000
+                max_ext 128
+                max_recursion 1
+                ext_dist_scale 20.0
+                proj_neg_z 0.1
+                proj_pos_z 100.0
+                enum_trigger "gtp_distance_impostor_trigger"
+                destprop_antialias 0
+                mesh_var "mesh"
+                update_interval 6
+                update_all_face 1
+                start_frame 1
+                last_center_var "lastCenter"
+                world_space 1
+                dest_array
+                {
+                    from_var "dist"
+                    to_var "dist"
+                    texprop_restrusage 0
+                    texprop_depth 0
+                    texprop_comp 1
+                    texprop_float 1
+                    samplermode_filter 0
+                    samplermode_clamp 1
+                }
+            }
+        }
+        {
+            ident "gtp_shader.worldmat"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                worldmat_var "worldMat"
+            }
+        }
+        {
+            ident "gtp_shader.worldmat"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                worldmat_var "worldMatIT"
+                inverse 1
+                transpose 1
+            }
+        }
+        {
+            ident "eng_shader_std.constvec"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                val_var "Fresnel"
+                val 0.95 0.63 0.54 1.0
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 12000
+                insp_ident "insp_shader_mesh"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 0
+                mesh_var "mesh"
+                texchan_var_array "envmap0" "dist"
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+                use_vertex_coloralpha 0
+                shaderprog_ident
+                    "levelutil/shader/prog/gtp_envmap_metal.s3d_shaderprog_run"
+                shaderprog_param_array
+                {
+                    src_var "lastCenter"
+                    dest_progvar "lastCenter"
+                }
+                {
+                    src_var "worldMat"
+                    dest_progvar "worldMat"
+                }
+                {
+                    src_var "worldMatIT"
+                    dest_progvar "worldMatIT"
+                }
+                {
+                    src_var "Fresnel"
+                    dest_progvar "Fresnel"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "gtp_distance_impostor_method"
+                rank 12000
+                insp_ident "insp_shader_mesh"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                color 1.0 1.0 1.0
+                shaderprog_ident
+                    "levelutil/shader/prog/gtp_distance_impostor.s3d_shaderpro"
+                    & "g_run"
+                shaderprog_param_array
+            }
+        }
+    }
+}
+{
+    name "ordinary_alu"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                mesh_var "mesh"
+                texchan_var_array "tex0" "normalmap"
+                tex_attr_var_array "attr0"
+                usage "render"
+                tangentu_attr_var "tangentu"
+                tangentv_attr_var "tangentv"
+                insp_ident "showmesh"
+                insp_rank 80000
+                insp_color 1.0 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                usage "shvol_occl"
+                mesh_var "mesh_shvol_occl"
+                texchan_var_array
+                tex_attr_var_array
+                insp_ident "showocclmesh"
+                insp_rank 80000
+                insp_color 0.5 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+                {
+                    triggers "gtp_distance_impostor_trigger"
+                    method "gtp_distance_impostor_method"
+                }
+                {
+                    triggers "gen_shmap_trigger"
+                    method "gen_shmap_method"
+                }
+                {
+                    triggers "light_trigger"
+                    method "light_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                }
+                {
+                    triggers "lightmild_trigger"
+                    method "lightmild_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                }
+                {
+                    triggers "lightbright_trigger"
+                    method "lightbright_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                    {
+                        src_extvar "ext_light_brighttex"
+                        dest_var "light_brighttex"
+                    }
+                    {
+                        src_extvar "ext_light_brightmat"
+                        dest_var "light_brightmat"
+                    }
+                }
+                {
+                    triggers "lightshmap_trigger"
+                    method "lightshmap_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                    {
+                        src_extvar "ext_light_projmat"
+                        dest_var "light_projmat"
+                    }
+                    {
+                        src_extvar "ext_light_shmapmat"
+                        dest_var "light_shmapmat"
+                    }
+                    {
+                        src_extvar "ext_light_projtex"
+                        dest_var "light_projtex"
+                    }
+                    {
+                        src_extvar "ext_light_shmap"
+                        dest_var "light_shmap"
+                    }
+                }
+                {
+                    triggers "gen_brightmap_for_softshmap_trigger"
+                    method "gen_brightmap_for_softshmap_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_intens"
+                        dest_var "light_intens"
+                    }
+                    {
+                        src_extvar "ext_light_projmat"
+                        dest_var "light_projmat"
+                    }
+                    {
+                        src_extvar "ext_light_shmapmat"
+                        dest_var "light_shmapmat"
+                    }
+                    {
+                        src_extvar "ext_light_projtex"
+                        dest_var "light_projtex"
+                    }
+                    {
+                        src_extvar "ext_light_shmap"
+                        dest_var "light_shmap"
+                    }
+                }
+                {
+                    triggers "gen_brightclear_trigger"
+                    method "gen_brightclear_method"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh_shvol_occl"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "shvol_mark_trigger"
+                    method "shvol_mark_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_shvolparam"
+                        dest_var "light_shvolparam"
+                    }
+                }
+            }
+        }
+        {
+            ident "eng_shader_shvol.occluder"
+            param
+            {
+                env "shaderenv"
+                methods "shvol_mark_method"
+                reverse_rank 90010
+                nonreverse_rank 90000
+                insp_ident "showocclwire"
+                rel_gap 0.01
+                backface 0
+                mesh_var "mesh_shvol_occl"
+                cenrange_var "light_cenrange"
+                shvolparam_var "light_shvolparam"
+                extrude_var "light_extrude"
+                strict_shaderprog_ident
+                    "levelutil/shader/prog/gen_shvol_strict.s3d_shaderprog_run"
+                strict_shaderprog_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_progvar "prog_light_cenrange"
+                }
+                {
+                    src_var "light_extrude"
+                    dest_progvar "prog_light_extrude"
+                }
+                quick_shaderprog_ident
+                    "levelutil/shader/prog/gen_shvol_quick.s3d_shaderprog_run"
+                quick_shaderprog_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_progvar "prog_light_cenrange"
+                }
+                {
+                    src_var "light_extrude"
+                    dest_progvar "prog_light_extrude"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                rank 99999
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                methods "gen_shmap_method"
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                shaderprog_ident
+                    "levelutil/shader/prog/gen_shmap.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 12000
+                insp_ident "showwire"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 0
+                color 0.0 0.0 0.0
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array
+                attrmat_var_array
+                lightarray_var ""
+                shaderprog_ident
+                    "levelutil/shader/prog/plain_point.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "lightshmap_method"
+                rank 99999
+                insp_ident "showwire"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 0
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+                mesh_var "mesh"
+                texchan_var_array "tex0" "normalmap" "light_projtex"
+                    "light_shmap"
+                tex_attr_var_array "attr0" "tangentu" "tangentv"
+                attrmat_var_array ""
+                blend_col_src_fac "one"
+                blend_col_dest_fac "inv_src_col"
+                lightarray_var ""
+                shaderprog_ident
+                    "levelutil/shader/prog/bump_shmap.s3d_shaderprog_run"
+                shaderprog_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_progvar "prog_light_cenrange"
+                }
+                {
+                    src_var "light_ambient"
+                    dest_progvar "prog_light_ambient"
+                }
+                {
+                    src_var "light_diffuse"
+                    dest_progvar "prog_light_diffuse"
+                }
+                {
+                    src_var "light_specular"
+                    dest_progvar "prog_light_specular"
+                }
+                {
+                    src_var "light_projmat"
+                    dest_progvar "prog_light_projmat"
+                }
+                {
+                    src_var "light_shmapmat"
+                    dest_progvar "prog_light_shmapmat"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "gen_brightmap_for_softshmap_method"
+                rank 99999
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 0
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+                mesh_var "mesh"
+                texchan_var_array "light_projtex" "light_shmap"
+                tex_attr_var_array ""
+                attrmat_var_array ""
+                blend_col_src_fac "one"
+                blend_col_dest_fac "inv_src_col"
+                lightarray_var ""
+                shaderprog_ident
+                    "levelutil/shader/prog/gen_brightmap_for_softshmap.s3d_sha"
+                    & "derprog_run"
+                shaderprog_param_array
+                {
+                    src_var "light_intens"
+                    dest_progvar "prog_light_intens"
+                }
+                {
+                    src_var "light_projmat"
+                    dest_progvar "prog_light_projmat"
+                }
+                {
+                    src_var "light_shmapmat"
+                    dest_progvar "prog_light_shmapmat"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "gen_brightclear_method"
+                rank 12000
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array
+                attrmat_var_array
+                fog_enabled 0
+                blend_col_src_fac "one"
+                blend_col_dest_fac "zero"
+                color 0.0 0.0 0.0
+                alpha 0.0
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                shaderprog_ident
+                    "levelutil/shader/prog/gen_brightclear.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+        {
+            ident "gtp_shader.createtex"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                texchan_var "envmap0"
+                width 128
+                height 128
+                texprop_rendertarget 1
+                texprop_cube 1
+                texprop_float 0
+                texprop_comp 4
+                texprop_bitspercomp 8
+                samplermode_clamp 0
+                samplermode_filter 1
+            }
+        }
+        {
+            ident "gtp_shader.envmap"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank -90000
+                max_ext 256
+                max_recursion 2
+                ext_dist_scale 20.0
+                proj_neg_z 0.1
+                proj_pos_z 100.0
+                enum_trigger "mirror_trigger"
+                destprop_antialias 0
+                mesh_var "mesh"
+                update_interval 1
+                update_all_face 1
+                start_frame 1
+                last_center_var "lastCenter"
+                world_space 1
+                dest_array
+                {
+                    from_var "envmap0"
+                    to_var "envmap0"
+                    texprop_restrusage 0
+                    texprop_depth 0
+                    texprop_comp 3
+                    texprop_float 0
+                    samplermode_filter 0
+                    samplermode_clamp 1
+                }
+            }
+        }
+        {
+            ident "gtp_shader.createtex"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                texchan_var "dist"
+                width 128
+                height 128
+                texprop_rendertarget 1
+                texprop_cube 1
+                texprop_float 1
+                texprop_comp 2
+                texprop_bitspercomp 16
+                samplermode_clamp 0
+                samplermode_filter 1
+            }
+        }
+        {
+            ident "gtp_shader.envmap"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank -90000
+                max_ext 128
+                max_recursion 1
+                ext_dist_scale 20.0
+                proj_neg_z 0.1
+                proj_pos_z 100.0
+                enum_trigger "gtp_distance_impostor_trigger"
+                destprop_antialias 0
+                mesh_var "mesh"
+                update_interval 1
+                update_all_face 1
+                start_frame 1
+                last_center_var "lastCenter"
+                world_space 1
+                dest_array
+                {
+                    from_var "dist"
+                    to_var "dist"
+                    texprop_restrusage 0
+                    texprop_depth 0
+                    texprop_comp 1
+                    texprop_float 1
+                    samplermode_filter 0
+                    samplermode_clamp 1
+                }
+            }
+        }
+        {
+            ident "gtp_shader.worldmat"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                worldmat_var "worldMat"
+            }
+        }
+        {
+            ident "gtp_shader.worldmat"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                worldmat_var "worldMatIT"
+                inverse 1
+                transpose 1
+            }
+        }
+        {
+            ident "eng_shader_std.constvec"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                val_var "Fresnel"
+                val 0.9 0.92 0.92 1.0
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 12000
+                insp_ident "insp_shader_mesh"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 0
+                mesh_var "mesh"
+                texchan_var_array "envmap0" "dist"
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+                use_vertex_coloralpha 0
+                shaderprog_ident
+                    "levelutil/shader/prog/gtp_envmap_metal.s3d_shaderprog_run"
+                shaderprog_param_array
+                {
+                    src_var "lastCenter"
+                    dest_progvar "lastCenter"
+                }
+                {
+                    src_var "worldMat"
+                    dest_progvar "worldMat"
+                }
+                {
+                    src_var "worldMatIT"
+                    dest_progvar "worldMatIT"
+                }
+                {
+                    src_var "Fresnel"
+                    dest_progvar "Fresnel"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "gtp_distance_impostor_method"
+                rank 12000
+                insp_ident "insp_shader_mesh"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                color 1.0 1.0 1.0
+                shaderprog_ident
+                    "levelutil/shader/prog/gtp_distance_impostor.s3d_shaderpro"
+                    & "g_run"
+                shaderprog_param_array
+            }
+        }
+    }
+}
+{
+    name "caustic_caster"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array
+                usage "render"
+                tangentu_attr_var
+                tangentv_attr_var
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh"
+                insp_ident "insp_shader_bound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+                {
+                    triggers "gtp_distance_impostor_trigger"
+                    method "gtp_distance_impostor_method"
+                }
+                {
+                    triggers "caustic_cast_trigger"
+                    method "caustic_cast_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "recievers"
+                        dest_var "recievers"
+                    }
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.constvec"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                val_var "lastCenter"
+                val 0.0 0.0 0.0 1.0
+            }
+        }
+        {
+            ident "gtp_shader.createtex"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                texchan_var "envmap0"
+                width 128
+                height 128
+                texprop_rendertarget 1
+                texprop_cube 1
+                texprop_float 0
+                texprop_comp 4
+                texprop_bitspercomp 8
+                samplermode_clamp 0
+                samplermode_filter 1
+            }
+        }
+        {
+            ident "gtp_shader.envmap"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank -89500
+                max_ext 256
+                max_recursion 2
+                ext_dist_scale 20.0
+                proj_neg_z 0.1
+                proj_pos_z 100.0
+                enum_trigger "mirror_trigger"
+                destprop_antialias 0
+                mesh_var "mesh"
+                update_interval 1
+                update_all_face 1
+                start_frame 0
+                last_center_var "lastCenter"
+                world_space 1
+                dest_array
+                {
+                    from_var "envmap0"
+                    to_var "envmap0"
+                    texprop_restrusage 0
+                    texprop_depth 0
+                    texprop_comp 3
+                    texprop_float 0
+                    samplermode_filter 0
+                    samplermode_clamp 1
+                }
+            }
+        }
+        {
+            ident "gtp_shader.createtex"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                texchan_var "dist"
+                width 128
+                height 128
+                texprop_rendertarget 1
+                texprop_cube 1
+                texprop_float 1
+                texprop_comp 2
+                texprop_bitspercomp 16
+                samplermode_clamp 0
+                samplermode_filter 1
+            }
+        }
+        {
+            ident "gtp_shader.envmap"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank -89600
+                max_ext 128
+                max_recursion 1
+                ext_dist_scale 20.0
+                proj_neg_z 0.1
+                proj_pos_z 100.0
+                enum_trigger "gtp_distance_impostor_trigger"
+                destprop_antialias 0
+                mesh_var "mesh"
+                update_interval 1
+                update_all_face 1
+                start_frame 0
+                last_center_var "lastCenter"
+                world_space 1
+                dest_array
+                {
+                    from_var "dist"
+                    to_var "dist"
+                    texprop_restrusage 0
+                    texprop_depth 0
+                    texprop_comp 1
+                    texprop_float 1
+                    samplermode_filter 0
+                    samplermode_clamp 1
+                }
+            }
+        }
+        {
+            ident "gtp_shader.worldmat"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                worldmat_var "worldMat"
+            }
+        }
+        {
+            ident "gtp_shader.worldmat"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                worldmat_var "worldMatIT"
+                inverse 1
+                transpose 1
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 12000
+                insp_ident "insp_shader_mesh"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                mesh_var "mesh"
+                texchan_var_array "envmap0" "dist"
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+                use_vertex_coloralpha 0
+                shaderprog_ident
+                    "levelutil/shader/prog/gtp_envmap_refract.s3d_shaderprog_r"
+                    & "un"
+                shaderprog_param_array
+                {
+                    src_var "lastCenter"
+                    dest_progvar "lastCenter"
+                }
+                {
+                    src_var "worldMat"
+                    dest_progvar "worldMat"
+                }
+                {
+                    src_var "worldMatIT"
+                    dest_progvar "worldMatIT"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "gtp_distance_impostor_method"
+                rank 13000
+                insp_ident "insp_shader_mesh"
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                color 1.0 1.0 1.0
+                shaderprog_ident
+                    "levelutil/shader/prog/gtp_distance_impostor.s3d_shaderpro"
+                    & "g_run"
+                shaderprog_param_array
+            }
+        }
+        {
+            ident "gtp_shader.createtex"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                texchan_var "cauCubeMap"
+                texprop_cube 1
+                width 128
+                height 128
+                texprop_rendertarget 1
+                texprop_float 1
+                texprop_comp 4
+                texprop_bitspercomp 16
+                samplermode_clamp 1
+                samplermode_filter 1
+            }
+        }
+        {
+            ident "gtp_shader.createtex"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                texchan_var "photonmap"
+                width 32
+                height 32
+                texprop_rendertarget 1
+                texprop_float 1
+                texprop_comp 4
+                texprop_bitspercomp 32
+                samplermode_clamp 1
+                samplermode_filter 0
+            }
+        }
+        {
+            ident "gtp_shader.focusedprojmat"
+            param
+            {
+                env "shaderenv"
+                methods "caustic_cast_method"
+                mesh_var "mesh"
+                destmat_var "lightViewProj"
+                centerpoint_var "light_cenrange"
+            }
+        }
+        {
+            ident "gtp_shader.worldmat"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                worldmat_var "viewToWorld"
+                inverse 0
+                transpose 0
+            }
+        }
+        {
+            ident "gtp_shader.worldmat"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                worldmat_var "viewToWorldInv"
+                inverse 1
+                transpose 0
+            }
+        }
+        {
+            ident "eng_shader_std.totex"
+            param
+            {
+                env "shaderenv"
+                methods "caustic_cast_method"
+                rank -7800
+                new_method "photonmap_method"
+                size_scale 1.0
+                dest_array
+                {
+                    from_var "photonmap"
+                    to_var "photonmap"
+                    texprop_restrusage 0
+                    texprop_depth 0
+                    texprop_comp 4
+                    texprop_float 1
+                    samplermode_filter 0
+                    samplermode_clamp 1
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "photonmap_method"
+                rank 1000
+                insp_ident "insp_shader_mesh"
+                cull_mode "front"
+                depth_test "less"
+                depth_write 1
+                mesh_var "mesh"
+                texchan_var_array "dist"
+                tex_attr_var_array "attr0"
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_normal 1
+                use_vertex_point 1
+                color 1.0 1.0 1.0
+                shaderprog_ident
+                    "levelutil/shader/prog/gtp_cau_photonmap.s3d_shaderprog_ru"
+                    & "n"
+                shaderprog_param_array
+                {
+                    src_var "lightViewProj"
+                    dest_progvar "lightViewProj"
+                }
+                {
+                    src_var "viewToWorld"
+                    dest_progvar "viewToWorld"
+                }
+                {
+                    src_var "viewToWorldInv"
+                    dest_progvar "viewToWorldInv"
+                }
+                {
+                    src_var "light_cenrange"
+                    dest_progvar "lightPosView"
+                }
+                {
+                    src_var "lastCenter"
+                    dest_progvar "lastCenter"
+                }
+            }
+        }
+        {
+            ident "gtp_shader.causticcube"
+            param
+            {
+                env "shaderenv"
+                methods "caustic_cast_method"
+                rank -7700
+                iter_start 0
+                iter_end 0
+                iter_step 0
+                width_scale 1.0
+                height_scale 1.0
+                destprop_antialias 1
+                passinfo_var ""
+                src_array "photonmap"
+                update_interval 1
+                update_all_face 1
+                start_frame 0
+                photon_count 128
+                use_points 1
+                dest_array
+                {
+                    from_var "cauCubeMap"
+                    to_var "cauCubeMap"
+                    texprop_restrusage 0
+                    texprop_depth 0
+                    texprop_float 0
+                    texprop_comp 4
+                    texprop_bitspercomp 8
+                    samplermode_filter 0
+                    samplermode_clamp 1
+                }
+                shaderprog_ident
+                    "levelutil/shader/prog/gtp_caustic_cubemap_point.s3d_shade"
+                    & "rprog_run"
+                shaderprog_param_array
+            }
+        }
+        {
+            ident "eng_shader_std.collexec"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                coll_var "recievers"
+                rank 13500
+                exec_trigger "caustic_recieve_trigger"
+                exec_param_array
+                {
+                    src_var "lastCenter"
+                    dest_extvar "lastCenter"
+                }
+                {
+                    src_var "cauCubeMap"
+                    dest_extvar "cauCubeMap"
+                }
+            }
+        }
+    }
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/comic.s3d_shader_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/comic.s3d_shader_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/levelutil/shader/comic.s3d_shader_run	(revision 2453)
@@ -0,0 +1,168 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Definition of the shaders.
+// A shader is an object responsible for drawing objects.
+
+shader_array
+{
+    // Shader for a comic-like look
+    name "comic"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                usage "render"
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array "attr0"
+                insp_ident "showmesh"
+                insp_rank 80000
+                insp_color 1.0 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.meshenter"
+            param
+            {
+                env "shaderenv"
+                mesh_var_array "mesh"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+                {
+                    triggers "drvlight_trigger"
+                    method "drvlight_method"
+                    param_array
+                    {
+                        src_extvar "ext_light_cenrange"
+                        dest_var "light_cenrange"
+                    }
+                    {
+                        src_extvar "ext_light_diffuse"
+                        dest_var "light_diffuse"
+                    }
+                    {
+                        src_extvar "ext_light_ambient"
+                        dest_var "light_ambient"
+                    }
+                    {
+                        src_extvar "ext_light_specular"
+                        dest_var "light_specular"
+                    }
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.drvlightcoll"
+            param
+            {
+                env "shaderenv"
+                reset_methods "main_method"
+                append_methods "drvlight_method"
+                
+                lightarray_var "lightarray"
+                diffuse_var "light_diffuse"
+                ambient_var "light_ambient"
+                specular_var "light_specular"
+                cenrange_var "light_cenrange"
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                // outline
+                methods "main_method"
+                rank 12000
+                insp_ident "showwire"
+
+                cull_mode "front"
+                depth_test "less_equal"
+                depth_write 1
+
+                fog_enabled 1
+                paint_mode "line"
+                paint_ext  3.0
+
+                shaderprog_ident "levelutil/shader/prog/"
+                        & "black.s3d_shaderprog_run"
+                shaderprog_param_array
+
+                mesh_var "mesh"
+                texchan_var_array
+                tex_attr_var_array
+                attrmat_var_array
+                
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+            }
+         }
+         {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                // fill interiour
+                methods "main_method"
+                rank 12000
+                insp_ident "showwire"
+
+                cull_mode "back"
+                depth_test "less_equal"
+                depth_write 1
+
+                mesh_var "mesh"
+                texchan_var_array "tex0"
+                tex_attr_var_array
+                attrmat_var_array ""
+                use_vertex_bone_wgh 1
+                use_vertex_bone_subscr 1
+                use_vertex_point 1
+                use_vertex_normal 1
+                use_vertex_coloralpha 1
+                fog_enabled 1
+                paint_mode "fill"
+                depth_bias_overlay 1.0
+                depth_bias_offs 1.0
+
+                mtl
+                {
+                    enabled 1
+                    diffuse 1. 1. 1.
+                }
+
+                lightarray_var "lightarray"
+
+                shaderprog_ident "levelutil/shader/prog/"
+                        & "comic.s3d_shaderprog_run"
+                shaderprog_param_array
+            }
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/server/actor/serverlink.s3d_actor_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/server/actor/serverlink.s3d_actor_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/server/actor/serverlink.s3d_actor_run	(revision 2453)
@@ -0,0 +1,69 @@
+// Automatically generated Shark 3D Snake 1x0 Text Stream. Format: ascii.
+actor_ident "kit_base.group"
+actor_param
+{
+    // Delegate action calls to the children.
+    active 1
+    child_array
+    {
+        ident "kit_base.producer"
+        param
+        {
+            active 1
+            name "link_producer"
+            deleg_name "link_set"
+            ident "kit_base.capsule"
+            param
+            {
+                active 1
+                scope "serverlink"
+                local_name "capsule"
+                local_deleg_name "capsule_deleg"
+                deleg_target "dispatch_export"
+                child_ident "kit_base.group"
+                child_param
+                {
+                    active 1
+                    child_array
+                    {
+                        ident "kit_base.dispatch"
+                        param
+                        {
+                            name "dispatch_export"
+                            entry_array
+                            {
+                                cmds "destroy"
+                                targets "capsule"
+                            }
+                            {
+                                cmds "connect_net"
+                                    "poll_recv" "poll_send"
+                                targets "plug"
+                            }
+                        }
+                    }
+                    {
+                        ident "kit_engbase.plug"
+                        param
+                        {
+                            name "plug"
+                            deleg_name "plug_root"
+                            netlink_suppl "^^envcompsuppl"
+                            netlink_ident "eng_base.netlink"
+                            netlink_param
+                            {
+                                env "^^env"
+                            }
+                            netroot_target "^universe"
+                            lost_target "dispatch_export"
+                            lost_cmd "destroy"
+                            nettraverse_target "^universe_extern"
+                            nettraverse_cmd "traverse"
+                        }
+                    }
+                }
+            }
+        }
+    }
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/server/actor/server.s3d_actor_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/server/actor/server.s3d_actor_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/server/actor/server.s3d_actor_run	(revision 2453)
@@ -0,0 +1,231 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// This file describes the server.
+
+// The server has an own namespace:
+actor_ident "kit_base.capsule"
+actor_param
+{
+    active 1
+    scope "server"
+    local_name "capsule"
+    deleg_target "dispatch_export"
+    child_ident "kit_base.group"
+    child_param
+    {
+        active 1
+        child_array
+        {
+            // Dispatcher handling messages from outside the server.
+            ident "kit_base.dispatch"
+            param
+            {
+                name "dispatch_export"
+                entry_array
+                {
+                    // Create local player (not via networking):
+                    cmds "produce_player"
+                    targets "universe"
+                }
+            }
+        }
+        {
+            ident "kit_base.dispatch"
+            param
+            {
+                name "dispatch"
+                entry_array
+            }
+        }
+        {
+            // Dispatcher handling messages from the universe.
+            ident "kit_base.dispatch"
+            param
+            {
+                name "dispatch_universe"
+                entry_array
+                {
+                    cmds "get_basesuppl"
+                    targets "sersuppl"
+                    newcmd "get_obj"
+                }
+                {
+                    cmds "ignore_frmtime"
+                    targets "^root"
+                }
+                {
+                    cmds "cfg_access_int_info"
+                    targets "^cfg"
+                    newcmd "access_int_info"
+                }
+                {
+                    cmds "cfg_access_float_info"
+                    targets "^cfg"
+                    newcmd "access_float_info"
+                }
+                {
+                    cmds "cfg_access_str_info"
+                    targets "^cfg"
+                    newcmd "access_str_info"
+                }
+                {
+                    cmds "cfg_access_chunk_info"
+                    targets "^cfg"
+                    newcmd "access_chunk_info"
+                }
+                {
+                    cmds "universe_cfg_access_int_info"
+                    targets "universe_cfg"
+                    newcmd "access_int_info"
+                }
+                {
+                    cmds "universe_cfg_access_float_info"
+                    targets "universe_cfg"
+                    newcmd "access_float_info"
+                }
+                {
+                    cmds "universe_cfg_access_str_info"
+                    targets "universe_cfg"
+                    newcmd "access_str_info"
+                }
+                {
+                    cmds "universe_cfg_access_chunk_info"
+                    targets "universe_cfg"
+                    newcmd "access_chunk_info"
+                }
+            }
+        }
+        {
+            ident "kit_perch.mgr"
+            param
+            {
+                name "perchmgr"
+            }
+        }
+        {
+            ident "kit_snk.data"
+            param
+            {
+                name "universe_cfg"
+                val
+                {
+                    server 1
+                }
+            }
+        }
+        {
+            ident "kit_base.sersuppl"
+            param
+            {
+                name "sersuppl"
+                child "^basesuppl"
+            }
+        }
+        {
+            ident "kit_base.onaction"
+            param
+            {
+                active 1
+                name "poll_recv_onaction"
+                target "link_set"
+                cmd "poll_recv"
+            }
+        }
+        {
+            // Event queue
+            ident "kit_base.evtmgr"
+            param
+            {
+                active 1
+                name "evtmgr"
+                extcfg_actor "^cfg"
+                extcfg_entry_log "log.evtmgr"
+            }
+        }
+        {
+            // Include the universe definition:
+            ident "kit_engbase.extern"
+            param
+            {
+                active 1
+                name "universe_extern"
+                deleg_name "universe"
+                allow_no_target 1
+                res "universe/actor/universe.s3d_actor_run"
+                net_imprint 1
+            }
+        }
+        {
+            // External file describing the structure of each link:
+            ident "kit_base.extern"
+            param
+            {
+                // Delegate action calls to the child:
+                active 1
+                res "server/actor/serverlink.s3d_actor_run"
+            }
+        }
+        {
+            // Create a network engine.
+            ident "kit_io.neteng"
+            param
+            {
+                active 1
+                name "neteng"
+                // Get parameters from the actor "cfg", 
+                // which is defined above.
+                extcfg_actor "^cfg"
+                // Get the parameters from the "network" entry.
+                extcfg_entry_param "network"
+                given_array
+                {
+                    item "^env"
+                    given_ident "env"
+                }
+            }
+        }
+        {
+            // Actor waiting for connections from clients:
+            ident "kit_engbase.pluglisten"
+            param
+            {
+                name "pluglisten"
+                neteng "neteng"
+                link_producer "link_producer"
+                extcfg_actor "^cfg"
+                extcfg_entry_addr "server.addr"
+            }
+        }
+        {
+            ident "kit_base.onaction"
+            param
+            {
+                active 1
+                name "check_pluglisten_onaction"
+                target "pluglisten"
+                cmd "check"
+            }
+        }
+        {
+            ident "kit_base.onaction"
+            param
+            {
+                active 1
+                name "poll_send_onaction"
+                target "link_set"
+                cmd "poll_send"
+            }
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/level/shader/fire.s3d_shader_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/level/shader/fire.s3d_shader_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/level/shader/fire.s3d_shader_run	(revision 2453)
@@ -0,0 +1,180 @@
+// Machine-made Shark 3D Snake Text 2x0 Stream. Format: ascii.
+shader_array
+{
+    name "fire"
+    sort "partic"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.modelmesh"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                usage "render"
+                mesh_var "mesh"
+                texchan_var_array "texpartic"
+                tex_attr_var_array "attrpartic"
+                insp_ident "showmesh"
+                insp_rank 80000
+                insp_color 1.0 1.0 0.0
+            }
+        }
+        {
+            ident "eng_shader_special.particenter"
+            param
+            {
+                env "shaderenv"
+                insp_ident "showbound"
+                insp_rank 80000
+                insp_color 1.0 0.0 0.0
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+                mesh_var_array "mesh"
+                radius 0.12
+                move_lin 0.0 0.0 1.0
+                move_quadr 0.0 0.0 0.0
+                move_vari 0.0 0.0 0.0
+                move_jiggle 0.15 0.15 0.15
+                move_normal 0.0
+                param_var "param"
+                move_lin_var "move_lin"
+                move_quadr_var "move_quadr"
+                move_vari_var "move_vari"
+                move_jiggle_var "move_jiggle"
+            }
+        }
+        {
+            ident "eng_shader_std.animgen"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                anim_vel 0.01
+                anim_var "anim"
+            }
+        }
+        {
+            ident "eng_shader_std.directtexchan"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                tex "tex:level/texture/particle.tga"
+                texchan_var "firepartictex"
+                samplermode_clamp 1
+                samplermode_filter 1
+            }
+        }
+        {
+            ident "eng_shader_std.coloralpha"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                multiplier 0.75
+                color 1.0 1.0 1.0
+                alpha 0.08
+                coloralpha_var "color_alpha"
+            }
+        }
+        {
+            ident "eng_shader_std.constvec"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                val 10.0 10.0 0.5 5.0
+                val_var "shrink"
+            }
+        }
+        {
+            ident "eng_shader_std.constvec"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                val 1.0 10.0 2.0 0.0
+                val_var "other"
+            }
+        }
+        {
+            ident "eng_shader_std.paintmesh"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 34000
+                back_to_front 1
+                insp_ident "showwire"
+                cull_mode "none"
+                depth_test "less_equal"
+                depth_write 0
+                blend_col_src_fac "src_alpha"
+                blend_col_dest_fac "inv_src_alpha"
+                mesh_var "mesh"
+                texchan_var_array "firepartictex"
+                tex_attr_var_array "attrpartic"
+                attrmat_var_array ""
+                use_vertex_normal 1
+                use_vertex_coloralpha 1
+                use_vertex_bone_wgh 0
+                use_vertex_bone_subscr 0
+                use_vertex_point 1
+                mtl
+                {
+                    enabled 1
+                    emissive 1.0 1.0 1.0
+                }
+                shaderprog_ident
+                    "levelutil/shader/prog/partic.s3d_shaderprog_run"
+                shaderprog_param_array
+                {
+                    src_var "anim"
+                    dest_progvar "prog_anim"
+                }
+                {
+                    src_var "color_alpha"
+                    dest_progvar "prog_color_alpha"
+                }
+                {
+                    src_var "param"
+                    dest_progvar "prog_param"
+                }
+                {
+                    src_var "move_lin"
+                    dest_progvar "prog_move_lin"
+                }
+                {
+                    src_var "move_quadr"
+                    dest_progvar "prog_move_quadr"
+                }
+                {
+                    src_var "move_vari"
+                    dest_progvar "prog_move_vari"
+                }
+                {
+                    src_var "move_jiggle"
+                    dest_progvar "prog_move_jiggle"
+                }
+                {
+                    src_var "shrink"
+                    dest_progvar "prog_shrink"
+                }
+                {
+                    src_var "other"
+                    dest_progvar "prog_other"
+                }
+                fog_enabled 1
+            }
+        }
+    }
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/level/shader/world.s3d_shader_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/level/shader/world.s3d_shader_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/level/shader/world.s3d_shader_run	(revision 2453)
@@ -0,0 +1,801 @@
+// Machine-made Shark 3D Snake Text 2x0 Stream. Format: ascii.
+shader_array
+{
+    name "caustic_caster_light"
+    sort "light_shvol"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.lightparam"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                diffuse 1.0 1.0 1.0
+                specular 0.0 0.0 0.0
+                range 22.1
+                multiplier 1.0
+                diffuse_var "light_diffuse"
+                ambient_var "light_ambient"
+                specular_var "light_specular"
+                cenrange_var "light_cenrange"
+            }
+        }
+        {
+            ident "eng_shader_shvol.lenparam"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                max_abs_len 20.0
+                max_rel_len 20.0
+                shvolparam_var "light_shvolparam"
+            }
+        }
+        {
+            ident "eng_shader_std.lightenter"
+            param
+            {
+                env "shaderenv"
+                cenrange_var "light_cenrange"
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.lightenum"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank -8000
+                cenrange_var "light_cenrange"
+                coll_var "casters"
+            }
+        }
+        {
+            ident "gtp_shader.mainenum"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                coll_var "recievers"
+            }
+        }
+        {
+            ident "eng_shader_std.collexec"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                coll_var "casters"
+                rank -8000
+                exec_trigger "caustic_cast_trigger"
+                exec_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_extvar "ext_light_cenrange"
+                }
+                {
+                    src_var "recievers"
+                    dest_extvar "recievers"
+                }
+            }
+        }
+    }
+}
+{
+    name "shvol_light_soft_tetra"
+    sort "light_softshvol_tetra"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.lightparam"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                diffuse 0.788235 0.788235 0.788235
+                specular 0.160784 0.160784 0.160784
+                range 6.1
+                multiplier 0.21
+                diffuse_var "light_diffuse"
+                ambient_var "light_ambient"
+                specular_var "light_specular"
+                cenrange_var "light_cenrange"
+            }
+        }
+        {
+            ident "eng_shader_shvol.lenparam"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                max_abs_len 4.4
+                max_rel_len 6.6
+                shvolparam_var "light_shvolparam"
+            }
+        }
+        {
+            ident "eng_shader_std.constfloat"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                val 0.11
+                val_var "size"
+            }
+        }
+        {
+            ident "eng_shader_std.lightenter"
+            param
+            {
+                env "shaderenv"
+                cenrange_var "light_cenrange"
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.lightenum"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank -99999
+                cenrange_var "light_cenrange"
+                coll_var "receivers"
+            }
+        }
+        {
+            ident "eng_shader_shvol.combineparam"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                lenparam_var "light_shvolparam"
+                bloat_var "size"
+                bloat_scale 0.5
+                shvolparam_var "light_bloated_shvolparam"
+            }
+        }
+        {
+            ident "eng_shader_shvol.enum"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank -99999
+                cenrange_var "light_cenrange"
+                shvolparam_var "light_bloated_shvolparam"
+                coll_var "occluders"
+            }
+        }
+        {
+            ident "eng_shader_std.totex"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                new_method "totex_method"
+                rank -99999
+                size_scale 1.0
+                destprop_antialias 0
+                dest_array
+                {
+                    from_var ""
+                    to_var "light_brighttex"
+                    texprop_restrusage 0
+                    texprop_depth 0
+                    texprop_float 0
+                    texprop_comp 4
+                    texprop_bitspercomp 0
+                    samplermode_filter 0
+                    samplermode_clamp 1
+                }
+                attrmat_var "light_brightmat"
+            }
+        }
+        {
+            ident "eng_shader_std.collexec"
+            param
+            {
+                env "shaderenv"
+                methods "totex_method"
+                coll_var "receivers"
+                rank 99999
+                exec_trigger "gen_brightclear_trigger"
+                exec_param_array
+            }
+        }
+        {
+            ident "eng_shader_special.multilight"
+            param
+            {
+                env "shaderenv"
+                first_methods "totex_method"
+                cenrange_var "light_cenrange"
+                projmat_var ""
+                scale_var "size"
+                sub_rank 99999
+                sub_method "sub_method"
+                sub_cenrange_var "sub_light_cenrange"
+                sub_projmat_var ""
+                sub_bloat_var "sub_light_bloat"
+                sub_intens_var "sub_light_intens"
+                elem_array
+                {
+                    offs -0.5 -0.5 -0.5
+                    bloat 0.0
+                }
+                {
+                    offs 0.5 0.5 -0.5
+                    bloat 0.0
+                }
+                {
+                    offs 0.5 -0.5 0.5
+                    bloat 0.0
+                }
+                {
+                    offs -0.5 0.5 0.5
+                    bloat 0.0
+                }
+            }
+        }
+        {
+            ident "eng_shader_shvol.combineparam"
+            param
+            {
+                env "shaderenv"
+                methods "sub_method"
+                lenparam_var "light_shvolparam"
+                bloat_var "sub_light_bloat"
+                bloat_scale 1.0
+                shvolparam_var "sub_light_shvolparam"
+            }
+        }
+        {
+            ident "eng_shader_shvol.perform"
+            param
+            {
+                env "shaderenv"
+                methods "sub_method"
+                rank 99999
+                coll_var "occluders"
+                mark_trigger "shvol_mark_trigger"
+                mark_param_array
+                {
+                    src_var "sub_light_cenrange"
+                    dest_extvar "ext_light_cenrange"
+                }
+                {
+                    src_var "sub_light_shvolparam"
+                    dest_extvar "ext_light_shvolparam"
+                }
+                paint_method ""
+                unmark_shaderprog_ident
+                    "levelutil/shader/prog/plain_pointcol.s3d_shaderprog_run"
+                unmark_shaderprog_param_array
+                unmark_blend_col_src_fac "one"
+                unmark_blend_col_dest_fac "one"
+                unmark_neg 1
+                unmark_color_var "sub_light_intens"
+                unmark_alpha 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.constvec"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                val 0.5 0.0 0.0 0.0
+                val_var "filterinfo"
+            }
+        }
+        {
+            ident "eng_shader_special.filter"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank -99999
+                iter_start 5
+                iter_end 0
+                iter_step -1
+                width_scale 1.0
+                height_scale 1.0
+                destprop_antialias 0
+                passinfo_var "passinfo"
+                src_array "light_brighttex"
+                dest_array
+                {
+                    from_var ""
+                    to_var "light_brighttex"
+                    texprop_restrusage 0
+                    texprop_depth 0
+                    texprop_float 0
+                    texprop_comp 4
+                    texprop_bitspercomp 0
+                    samplermode_filter 0
+                    samplermode_clamp 1
+                }
+                shaderprog_ident
+                    "levelutil/shader/prog/lightfilter.s3d_shaderprog_run"
+                shaderprog_param_array
+                {
+                    src_var "passinfo"
+                    dest_progvar "prog_passinfo"
+                }
+                {
+                    src_var "filterinfo"
+                    dest_progvar "prog_filterinfo"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.collexec"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                coll_var "receivers"
+                rank 32000
+                exec_trigger "lightbright_trigger"
+                exec_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_extvar "ext_light_cenrange"
+                }
+                {
+                    src_var "light_ambient"
+                    dest_extvar "ext_light_ambient"
+                }
+                {
+                    src_var "light_diffuse"
+                    dest_extvar "ext_light_diffuse"
+                }
+                {
+                    src_var "light_specular"
+                    dest_extvar "ext_light_specular"
+                }
+                {
+                    src_var "light_brighttex"
+                    dest_extvar "ext_light_brighttex"
+                }
+                {
+                    src_var "light_brightmat"
+                    dest_extvar "ext_light_brightmat"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.lightenum"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank -8000
+                cenrange_var "light_cenrange"
+                coll_var "casters"
+            }
+        }
+        {
+            ident "gtp_shader.mainenum"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                coll_var "recievers"
+            }
+        }
+        {
+            ident "eng_shader_std.collexec"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                coll_var "casters"
+                rank -8000
+                exec_trigger "caustic_cast_trigger"
+                exec_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_extvar "ext_light_cenrange"
+                }
+                {
+                    src_var "recievers"
+                    dest_extvar "recievers"
+                }
+            }
+        }
+    }
+}
+{
+    name "new_mild_light"
+    sort "light_mild"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.lightparam"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                diffuse 1.0 1.0 1.0
+                specular 1.0 1.0 1.0
+                range 20.0
+                multiplier 0.25
+                diffuse_var "light_diffuse"
+                ambient_var "light_ambient"
+                specular_var "light_specular"
+                cenrange_var "light_cenrange"
+            }
+        }
+        {
+            ident "eng_shader_std.lightenter"
+            param
+            {
+                env "shaderenv"
+                cenrange_var "light_cenrange"
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.lightenum"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank 32000
+                cenrange_var "light_cenrange"
+                coll_var "receivers"
+            }
+        }
+        {
+            ident "eng_shader_std.collexec"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                coll_var "receivers"
+                rank 32000
+                exec_trigger "lightmild_trigger"
+                exec_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_extvar "ext_light_cenrange"
+                }
+                {
+                    src_var "light_diffuse"
+                    dest_extvar "ext_light_diffuse"
+                }
+                {
+                    src_var "light_ambient"
+                    dest_extvar "ext_light_ambient"
+                }
+                {
+                    src_var "light_specular"
+                    dest_extvar "ext_light_specular"
+                }
+            }
+        }
+    }
+}
+{
+    name "red_soft"
+    sort "light_softshvol_tetra"
+    ident "eng_shader_std.group"
+    param
+    {
+        env "shaderenv"
+        init_method "init_method"
+        child_array
+        {
+            ident "eng_shader_std.lightparam"
+            param
+            {
+                env "shaderenv"
+                methods "init_method"
+                diffuse 0.0901961 0.0 0.00392157
+                specular 0.215686 0.0 0.00392157
+                range 9.9
+                multiplier 0.11
+                diffuse_var "light_diffuse"
+                ambient_var "light_ambient"
+                specular_var "light_specular"
+                cenrange_var "light_cenrange"
+            }
+        }
+        {
+            ident "eng_shader_shvol.lenparam"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                max_abs_len 24.3
+                max_rel_len 16.6
+                shvolparam_var "light_shvolparam"
+            }
+        }
+        {
+            ident "eng_shader_std.constfloat"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                val 0.165
+                val_var "size"
+            }
+        }
+        {
+            ident "eng_shader_std.lightenter"
+            param
+            {
+                env "shaderenv"
+                cenrange_var "light_cenrange"
+                enter_array
+                {
+                    triggers "main_trigger" "mirror_trigger"
+                    method "main_method"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.lightenum"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank -99999
+                cenrange_var "light_cenrange"
+                coll_var "receivers"
+            }
+        }
+        {
+            ident "eng_shader_shvol.combineparam"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                lenparam_var "light_shvolparam"
+                bloat_var "size"
+                bloat_scale 0.5
+                shvolparam_var "light_bloated_shvolparam"
+            }
+        }
+        {
+            ident "eng_shader_shvol.enum"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank -99999
+                cenrange_var "light_cenrange"
+                shvolparam_var "light_bloated_shvolparam"
+                coll_var "occluders"
+            }
+        }
+        {
+            ident "eng_shader_std.totex"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                new_method "totex_method"
+                rank -99999
+                size_scale 1.0
+                destprop_antialias 0
+                dest_array
+                {
+                    from_var ""
+                    to_var "light_brighttex"
+                    texprop_restrusage 0
+                    texprop_depth 0
+                    texprop_float 0
+                    texprop_comp 4
+                    texprop_bitspercomp 0
+                    samplermode_filter 0
+                    samplermode_clamp 1
+                }
+                attrmat_var "light_brightmat"
+            }
+        }
+        {
+            ident "eng_shader_std.collexec"
+            param
+            {
+                env "shaderenv"
+                methods "totex_method"
+                coll_var "receivers"
+                rank 99999
+                exec_trigger "gen_brightclear_trigger"
+                exec_param_array
+            }
+        }
+        {
+            ident "eng_shader_special.multilight"
+            param
+            {
+                env "shaderenv"
+                first_methods "totex_method"
+                cenrange_var "light_cenrange"
+                projmat_var ""
+                scale_var "size"
+                sub_rank 99999
+                sub_method "sub_method"
+                sub_cenrange_var "sub_light_cenrange"
+                sub_projmat_var ""
+                sub_bloat_var "sub_light_bloat"
+                sub_intens_var "sub_light_intens"
+                elem_array
+                {
+                    offs -0.5 -0.5 -0.5
+                    bloat 0.0
+                }
+                {
+                    offs 0.5 0.5 -0.5
+                    bloat 0.0
+                }
+                {
+                    offs 0.5 -0.5 0.5
+                    bloat 0.0
+                }
+                {
+                    offs -0.5 0.5 0.5
+                    bloat 0.0
+                }
+            }
+        }
+        {
+            ident "eng_shader_shvol.combineparam"
+            param
+            {
+                env "shaderenv"
+                methods "sub_method"
+                lenparam_var "light_shvolparam"
+                bloat_var "sub_light_bloat"
+                bloat_scale 1.0
+                shvolparam_var "sub_light_shvolparam"
+            }
+        }
+        {
+            ident "eng_shader_shvol.perform"
+            param
+            {
+                env "shaderenv"
+                methods "sub_method"
+                rank 99999
+                coll_var "occluders"
+                mark_trigger "shvol_mark_trigger"
+                mark_param_array
+                {
+                    src_var "sub_light_cenrange"
+                    dest_extvar "ext_light_cenrange"
+                }
+                {
+                    src_var "sub_light_shvolparam"
+                    dest_extvar "ext_light_shvolparam"
+                }
+                paint_method ""
+                unmark_shaderprog_ident
+                    "levelutil/shader/prog/plain_pointcol.s3d_shaderprog_run"
+                unmark_shaderprog_param_array
+                unmark_blend_col_src_fac "one"
+                unmark_blend_col_dest_fac "one"
+                unmark_neg 1
+                unmark_color_var "sub_light_intens"
+                unmark_alpha 0.0
+            }
+        }
+        {
+            ident "eng_shader_std.constvec"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                val 0.5 0.0 0.0 0.0
+                val_var "filterinfo"
+            }
+        }
+        {
+            ident "eng_shader_special.filter"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                rank -99999
+                iter_start 5
+                iter_end 0
+                iter_step -1
+                width_scale 1.0
+                height_scale 1.0
+                destprop_antialias 0
+                passinfo_var "passinfo"
+                src_array "light_brighttex"
+                dest_array
+                {
+                    from_var ""
+                    to_var "light_brighttex"
+                    texprop_restrusage 0
+                    texprop_depth 0
+                    texprop_float 0
+                    texprop_comp 4
+                    texprop_bitspercomp 0
+                    samplermode_filter 0
+                    samplermode_clamp 1
+                }
+                shaderprog_ident
+                    "levelutil/shader/prog/lightfilter.s3d_shaderprog_run"
+                shaderprog_param_array
+                {
+                    src_var "passinfo"
+                    dest_progvar "prog_passinfo"
+                }
+                {
+                    src_var "filterinfo"
+                    dest_progvar "prog_filterinfo"
+                }
+            }
+        }
+        {
+            ident "eng_shader_std.collexec"
+            param
+            {
+                env "shaderenv"
+                methods "main_method"
+                coll_var "receivers"
+                rank 32000
+                exec_trigger "lightbright_trigger"
+                exec_param_array
+                {
+                    src_var "light_cenrange"
+                    dest_extvar "ext_light_cenrange"
+                }
+                {
+                    src_var "light_ambient"
+                    dest_extvar "ext_light_ambient"
+                }
+                {
+                    src_var "light_diffuse"
+                    dest_extvar "ext_light_diffuse"
+                }
+                {
+                    src_var "light_specular"
+                    dest_extvar "ext_light_specular"
+                }
+                {
+                    src_var "light_brighttex"
+                    dest_extvar "ext_light_brighttex"
+                }
+                {
+                    src_var "light_brightmat"
+                    dest_extvar "ext_light_brightmat"
+                }
+            }
+        }
+    }
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/level/actor/levelplayer.s3d_actor_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/level/actor/levelplayer.s3d_actor_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/level/actor/levelplayer.s3d_actor_run	(revision 2453)
@@ -0,0 +1,550 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Definition of the player.
+//
+// In this case, the player is a player having a walk collision detection
+// and can be controlled by the human player.
+//
+// The player is not defined directly, but only a suppl for the player.
+// The reason for this is that not only one player must be created,
+// but a new player for every player which logs into the server.
+// As long as no client logs into a server, no player is created.
+// Each time a player logs into the server, the player suppl
+// is used to create a player.
+
+
+// Since each dsc-file formally can only contain a single actor,
+// we use the group actor to define more than one actor.
+actor_ident "kit_base.group"
+actor_param
+{
+    // Delegate action calls to the children.
+    active 1
+    child_array
+    {
+        // This dispatcher dispatches commands coming 
+        // from outside the capsule. 
+        ident "kit_base.dispatch"
+        param
+        {
+            name "dispatch_export"
+            entry_array
+            // notice_destroy the player:
+            {
+                cmds "destroy"
+                targets "capsule"
+            }
+            {
+                cmds "created_local"
+                targets
+            }
+            {
+                cmds "created_net"
+                targets "reproduce"
+                newcmd "set_blocked"
+            }
+            {
+                cmds "net_traverse"
+                targets "group_player"
+                newcmd "traverse"
+            }
+            {
+                cmds "net_appear"
+                targets "reproduce"
+                newcmd "rework"
+            }
+            // Inform management:
+            {
+                // Store the inform-actor in "inform":
+                cmds "assign_inform" "set_inform"
+                targets "inform_deleg"
+                newcmd "set_deleg_target"
+            }
+            {
+                // Delegate the inform command:
+                cmds "assign_inform" "set_inform"
+                targets "informanswer"
+                    "oninform_gfxmgr" "oninform_sndmgr"
+                    "oninform_world" "oninform_sky" 
+                    "oninform_sim" 
+                    "oninform_noise"
+                    "oninform_sensorstate"
+                    "oninform_maincamera"
+                    "maininform_switch"
+                    "oninform_playerbody"
+            }
+            {
+                cmds "search_inform" "search_noinform"
+                targets "informanswer"
+            }
+            {
+                // Set the position of the player.
+                cmds "set_transf"
+                targets "scene_root"
+            }
+            {
+                cmds "add_motion"
+                targets "player_deleg" "godplayer_deleg"
+            }
+            {
+                cmds "add_motion_to_gear"
+                targets "gear"
+                newcmd "add_gear_motion"
+            }
+            {
+                cmds "god"
+                targets "god_switch"
+                newcmd "toggle_switch"
+            }
+        }
+    }
+    {
+        ident "kit_base.dispatch"
+        param
+        {
+            name "dispatch"
+            entry_array
+            {
+                // Disable god mode:
+                cmds "disable_god"
+                targets "maininform_switch"
+                newcmd "select_normalmode"
+            }
+            {
+                // Disable godmode.
+                cmds "disable_god"
+                targets "player_deleg_actor"
+                newcmd "enable"
+            }
+            {
+                // Disable godmode.
+                cmds "disable_god"
+                targets "godplayer_deleg_actor"
+                newcmd "disable"
+            }
+            {
+                // Disable godmode.
+                cmds "disable_god"
+                targets "godctrl"
+                newcmd "god_to_player"
+            }
+            {
+                // Disable godmode.
+                cmds "disable_god"
+                targets "scene_root"
+                newcmd "activate_body"
+            }
+            {
+                // Enable godmode.
+                cmds "enable_god"
+                targets "maininform_switch"
+                newcmd "select_godmode"
+            }
+            {
+                // Enable godmode.
+                cmds "enable_god"
+                targets "player_deleg_actor"
+                newcmd "disable"
+            }
+            {
+                // Enable godmode.
+                cmds "enable_god"
+                targets "godplayer_deleg_actor"
+                newcmd "enable"
+            }
+            {
+                // Enable godmode.
+                cmds "enable_god"
+                targets "godctrl"
+                newcmd "player_to_god"
+            }
+        }
+    }
+    {
+        ident "kit_base.deleg"
+        param
+        {
+            name "inform_deleg"
+            deleg_name "inform"
+            deleg_target ""
+            allow_no_target 1
+            enabled 1
+        }
+    }
+    {
+        ident "kit_engobj.informanswer"
+        param
+        {
+            name "informanswer"
+            answer_cmd "add_result"
+            answer_actor "capsule_deleg"
+        }
+    }
+    {
+        ident "kit_base.switch"
+        param
+        {
+            name "god_switch"
+            target "dispatch"
+            disable_switch_cmd "disable_god"
+            enable_switch_cmd "enable_god"
+        }
+    }
+    {
+        ident "kit_engobj.itemeye"
+        param
+        {
+            name "scene_root"
+            item_actor "group_player"
+            item_name "body:scene_root"
+        }
+    }
+    {
+        ident "kit_engobj.itemeye"
+        param
+        {
+            name "camera"
+            item_actor "group_player"
+            item_name "simplepos:camera"
+        }
+    }
+    {
+        ident "kit_engobj.itemeye"
+        param
+        {
+            name "playerbody"
+            item_actor "group_player"
+            item_name "body:scene_root"
+        }
+    }
+    {
+        ident "kit_engobj.itemeye"
+        param
+        {
+            name "gear"
+            item_actor "group_player"
+            item_name "gear:gear"
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {
+            // Create the position of the godplayer
+            // (spawn at (0,0,0) for now).
+            name "god_vehicleobj"
+            obj_suppl "^stdsuppl"
+            obj_ident "simplepos:"
+            obj_param
+            {
+                env "^^env"
+            }
+        }
+    }
+    {
+        // Select the position of the godmode-player
+        // (we want the position, not the wrapping actor,
+        // so "unwrap" it).
+        ident "kit_engobj.itemeye"
+        param
+        {
+            name "god_vehicle"
+            item_actor "god_vehicleobj"
+            item_name ""
+        }
+    }
+    {
+        // Create a camera-position for the godmode-player
+        // mounted on the godmode-player's position
+        // (i.e. camera moves relatively to player-position).
+        ident "kit_base.obj"
+        param
+        {
+            name "god_camobj"
+            obj_suppl "^stdsuppl"
+            obj_ident "simplepos:"
+            obj_param
+            {
+                env "^^env"
+                parent "god_vehicle"
+            }
+        }
+    }
+    {
+        // Select the position of the godmode-camera
+        // (we want the position, not the wrapping actor,
+        // so "unwrap" it).
+        ident "kit_engobj.itemeye"
+        param
+        {
+            name "god_cam"
+            //item_actor "^god_spawn"
+            item_actor "god_camobj"
+            item_name ""
+        }
+    }
+    {
+        // The godplayer moves different than the normal player
+        // so pass the movement to this godmode-control actor.
+        ident "kit_engobj.godctrl"
+        param
+        {
+            active 1
+            name "godctrl"
+            move_dir 0.0 1.0 0.0
+            move_also 1.0 0.0 0.0
+            cam_dir 0.0 0.0 1.0
+            cam_also 1.0 0.0 0.0
+            god_vehicle "god_vehicle"
+            god_cam "god_cam"
+            player_vehicle "playerbody"
+            player_cam "camera"
+        }
+    }
+    {
+        ident "kit_engobj.motionlook"
+        param
+        {
+            name "motionlook"
+            look_actor "camera"
+            look_target "camera"
+            look_get_cmd "get_transf"
+            look_set_cmd "set_transf"
+            other_target "dispatch_export"
+            other_cmd "add_motion_to_gear"
+            axis 1.0 0.0 0.0
+            min_angle -170.0
+            max_angle -10.0
+        }
+    }
+    {
+        ident "kit_engobj.motionlook"
+        param
+        {
+            name "godmotionlook"
+            look_actor "god_cam"
+            look_target "god_cam"
+            look_get_cmd "get_transf"
+            look_set_cmd "set_transf"
+            other_target "godctrl"
+            other_cmd "add_motion"
+            axis 1.0 0.0 0.0
+            min_angle -170.0
+            max_angle -10.0
+        }
+    }
+    {
+        ident "kit_base.deleg"
+        param
+        {
+            name "player_deleg_actor"
+            deleg_name "player_deleg"
+            deleg_target "motionlook"
+            enabled 1
+            allow_no_target 1
+        }
+    }
+    {
+        ident "kit_base.deleg"
+        param
+        {
+            name "godplayer_deleg_actor"
+            deleg_name "godplayer_deleg"
+            deleg_target "godmotionlook"
+            enabled 0
+            allow_no_target 1
+        }
+    }
+    {
+        ident "kit_engobj.oninform"
+        param
+        {
+            // Tell the client about performing 
+            // the level change.
+            name "oninform_changelevel"
+            cmd "changelevel_perform"
+        }
+    }
+    {
+        ident "kit_engobj.oninformobj"
+        param
+        {
+            name "oninform_gfxmgr"
+            cmd "set_gfxmgr_level"
+            param "^gfxmgr"
+        }
+    }
+    {
+        ident "kit_engobj.oninformobj"
+        param
+        {
+            name "oninform_sndmgr"
+            cmd "set_sndmgr_level"
+            param "^sndmgr"
+        }
+    }
+    {
+        ident "kit_engobj.oninformobj"
+        param
+        {
+            name "oninform_world"
+            cmd "set_state_world"
+            param "^state_world"
+        }
+    }
+    {
+        ident "kit_engobj.oninformobj"
+        param
+        {
+            name "oninform_sky"
+            cmd "set_state_sky"
+            param "^state_sky"
+        }
+    }
+    {
+        ident "kit_engobj.oninformobj"
+        param
+        {
+            name "oninform_sim"
+            cmd "set_sim_world"
+            param "^sim_world"
+        }
+    }
+    {
+        ident "kit_engobj.oninformobj"
+        param
+        {
+            name "oninform_noise"
+            cmd "set_noise_world"
+            param "^noise_world"
+        }
+    }
+    {
+        ident "kit_engobj.oninformobj"
+        param
+        {
+            name "oninform_sensorstate"
+            cmd "set_sensorstate_world"
+            param "^sensorstate_world"
+        }
+    }
+    {
+        ident "kit_engobj.oninformobj"
+        param
+        {
+            name "oninform_maincamera"
+            cmd "set_camera"
+            param "camera"
+        }
+    }
+    {
+        ident "kit_engobj.oninformobj"
+        param
+        {
+            name "oninform_godcamera"
+            cmd "set_camera"
+            param "god_cam"
+        }
+    }
+    {
+        // This actor is used to switch between the main
+        // camera and the test camera.
+        // This actor switches between different actors
+        // which get the "assign_inform" or "set_inform" 
+        // command with the current inform-actor, whereas
+        // all other disabled actors get a "assign_inform" or
+        // "set_inform" with 0 as argument.
+        ident "kit_engobj.oninformswitch"
+        param
+        {
+            name "maininform_switch"
+            deleg_name "maininform"
+            target "oninform_maincamera"
+            entry_array
+            {
+                cmd "select_godmode"
+                target "oninform_godcamera"
+            }
+            {
+                cmd "select_normalmode"
+                target "oninform_maincamera"
+            }
+        }
+    }
+    {
+        ident "kit_engobj.oninformobj"
+        param
+        {
+            name "oninform_playerbody"
+            cmd "set_playerbody"
+            param "playerbody"
+        }
+    }
+    {
+        ident "kit_engobj.itemeye"
+        param
+        {
+            name "sensortrig_pos"
+            item_actor "group_player"
+            item_name "simplepos:sensortrig"
+        }
+    }
+    {
+        ident "kit_base.obj"
+        param
+        {                            
+            name "sensortrig_elem"
+            obj_suppl "^^envcompsuppl"
+            obj_ident "eng_sensor_std.sensortrig"
+            obj_param
+            {
+                env "^^env" 
+                sensorstate "^sensorstate_world" 
+                pos "sensortrig_pos"
+            }
+        }
+    }
+    {
+        ident "kit_engobj.sensortrig"
+        param
+        {
+            name "sensortrig_world"
+            sensorelem_actor "sensortrig_elem"
+            sensorelem_name ""
+            enter_cmd "player_enter"
+            leave_cmd "player_leave"
+            sender "capsule_deleg"
+        }
+    }
+    {
+        ident "kit_base.onaction"
+        param
+        {
+            active 1
+            name "update_sensortrig_world_onaction"
+            target "sensortrig_world"
+            cmd "update"
+        }
+    }
+    {
+        ident "kit_engbase.netreproduce"
+        param
+        {
+            name "reproduce"
+            producer "inform"
+            charge "capsule_deleg"
+            reproduce_cmd "reproduce"
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/level/actor/main.s3d_actor_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/level/actor/main.s3d_actor_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/level/actor/main.s3d_actor_run	(revision 2453)
@@ -0,0 +1,334 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Define a local namespace for the level.
+// All actors within the capsule can access each other without restrictions.
+// All foreign actors outside the capsule cannot access actors
+// within the capsule. Instead, foreign can only send commands
+// to the capsule itself. The capsule delegates the commands
+// in a controlled way, see below.
+actor_ident "kit_base.capsule"
+actor_param
+{
+    // Delegate the action calls to all children:
+    active 1
+    // Scope string used for reporting errors:
+    scope "level"
+    // Name of the capsule actor within its own namespace.
+    // Actors within the capsule can access the capsule actor itself
+    // by this name.
+    local_name "capsule"
+    // Delegate commands from outside the capsule to this dispatcher.
+    // The dispatcher handles the commands from outside in a controlled way.
+    deleg_target "dispatch_export"
+    // Define a group of actors contained in the capsule actor.
+    // Formally, a capsule can only have a single member,
+    // but by using a group actor, it can contain any number of members.
+    child_ident "kit_base.group"
+    child_param
+    {
+        active 1
+        child_array
+        {
+            // Dispatcher for commands from outside the level.
+            // Commands coming from outside the capsule are delegated
+            // to this dispatcher. This dispatcher then decides
+            // which commands are understood, and which are the target actors.
+            ident "kit_base.dispatch"
+            param
+            {
+                // Name of the actor.
+                name "dispatch_export"
+                entry_array
+                {
+                    // Utility, to get a simple access to the level admin.
+                    cmds "get_level"
+                    targets "capsule"
+                    newcmd "get_admin"
+                }
+                {
+                    cmds "produce_player"
+                    targets "playerproducer"
+                    newcmd "produce"
+                }
+                {
+                    cmds "fetch_player"
+                    targets "player_set"
+                    newcmd "search_noinform"
+                }
+                {
+                    cmds "net_traverse"
+                    targets "dispatch_content"
+                }
+            }
+        }
+        {
+            ident "kit_base.deleg"
+            param
+            {
+                name ""
+                deleg_name "env"
+                deleg_target "^env"
+                allow_no_target 0
+                enabled 1
+            }
+        }
+        {
+            ident "kit_base.deleg"
+            param
+            {
+                name ""
+                deleg_name "perchmgr"
+                deleg_target "^perchmgr"
+                allow_no_target 0
+                enabled 1
+            }
+        }
+        {
+            ident "kit_engbase.gfxmgr"
+            param
+            {
+                name "gfxmgr"
+                ident "eng_base.gfxmgr"
+            }
+        }
+        {
+            ident "kit_base.obj"
+            param
+            {
+                name "gfxsuppl"
+                obj_suppl "^envcompsuppl"
+                obj_ident "eng_base.gfxsuppl"
+                obj_param
+                {
+                    env "env" 
+                    child_suppl "^basesuppl"
+                }
+            }
+        }
+        {
+            ident "kit_engbase.gfxassign"
+            param
+            {
+                obj "gfxsuppl"
+                gfxmgr "gfxmgr"
+            }
+        }
+        {
+            ident "kit_engbase.sndmgr"
+            param
+            {
+                name "sndmgr"
+                ident "eng_base.sndmgr"
+            }
+        }
+        {
+            ident "kit_base.obj"
+            param
+            {
+                name "stdsuppl"
+                obj_suppl "^envcompsuppl"
+                obj_ident "eng_base.sndsuppl"
+                obj_param
+                {
+                    env "env" 
+                    child_suppl "gfxsuppl"
+                }
+            }
+        }
+        {
+            ident "kit_engbase.sndassign"
+            param
+            {
+                obj "stdsuppl"
+                sndmgr "sndmgr"
+            }
+        }
+        {
+            ident "kit_engbase.clock"
+            param
+            {
+                active 1
+                name "clock"
+                clock_suppl "stdsuppl"
+                clock_ident "clock:"
+            }
+        }
+        {
+            ident "kit_engbase.state"
+            param
+            {
+                name "state_world"
+                obj_suppl "stdsuppl"
+                obj_ident "state:"
+            }
+        }
+        {
+            ident "kit_engbase.state"
+            param
+            {
+                name "state_sky"
+                obj_suppl "stdsuppl"
+                obj_ident "state:"
+            }
+        }
+        {
+            ident "kit_base.obj"
+            param
+            {
+                name "sensorstate_world"
+                obj_suppl "stdsuppl"
+                obj_ident "stdsensorstate:"
+                obj_param
+                {
+                    env "env"
+                    insp_geo_ident "showsensorgeo"
+                    insp_bound_ident "showsensorbound"
+                    insp_geo_color 0.0 0.0 1.0
+                    insp_bound_color 0.0 0.0 1.0
+                }
+            }
+        }
+        {
+            ident "kit_engobj.sim"
+            param
+            {
+                name "sim_world"
+                sim_suppl "stdsuppl"
+                sim_ident "sim:"
+                sim_param
+                {
+                    env "env"
+                    // When changing the step, you should change the erp 
+                    // by the same factor:
+                    step 0.02
+                    subiter 0
+                    gravity 0.0 0.0 -10.0
+                    erp 0.5
+                    cfm 1e-4
+                    max_correcting_vel 1000.0
+                    overlap 0.001
+                    damp 0.05
+                    max_vel 10.0
+                    max_spin 10.0
+                    settled_pos_eps 0.01
+                    settled_rot_eps 0.01
+                    settled_period 1.0
+                    settled_dist 1e3
+                    insp_geo_ident "showphysgeo"
+                    insp_bound_ident "showphysbound"
+                    insp_contact_ident "showphyscontact"
+                    insp_pas_geo_color 0.0 0.0 1.0
+                    insp_pas_bound_color 0.0 0.0 1.0
+                    insp_deact_geo_color 0.0 1.0 0.0
+                    insp_deact_bound_color 0.0 1.0 0.0
+                    insp_act_geo_color 1.0 0.0 0.0
+                    insp_act_bound_color 1.0 0.0 0.0
+                    insp_slave_geo_color 1.0 0.0 1.0
+                    insp_slave_bound_color 1.0 0.0 1.0
+                    insp_contact_extralen 0.2
+                    insp_contact_pre_color 1.0 0.0 1.0
+                    insp_contact_mid_color 0.0 0.0 1.0
+                    insp_contact_post_color 0.0 1.0 1.0
+                }
+                clock "clock"
+            }
+        }
+        {
+            // Event queue.
+            // This actor manages delayed commands.
+            // Define this actor after the 3d state
+            // to avoid unnecessary delays.
+            ident "kit_base.evtmgr"
+            param
+            {
+                // Name of the event queue actor:
+                name "evtmgr"
+                active 1
+                extcfg_actor "^cfg"
+                extcfg_entry_log "log.evtmgr"
+            }
+        }
+        {
+            ident "kit_base.extern"
+            param
+            {
+                name "content_extern"
+                res "level/actor/content.s3d_actor_run"
+                watch_target "content_extern"
+                watch_cmd "load_current"
+                active 1
+            }
+        }
+        {
+            // Actor containing all active players.
+            ident "kit_base.producer"
+            param
+            {
+                name "playerproducer"
+                deleg_name "player_set"
+                active 1
+                ident "kit_base.capsule"
+                param
+                {
+                    scope "levelplayer"
+                    local_name "capsule"
+                    local_deleg_name "capsule_deleg"
+                    deleg_target "dispatch_rawexport"
+                    active 1
+                    child_ident "kit_base.group"
+                    child_param
+                    {
+                        active 1
+                        child_array
+                        {
+                            ident "kit_base.dispatch"
+                            param
+                            {
+                                name "dispatch_rawexport"
+                                allow_other 1
+                                other_target "dispatch_export"
+                                entry_array
+                            }
+                        }
+                        {
+                            // Include the character actors for this level.
+                            // It is defined after the character bag
+                            // since this dsc file refers the bag actor.
+                            ident "kit_base.extern"
+                            param
+                            {
+                                // Delegate action calls to the child:
+                                name "levelplayerbasis_extern"
+                                res "level/actor/"
+                                        & "levelplayerbasis.s3d_actor_run"
+                                watch_target "levelplayerbasis_extern"
+                                watch_cmd "load_current"
+                                active 1
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        {
+            // Ignore level load time.
+            ident "kit_base.oninit"
+            param
+            {
+                target "^outside"
+                cmd "ignore_frmtime"
+            }
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/level/actor/levelplayerbasis.s3d_actor_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/level/actor/levelplayerbasis.s3d_actor_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/level/actor/levelplayerbasis.s3d_actor_run	(revision 2453)
@@ -0,0 +1,134 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Definition of the player.
+//
+// In this case, the player is a player having a walk collision detection
+// and can be controlled by the human player.
+//
+// The player is not defined directly, but only a suppl for the player.
+// The reason for this is that not only one player must be created,
+// but a new player for every player which logs into the server.
+// As long as no client logs into a server, no player is created.
+// Each time a player logs into the server, the player suppl
+// is used to create a player.
+
+
+// Since each dsc-file formally can only contain a single actor,
+// we use the group actor to define more than one actor.
+actor_ident "kit_base.group"
+actor_param
+{
+    // Delegate action calls to the children.
+    active 1
+    child_array
+    {
+        ident "kit_base.deleg"
+        param
+        {
+            name ""
+            deleg_name "env"
+            deleg_target "^env"
+            allow_no_target 0
+            enabled 1
+        }
+    }
+    {
+        ident "kit_base.deleg"
+        param
+        {
+            name ""
+            deleg_name "stdsuppl"
+            deleg_target "^stdsuppl"
+            allow_no_target 0
+            enabled 1
+        }
+    }
+    {
+        ident "kit_base.deleg"
+        param
+        {
+            name ""
+            deleg_name "state_world"
+            deleg_target "^state_world"
+            allow_no_target 0
+            enabled 1
+        }
+    }
+    {
+        ident "kit_base.deleg"
+        param
+        {
+            name ""
+            deleg_name "sim_world"
+            deleg_target "^sim_world"
+            allow_no_target 0
+            enabled 1
+        }
+    }
+    {
+        ident "kit_engobj.group"
+        param
+        {
+            name "group_player"
+            group_suppl "^stdsuppl"
+            group_ident "group:"
+            group_param
+            {
+                env "env"
+                gensuppl "stdsuppl"
+                given_array
+                {
+                    item "env"
+                    given_ident "env"
+                }
+                {
+                    item "stdsuppl"
+                    given_ident "gensuppl"
+                }
+                {
+                    item "^player_spawn"
+                    given_ident "hook"
+                }
+                {
+                    item "state_world"
+                    given_ident "state"
+                }
+                {
+                    item "sim_world"
+                    given_ident "sim"
+                }
+                {
+                    item ""
+                    given_ident "sensorstate"
+                }
+                res "level/model/"
+                    & "playermodel.s3d_inst_run"
+            }
+        }
+    }
+    {
+        // Include the character actors for this level.
+        // It is defined after the character bag
+        // since this dsc file refers the bag actor.
+        ident "kit_base.extern"
+        param
+        {
+            active 1
+            name "levelplayer_extern"
+            res "level/actor/levelplayer.s3d_actor_run"
+            watch_target "levelplayer_extern"
+            watch_cmd "load_current"
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/level/actor/sky.s3d_actor_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/level/actor/sky.s3d_actor_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/level/actor/sky.s3d_actor_run	(revision 2453)
@@ -0,0 +1,32 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+actor_ident "kit_base.group"
+actor_param
+{
+    // Delegate action calls to the children.
+    active 1
+    child_array
+    {
+        ident "kit_base.dispatch"
+        param
+        {
+            name "dispatch_sky"
+            entry_array
+            {
+                cmds "net_traverse"
+                targets
+            }
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/level/actor/world.s3d_actor_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/level/actor/world.s3d_actor_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/level/actor/world.s3d_actor_run	(revision 2453)
@@ -0,0 +1,54 @@
+// Machine-made Shark 3D Snake Text 2x0 Stream. Format: ascii.
+actor_ident "kit_base.group"
+actor_param
+{
+    active 1
+    child_array
+    {
+        ident "kit_base.dispatch"
+        param
+        {
+            name "dispatch_world"
+            entry_array
+            {
+                cmds "net_traverse"
+                targets
+            }
+        }
+    }
+    {
+        ident "kit_engobj.itemeye"
+        param
+        {
+            name "player_spawn"
+            item_actor "group_world"
+            item_name "simplepos:playerstart"
+        }
+    }
+    {
+        ident "kit_engobj.actu"
+        param
+        {
+            name "lamp_group_actu1"
+            actu_suppl "stdsuppl"
+            actu_ident "actucyc:"
+            actu_param
+            {
+            }
+            clock "clock"
+            vel 0.35
+            auto_play_forw 1
+        }
+    }
+    {
+        ident "kit_engobj.posactu"
+        param
+        {
+            pos_actor "group_world"
+            pos_names "path:lamp_group"
+            slot 0
+            actu "lamp_group_actu1"
+        }
+    }
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/level/actor/content.s3d_actor_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/level/actor/content.s3d_actor_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/level/actor/content.s3d_actor_run	(revision 2453)
@@ -0,0 +1,220 @@
+// Machine-made Shark 3D Snake Text 2x0 Stream. Format: ascii.
+actor_ident "kit_base.group"
+actor_param
+{
+    active 1
+    child_array
+    {
+        ident "kit_engobj.group"
+        param
+        {
+            name "group_bloom"
+            group_suppl "stdsuppl"
+            group_ident "group:"
+            group_param
+            {
+                env "^env"
+                gensuppl "stdsuppl"
+                given_array
+                {
+                    item "^env"
+                    given_ident "env"
+                }
+                {
+                    item "stdsuppl"
+                    given_ident "gensuppl"
+                }
+                {
+                    item ""
+                    given_ident "hook"
+                }
+                {
+                    item "state_world"
+                    given_ident "state"
+                }
+                {
+                    item "sim_world"
+                    given_ident "sim"
+                }
+                {
+                    item "sensorstate_world"
+                    given_ident "sensorstate"
+                }
+                res "level/model/bloom.s3d_inst_run"
+            }
+        }
+    }
+    {
+        ident "kit_base.dispatch"
+        param
+        {
+            name "dispatch_content"
+            entry_array
+            {
+                cmds "net_traverse"
+                targets "group_world" "group_sky" "group_bloom"
+                newcmd "traverse"
+            }
+            {
+                cmds "net_traverse"
+                targets "dispatch_world" "dispatch_sky"
+            }
+        }
+    }
+    {
+        ident "kit_engobj.noise"
+        param
+        {
+            active 1
+            name "noise_world"
+            noise_suppl "stdsuppl"
+            noise_ident "noise:"
+            noise_param
+            {
+                env "env"
+                state "state_world"
+                sim "sim_world"
+                clock "clock"
+                insp_ident "shownoise"
+                insp_point_color 1.0 1.0 0.5
+                insp_ext_color 0.5 1.0 0.5
+                insp_default_radius 0.5
+                pos_suppl "stdsuppl"
+                pos_ident "simplepos:"
+                speaker_suppl "stdsuppl"
+                speaker_ident "speaker:"
+                wave_suppl "stdsuppl"
+                attr_array
+                {
+                    mtl_array "character"
+                    dominance 10
+                    bump
+                    {
+                        share_range 0.0
+                        share_period 0.0
+                        min_vel 0.0
+                        max_vel 0.0
+                        max_volume 1.0
+                        wave ""
+                        speaker_range 50.0
+                        speaker_size 5.0
+                    }
+                    slide
+                    {
+                        share_range 0.0
+                        share_period 0.0
+                        min_vel 0.0
+                        max_vel 0.0
+                        max_volume 1.0
+                        wave ""
+                        speaker_range 50.0
+                        speaker_size 5.0
+                    }
+                }
+            }
+        }
+    }
+    {
+        ident "kit_engobj.group"
+        param
+        {
+            name "group_world"
+            group_suppl "stdsuppl"
+            group_ident "group:"
+            group_param
+            {
+                env "env"
+                gensuppl "stdsuppl"
+                given_array
+                {
+                    item "env"
+                    given_ident "env"
+                }
+                {
+                    item "stdsuppl"
+                    given_ident "gensuppl"
+                }
+                {
+                    item ""
+                    given_ident "hook"
+                }
+                {
+                    item "state_world"
+                    given_ident "state"
+                }
+                {
+                    item "sim_world"
+                    given_ident "sim"
+                }
+                {
+                    item "sensorstate_world"
+                    given_ident "sensorstate"
+                }
+                res "level/model/worldmodel.s3d_inst_run"
+            }
+        }
+    }
+    {
+        ident "kit_engobj.group"
+        param
+        {
+            name "group_sky"
+            group_suppl "stdsuppl"
+            group_ident "group:"
+            group_param
+            {
+                env "env"
+                gensuppl "stdsuppl"
+                given_array
+                {
+                    item "env"
+                    given_ident "env"
+                }
+                {
+                    item "stdsuppl"
+                    given_ident "gensuppl"
+                }
+                {
+                    item ""
+                    given_ident "hook"
+                }
+                {
+                    item "state_sky"
+                    given_ident "state"
+                }
+                {
+                    item ""
+                    given_ident "sim"
+                }
+                {
+                    item ""
+                    given_ident "sensorstate"
+                }
+                res "level/model/skymodel.s3d_inst_run"
+            }
+        }
+    }
+    {
+        ident "kit_base.extern"
+        param
+        {
+            active 1
+            name "world_extern"
+            res "level/actor/world.s3d_actor_run"
+            watch_target "world_extern"
+            watch_cmd "load_current"
+        }
+    }
+    {
+        ident "kit_base.extern"
+        param
+        {
+            active 1
+            name "sky_extern"
+            res "level/actor/sky.s3d_actor_run"
+            watch_target "sky_extern"
+            watch_cmd "load_current"
+        }
+    }
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/client/actor/displayworld.s3d_actor_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/client/actor/displayworld.s3d_actor_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/client/actor/displayworld.s3d_actor_run	(revision 2453)
@@ -0,0 +1,103 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Client-side display 3d objects.
+
+// Group actor:
+actor_ident "kit_base.group"
+actor_param
+{
+    // Delegate action calls to the children.
+    active 1
+    child_array
+    {
+        ident "kit_engobj.group"
+        param
+        {
+            name "group_display"
+            group_suppl "stdsuppl"
+            group_ident "group:"
+            group_param
+            {
+                env "env"
+                gensuppl "stdsuppl"
+                res "client/model/displaymodel.s3d_inst_run"
+                given_array
+                {
+                    item "env"
+                    given_ident "env"
+                }
+                {
+                    item "stdsuppl"
+                    given_ident "gensuppl"
+                }
+                {
+                    item ""
+                    given_ident "hook"
+                }
+                {
+                    item "display_state"
+                    given_ident "state"
+                }
+                {
+                    item ""
+                    given_ident "sim"
+                }
+                {
+                    item ""
+                    given_ident "sensorstate"
+                }
+            }
+        }
+    }
+    {
+        ident "kit_base.dispatch"
+        param
+        {
+            name "dispatch"
+            entry_array
+            {
+                cmds "init"
+                targets "loading_pos" "saving_pos"
+                newcmd "disable_pos"
+            }
+        }
+    }
+    // Select the loading object:
+    {
+        ident "kit_engobj.itemeye"
+        param
+        {
+            name "loading_pos"
+            item_actor "group_display"
+            item_name "path:loading"
+        }
+    }
+    {
+        ident "kit_engobj.itemeye"
+        param
+        {
+            name "saving_pos"
+            item_actor "group_display"
+            item_name "simplepos:saving"
+        }
+    }
+    {
+        ident "kit_base.oninit"
+        param
+        {
+            target "dispatch"
+            cmd "init"
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/client/actor/client.s3d_actor_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/client/actor/client.s3d_actor_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/client/actor/client.s3d_actor_run	(revision 2453)
@@ -0,0 +1,672 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Definition of the game client.
+// This file defines all actors used on client side.
+// It includes the graphic output definitions "client/actor/gfx.s3d_actor_run"
+// and the display defintion "client/actor/display.s3d_actor_run".
+
+// The client root actor is a capsule, defining an own local namespace.
+actor_ident "kit_base.capsule"
+actor_param
+{
+    // Delegate the action calls to all children:
+    active 1
+    // Scope name. Used in error messages.
+    scope "client"
+    // Name of the capsule actor within its own namespace.
+    // Actors within the capsule can access the capsule
+    // actor itself by this name.
+    local_name "capsule"
+    // Delegate commands from outside to the correct dispatcher.
+    deleg_target "dispatch_export"
+    // The capsule actor contains a group of actors:
+    child_ident "kit_base.group"
+    child_param
+    {
+        // Delegate action calls to the children.
+        active 1
+        child_array
+        {
+            // Dispatcher for commands from outside the client capsule.
+            ident "kit_base.dispatch"
+            param
+            {
+                name "dispatch_export"
+                entry_array
+            }
+        }
+        {
+            // Central command dispatch actor.
+            // This dispatcher is used internally within the client.
+            ident "kit_base.dispatch"
+            param
+            {
+                name "dispatch"
+                entry_array
+                {
+                    cmds "set_camera_transf"
+                    targets "io"
+                }
+                {
+                    cmds "io_reloaded"
+                    targets "universeplayer_refresh_charge"
+                    newcmd "perform"
+                }
+            }
+        }
+        {
+            // This dispatcher is used to filter input commands.
+            ident "kit_base.dispatch"
+            param
+            {
+                name "dispatch_input"
+                entry_array
+                {
+                    cmds "quit" "refresh_all_res"
+                    targets "^root"
+                }
+                {
+                    cmds "store_file_default"
+                    targets "store_file_default"
+                    newcmd "perform"
+                }
+                {
+                    cmds "load_file_default"
+                    targets "load_file_default"
+                    newcmd "perform"
+                }
+                {
+                    // Send these commands to server:
+                    cmds
+                        "fire" "directfire" "god" "special"
+                        "goto_level0" "goto_level1" 
+                        "goto_level2" "goto_level3"
+                        "goto_level4" "goto_level5"
+                        "goto_level6" "goto_level7" 
+                        "goto_level8" "goto_level9"
+                        "goto_level10" "goto_level11" 
+                        "goto_level12" "goto_level13"
+                        "goto_level14" "goto_level15"
+                        "goto_level16" "goto_level17" 
+                        "goto_level18" "goto_level19"
+                        "goto_level20" "goto_level21"
+                        "goto_level_next" "goto_level_prev"
+                    // Delegate to the universe-player:
+                    targets "universeplayer"
+                }
+                {
+                    // Send movement commands to the movement control actor:
+                    cmds
+                        "apply_move_pos_x" "apply_move_neg_x" 
+                        "apply_move_pos_y" "apply_move_neg_y" 
+                        "apply_move_pos_z" "apply_move_neg_z"
+                        "assign_vel_pos_x" "assign_vel_neg_x" 
+                        "assign_vel_pos_y" "assign_vel_neg_y" 
+                        "assign_vel_pos_z" "assign_vel_neg_z"
+                        "switch_vel_pos_x" "switch_vel_neg_x" 
+                        "switch_vel_pos_y" "switch_vel_neg_y" 
+                        "switch_vel_pos_z" "switch_vel_neg_z"
+                        "apply_rot_pos_x" "apply_rot_neg_x" 
+                        "apply_rot_pos_y" "apply_rot_neg_y" 
+                        "apply_rot_pos_z" "apply_rot_neg_z"
+                        "assign_spin_pos_x" "assign_spin_neg_x" 
+                        "assign_spin_pos_y" "assign_spin_neg_y" 
+                        "assign_spin_pos_z" "assign_spin_neg_z"
+                        "switch_spin_pos_x" "switch_spin_neg_x" 
+                        "switch_spin_pos_y" "switch_spin_neg_y" 
+                        "switch_spin_pos_z" "switch_spin_neg_z"
+                        "jump"
+                    targets "motion"
+                }
+                {
+                    // Commands for gfx:
+                    cmds "set_cursor_x" "set_cursor_y"
+                        "move_cursor_x" "move_cursor_y"
+                        "toggle_showgfxbound" 
+                        "toggle_showgfxmesh" 
+                        "toggle_showgfxwire" 
+                        "toggle_showgfxocclmesh" 
+                        "toggle_showgfxocclwire"
+                        "toggle_showphysbound" 
+                        "toggle_showphysgeo"
+                        "toggle_showphyscontact"
+                        "toggle_shownoise"
+                        "toggle_showsensorbound" 
+                        "toggle_showsensorgeo"
+                        "store_screenshot"
+                        "reset_msg"
+                        "toggle_frmtime" 
+                        "toggle_stat" "reset_stat"
+                        "toggle_fullscreen"
+                        "toggle_catch_mouse"
+                    targets "io"
+                }
+                {
+                    cmds "reload_io"
+                    targets "io_extern"
+                    newcmd "load_current"
+                }
+                {
+                    // Character input
+                    cmds "handle_char"
+                    targets
+                }
+            }
+        }
+        {
+            // Dispatcher of commands coming from the server.
+            ident "kit_base.dispatch"
+            param
+            {
+                name "dispatch_universe"
+                entry_array
+                {
+                    cmds "get_basesuppl"
+                    targets "sersuppl"
+                    newcmd "get_obj"
+                }
+                {
+                    cmds "ignore_frmtime"
+                    targets "^root"
+                }
+                {
+                    cmds "cfg_access_int_info"
+                    targets "^cfg"
+                    newcmd "access_int_info"
+                }
+                {
+                    cmds "cfg_access_float_info"
+                    targets "^cfg"
+                    newcmd "access_float_info"
+                }
+                {
+                    cmds "cfg_access_str_info"
+                    targets "^cfg"
+                    newcmd "access_str_info"
+                }
+                {
+                    cmds "cfg_access_chunk_info"
+                    targets "^cfg"
+                    newcmd "access_chunk_info"
+                }
+                {
+                    cmds "universe_cfg_access_int_info"
+                    targets "universe_cfg"
+                    newcmd "access_int_info"
+                }
+                {
+                    cmds "universe_cfg_access_float_info"
+                    targets "universe_cfg"
+                    newcmd "access_float_info"
+                }
+                {
+                    cmds "universe_cfg_access_str_info"
+                    targets "universe_cfg"
+                    newcmd "access_str_info"
+                }
+                {
+                    cmds "universe_cfg_access_chunk_info"
+                    targets "universe_cfg"
+                    newcmd "access_chunk_info"
+                }
+                {
+                    cmds "enable_notice_destroying" "disable_notice_destroying"
+                        "enable_notice_loading" "disable_notice_loading"
+                        "enable_notice_saving" "disable_notice_saving"
+                    targets
+                }
+            }
+        }
+        {
+            ident "kit_perch.mgr"
+            param
+            {
+                name "perchmgr"
+            }
+        }
+        {
+            ident "kit_snk.data"
+            param
+            {
+                name "universe_cfg"
+                val
+                {
+                    server 0
+                }
+            }
+        }
+        {
+            ident "kit_base.sersuppl"
+            param
+            {
+                name "sersuppl"
+                child "^basesuppl"
+            }
+        }
+        {
+            // Dispatcher of commands coming from the server.
+            ident "kit_base.dispatch"
+            param
+            {
+                name "dispatch_inform"
+                entry_array
+                {
+                    cmds "set_state_world"
+                    targets "state_world"
+                    newcmd "set_obj"
+                }
+                {
+                    cmds "set_state_sky"
+                    targets "state_sky"
+                    newcmd "set_obj"
+                }
+                {
+                    cmds
+                        "set_gfxmgr_level"
+                        "set_sndmgr_level"
+                        "set_state_world"
+                        "set_state_sky"
+                        "set_sim_world"
+                        "set_noise_world"
+                        "set_sensorstate_world"
+                    targets "io"
+                }
+                {
+                    cmds "set_sim_world"
+                    targets "sim_world"
+                    newcmd "set_obj"
+                }
+                {
+                    cmds "set_noise_world"
+                    targets "noise_world"
+                    newcmd "set_obj"
+                }
+                {
+                    cmds "set_sensorstate_world"
+                    targets "sensorstate_world"
+                    newcmd "set_obj"
+                }
+                {
+                    cmds "set_camera"
+                    targets "elem_camera"
+                    newcmd "set_obj"
+                }
+                {
+                    cmds "set_playerbody"
+                    targets "io"
+                }
+                {
+                    cmds "notice_level_load_pre"
+                    targets "display"
+                    newcmd "enable_notice_loading"
+                }
+                {
+                    cmds "notice_level_load_post"
+                    targets "display"
+                    newcmd "disable_notice_loading"
+                }
+                {
+                    cmds
+                        "notice_level_load_pre"
+                        "notice_level_load_post"
+                    targets "io"
+                    newcmd "suspend_output"
+                }
+                {
+                    cmds
+                        "notice_level_load_pre"
+                        "notice_level_load_post"
+                    targets "io"
+                    newcmd "perform_output"
+                }
+            }
+        }
+        {
+            // Event queue.
+            ident "kit_base.evtmgr"
+            param
+            {
+                name "evtmgr"
+                active 1
+                extcfg_actor "^cfg"
+                extcfg_entry_log "log.evtmgr"
+            }
+        }
+        {
+            // Information line collection actor.
+            // This actor collects per-frame information lines
+            // like the frmtime.
+            // This actor does not generate the information,
+            // but only is responsible for collecting the lines.
+            ident "kit_base.inspcollect"
+            param
+            {
+                name "inspcollect"
+            }
+        }
+        {
+            ident "kit_engbase.extern"
+            param
+            {
+                name "universe_extern"
+                deleg_name "universe"
+                allow_no_target 1
+                res ""
+                active 1
+                net_imprint 0
+            }
+        }
+        {
+            ident "kit_engbase.plug"
+            param
+            {
+                name "plug"
+                deleg_name "plug_root"
+                netlink_suppl "^envcompsuppl"
+                netlink_ident "eng_base.netlink"
+                netlink_param
+                {
+                    env "^env"
+                }
+                netroot_target "universe"
+                lost_target ""
+                lost_cmd ""
+                nettraverse_target "universe_extern"
+                nettraverse_cmd "traverse"
+            }
+        }
+        {
+            // Create a network engine.
+            ident "kit_io.neteng"
+            param
+            {
+                name "neteng"
+                active 1
+                // Get parameters from the actor "cfg", 
+                // which is defined above.
+                extcfg_actor "^cfg"
+                // Get the parameters from the "network" entry.
+                extcfg_entry_param "network"
+                given_array
+                {
+                    item "^env"
+                    given_ident "env"
+                }                
+            }
+        }
+        {
+            ident "kit_engbase.plugconnect"
+            param
+            {
+                name "plugconnect"
+                plug "plug"
+                neteng "neteng"
+                localroot "^server"
+                extcfg_actor "^cfg"
+                extcfg_entry_addr "client.addr"
+            }
+        }
+        {
+            ident "kit_engobj.informmgr"
+            param
+            {
+                name "universeplayer_informmgr"
+                deleg_name "universeplayer"
+                inform "dispatch_inform"
+                ignore_no_charge 1
+                notify_target ""
+                notify_pre_cmd ""
+                notify_post_cmd ""
+                produce_target "plug_root"
+                produce_cmd "produce_player"
+            }
+        }
+        {
+            ident "kit_base.paramvoid"
+            param
+            {
+                name "universeplayer_refresh_charge"
+                target "universeplayer_informmgr"
+                cmd "refresh_charge"
+            }
+        }
+        {
+            ident "kit_engobj.fetch"
+            param
+            {
+                name "universeplayer_fetch"
+                query_target "universeplayer_informmgr"
+                query_cmd "get_charge"
+                produce_target "universeplayer_informmgr"
+                produce_cmd "produce_charge"
+                produce_report_target ""
+                produce_report_cmd ""
+                enum_target ""
+                enum_cmd ""
+                enum_report_target ""
+                enum_report_cmd ""
+            }
+        }
+
+        {
+            ident "kit_engobj.itemeye"
+            param
+            {
+                name "sim_world"
+            }
+        }
+        {
+            ident "kit_engobj.itemeye"
+            param
+            {
+                name "noise_world"
+            }
+        }
+        {
+            ident "kit_engobj.itemeye"
+            param
+            {
+                name "sensorstate_world"
+            }
+        }
+        {
+            ident "kit_engobj.itemeye"
+            param
+            {
+                name "elem_camera"
+            }
+        }
+        {
+            // Define the camera:
+            ident "kit_engobj.cameractrl"
+            param
+            {
+                name "cameractrl"
+                active 1
+                rawtransf_src "elem_camera"
+                transf_target "dispatch"
+                transf_cmd "set_camera_transf"
+            }
+        }
+        {
+            // Include the definition of the display.
+            ident "kit_base.extern"
+            param
+            {
+                // Delegate action calls to the child:
+                name "display_extern"
+                deleg_name "display"
+                res "client/actor/display.s3d_actor_run"
+                // No watch because display needs "set_clientimageobj_xxx"
+                active 1
+            }
+        }
+        {
+            // Include actors for movement control:
+            ident "kit_base.extern"
+            param
+            {
+                // Delegate action calls to the child:
+                deleg_name "motion"
+                res "client/actor/motion.s3d_actor_run"
+                active 1
+            }
+        }
+        {
+            ident "kit_engobj.itemeye"
+            param
+            {
+                name "state_world"
+            }
+        }
+        {
+            ident "kit_engobj.itemeye"
+            param
+            {
+                name "state_sky"
+            }
+        }
+        {
+            ident "kit_engobj.itemeye"
+            param
+            {
+                name "state_display"
+            }
+        }
+        {
+            // Include the definition of the display.
+            ident "kit_base.extern"
+            param
+            {
+                // Delegate action calls to the child:
+                name "io_extern"
+                deleg_name "io"
+                res "client/actor/io.s3d_actor_run"
+                notify_target "dispatch"
+                notify_post_cmd "io_reloaded"
+                watch_target "io_extern"
+                watch_cmd "load_current"
+                active 1
+            }
+        }
+
+        // The following entry_array define the order of actions
+        // performed each frame in the client.
+        // General order:
+        //   1. Receive data from server.
+        //   2. Update output (especially timeconsuming 3D output).
+        //   3. Evaluate input.
+        //   4. Send data to server.
+        // Note that performing input before output would be the wrong order,
+        // since the input would not have been evaluated by the server yet-
+        // The above order archives that the display reflects the input
+        // as soon as possible.
+        {
+            ident "kit_base.onaction"
+            param
+            {
+                active 1
+                name "check_universeplayer_onaction"
+                target "universeplayer_fetch"
+                cmd "check_produce_charge"
+            }
+        }
+        {
+            // First, evaluate data received from server:
+            ident "kit_base.onaction"
+            param
+            {
+                active 1
+                name "poll_recv_onaction"
+                target "plug"
+                cmd "poll_recv"
+            }
+        }
+        {
+            // Update camera transformation to views and snd.
+            ident "kit_base.onaction"
+            param
+            {
+                active 1
+                name "update_cameractrl_onaction"
+                target "cameractrl"
+                cmd "update"
+            }
+        }
+        {
+            // Render the gfxports and update the sndports:
+            ident "kit_base.onaction"
+            param
+            {
+                active 1
+                name "perform_output_onaction"
+                target "io"
+                cmd "perform_output"
+            }
+        }
+        {
+            // Evaluate input data:
+            ident "kit_base.onaction"
+            param
+            {
+                active 1
+                name "perform_input_onaction"
+                target "io"
+                cmd "perform_input"
+            }
+        }
+        {
+            // Evaluate motin input control:
+            ident "kit_base.onaction"
+            param
+            {
+                active 1
+                name "update_motion_onaction"
+                target "motion"
+                cmd "update_motion"
+            }
+        }
+        {
+            // Send data to server:
+            ident "kit_base.onaction"
+            param
+            {
+                active 1
+                name "poll_send_onaction"
+                target "plug"
+                cmd "poll_send"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "store_file_default"
+                target "universeplayer"
+                cmd "store_file"
+                param "save.sav"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "load_file_default"
+                target "universeplayer"
+                cmd "load_file"
+                param "save.sav"
+            }
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/client/actor/gfx.s3d_actor_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/client/actor/gfx.s3d_actor_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/client/actor/gfx.s3d_actor_run	(revision 2453)
@@ -0,0 +1,852 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Definition of the graphics output.
+// This includes the graphics engine object and the gfxports.
+//
+// This file defines three gfxports.
+// a) Display gfxport.   Depth range 0.00 to 0.01.
+// b) World gfxport.     Depth range 0.01 to 0.99
+// c) Sky gfxport.       Depth range 0.99 to 1.00
+
+// The client root actor is a capsule, defining an own local namespace.
+actor_ident "kit_base.capsule"
+actor_param
+{
+    // Delegate the action calls to all children:
+    active 1
+    // Scope name for reporting errors:
+    scope "gfx"
+    // Name of the capsule actor within its own namespace.
+    // Actors within the capsule can access the capsule
+    // actor itself by this name.
+    local_name "capsule"
+    // Delegate events from outside:
+    deleg_target "dispatch_export"
+    // The capsule actor contains a group of actors:
+    child_ident "kit_base.group"
+    child_param
+    {
+        // Delegate action calls to the children.
+        active 1
+        child_array
+        {
+            // Dispatcher for commands from outside the capsule.
+            ident "kit_base.dispatch"
+            param
+            {
+                name "dispatch_export"
+                entry_array
+                {
+                    cmds "set_cursor_x" "set_cursor_y"
+                    targets "cursor"
+                }
+                {
+                    cmds "set_playerbody"
+                    targets "cursor"
+                    newcmd "set_avoid"
+                }
+                {
+                    cmds "set_gfxmgr_level"
+                    targets "gfxsect_level"
+                    newcmd "assign_gfxmgr"
+                }
+                {
+                    cmds "set_state_display"
+                    targets "gfxport_display"
+                    newcmd "assign_state"
+                }
+                {
+                    cmds "set_state_world"
+                    targets "gfxport_world"
+                    newcmd "assign_state"
+                }
+                {
+                    cmds "set_state_sky"
+                    targets "gfxport_sky"
+                    newcmd "assign_state"
+                }
+                {
+                    cmds "set_sim_world"
+                    targets "inspperform_sim_world"
+                    newcmd "set_obj"
+                }
+                {
+                    cmds "set_sim_world"
+                    targets "cursor"
+                    newcmd "set_sim"
+                }
+                {
+                    cmds "set_noise_world"
+                    targets "inspperform_noise_world"
+                    newcmd "set_obj"
+                }
+                {
+                    cmds "set_sensorstate_world"
+                    targets "inspperform_sensorstate_world"
+                    newcmd "set_obj"
+                }
+                {
+                    // Update camera transformation of world:
+                    cmds "set_camera_efftransf"
+                    targets "gfxport_world"
+                    newcmd "set_transf"
+                }
+                {
+                    // Click command:
+                    cmds "click"
+                        "set_cursor_x" "set_cursor_y"
+                        "move_cursor_x" "move_cursor_y"
+                    targets //"cursor"
+                }
+                {
+                    // Toggle frmtime information:
+                    cmds "toggle_frmtime"
+                    targets "inspfrmtime"
+                    newcmd "toggle_insp"
+                }
+                {
+                    // Toggle frmtime information:
+                    cmds "toggle_stat" "reset_stat"
+                    targets "inspfrmtime"
+                }
+                {
+                    cmds "reset_msg"
+                    targets "inspmsg"
+                    newcmd "reset"
+                }
+                {
+                    cmds "toggle_fullscreen"
+                    targets "gfxout"
+                }
+                {
+                    cmds "toggle_showgfxbound"
+                    targets 
+                        "toggle_showgfxbound_sky" 
+                        "toggle_showgfxbound_world" 
+                        "toggle_showgfxbound_display"
+                    newcmd "perform"
+                }
+                {
+                    cmds "toggle_showgfxmesh"
+                    targets
+                        "toggle_showgfxmesh_sky"
+                        "toggle_showgfxmesh_world"
+                        "toggle_showgfxmesh_display"
+                    newcmd "perform"
+                }
+                {
+                    cmds "toggle_showgfxwire"
+                    targets 
+                        "toggle_showgfxwire_sky" 
+                        "toggle_showgfxwire_world" 
+                        "toggle_showgfxwire_display"
+                    newcmd "perform"
+                }
+                {
+                    cmds "toggle_showgfxocclmesh"
+                    targets 
+                        "toggle_showgfxocclmesh_sky" 
+                        "toggle_showgfxocclmesh_world" 
+                        "toggle_showgfxocclmesh_display"
+                    newcmd "perform"
+                }
+                {
+                    cmds "toggle_showgfxocclwire"
+                    targets 
+                        "toggle_showgfxocclwire_sky" 
+                        "toggle_showgfxocclwire_world" 
+                        "toggle_showgfxocclwire_display"
+                    newcmd "perform"
+                }
+                {
+                    cmds "toggle_showphysbound"
+                    targets "toggle_showphysbound"
+                    newcmd "perform"
+                }
+                {
+                    cmds "toggle_showphysgeo"
+                    targets "toggle_showphysgeo"
+                    newcmd "perform"
+                }
+                {
+                    cmds "toggle_showphyscontact"
+                    targets "toggle_showphyscontact"
+                    newcmd "perform"
+                }
+                {
+                    cmds "toggle_shownoise"
+                    targets "toggle_shownoise"
+                    newcmd "perform"
+                }
+                {
+                    cmds "toggle_showsensorgeo"
+                    targets "toggle_showsensorgeo"
+                    newcmd "perform"
+                }
+                {
+                    cmds "toggle_showsensorbound"
+                    targets "toggle_showsensorbound"
+                    newcmd "perform"
+                }
+                {
+                    cmds "store_screenshot"
+                    targets "gfxeng"
+                }
+
+                // Paint sequence.
+                // The following entry_array define the steps in correct order
+                // which have to be performed for rendering a frame.
+                {
+                    cmds "paint"
+                    targets "cursor"
+                    newcmd "perform_raycast"
+                }
+                {
+                    cmds "paint"
+                    targets "gfxport_display"
+                    newcmd "perform"
+                }
+                {
+                    // Paint the general information.
+                    cmds "paint"
+                    targets "inspmem"
+                    newcmd "perform_insp"
+                }
+                {
+                    // Paint the general information.
+                    cmds "paint"
+                    targets "inspmsg"
+                    newcmd "perform_insp"
+                }
+                {
+                    // Paint the general information.
+                    cmds "paint"
+                    targets "inspgeneral"
+                    newcmd "perform_insp"
+                }
+                {
+                    // Finish the paint cycle.
+                    cmds "paint"
+                    targets "gfxeng"
+                    newcmd "perform_insp"
+                }
+                {
+                    // Finish the paint cycle.
+                    cmds "paint"
+                    targets "gfxout"
+                    newcmd "perform_insp"
+                }
+                {
+                    cmds "paint"
+                    targets "cursor"
+                    newcmd "perform_insp"
+                }
+                {
+                    // Update per-frame information of the gfx engine.
+                    cmds "paint"
+                    targets "inspperform_sim_world"
+                    newcmd "perform_insp"
+                }
+                {
+                    cmds "paint"
+                    targets "inspperform_noise_world"
+                    newcmd "perform_insp"
+                }
+                {
+                    // Update per-frame information of the gfx engine.
+                    cmds "paint"
+                    targets "inspperform_sensorstate_world"
+                    newcmd "perform_insp"
+                }
+                {
+                    // Paint the inspfrmtime last:
+                    cmds "paint"
+                    targets "inspfrmtime"
+                    newcmd "perform_insp"
+                }
+                {
+                    // Draw the per-frame information.
+                    cmds "paint"
+                    targets "insppaint"
+                    newcmd "paint"
+                }
+                {
+                    // Finish the paint cycle.
+                    cmds "paint"
+                    targets "gfxeng"
+                    newcmd "end_render"
+                }
+                {
+                    cmds "paint"
+                    targets "gfxout"
+                    newcmd "present"
+                }
+            }
+        }
+        {
+            // 3D graphics engine:
+            ident "kit_io.gfxeng"
+            param
+            {
+                name "gfxeng"
+                active 1
+                extcfg_actor "^^^cfg"
+                extcfg_entry_param "gfxeng"
+                extcfg_entry_insp_stat_enabled "insp.gfxstat"
+                inspcollect "^^inspcollect"
+                given_array
+                {
+                    item "^^^envcompsuppl"
+                    given_ident "envcompsuppl"
+                }
+                {
+                    item "^^^env"
+                    given_ident "env"
+                }
+            }
+        }
+        {
+            // 3D graphics engine:
+            ident "kit_io.gfxout"
+            param
+            {
+                ctx "^ctx"
+                gfxeng "gfxeng"
+                name "gfxout"
+                active 1
+                extcfg_actor "^^^cfg"
+                extcfg_entry_param "gfxout"
+                extcfg_entry_insp_base_enabled "insp.gfxbase"
+                inspcollect "^^inspcollect"
+            }
+        }
+        {
+            ident "kit_engbase.gfxctx"
+            param
+            {
+                name "gfxctx"
+                gfxeng "gfxeng"
+                extcfg_actor "^^^cfg"
+                extcfg_entry_featureset "feature_set"
+            }
+        }
+        {
+            // 3D graphics engine:
+            ident "kit_engbase.gfxsect"
+            param
+            {
+                name "gfxsect_display"
+                gfxctx "gfxctx"
+                gfxmgr_actor "^^display"
+                gfxmgr_cmd "get_display_gfxmgr"
+            }
+        }
+        {
+            // 3D graphics engine:
+            ident "kit_engbase.gfxsect"
+            param
+            {
+                name "gfxsect_level"
+                gfxctx "gfxctx"
+                gfxmgr_actor ""
+                gfxmgr_cmd ""
+            }
+        }
+        {
+            // Painting per-frame information lines.
+            ident "kit_engbase.insppaint"
+            param
+            {
+                name "insppaint"
+                inspcollect "^^inspcollect"
+                gfxctx "gfxctx"
+                tex_suppl "^^^basesuppl"
+                tex_ident "tex:client/texture/charset.tga"
+                extcfg_actor "^^^cfg"
+                extcfg_entry_chunk "insp.paint"
+            }
+        }
+
+        {
+            // Reporting general information.
+            ident "kit_base.inspmsg"
+            param
+            {
+                name "inspmsg"
+                inspcollect "^^inspcollect"
+                extcfg_actor "^^^cfg"
+                extcfg_entry_insp "insp.msg"
+                extcfg_entry_limit "insp.msg_limit"
+                extcfg_entry_alsoinfo "insp.msg_alsoinfo"
+            }
+        }
+        {
+            // Reporting general information.
+            ident "kit_base.inspgeneral"
+            param
+            {
+                name "inspgeneral"
+                inspcollect "^^inspcollect"
+                extcfg_actor "^^^cfg"
+                extcfg_entry_insp "insp.general"
+            }
+        }
+        {
+            // frmtime calculation actor.
+            ident "kit_base.inspfrmtime"
+            param
+            {
+                name "inspfrmtime"
+                inspcollect "^^inspcollect"
+                extcfg_actor "^^^cfg"
+                extcfg_entry_insp "insp.frmtime"
+                extcfg_entry_logfile "insp.frmtime_logfile"
+            }
+        }
+        {
+            //
+            ident "kit_base.inspmem"
+            param
+            {
+                name "inspmem"
+                inspcollect "^^inspcollect"
+                extcfg_actor "^^^cfg"
+                extcfg_entry_insp "insp.mem"
+            }
+        }
+        {
+            ident "kit_engbase.gfxport"
+            param
+            {
+                name "gfxport_sky"
+                
+                active 1
+                
+                gfxout "gfxout"
+                gfxctx "gfxctx"
+                next ""
+                couple 0
+                
+                state_actor ""
+                state_cmd ""
+                
+                gfxstat "gfxstat"
+                
+                extcfg_actor "^^^cfg"
+                extcfg_entry_proj "proj_world"
+                extcfg_entry_param "gfxport"
+                //extcfg_entry_eyedist "eyedist.display"
+
+                view_transl_x 0.00
+                view_transl_y 0.00
+                view_scale_x 1.00
+                view_scale_y 1.00
+                view_depth_start 0.99
+                view_depth_end 1.00
+
+                // Use orthogonal projection.
+                proj_ortho 0
+                // View frustum extension.
+                // These values are plane slopes in case of a persepctive
+                // projection, and coordinates otherwise.
+                // If all set to zero, read from cfguration file instead.
+                proj_open_x 0.0
+                proj_open_y 0.0
+                proj_center_x 0.0
+                proj_center_y 0.0
+                // Clipping plane coordinates.
+                proj_neg_z 0.05
+                proj_pos_z 1000.0
+                // Fog:
+                fog_color 0.5 0.5 0.5
+                //fog_density 0.02
+                
+                destprop_antialias 1
+                clear_must_coloralpha 1
+                clear_color 0.0 0.0 0.0
+
+                enum_trigger "main_trigger"
+            }
+        }
+        {
+            ident "kit_engbase.gfxport"
+            param
+            {
+                name "gfxport_world"
+                
+                active 1
+                
+                gfxout "gfxout"
+                gfxctx "gfxctx"
+                next "gfxport_sky"
+                couple 1   // Sky is coupled
+                
+                state_actor ""
+                state_cmd ""
+                
+                gfxstat "gfxstat"
+                
+                extcfg_actor "^^^cfg"
+                extcfg_entry_proj "proj_world"
+                extcfg_entry_param "gfxport"
+                //extcfg_entry_eyedist "eyedist.display"
+
+                view_transl_x 0.00
+                view_transl_y 0.00
+                view_scale_x 1.00
+                view_scale_y 1.00
+                view_depth_start 0.01
+                view_depth_end 0.99
+
+                // Use orthogonal projection.
+                proj_ortho 0
+                // View frustum extension.
+                // These values are plane slopes in case of a persepctive
+                // projection, and coordinates otherwise.
+                // If all set to zero, read from cfguration file instead.
+                proj_open_x 0.0
+                proj_open_y 0.0
+                proj_center_x 0.0
+                proj_center_y 0.0
+                // Clipping plane coordinates.
+                proj_neg_z 0.05
+                proj_pos_z 1000.0
+                // Fog:
+                fog_color 0.5 0.5 0.5
+                //fog_density 0.02
+
+                destprop_antialias 1
+                clear_must_coloralpha 1
+                clear_color 0.0 0.0 0.0
+
+                enum_trigger "main_trigger"
+            }
+        }
+        {
+            ident "kit_special.raycast"
+            param
+            {
+                name "raycast_cursor"
+            }
+        }
+        {
+            ident "kit_special.cursor"
+            param
+            {
+                name "cursor"
+                proj_src "gfxport_world"
+                proj_cmd "get_proj"
+                transf_src "gfxport_world"
+                transf_cmd "get_transf"
+                raycast_actor "raycast_cursor"
+                raycast_cmd "perform_raycast"
+                ray_start_z -1.0
+                ray_end_z 1.0
+
+                extcfg_actor "^^^cfg"
+                extcfg_entry_param "gfxeng"
+                extcfg_entry_insp_stat_enabled "insp.cursor"
+                inspcollect "^^inspcollect"
+            }
+        }
+        {
+            ident "kit_engbase.gfxport"
+            param
+            {
+                name "gfxport_display"
+                
+                active 1
+                
+                gfxout "gfxout"
+                gfxctx "gfxctx"
+                next "gfxport_world"
+                couple 0
+
+                state_actor "^^display"
+                state_cmd "get_display_state"
+                
+                gfxstat "gfxstat"
+                
+                extcfg_actor "^^^cfg"
+                extcfg_entry_proj "proj_display"
+                extcfg_entry_param "gfxport"
+                //extcfg_entry_eyedist "eyedist.display"
+
+                view_transl_x 0.00
+                view_transl_y 0.00
+                view_scale_x 1.00
+                view_scale_y 1.00
+                view_depth_start 0.00
+                view_depth_end 0.01
+
+                proj_ortho 1
+                proj_open_x 0.0
+                proj_open_y 0.0
+                proj_center_x 0.0
+                proj_center_y 0.0
+                proj_neg_z -1.0
+                proj_pos_z 1.0
+
+                fog_color 0.5 0.5 0.5
+                //fog_density 0.02
+
+                destprop_antialias 1
+                clear_must_coloralpha 1
+                clear_color 0.0 0.0 0.0
+
+                enum_trigger "main_trigger"
+            }
+        }
+        {
+            ident "kit_engbase.inspperform"
+            param
+            {
+                name "inspperform_sim_world"
+                inspcollect "^^inspcollect"
+                gfxport "gfxport_world"
+                obj ""
+            }
+        }
+        {
+            ident "kit_engbase.inspperform"
+            param
+            {
+                name "inspperform_noise_world"
+                inspcollect "^^inspcollect"
+                gfxport "gfxport_world"
+                obj ""
+            }
+        }
+        {
+            ident "kit_engbase.inspperform"
+            param
+            {
+                name "inspperform_sensorstate_world"
+                inspcollect "^^inspcollect"
+                gfxport "gfxport_world"
+                obj ""
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showgfxbound_sky"
+                target "gfxport_sky"
+                cmd "toggle_mode_flag"
+                param "showbound"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showgfxbound_world"
+                target "gfxport_world"
+                cmd "toggle_mode_flag"
+                param "showbound"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showgfxbound_display"
+                target "gfxport_display"
+                cmd "toggle_mode_flag"
+                param "showbound"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showgfxmesh_sky"
+                target "gfxport_sky"
+                cmd "toggle_mode_flag"
+                param "showmesh"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showgfxmesh_world"
+                target "gfxport_world"
+                cmd "toggle_mode_flag"
+                param "showmesh"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showgfxmesh_display"
+                target "gfxport_display"
+                cmd "toggle_mode_flag"
+                param "showmesh"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showgfxwire_sky"
+                target "gfxport_sky"
+                cmd "toggle_mode_flag"
+                param "showwire"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showgfxwire_world"
+                target "gfxport_world"
+                cmd "toggle_mode_flag"
+                param "showwire"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showgfxwire_display"
+                target "gfxport_display"
+                cmd "toggle_mode_flag"
+                param "showwire"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showgfxocclmesh_sky"
+                target "gfxport_sky"
+                cmd "toggle_mode_flag"
+                param "showocclmesh"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showgfxocclmesh_world"
+                target "gfxport_world"
+                cmd "toggle_mode_flag"
+                param "showocclmesh"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showgfxocclmesh_display"
+                target "gfxport_display"
+                cmd "toggle_mode_flag"
+                param "showocclmesh"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showgfxocclwire_sky"
+                target "gfxport_sky"
+                cmd "toggle_mode_flag"
+                param "showocclwire"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showgfxocclwire_world"
+                target "gfxport_world"
+                cmd "toggle_mode_flag"
+                param "showocclwire"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showgfxocclwire_display"
+                target "gfxport_display"
+                cmd "toggle_mode_flag"
+                param "showocclwire"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showphysbound"
+                target "gfxport_world"
+                cmd "toggle_mode_flag"
+                param "showphysbound"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showphysgeo"
+                target "gfxport_world"
+                cmd "toggle_mode_flag"
+                param "showphysgeo"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showphyscontact"
+                target "gfxport_world"
+                cmd "toggle_mode_flag"
+                param "showphyscontact"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_shownoise"
+                target "gfxport_world"
+                cmd "toggle_mode_flag"
+                param "shownoise"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showsensorbound"
+                target "gfxport_world"
+                cmd "toggle_mode_flag"
+                param "showsensorbound"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_showsensorgeo"
+                target "gfxport_world"
+                cmd "toggle_mode_flag"
+                param "showsensorgeo"
+            }
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/client/actor/snd.s3d_actor_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/client/actor/snd.s3d_actor_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/client/actor/snd.s3d_actor_run	(revision 2453)
@@ -0,0 +1,188 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Definition of the snd output.
+// This includes the snd engine object and the sndport.
+
+// The client root actor is a capsule, defining an own local namespace.
+actor_ident "kit_base.capsule"
+actor_param
+{
+    // Delegate the action calls to all children:
+    active 1
+    // Scope name for reporting errors:
+    scope "snd"
+    // Name of the capsule actor within its own namespace.
+    // Actors within the capsule can access the capsule 
+    // actor itself by this name.
+    local_name "capsule"
+    // Delegate events from outside:
+    deleg_target "dispatch_export"
+    // The capsule actor contains a group of actors:
+    child_ident "kit_base.group"
+    child_param
+    {
+        // Delegate action calls to the children.
+        active 1
+        child_array
+        {
+            // Dispatcher for commands from outside the capsule.
+            ident "kit_base.dispatch"
+            param
+            {
+                name "dispatch_export"
+                entry_array
+                {
+                    cmds "set_sndmgr_level"
+                    targets "sndsect_level"
+                    newcmd "assign_sndmgr"
+                }
+                {
+                    cmds "set_state_display"
+                    targets "sndport_display"
+                    newcmd "assign_state"
+                }
+                {
+                    cmds "set_state_world"
+                    targets "sndport_world"
+                    newcmd "assign_state"
+                }
+                {
+                    cmds "set_state_sky"
+                    targets "sndport_sky"
+                    newcmd "assign_state"
+                }
+                {
+                    // Update camera transformation of world:
+                    cmds "set_camera_efftransf"
+                    targets 
+                        "sndport_world"
+                    newcmd "set_transf"
+                }
+                {
+                    cmds "suspend"
+                    targets
+                }
+                {
+                    cmds "update"
+                    targets "sndport_display"
+                    newcmd "perform"
+                }
+            }
+        }
+        {
+            // Snd engine.
+            ident "kit_io.sndeng"
+            param
+            {
+                name "sndeng"
+                active 1
+                extcfg_actor "^^^cfg"
+                extcfg_entry_param "snd"
+                given_array
+                {
+                    item "^ctx"
+                    given_ident "ctx"
+                }
+            }
+        }
+        {
+            // 3D graphics engine:
+            ident "kit_engbase.sndctx"
+            param
+            {
+                name "sndctx"
+                sndeng "sndeng"
+            }
+        }
+        {
+            // 3D graphics engine:
+            ident "kit_engbase.sndsect"
+            param
+            {
+                name "sndsect_display"
+                sndctx "sndctx"
+                sndmgr_actor "^^display"
+                sndmgr_cmd "get_display_sndmgr"
+            }
+        }
+        {
+            // 3D graphics engine:
+            ident "kit_engbase.sndsect"
+            param
+            {
+                name "sndsect_level"
+                sndctx "sndctx"
+                sndmgr_actor ""
+                sndmgr_cmd ""
+            }
+        }
+        {
+            // Sndport for sky:
+            ident "kit_engbase.sndport"
+            param
+            {
+                active 1
+                name "sndport_sky"
+                sndctx "sndctx"
+                next ""
+                couple 0
+            }
+        }
+        {
+            // Sndport for world:
+            ident "kit_engbase.sndport"
+            param
+            {
+                active 1
+                name "sndport_world"
+                sndctx "sndctx"
+                next "sndport_sky"
+                couple 1
+            }
+        }
+        {
+            // Sndport for display:
+            ident "kit_engbase.sndport"
+            param
+            {
+                active 1
+                name "sndport_display"
+                sndctx "sndctx"
+                next "sndport_world"
+                couple 0
+                state_actor "^^display"
+                state_cmd "get_display_state"
+            }
+        }
+        
+        /*{
+            // CD Player:
+            ident "kit_special.s3d_actorplayer"
+            param
+            {
+                name "cdplayer"
+                stop_on_destruct 1
+            }
+        }*/
+        /*{
+            // Start the first track of the CD on startup.
+            ident "kit_base.oninit"
+            param
+            {
+                target "cdplayer"
+                cmd "play_track_one"
+            }
+        }*/
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/client/actor/display.s3d_actor_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/client/actor/display.s3d_actor_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/client/actor/display.s3d_actor_run	(revision 2453)
@@ -0,0 +1,200 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Client-side display.
+// The display is a 3D state completely managed on client side
+// to display informations like health points or the inventory.
+
+// The client root actor is a capsule, defining an own local namespace.
+actor_ident "kit_base.capsule"
+actor_param
+{
+    // Delegate the action calls to all children:
+    active 1
+    // Scope name for reporting errors.
+    scope "display"
+    // Name of the capsule actor within its own namespace.
+    // Actors within the capsule can access the capsule
+    // actor itself by this name.
+    local_name "capsule"
+    // Delegate events from outside to.
+    deleg_target "dispatch_export"
+    // The capsule actor encapsulates a group of actors:
+    child_ident "kit_base.group"
+    child_param
+    {
+        // Delegate action calls to the children.
+        active 1
+        child_array
+        {
+            // Central command dispatch actor.
+            // This dispatcher is used internally within the client.
+            ident "kit_base.dispatch"
+            param
+            {
+                name "dispatch_export"
+                entry_array
+                {
+                    cmds "get_display_gfxmgr"
+                    targets "gfxmgr"
+                    newcmd "get_obj"
+                }
+                {
+                    cmds "get_display_sndmgr"
+                    targets "sndmgr"
+                    newcmd "get_obj"
+                }
+                {
+                    cmds "get_display_state"
+                    targets "display_state"
+                    newcmd "get_obj"
+                }
+                {
+                    cmds "enable_notice_loading"
+                    targets "loading_pos"
+                    newcmd "enable_pos"
+                }
+                {
+                    cmds "disable_notice_loading"
+                    targets "loading_pos"
+                    newcmd "disable_pos"
+                }
+                {
+                    cmds "notice_saving_enable"
+                    targets "saving_pos"
+                    newcmd "enable_pos"
+                }
+                {
+                    cmds "notice_saving_disable"
+                    targets "saving_pos"
+                    newcmd "disable_pos"
+                }
+            }
+        }
+        {
+            ident "kit_base.deleg"
+            param
+            {
+                name ""
+                deleg_name "env"
+                deleg_target "^^env"
+                allow_no_target 0
+                enabled 1
+            }
+        }
+        {
+            ident "kit_base.deleg"
+            param
+            {
+                name ""
+                deleg_name "perchmgr"
+                deleg_target "^perchmgr"
+                allow_no_target 0
+                enabled 1
+            }
+        }
+        {
+            ident "kit_engbase.gfxmgr"
+            param
+            {
+                name "gfxmgr"
+                ident "eng_base.gfxmgr"
+            }
+        }
+        {
+            ident "kit_base.obj"
+            param
+            {
+                name "gfxsuppl"
+                obj_suppl "^^envcompsuppl"
+                obj_ident "eng_base.gfxsuppl"
+                obj_param
+                {
+                    env "^^env" 
+                    child_suppl "^^basesuppl"
+                
+                }
+            }
+        }
+        {
+            ident "kit_engbase.gfxassign"
+            param
+            {
+                obj "gfxsuppl"
+                gfxmgr "gfxmgr"
+            }
+        }
+        {
+            ident "kit_engbase.sndmgr"
+            param
+            {
+                name "sndmgr"
+                ident "eng_base.sndmgr"
+            }
+        }
+        {
+            ident "kit_base.obj"
+            param
+            {
+                name "stdsuppl"
+                obj_suppl "^^envcompsuppl"
+                obj_ident "eng_base.sndsuppl"
+                obj_param
+                {
+                    env "^^env" 
+                    child_suppl "gfxsuppl"
+                }
+            }
+        }
+        {
+            ident "kit_engbase.sndassign"
+            param
+            {
+                obj "stdsuppl"
+                sndmgr "sndmgr"
+            }
+        }
+        {
+            ident "kit_engbase.clock"
+            param
+            {
+                active 1
+                name "clock"
+                clock_suppl "stdsuppl"
+                clock_ident "clock:"
+            }
+        }
+        {
+            ident "kit_engbase.state"
+            param
+            {
+                name "display_state"
+                obj_suppl "stdsuppl"
+                obj_ident "state:"
+            }
+        }
+        {
+            // Load the display 3d data:
+            ident "kit_base.extern"
+            param
+            {
+                // Delegate action calls to the child:
+                name "displaystate_extern"
+                res "client/actor/displayworld.s3d_actor_run"
+                watch_target "displaystate_extern"
+                watch_cmd "load_current"
+                active 1
+            }
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/client/actor/motion.s3d_actor_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/client/actor/motion.s3d_actor_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/client/actor/motion.s3d_actor_run	(revision 2453)
@@ -0,0 +1,84 @@
+// Automatically generated Shark 3D Snake 1x0 Text Stream. Format: ascii.
+actor_ident "kit_base.capsule"
+actor_param
+{
+    active 1
+    scope "motion"
+    local_name "capsule"
+    deleg_target "dispatch_export"
+    child_ident "kit_base.group"
+    child_param
+    {
+        // Delegate action calls to the children.
+        active 1
+        child_array
+        {
+            ident "kit_base.dispatch"
+            param
+            {
+                name "dispatch_export"
+                entry_array
+                {
+                    cmds "update_motion"
+                    targets "motioninput"
+                    newcmd "update"
+                }
+                {
+                    cmds 
+                        "apply_move_pos_x" "apply_move_neg_x" 
+                        "apply_move_pos_y" "apply_move_neg_y" 
+                        "apply_move_pos_z" "apply_move_neg_z"
+                        "assign_vel_pos_x" "assign_vel_neg_x" 
+                        "assign_vel_pos_y" "assign_vel_neg_y" 
+                        "assign_vel_pos_z" "assign_vel_neg_z"
+                        "switch_vel_pos_x" "switch_vel_neg_x" 
+                        "switch_vel_pos_y" "switch_vel_neg_y" 
+                        "switch_vel_pos_z" "switch_vel_neg_z"
+                        "apply_rot_pos_x" "apply_rot_neg_x" 
+                        "apply_rot_pos_y" "apply_rot_neg_y" 
+                        "apply_rot_pos_z" "apply_rot_neg_z"
+                        "assign_spin_pos_x" "assign_spin_neg_x" 
+                        "assign_spin_pos_y" "assign_spin_neg_y" 
+                        "assign_spin_pos_z" "assign_spin_neg_z"
+                        "switch_spin_pos_x" "switch_spin_neg_x" 
+                        "switch_spin_pos_y" "switch_spin_neg_y" 
+                        "switch_spin_pos_z" "switch_spin_neg_z"
+                    targets "motioninput"
+                }
+            }
+        }
+        {
+            ident "kit_engobj.motioninput"
+            param
+            {
+                active 1
+                name "motioninput"
+                motion_target "^universeplayer"
+                motion_cmd "add_motion"
+                move_scale_x 12.
+                move_scale_y 12.
+                move_scale_z 12.
+                vel_scale_x 12.
+                vel_scale_y -12.
+                vel_scale_z 12.
+                vel_speed_x 12.
+                vel_speed_y 12.
+                vel_speed_z 12.
+                rot_scale_x -0.5
+                rot_scale_y 1.0
+                rot_scale_z -1.0
+                spin_scale_x -4.
+                spin_scale_y 4.
+                spin_scale_z -4.
+                spin_speed_x -2.
+                spin_speed_y 2.
+                spin_speed_z -2.
+                extcfg_actor "^^cfg"
+                extcfg_entry_smooth_move "input.smooth_move"
+                extcfg_entry_smooth_rot "input.smooth_rot"
+                extcfg_entry_deadzone "input.deadzone"
+            }
+        }
+    }
+}
+$
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/client/actor/io.s3d_actor_run
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/client/actor/io.s3d_actor_run	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/bin/res/client/actor/io.s3d_actor_run	(revision 2453)
@@ -0,0 +1,243 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Definition of the input and output.
+
+// The client root actor is a capsule, defining an own local namespace.
+actor_ident "kit_base.capsule"
+actor_param
+{
+    // Delegate the action calls to all children:
+    active 1
+    // Scope name. Used in error messages.
+    scope "io"
+    // Name of the capsule actor within its own namespace.
+    // Actors within the capsule can access the capsule
+    // actor itself by this name.
+    local_name "capsule"
+    // Delegate commands from outside to the correct dispatcher.
+    deleg_target "dispatch_export"
+    // The capsule actor contains a group of actors:
+    child_ident "kit_base.group"
+    child_param
+    {
+        // Delegate action calls to the children.
+        active 1
+        child_array
+        {
+            // Dispatcher for commands from outside the client capsule.
+            ident "kit_base.dispatch"
+            param
+            {
+                name "dispatch_export"
+                entry_array
+                {
+                    cmds "set_sndmgr_level"
+                        "set_state_world" "set_state_sky" 
+                    targets "snd"
+                }
+                {
+                    // Assign a 3D state image.
+                    cmds "set_camera_transf"
+                    targets "extratransf"
+                    newcmd "set_transf"
+                }
+                {
+                    // Commands for gfx:
+                    cmds "set_gfxmgr_level"
+                        "set_state_world" "set_state_sky" 
+                        "set_sim_world" 
+                        "set_noise_world" 
+                        "set_sensorstate_world"
+                        "set_cursor_x" "set_cursor_y"
+                        "move_cursor_x" "move_cursor_y"
+                        "toggle_showgfxbound" 
+                        "toggle_showgfxmesh" "toggle_showgfxwire" 
+                        "toggle_showgfxocclmesh" "toggle_showgfxocclwire"
+                        "toggle_showphysbound" "toggle_showphysgeo"
+                        "toggle_showphyscontact"
+                        "toggle_shownoise"
+                        "toggle_showsensorgeo" 
+                        "toggle_showsensorbound"
+                        "store_screenshot"
+                        "reset_msg"
+                        "toggle_frmtime" "toggle_stat" "reset_stat"
+                        "toggle_fullscreen"
+                        "set_playerbody"
+                    targets "gfx"
+                }
+                {
+                    cmds "toggle_catch_mouse"
+                    targets "toggle_catch_mouse"
+                    newcmd "perform"
+                }
+                
+                // Update output:
+                {
+                    // Render the gfxports:
+                    cmds "perform_output"
+                    targets "gfx"
+                    newcmd "paint"
+                }
+                {
+                    // Update snd:
+                    cmds "perform_output"
+                    targets "snd"
+                    newcmd "update"
+                }
+                {
+                    // Update snd:
+                    cmds "suspend_output"
+                    targets "snd"
+                    newcmd "suspend"
+                }
+
+                // Update input:
+                {
+                    cmds "perform_input"
+                    targets "input"
+                    newcmd "update"
+                }
+            }
+        }
+        {
+            // Dispatcher for commands from outside the client capsule.
+            ident "kit_base.dispatch"
+            param
+            {
+                name "dispatch"
+                entry_array
+                {
+                    // Assign a 3D state image.
+                    cmds "set_camera_efftransf"
+                    targets "gfx" "snd"
+                }
+                {
+                    cmds "input_dev_found"
+                    targets "inputcfg"
+                    newcmd "configure_dev"
+                }
+                {
+                    cmds "input_dev_lost"
+                    targets
+                }
+            }
+        }
+        {
+            ident "kit_engbase.extratransf"
+            param
+            {
+                name "extratransf"
+                transf_target "dispatch"
+                transf_cmd "set_camera_efftransf"
+                extcfg_actor "^^cfg"
+                extcfg_entry_extratransf "client.extratransf"
+            }
+        }
+        {
+            // Create the context object.
+            // The context is the glue managing input and output.
+            // Other IO-actors like input or gfx refer this context actor:
+            ident "kit_io.ctx"
+            param
+            {
+                name "ctx"
+                active 1
+                src_actor "^^root"
+                src_cmd "get_ctx"
+                extcfg_actor "^^cfg"
+                extcfg_entry_param "context"
+                given_array
+                {
+                    item "^^env"
+                    given_ident "env"
+                }
+            }
+        }
+        {
+            // Include the graphics output definitions.
+            ident "kit_base.extern"
+            param
+            {
+                // Delegate action calls to the child:
+                deleg_name "gfx"
+                res "client/actor/gfx.s3d_actor_run"
+                watch_target "^io_extern"
+                watch_cmd "load_current"
+                active 1
+            }
+        }
+        {
+            ident "kit_base.extern"
+            param
+            {
+                // Delegate action calls to the child:
+                deleg_name "snd"
+                res "client/actor/snd.s3d_actor_run"
+                watch_target "^io_extern"
+                watch_cmd "load_current"
+                active 1
+            }
+        }
+        {
+            // Input actor.
+            ident "kit_io.input"
+            param
+            {
+                name "input"
+                ctx "ctx"
+                extcfg_actor "^^cfg"
+                extcfg_entry "input.mgr"
+                found_target "dispatch"
+                found_cmd "input_dev_found"
+                lost_target "dispatch"
+                lost_cmd "input_dev_lost"
+                char_target "^dispatch_input"
+                char_cmd "handle_char"
+                given_array
+                {
+                    item "^^env"
+                    given_ident "env"
+                }
+                {
+                    item "ctx"
+                    given_ident "ctx"
+                }
+            }
+        }
+        {
+            // Simple default input configuration.
+            // This actor sends input configuration commands
+            // to the input actor.
+            ident "kit_io.inputcfg"
+            param
+            {
+                name "inputcfg"
+                input "input"               // The input actor to cfgurate.
+                target "^dispatch_input"    // Target of input commands.
+                extcfg_actor "^^cfg"
+                extcfg_entry_mapping "input.mapping"
+            }
+        }
+        {
+            ident "kit_base.paramstr"
+            param
+            {
+                name "toggle_catch_mouse"
+                target "input"
+                cmd "userfunc_all"
+                param "toggle_catch_mouse"
+            }
+        }
+    }
+}
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_max_toolbox.cfg
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_max_toolbox.cfg	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_max_toolbox.cfg	(revision 2453)
@@ -0,0 +1,21 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+app_run "win32_run.bat"
+app_make "win32_res_make.bat"
+app_maketarget "win32_res_maketarget.bat [target]"
+app_clear "win32_res_clear.bat"
+view_cfg "win32_run.cfg"
+// Export dir relative to the max file, e.g. "shark3d_export":
+export_dir ""   
+
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_max_expbutton.cfg
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_max_expbutton.cfg	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_max_expbutton.cfg	(revision 2453)
@@ -0,0 +1,14 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//      ##  ######
+//       ######  ###
+//  ## ###############        Shark 3D Engine (www.shark3d.com)
+//   ########## # # #
+//    ########                Copyright (c) 1996-2006 Spinor GmbH.
+//   ######### # # #          All rights reserved.
+//  ##   ##########
+//      ##
+//
+///////////////////////////////////////////////////////////////////////////////
+
+export_dir ""
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_editor.bat
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_editor.bat	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_editor.bat	(revision 2453)
@@ -0,0 +1,13 @@
+@echo off
+setlocal
+call win32_env.bat
+
+set EDITOR_WIDTH=0
+set EDITOR_HEIGHT=0
+
+SET BINDIR=%S3D_SDKDIR%\bin\win32_vc7x1\%S3D_TOOLCFG%
+set EDITOR_CMD="%BINDIR%\shark3d_gui_app.exe" 
+set EDITOR_CMD=%EDITOR_CMD% win32_editor.cfg
+set EDITOR_CMD=%EDITOR_CMD% -startuptree src/res/
+set EDITOR_CMD=%EDITOR_CMD% -width %EDITOR_WIDTH% -height %EDITOR_HEIGHT%
+start "Shark 3D Editor" %EDITOR_CMD%
Index: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_res_make.bat
===================================================================
--- GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_res_make.bat	(revision 2453)
+++ GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/CleanTheLab/win32_res_make.bat	(revision 2453)
@@ -0,0 +1,7 @@
+@echo off
+setlocal
+call win32_env.bat
+
+set PARAM=-f "%S3D_SDKDIR%\utility\buildres\project_win32.s3d_scons" bin\res
+scons %PARAM%
+@if errorlevel 1 echo shark3d_error
