Ignore:
Timestamp:
09/27/06 16:04:44 (18 years ago)
Author:
szirmay
Message:
 
Location:
GTP/trunk/App/Demos/Illum/Ogre/Media/materials
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Illum/Ogre/Media/materials/programs/GameTools_ReduceCubeMap.hlsl

    r777 r1519  
    2424    OUT.hPosition = IN.Position; 
    2525    OUT.Position = IN.Position.xy; 
     26    //OUT.Position.y = 1 - OUT.Position.y; 
    2627    return OUT; 
    2728} 
     
    3132 
    3233        RATE = 32; 
     34        CUBEMAP_SIZE = 128; 
    3335    float4 color = 0; 
    3436    // color += texCUBE( EnvironmentMapSampler, Tex ); 
     
    4749                if (nFace == 2) dir = float3(pos.x, 1, -pos.y); 
    4850                if (nFace == 3) dir = float3(pos.x, -1, pos.y); 
    49                 if (nFace == 4) dir = float3(pos.xy, 1); 
     51                if (nFace == 4) dir = float3(pos.x, pos.y, 1); 
    5052                if (nFace == 5) dir = float3(-pos.x, pos.y,-1); 
    5153 
    52                 color += readCubeMap( EnvironmentMapSampler, dir); 
     54                color += texCUBE( EnvironmentMapSampler, dir); 
    5355    } 
     56  /*   
     57    if (nFace == 0)     dir = float3(1, 0, 0); 
     58        if (nFace == 1) dir = float3(-1, 0, 0); 
     59        if (nFace == 2) dir = float3(0, 1, 0); 
     60        if (nFace == 3) dir = float3(0, -1, 0); 
     61        if (nFace == 4) dir = float3(0, 0, 1); 
     62        if (nFace == 5) dir = float3(0, 0,-1); 
     63                 
     64    return texCUBE(EnvironmentMapSampler, dir);*/ 
    5465    //return float4(IN.Position.xy,1,1); 
    5566        return color / (RATE*RATE);      
  • GTP/trunk/App/Demos/Illum/Ogre/Media/materials/scripts/Diffuse.material

    r1094 r1519  
    4747                IllumTechniques 
    4848                { 
     49                        RenderTechnique DistanceCubeMap 
     50                        { 
     51                                update_interval         1 
     52                                distance_calc false                                              
     53                        } 
    4954                        RenderTechnique ReducedColorCubeMap 
    5055                        { 
    51                                 update_interval         3 
     56                                update_interval         1 
     57                                reduced_resolution 4 
     58                                resolution 128 
    5259                                distance_calc false 
    5360                                face_angle_calc false 
    54                                 update_all_face         false 
     61                                update_all_face         true 
    5562                        } 
    5663                } 
     
    8895   } 
    8996} 
     97 
     98 
     99 
     100vertex_program Diffuse2VS hlsl 
     101{ 
     102        source GameTools_Diffuse.hlsl 
     103        entry_point DiffuseVS 
     104        target vs_2_0 
     105}  
     106 
     107fragment_program Diffuse2PS hlsl 
     108{ 
     109        source GameTools_Diffuse.hlsl 
     110        entry_point DiffusePS 
     111        target ps_3_0 
     112}  
     113 
     114material GameTools/Diffuse2  
     115{  
     116   technique  
     117   {  
     118      pass  
     119      {  
     120                 
     121                IllumTechniques 
     122                { 
     123                        RenderTechnique DistanceCubeMap 
     124                        { 
     125                                update_interval         1 
     126                                distance_calc false                                              
     127                        } 
     128                        RenderTechnique ReducedColorCubeMap 
     129                        { 
     130                                update_interval         1 
     131                                reduced_resolution 4 
     132                                resolution 128 
     133                                distance_calc false 
     134                                face_angle_calc false 
     135                                update_all_face         true 
     136                        } 
     137                } 
     138       
     139 
     140                vertex_program_ref Diffuse2VS 
     141                {        
     142                 param_named_auto worldViewProj worldviewproj_matrix  
     143                param_named_auto world world_matrix   
     144         
     145                }  
     146                fragment_program_ref Diffuse2PS 
     147                {  
     148                        param_named_auto cameraPos camera_position 
     149                        param_named REDUCED_CUBEMAP_SIZE int 4 
     150                        param_named lastCenter float3 0 0 0 
     151                         param_named_auto world_IT inverse_transpose_world_matrix                
     152                }  
     153                 
     154                //Cube map for reflections and refractions       
     155                texture_unit 
     156                { 
     157                        cubic_texture cubemap.jpg combinedUVW 
     158                        tex_address_mode clamp 
     159                        colour_op replace 
     160                } 
     161 
     162                //Cube map of distances 
     163                texture_unit 
     164                 { 
     165                   cubic_texture cubemap.jpg combinedUVW 
     166                   tex_address_mode clamp 
     167                   colour_op replace 
     168                 } 
     169         } 
     170   } 
     171} 
  • GTP/trunk/App/Demos/Illum/Ogre/Media/materials/scripts/GameTools.material

    r1451 r1519  
    6969                        { 
    7070                                texture rockwall.tga 
    71                                 env_map cubic_normal 
     71                                //env_map cubic_normal 
    7272                                //vertex_texture true 
    7373                        } 
  • GTP/trunk/App/Demos/Illum/Ogre/Media/materials/scripts/GlassHead.material

    r1487 r1519  
    144144                                photonmap_resolution 32 
    145145                                caustic_cubemap_resolution 512   
    146                                 caustic_map_material            GameTools/CauTri 
    147                                 use_triangles   true                             
     146                                //caustic_map_material          GameTools/CauTri 
     147                                //use_triangles true                             
    148148                        } 
    149149                         
Note: See TracChangeset for help on using the changeset viewer.