Changeset 2368


Ignore:
Timestamp:
05/12/07 14:22:06 (17 years ago)
Author:
szirmay
Message:
 
Location:
GTP/trunk/App/Demos/Illum/Ogre/Media
Files:
4 added
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/moria.material

    r2345 r2368  
    1 vertex_program GTP/Demo/BumpMapped_VS hlsl 
    2 { 
    3    source bump.hlsl 
    4    entry_point BaseVS 
     1vertex_program GTP/MoriaDemo/MoriaHallBase_VS hlsl 
     2{ 
     3   source MoriaHallBase.hlsl 
     4   entry_point MoriaHallBase_VS 
    55   target vs_3_0 
    66} 
    77 
    8 fragment_program GTP/Demo/BumpMapped_PS hlsl 
    9 { 
    10    source bump.hlsl 
    11    entry_point BumpPS 
     8fragment_program GTP/MoriaDemo/MoriaHallBase_PS hlsl 
     9{ 
     10   source MoriaHallBase.hlsl 
     11   entry_point MoriaHallBase_PS 
    1212   target ps_3_0 
    1313} 
    1414 
    15 material DetailTexturedBumpBase 
     15material MoriaHallBase 
    1616{ 
    1717 technique maintechnique 
     
    2121                        IllumTechniques 
    2222                        { 
    23                                 RenderTechnique DepthShadowReceiver 
    24                                 { 
    25                                         //pass_blending none 
     23                                //RenderTechnique PathMap 
     24                                //{ 
     25                            //  new_passes false 
     26                                //      start_tex_id 3 
     27                                //}      
     28                                RenderTechnique DepthShadowReceiver 
     29                                { 
    2630                                        max_light_count 1 
    27                                         vertex_program_name GTP/Basic/LightCPos_VS 
    28                                         fragment_program_name GTP/Basic/SM/Dist_POINT_VSM_PS 
    29                                         //fragment_program_name GTP/Basic/SM/Dist_VSM_PS 
     31                                        set_light_viewproj false 
    3032                                        set_light_view true 
    3133                                        set_light_farplane true 
    32                                         light_viewproj_param_name LightViewProj 
    3334                                        light_view_param_name LightView 
    3435                                        light_farplane_param_name lightFarPlane 
    35                                         world_view_proj_param_name WorldViewProj 
    36                                         world_param_name World           
    37                                 } 
    38                                 RenderTechnique PathMap 
    39                                 { 
    40                               pass_blending dest_alpha one 
    41                              //pass_blending none 
    42                              //pass_blending add 
    43                                 }                                
    44                                  
     36                                        new_passes false 
     37                                        start_tex_id 6 
     38                                }                                
    4539                        } 
    46                         vertex_program_ref GTP/Demo/BumpMapped_VS 
     40                        vertex_program_ref GTP/MoriaDemo/MoriaHallBase_VS 
    4741                        { 
    4842                          param_named_auto WorldViewProj worldviewproj_matrix   
    4943                          param_named_auto World world_matrix 
    5044                          param_named_auto WorldI inverse_world_matrix 
    51                           param_named_auto wLightPos light_position 0 
    5245                          param_named_auto wCamPos camera_position 
    5346                          param_named normalCoord float 0 
    5447                        } 
    55                         fragment_program_ref GTP/Demo/BumpMapped_PS 
     48                        fragment_program_ref GTP/MoriaDemo/MoriaHallBase_PS 
    5649                        {  
    5750                          param_named_auto wLightPos light_position 0 
    58                           param_named_auto wLightDir light_direction 0                     
    59                           param_named_auto lightRange light_attenuation 0 
    60                           param_named_auto lightPower light_power 0                                                        
     51                          //param_named_auto wLightPos light_position 1                            
     52                          param_named_auto lightRange light_attenuation 0 
     53                          //param_named_auto lightRange[1] light_attenuation 1 
     54                          param_named_auto lightPower light_power 0 
     55                          //param_named_auto lightPower[1] light_power 1 
     56                          param_named_auto lightColor light_diffuse_colour 0 
     57                          //param_named_auto lightColor[1] light_diffuse_colour 1 
     58                          param_named specularity float 120 
    6159                        } 
     60                        texture_unit tile_texture 
     61                        { 
     62                        } 
     63                        texture_unit detail_texture 
     64                        { 
     65                        } 
     66                        texture_unit displace 
     67                        { 
     68                        } 
     69                        texture_unit pathMap 
     70                        { 
     71                        } 
     72                        texture_unit PMweightIndex 
     73                        { 
     74                        } 
     75                        texture_unit PMweight 
     76                        { 
     77                        } 
     78                        texture_unit SM1 
     79                        { 
     80                        } 
     81                        texture_unit SM2 
     82                        { 
     83                        }                        
    6284  } 
    6385 } 
    6486} 
    6587 
    66 material GreatPillarTrunk : DetailTexturedBumpBase 
    67 { 
    68         technique maintechnique 
    69         { 
    70                 pass mainpass 
    71                 { 
    72                         ambient 1 1 1 1 
    73                         diffuse 1 1 1 1 
    74                         specular 0.08264 0.08264 0.08264 2 
    75                         emissive 0 0 0 
     88material GreatPillarTrunk : MoriaHallBase 
     89{ 
     90        technique maintechnique 
     91        { 
     92                pass mainpass 
     93                { 
    7694                        texture_unit tile_texture 
    7795                        { 
     
    89107        } 
    90108} 
    91 material GreatHallFloor : DetailTexturedBumpBase 
    92 { 
    93         technique maintechnique 
    94         { 
    95                 pass mainpass 
    96                 { 
    97                                                          
    98                         ambient 1 1 1 1 
    99                         diffuse 1 1 1 1 
    100                         specular 0.57852 0.57852 0.57852 25.49 
    101                         emissive 0 0 0 
    102                         vertex_program_ref GTP/Demo/BumpMapped_VS 
     109material GreatHallFloor : MoriaHallBase 
     110{ 
     111        technique maintechnique 
     112        { 
     113                pass mainpass 
     114                {                        
     115                        vertex_program_ref GTP/MoriaDemo/MoriaHallBase_VS 
    103116                        { 
    104117                                param_named normalCoord float 1 
     
    120133        } 
    121134} 
    122 material GreatHallWall : DetailTexturedBumpBase 
    123 { 
    124         technique maintechnique 
    125         { 
    126                 pass mainpass 
    127                 { 
    128                         ambient 1 1 1 1 
    129                         diffuse 1 1 1 1 
    130                         specular 0.08264 0.08264 0.08264 2 
    131                         emissive 0 0 0 
    132  
     135material GreatHallWall : MoriaHallBase 
     136{ 
     137        technique maintechnique 
     138        { 
     139                pass mainpass 
     140                { 
    133141                        texture_unit tile_texture 
    134142                        { 
     
    142150        } 
    143151} 
    144 material GreatHallPillarHead : DetailTexturedBumpBase 
    145 { 
    146         technique maintechnique 
    147         { 
    148                 pass mainpass 
    149                 { 
    150                         ambient 1 1 1 1 
    151                         diffuse 1 1 1 1 
    152                         specular 0.08264 0.08264 0.08264 2 
    153                         emissive 0 0 0 
    154  
     152material GreatHallPillarHead : MoriaHallBase 
     153{ 
     154        technique maintechnique 
     155        { 
     156                pass mainpass 
     157                { 
    155158                        texture_unit tile_texture 
    156159                        { 
     
    165168} 
    166169 
    167 material GreatHallCeiling : DetailTexturedBumpBase 
    168 { 
    169         technique maintechnique 
    170         { 
    171                 pass mainpass 
    172                 { 
    173                         ambient 1 1 1 1 
    174                         diffuse 1 1 1 1 
    175                         specular 0.08264 0.08264 0.08264 2 
    176                         emissive 0 0 0 
    177  
     170material GreatHallCeiling : MoriaHallBase 
     171{ 
     172        technique maintechnique 
     173        { 
     174                pass mainpass 
     175                { 
    178176                        texture_unit tile_texture 
    179177                        { 
  • GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/troll.material

    r2336 r2368  
    1 material phong2 
     1material phong22 
    22{ 
    33        technique 
     
    1414        } 
    1515} 
    16 material phong4 
     16material phong44 
    1717{ 
    1818        technique 
     
    3030        } 
    3131} 
    32 material phong1 
     32material phong11 
    3333{ 
    3434        technique 
     
    4949vertex_program TrollSkinningOneWeight cg 
    5050{ 
    51    source trollvs.cg 
     51   source trollvs.hlsl 
    5252   entry_point trollSkinning_One_Weight_vp 
    5353   profiles vs_2_0 
     
    5555} 
    5656 
    57 material phong22 
     57vertex_program TrollSkinningSMGen cg 
     58{ 
     59   source trollvs.hlsl 
     60   entry_point trollSkinning_SMGen_One_Weight_vp 
     61   profiles vs_2_0 
     62   includes_skeletal_animation true    
     63} 
     64 
     65 
     66material trollShadowMapGen_POINT 
    5867{ 
    5968        technique 
     
    6170                pass 
    6271                { 
    63                         ambient 1 1 1 1 
    64                         diffuse 1 1 1 1 
    65                         specular 0.5 0.5 0.5 20 
    66                         emissive 0 0 0 
    67                          
     72                        vertex_program_ref TrollSkinningSMGen 
     73                        { 
     74                                param_named_auto worldMatrix3x4Array[0] world_matrix_array_3x4 
     75                                param_named_auto viewProjectionMatrix viewproj_matrix 
     76                                param_named_auto viewMatrix view_matrix                          
     77                        } 
     78                  fragment_program_ref GTP/Basic/CDistNorm_PS 
     79                   {     
     80                    param_named_auto farPlane far_clip_distance 
     81                   }   
     82                } 
     83        } 
     84} 
     85 
     86material trollBase 
     87{ 
     88        technique maintechnique 
     89        { 
     90                pass mainpass 
     91                { 
     92                        IllumTechniques 
     93                        { 
     94                                RenderTechnique Triggers 
     95                                { 
     96                                        ILLUM_TRIGGER_SM_POINT trollShadowMapGen_POINT 
     97                                } 
     98                        } 
    6899                        vertex_program_ref TrollSkinningOneWeight 
    69100                        { 
     
    77108                         
    78109                        } 
    79                         // alternate shadow caster program 
    80                         shadow_caster_vertex_program_ref Ogre/HardwareSkinningOneWeightShadowCaster 
     110                        texture_unit basetexture 
    81111                        { 
    82                                 param_named_auto worldMatrix3x4Array[0] world_matrix_array_3x4 
    83                                 param_named_auto viewProjectionMatrix viewproj_matrix 
    84                                 param_named_auto ambient ambient_light_colour 
    85                          
    86112                        } 
    87                          
    88                         texture_unit 
     113                } 
     114        } 
     115} 
     116material phong2 : trollBase 
     117{ 
     118        technique maintechnique 
     119        { 
     120                pass mainpass 
     121                {                        
     122                        texture_unit basetexture 
    89123                        { 
    90124                                texture eyeball.jpg 
     
    95129        } 
    96130} 
    97 material phong44 
     131material phong4 : trollBase 
    98132{ 
    99         technique 
     133        technique maintechnique 
    100134        { 
    101                 pass 
    102                 { 
    103                          
    104                         vertex_program_ref TrollSkinningOneWeight 
    105                         { 
    106                                 param_named_auto worldMatrix3x4Array[0] world_matrix_array_3x4 
    107                                 param_named_auto viewProjectionMatrix viewproj_matrix 
    108                                 param_named_auto lightPos[0] light_position 0 
    109                                 param_named_auto lightPos[1] light_position 1 
    110                                 param_named_auto lightDiffuseColour[0] light_diffuse_colour 0 
    111                                 param_named_auto lightDiffuseColour[1] light_diffuse_colour 1 
    112                                 param_named_auto ambient ambient_light_colour 
    113                          
    114                         } 
    115                         // alternate shadow caster program 
    116                         shadow_caster_vertex_program_ref Ogre/HardwareSkinningOneWeightShadowCaster 
    117                         { 
    118                                 param_named_auto worldMatrix3x4Array[0] world_matrix_array_3x4 
    119                                 param_named_auto viewProjectionMatrix viewproj_matrix 
    120                                 param_named_auto ambient ambient_light_colour 
    121                          
    122                         } 
    123  
    124                         texture_unit 
     135                pass mainpass 
     136                {                        
     137                        texture_unit basetexture 
    125138                        { 
    126139                                texture trollbody.png 
     
    131144        } 
    132145} 
    133 material phong11 
     146material phong1 : trollBase 
    134147{ 
    135         technique 
     148        technique maintechnique 
    136149        { 
    137                 pass 
    138                 { 
    139                          
    140                         vertex_program_ref TrollSkinningOneWeight 
    141                         { 
    142                                 param_named_auto worldMatrix3x4Array[0] world_matrix_array_3x4 
    143                                 param_named_auto viewProjectionMatrix viewproj_matrix 
    144                                 param_named_auto lightPos[0] light_position 0 
    145                                 param_named_auto lightPos[1] light_position 1 
    146                                 param_named_auto lightDiffuseColour[0] light_diffuse_colour 0 
    147                                 param_named_auto lightDiffuseColour[1] light_diffuse_colour 1 
    148                                 param_named_auto ambient ambient_light_colour 
    149                          
    150                         } 
    151                         // alternate shadow caster program 
    152                         shadow_caster_vertex_program_ref Ogre/HardwareSkinningOneWeightShadowCaster 
    153                         { 
    154                                 param_named_auto worldMatrix3x4Array[0] world_matrix_array_3x4 
    155                                 param_named_auto viewProjectionMatrix viewproj_matrix 
    156                                 param_named_auto ambient ambient_light_colour 
    157                          
    158                         } 
    159                          
    160                         texture_unit 
     150                pass mainpass 
     151                {                
     152                        texture_unit basetexture 
    161153                        { 
    162154                                texture trollhead.png 
  • GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPCaustic/GTPCaustic.hlsl

    r2357 r2368  
    1 #include ".\\dummy.hlsl" 
    2  
    31struct Shaded_OUT 
    42{ 
  • GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPCaustic/GTPCaustic.material

    r2337 r2368  
    128128         fragment_program_ref GTP/EnvMap/Localized_Refraction_PS 
    129129         {  
    130                     param_named_auto cameraPos camera_position 
     130            param_named_auto cameraPos camera_position 
    131131            param_named lastCenter float3 0 0 0 
    132132            param_named sFresnel float 0.1 
    133 <<<<<<< .mine 
    134133            param_named sRefraction float 0.85 
    135 ======= 
    136             param_named sRefraction float 0.8 
    137 >>>>>>> .r2314 
     134 
    138135             }           
    139136             //Cube map for reflections and refractions  
  • GTP/trunk/App/Demos/Illum/Ogre/Media/materials/programs/GameTools_Blur.hlsl

    r2138 r2368  
    1 #define samplesU 7 
    2 #define samplesV 7 
     1#define samplesU 3 
     2#define samplesV 3 
    33 
    44struct VS_INPUT {            
     
    6767                        uniform float height, 
    6868                        uniform float face ) : COLOR 
    69 {   
    70  
     69{ 
     70/* 
    7171  float2 pixel = float2(2.0 / width, 2.0 / height); 
    7272  float2 uv = IN.Position + pixel * 0.5; 
     
    8989         } 
    9090                 
    91  
    92   sum /= samplesU * samplesV; 
     91*/ 
     92  float pixel = 2.0 / width; 
     93  float2 uv = IN.Position; 
     94  float3 u; 
     95  float3 v; 
     96  float3 pos; 
     97  if (face == 0){u = float3(0,0,-1); v = float3(0,1,0); pos = float3(1,uv.y,-uv.x);} 
     98  if (face == 1){u = float3(0,0,1); v = float3(0,1,0); pos = float3(-1,uv.y,uv.x);} 
     99  if (face == 2){u = float3(1,0,0); v = float3(0,0,-1); pos = float3(uv.x,1,-uv.y);} 
     100  if (face == 3){u = float3(1,0,0); v = float3(0,0,1); pos = float3(uv.x,-1,uv.y);} 
     101  if (face == 4){u = float3(1,0,0); v = float3(0,1,0); pos = float3(uv.x,uv.y,1);} 
     102  if (face == 5){u = float3(-1,0,0); v = float3(0,1,0); pos = float3(-uv.x,uv.y,-1);} 
     103  u *= pixel; 
     104  v *= pixel; 
     105  float4 sum = float4(0,0,0,0); 
     106  sum += texCUBE(Texture, pos); 
     107  sum += texCUBE(Texture, pos + u); 
     108  sum += texCUBE(Texture, pos + v); 
     109  sum += texCUBE(Texture, pos + u + v); 
     110  sum /= 4.0; 
    93111 
    94112  return sum; 
Note: See TracChangeset for help on using the changeset viewer.