Changeset 2458 for GTP


Ignore:
Timestamp:
06/24/07 10:58:31 (17 years ago)
Author:
szirmay
Message:
 
Location:
GTP/trunk/App/Demos/Illum/Ogre/Media
Files:
20 added
13 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/FPSArm_PS.hlsl

    r2417 r2458  
    1010uniform sampler2D bumpMap : register(s1); 
    1111 
    12 uniform float4 lightRange; 
    13 uniform float lightPower; 
    14 uniform float4 lightColor; 
     12uniform float4 lightRange1; 
     13uniform float lightPower1; 
     14uniform float4 lightColor1; 
     15 
     16uniform float4 lightRange2; 
     17uniform float lightPower2; 
     18uniform float4 lightColor2; 
    1519 
    1620uniform float specularity; 
     
    2731        float3 normal:TEXCOORD3; 
    2832        float3 V: TEXCOORD4; 
    29         float3 L: TEXCOORD5; 
     33        float3 L1: TEXCOORD5; 
     34        float3 L2: TEXCOORD6; 
    3035}; 
    3136 
     
    3641        float dist = length(IN.V); 
    3742        float3 V = IN.V /dist; 
    38         float3 L = IN.L; 
     43        float3 L1 = IN.L1; 
     44        float3 L2 = IN.L2; 
    3945         
    4046        float4 diffuseColor = albedo * tex2D(colorTexture, IN.texCoord); 
    4147         
    42         Color = Illumination(N, L, V, lightColor * lightPower, lightRange, diffuseColor, specularity, specularColor); 
     48        if(lightPower1 !=0) 
     49        Color = Illumination(N, L1, V, lightColor1 * lightPower1, lightRange1, diffuseColor, specularity, specularColor); 
     50         
     51        if(lightPower2 !=0) 
     52        Color = Illumination(N, L2, V, lightColor2 * lightPower2, lightRange2, diffuseColor, specularity, specularColor); 
    4353         
    4454        float4 ret = Color; 
  • GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/FPSarm.material

    r2422 r2458  
    1919   source FPSArm_PS.hlsl 
    2020   entry_point FPSArm_PS 
    21    target ps_2_0 
     21   target ps_3_0 
    2222} 
    2323 
     
    8181                            param_named_auto worldMatrix3x4Array[0] world_matrix_array_3x4 
    8282                            param_named_auto viewProjectionMatrix viewproj_matrix 
    83                             param_named_auto lightPos light_position 0 
     83                            param_named_auto lightPos1 light_position 0 
     84                            param_named_auto lightPos2 light_position 1 
    8485                            param_named_auto cameraPos camera_position           
    8586                        } 
    8687                        fragment_program_ref FPSArm_PS  
    8788                        { 
    88                             param_named_auto lightRange light_attenuation 0 
    89                             param_named_auto lightPower light_power 0 
    90                             param_named_auto lightColor light_diffuse_colour 0 
     89                            param_named_auto lightRange1 light_attenuation 0 
     90                            param_named_auto lightPower1 light_power 0 
     91                            param_named_auto lightColor1 light_diffuse_colour 0 
     92                             param_named_auto lightRange2 light_attenuation 1 
     93                            param_named_auto lightPower2 light_power 1 
     94                            param_named_auto lightColor2 light_diffuse_colour 1 
    9195                            param_named specularity float 100 
    9296                            param_named albedo float 0.1 
  • GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/GTPMoriaPostProc.material

    r2442 r2458  
    8181                        param_named focalDist  float 2.0  
    8282                        param_named focalRange float 0.02 
    83                         param_named maxCoC     float 15 
     83                        param_named maxCoC     float 10 
    8484                 
    8585        } 
  • GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/MoriaHallBase.hlsl

    r2442 r2458  
    2828uniform float lightPower2; 
    2929uniform float4 lightColor1; 
    30 uniform float4 lightColor2; 
     30float4 lightColor2 = 0; 
    3131                                                 
    3232uniform float4x4 LightView1; 
     
    100100float shadow; 
    101101 
    102 //if(dot(lightColor1, lightColor1) != 0) 
    103 //{ 
     102if( dot(lightRange1, lightRange1) != 0) 
     103{ 
    104104        L = wLightPos1.xyz - IN.wPos * wLightPos1.w; 
    105105        //illumination 
     
    112112         
    113113        //Color = col; 
    114 //} 
     114} 
    115115 
    116116//---------------------------------------------------------------------------------------------------------------- 
    117117//light2                         
    118 /*if(dot(lightColor2, lightColor2) != 0) 
     118if( dot(lightRange2, lightRange2) != 0 ) 
    119119{ 
    120120        //light dir 
     
    126126        shadow = shadowPoint(ShadowMap2Point, lightCPos, lightFarPlane2); 
    127127        Color += col * shadow;   
    128 }*/ 
     128} 
    129129         
    130130        //do Path Map to gather indirect illumination 
  • GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/SkinningVS.cg

    r2422 r2458  
    1313        out float3 oNormal   : TEXCOORD3, 
    1414        out float3 V: TEXCOORD4, 
    15         out float3 L: TEXCOORD5, 
     15        out float3 L1: TEXCOORD5, 
     16        out float3 L2: TEXCOORD6, 
    1617        uniform float3x4   worldMatrix3x4Array[69], 
    1718        uniform float4x4 viewProjectionMatrix, 
    18         uniform float4   lightPos, 
     19        uniform float4   lightPos1, 
     20        uniform float4   lightPos2, 
    1921        uniform float4   cameraPos) 
    2022{ 
     
    3436//      oBinormal = cross(oTangent, oNormal); 
    3537        // Lighting - support point and directional 
    36         L =  lightPos.xyz - blendPos.xyz * lightPos.w; 
     38        L1 =  lightPos1.xyz - blendPos.xyz * lightPos1.w; 
     39        L2 =  lightPos2.xyz - blendPos.xyz * lightPos2.w; 
    3740        V =  cameraPos.xyz - blendPos.xyz; 
    3841         
     
    6972        float3 normal:TEXCOORD3; 
    7073        float3 V: TEXCOORD4; 
    71         float3 L: TEXCOORD5; 
     74        float3 L1: TEXCOORD5; 
     75        float3 L2: TEXCOORD6; 
    7276}; 
    7377 
     
    8185                        uniform float4x4 viewMatrix, 
    8286                        uniform float4x4 viewProjectionMatrix, 
    83                         uniform float4   lightPos, 
     87                        uniform float4   lightPos1, 
     88                        uniform float4   lightPos2, 
    8489                        uniform float4   cameraPos) 
    8590{ 
     
    101106        OUT.binormal = cross(OUT.tangent, OUT.normal); 
    102107        // Lighting - support point and directional 
    103         OUT.L =  lightPos.xyz - blendPos.xyz * lightPos.w; 
     108        OUT.L1 =  lightPos1.xyz - blendPos.xyz * lightPos1.w; 
     109        OUT.L2 =  lightPos2.xyz - blendPos.xyz * lightPos2.w; 
    104110        OUT.V =  cameraPos.xyz - blendPos.xyz; 
    105111         
  • GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/illum.hlsl

    r2442 r2458  
    11#define SPOT_ANGLE 2.093 
    22#define SPOT_FALLOFF 1 
    3 #define SHADOW_COLOR float4(0.0,0.0,0.0,1.0) 
    4 #define SHADOW_BIAS_POINT 0.0001 
    5 #define SHADOW_EPSILON_POINT 0.0001 
     3#define SHADOW_COLOR float4(0.2,0.2,0.2,1.0) 
     4#define SHADOW_BIAS_POINT 0.001 
     5#define SHADOW_EPSILON_POINT 0.0000005 
    66 
    77float4 Illumination(float3 N, float3 L, float3 V, float4 lightColor, float4 lightRange, float4 diffuseColor, float specularity, float4 specularColor) 
  • GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/moria.level

    r2389 r2458  
    8888        pathmapresolution 16 
    8989        divide 1 
    90         physXShape cube 2 10 2 
     90        physXShape cube 3 12 3 
    9191        physXStatic true 
     92        //physXMass 10000 
     93        //physXKinematic true 
    9294} 
    9395mesh MoriaWallShape 
  • GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/moria.material

    r2442 r2458  
    2424                                //{ 
    2525                                        //pass_blending one one 
    26                                 //      new_passes false 
     26                            //  new_passes false 
    2727                                //      start_tex_id 3 
    2828                                //}      
     
    3333                                RenderTechnique DepthShadowReceiver 
    3434                                { 
    35                                         max_light_count 1 
     35                                        max_light_count 2 
    3636                                        set_light_viewproj false 
    3737                                        set_light_view true 
     
    272272} 
    273273 
     274material GTP/Moria/Crosshair 
     275{ 
     276        technique 
     277        { 
     278         pass 
     279         { 
     280          scene_blend one one_minus_src_colour 
     281          cull_hardware none 
     282          depth_test off 
     283          depth_write off 
     284          lighting off 
     285          texture_unit 
     286          { 
     287            texture crosshair.jpg 
     288            colour_op replace 
     289          } 
     290         } 
     291        } 
     292} 
     293 
     294material GTP/Moria/Border 
     295{ 
     296        technique 
     297        { 
     298         pass 
     299         { 
     300         scene_blend one one_minus_src_colour 
     301          cull_hardware none 
     302          depth_test off 
     303          depth_write off 
     304          lighting off 
     305          texture_unit 
     306          { 
     307            texture border.jpg 
     308            colour_op replace 
     309          } 
     310         } 
     311        } 
     312} 
     313 
     314material GTP/Moria/HUD/Column 
     315{ 
     316        technique t1 
     317        { 
     318         pass p1 
     319         { 
     320//        scene_blend one one_minus_src_colour 
     321          cull_hardware none 
     322          depth_test off 
     323          depth_write off 
     324          lighting off 
     325           
     326         } 
     327        } 
     328} 
     329 
     330material GTP/Moria/HUD/BlueColumn : GTP/Moria/HUD/Column 
     331{ 
     332        technique t1 
     333        { 
     334         pass p1 
     335         { 
     336          texture_unit 
     337          { 
     338            texture blue.jpg 
     339            colour_op replace 
     340          } 
     341         } 
     342        } 
     343} 
     344 
     345material GTP/Moria/HUD/RedColumn : GTP/Moria/HUD/Column 
     346{ 
     347        technique t1 
     348        { 
     349         pass p1 
     350         { 
     351          texture_unit 
     352          { 
     353            texture red.jpg 
     354            colour_op replace 
     355          } 
     356         } 
     357        } 
     358} 
     359 
     360material GTP/Moria/HUD/YellowColumn : GTP/Moria/HUD/Column 
     361{ 
     362        technique t1 
     363        { 
     364         pass p1 
     365         { 
     366          texture_unit 
     367          { 
     368            texture yellow.jpg 
     369            colour_op replace 
     370            tex_address_mode clamp 
     371          } 
     372         } 
     373        } 
     374} 
     375 
     376material GTP/Moria/HUD/SwordIcon : GTP/Moria/HUD/Column 
     377{ 
     378        technique t1 
     379        { 
     380         pass p1 
     381         { 
     382          texture_unit 
     383          { 
     384            texture swordicon.jpg 
     385            colour_op replace 
     386            tex_address_mode clamp 
     387          } 
     388         } 
     389        } 
     390} 
     391 
     392material GTP/Moria/HUD/FireBallIcon : GTP/Moria/HUD/Column 
     393{ 
     394        technique t1 
     395        { 
     396         pass p1 
     397         { 
     398          texture_unit 
     399          { 
     400            texture fireballicon.jpg 
     401            colour_op replace 
     402            tex_address_mode clamp 
     403          } 
     404         } 
     405        } 
     406} 
  • GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/troll.material

    r2417 r2458  
    1919   source trollps.hlsl 
    2020   entry_point Troll_PS 
    21    target ps_2_0 
     21   target ps_3_0 
    2222} 
    2323 
     
    8181                                param_named_auto worldMatrix3x4Array[0] world_matrix_array_3x4 
    8282                                param_named_auto viewProjectionMatrix viewproj_matrix 
    83                                 param_named_auto lightPos light_position 0 
     83                                param_named_auto lightPos1 light_position 0 
     84                                param_named_auto lightPos2 light_position 1 
    8485                                param_named_auto cameraPos camera_position               
    8586                        } 
    8687                        fragment_program_ref TrollPS 
    8788                        { 
    88                                 param_named_auto lightRange light_attenuation 0 
    89                             param_named_auto lightPower light_power 0 
    90                             param_named_auto lightColor light_diffuse_colour 0 
     89                                param_named_auto lightRange1 light_attenuation 0 
     90                            param_named_auto lightPower1 light_power 0 
     91                            param_named_auto lightColor1 light_diffuse_colour 0 
     92                            param_named_auto lightRange2 light_attenuation 1 
     93                            param_named_auto lightPower2 light_power 1 
     94                            param_named_auto lightColor2 light_diffuse_colour 1 
    9195                            param_named specularity float 200 
    9296                            param_named albedo float 0.1 
     
    150154} 
    151155 
     156vertex_program GTP/Troll/Mace_VS hlsl 
     157{ 
     158   source sword.hlsl 
     159   entry_point Sword_VS 
     160   target vs_2_0 
     161} 
     162fragment_program GTP/Troll/Mace_PS hlsl 
     163{ 
     164   source sword.hlsl 
     165   entry_point Sword_Handle_PS 
     166   target ps_3_0 
     167} 
     168 
     169material TrollMace 
     170{ 
     171        technique 
     172        { 
     173                pass 
     174                { 
     175                        vertex_program_ref GTP/Troll/Mace_VS 
     176                        { 
     177                          param_named_auto WorldViewProj worldviewproj_matrix   
     178                          param_named_auto World world_matrix 
     179                          param_named_auto WorldI inverse_world_matrix 
     180                          param_named_auto wCamPos camera_position 
     181                        } 
     182                        fragment_program_ref GTP/Troll/Mace_PS 
     183                        {  
     184                          param_named_auto wLightPos1 light_position 0 
     185                         // param_named_auto wLightPos2 light_position 1                           
     186                          param_named_auto lightRange1 light_attenuation 0 
     187                         // param_named_auto lightRange2 light_attenuation 1 
     188                          param_named_auto lightPower1 light_power 0 
     189                         // param_named_auto lightPower2 light_power 1 
     190                          param_named_auto lightColor1 light_diffuse_colour 0 
     191                         // param_named_auto lightColor2 light_diffuse_colour 1 
     192                          param_named specularity float 100 
     193                          param_named specularColor float4 0.05 0.05 0.05 0.05                             
     194                        } 
     195                        texture_unit 
     196                        { 
     197                          texture trollmace.jpg 
     198                        }                                                
     199                } 
     200        } 
     201} 
     202 
     203 
  • GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/trollps.hlsl

    r2417 r2458  
    1010uniform sampler2D bumpMap : register(s1); 
    1111 
    12 uniform float4 lightRange; 
    13 uniform float lightPower; 
    14 uniform float4 lightColor; 
     12uniform float4 lightRange1; 
     13uniform float lightPower1; 
     14uniform float4 lightColor1; 
     15 
     16uniform float4 lightRange2; 
     17uniform float lightPower2; 
     18uniform float4 lightColor2; 
    1519 
    1620uniform float specularity; 
     
    2731        float3 normal:TEXCOORD3; 
    2832        float3 V: TEXCOORD4; 
    29         float3 L: TEXCOORD5; 
     33        float3 L1: TEXCOORD5; 
     34        float3 L2: TEXCOORD6; 
    3035}; 
    3136 
     
    3641        float dist = length(IN.V); 
    3742        float3 V = IN.V /dist; 
    38         float3 L = IN.L; 
     43        float3 L1 = IN.L1; 
     44        float3 L2 = IN.L2; 
    3945         
    4046        float4 diffuseColor = albedo * tex2D(colorTexture, IN.texCoord); 
    41          
    42         Color = Illumination(N, L, V, lightColor * lightPower, lightRange, diffuseColor, specularity, specularColor); 
     47        if(lightPower1 != 0) 
     48        Color += Illumination(N, L1, V, lightColor1 * lightPower1, lightRange1, diffuseColor, specularity, specularColor); 
     49        if(lightPower2 != 0) 
     50        Color += Illumination(N, L2, V, lightColor2 * lightPower2, lightRange2, diffuseColor, specularity, specularColor); 
    4351         
    4452        float4 ret =  Color; 
  • GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPPostProc/GTPPostProc.material

    r2414 r2458  
    5757                        param_named_auto width viewport_width    
    5858                param_named_auto height viewport_height  
    59                 param_named_auto alpha frame_time 9.0 
     59                param_named_auto alpha frame_time 1.0 
    6060                 
    6161        } 
Note: See TracChangeset for help on using the changeset viewer.