Changeset 2131


Ignore:
Timestamp:
02/20/07 14:10:19 (17 years ago)
Author:
szirmay
Message:
 
Location:
GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPAdvancedEnvMap/multibounce
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPAdvancedEnvMap/multibounce/GTPMultipleReflection.hlsl

    r2095 r2131  
    1212 
    1313#define MAX_LIN_ITERATIONCOUNT 50  //80 
    14 #define MIN_LIN_ITERATIONCOUNT 15  //60 
     14#define MIN_LIN_ITERATIONCOUNT 30  //60 
    1515#define SECANT_ITERATIONCOUNT 1 
    16 #define MAX_RAY_DEPTH 4 
     16#define MAX_RAY_DEPTH 2 
    1717 
    1818void linearSearch(  float3 x, float3 R, float3 N, samplerCUBE mp, 
     
    240240          float3 l = Hit(x, R, N, NormDistMap1, NormDistMap2, CubeMap, DistanceMap, Il, Nl); 
    241241          if(Il.a == 0) 
    242           { 
    243                   //I = readCubeMap(CubeMap, l); 
     242          {                
    244243                   depth += 1;            
    245244          } 
     
    252251          N = normalize(Nl); 
    253252          V = R;                    
    254         }   
    255              
     253        }  
     254                 
     255        if(I.a == 0) 
     256        { 
     257         float ri = refIndex;     
     258         if(dot(V,N) > 0) 
     259         { 
     260                ri = 1.0 / ri; 
     261                N = -N;      
     262         } 
     263         float3 R = refract( V, N, ri); 
     264         if(dot(R,R) == 0) R = reflect( V, N); 
     265         I = readCubeMap(CubeMap, R); 
     266        } 
     267         
    256268        I *= (1.0 - F);  
    257269     
     
    307319        }   
    308320        if(I.a == 0) 
    309                 I = 0; 
     321                I = float4(V,1); 
    310322        else 
    311323                I = float4(l,1); 
  • GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPAdvancedEnvMap/multibounce/GTPMultipleReflection_MinMax.hlsl

    r2095 r2131  
    1111} 
    1212 
    13 #define MAX_LIN_ITERATIONCOUNT 80  //80 
    14 #define MIN_LIN_ITERATIONCOUNT 60  //60 
     13#define MAX_LIN_ITERATIONCOUNT 50  //80 
     14#define MIN_LIN_ITERATIONCOUNT 30  //60 
    1515#define SECANT_ITERATIONCOUNT 1 
    1616#define MAX_RAY_DEPTH 4 
  • GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPAdvancedEnvMap/multibounce/multipleReflection/GTPMultipleReflection.material

    r2054 r2131  
    3636                        RenderTechnique ColorCubeMap 
    3737                        { 
    38                                 resolution 1024 
     38                                resolution 512 
    3939                                layer 1 
    4040                                texture_unit_id 2 
    41                                 update_interval         0 
     41                                update_interval         1 
    4242                                distance_calc false 
    4343                                face_angle_calc false 
     
    4949                        RenderTechnique ColorCubeMap 
    5050                        { 
    51                                 resolution 1024 
     51                                resolution 512 
    5252                                layer 2 
    5353                                texture_unit_id 3 
    54                                 update_interval         0 
     54                                update_interval         1 
    5555                                distance_calc false 
    5656                                face_angle_calc false 
  • GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPAdvancedEnvMap/multibounce/multipleReflectionMinMax/GTPMultipleReflectionMinMax.material

    r2095 r2131  
    3333                                face_angle_calc false 
    3434                                update_all_face true 
    35                                 get_minmax true 
    36                                 min_var_name min 
    37                                 max_var_name Max                                 
     35                                //get_minmax true 
     36                                //min_var_name min 
     37                                //max_var_name Max                               
    3838                        } 
    3939                        RenderTechnique ColorCubeMap 
    4040                        { 
    41                                 resolution 1024 
     41                                resolution 512   
    4242                                layer 1 
    4343                                texture_unit_id 2 
    44                                 update_interval         0 
     44                                update_interval         1 
    4545                                distance_calc false 
    4646                                face_angle_calc false 
     
    4949                                render_self true 
    5050                                self_material GTP/MultiBounce/NormalDistanceCCW 
    51                                 get_minmax true 
    52                                 min_var_name min1 
    53                                 max_var_name max1                        
     51                                //get_minmax true 
     52                                //min_var_name min1 
     53                                //max_var_name max1                      
    5454                        } 
    5555                        RenderTechnique ColorCubeMap 
    5656                        { 
    57                                 resolution 1024 
     57                                resolution 512 
    5858                                layer 2 
    5959                                texture_unit_id 3 
    60                                 update_interval         0 
     60                                update_interval         1 
    6161                                distance_calc false 
    6262                                face_angle_calc false 
     
    6565                                render_self true 
    6666                                self_material GTP/MultiBounce/NormalDistanceCW 
    67                                 get_minmax true 
    68                                 min_var_name min2 
    69                                 max_var_name max2 
     67                                //get_minmax true 
     68                                //min_var_name min2 
     69                                //max_var_name max2 
    7070                        }                                
    7171                 } 
     
    7878                 fragment_program_ref GTP/MultiBounce/Reflection_MinMax_PS 
    7979         {  
    80                         param_named_auto cameraPos camera_position                                               
     80                        param_named_auto cameraPos camera_position       
     81                        param_named min float4 0 0 0 0.76 
     82                        param_named Max float4 0 0 0 3.077 
     83                        param_named min1 float4 0 0 0 0.14 
     84                        param_named max1 float4 0 0 0 0.35 
     85                        param_named min2 float4 0 0 0 0.15 
     86                        param_named max2 float4 0 0 0 0.46 
    8187                 }  
    8288                 
  • GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPAdvancedEnvMap/multibounce/multipleRefraction/GTPMultipleRefraction.material

    r2054 r2131  
    2020                        { 
    2121                                resolution 1024 
    22                                 update_interval         0 
     22                                update_interval         1 
    2323                                distance_calc false 
    2424                                face_angle_calc false 
     
    2929                        { 
    3030                                resolution 1024 
    31                                 update_interval         0 
     31                                update_interval         1 
    3232                                distance_calc false 
    3333                                face_angle_calc false 
     
    3939                                layer 1 
    4040                                texture_unit_id 2 
    41                                 update_interval         0 
     41                                update_interval         1 
    4242                                distance_calc false 
    4343                                face_angle_calc false 
     
    5252                                layer 2 
    5353                                texture_unit_id 3 
    54                                 update_interval         0 
     54                                update_interval         1 
    5555                                distance_calc false 
    5656                                face_angle_calc false 
Note: See TracChangeset for help on using the changeset viewer.