Changeset 2398


Ignore:
Timestamp:
05/28/07 17:00:18 (17 years ago)
Author:
szirmay
Message:
 
Location:
GTP/trunk/App/Demos/Illum/Ogre/Media
Files:
10 added
11 edited

Legend:

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

    r2392 r2398  
    1010                        emissive 0 0 0 
    1111 
    12                         scene_blend alpha_blend 
     12                        //scene_blend alpha_blend 
    1313                        depth_write on 
    1414                        //depth_check off 
  • GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/MoriaDust.material

    r2392 r2398  
    3030                        depth_write off 
    3131                        scene_blend src_alpha one 
     32                        scene_blend_alpha zero one 
    3233                        //scene_blend alpha_blend 
    3334                        vertex_program_ref Moria/MoriaDust_VS 
  • GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/MoriaHallBase.hlsl

    r2386 r2398  
    9292        float4 Color = 0; 
    9393        float3 N = NormalMap(IN.wTangent, IN.wBinormal, IN.wNormal, IN.texCoord2.xy, bumpMap); 
    94         float3 V = normalize(IN.wView); 
     94        float dist = length(IN.wView); 
     95        float3 V = IN.wView / dist; 
    9596        // read textures 
    9697        float4 diffuseColor = tex2D(tileTexture, IN.texCoord.zw) * tex2D(detailTexture, IN.texCoord.xy); 
     
    104105float shadow; 
    105106 
    106 if(dot(lightColor1, lightColor1) != 0) 
    107 { 
     107//if(dot(lightColor1, lightColor1) != 0) 
     108//{ 
    108109        L = wLightPos1.xyz - IN.wPos * wLightPos1.w; 
    109110        //illumination 
     
    113114        shadow = shadowPoint(ShadowMap1Point, lightCPos, lightFarPlane1); 
    114115        Color += col * shadow;   
    115 } 
     116         
     117        //Color = col; 
     118//} 
    116119 
    117120//---------------------------------------------------------------------------------------------------------------- 
     
    137140        //gather caustics for all casters 
    138141        //return diffuseColor; 
     142        Color.a = dist; 
    139143        return Color; 
    140144} 
  • GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/illum.hlsl

    r2376 r2398  
    77        float3 H = normalize(L + V); 
    88        float4 Lighting = lit(dot(N, L), dot(N, H), specularity); 
     9        Lighting = saturate(Lighting); 
    910         
    1011        return   lightColor * (Lighting.y * diffuseColor + Lighting.z * specularColor) //color 
    1112                         / (lightRange.y + d * lightRange.z + d * d * lightRange.w) //attenuation 
    1213                         ; 
     14                          
     15        //return lightColor * (Lighting.y * diffuseColor); 
    1316} 
    1417 
     
    1922        float3 mNormal; 
    2023        float3 tNormal = tex2D(normalMap, texCoord).rgb; 
    21         if(length(tNormal == 0))         
    22                 mNormal = normal; 
    23     else 
    24     { 
    25         tangent = normalize(tangent); 
    26                 binormal = normalize(binormal);  
    27                 float3x3 TangentToModel = float3x3(tangent, binormal, normal ); 
     24        //tNormal = float3(0.5,0.5,1.0); 
     25         
     26    tangent = normalize(tangent); 
     27        binormal = normalize(binormal);  
     28        float3x3 TangentToModel = float3x3(tangent, binormal, normal ); 
    2829                 
    29         tNormal.xy = (tNormal.xy *2.0) - 1.0; 
    30         mNormal = normalize( mul( tNormal, TangentToModel ) ); 
    31         } 
     30        tNormal.xy = (tNormal.xy *2.0) - 1.0; 
     31        mNormal = normalize( mul( tNormal, TangentToModel ) ); 
     32         
    3233    return mNormal; 
    3334} 
  • GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/moria.material

    r2386 r2398  
    2626                                //      start_tex_id 3 
    2727                                //}      
     28                                //RenderTechnique SphericalBillboard 
     29                                //{ 
     30                           //   bind_texture false 
     31                                //}      
    2832                                RenderTechnique DepthShadowReceiver 
    2933                                { 
     
    6872                        texture_unit displace 
    6973                        { 
     74                                texture nullbump.bmp 
     75                                //filtering none 
     76                                //tex_address_mode clamp 
    7077                        } 
    7178                        texture_unit pathMap 
     
    104111                        texture_unit displace 
    105112                        { 
    106                                 texture greatpillardisplace.dds 
     113                                texture greatpillarbump.bmp 
     114                                //texture nullbump.bmp 
     115                                //tex_address_mode mirror 
    107116                        } 
    108117                } 
     
    150159                                texture greatHallWallDetail.png 
    151160                        } 
     161                        texture_unit displace 
     162                        { 
     163                                texture morialwalldetailbump.bmp 
     164                        }                        
    152165                } 
    153166        } 
     
    167180                                texture pillarheaddetail.png 
    168181                        } 
     182                        texture_unit displace 
     183                        { 
     184                                texture greatpillarheadbump.bmp 
     185                        } 
     186                                                 
    169187                } 
    170188        } 
  • GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/trollps.hlsl

    r2389 r2398  
    3333        float4 Color = 0; 
    3434        float3 N = normalize(IN.normal);//NormalMap(IN.tangent, IN.binormal, IN.normal, IN.texCoord, bumpMap); 
    35         float3 V = normalize(IN.V); 
     35        float dist = length(IN.V); 
     36        float3 V = IN.V /dist; 
    3637        float3 L = IN.L; 
    3738         
     
    4041        Color = Illumination(N, L, V, lightColor * lightPower, lightRange, diffuseColor, specularity, specularColor); 
    4142         
    42         return diffuseColor * 0.1 + Color; 
     43        float4 ret =  diffuseColor * 0.1 + Color; 
     44        return float4(ret.xyz, dist); 
    4345} 
  • GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPPostProc/GTPPostProc.hlsl

    r2024 r2398  
    2525{ 
    2626   IN.texCoord += float2(0.5/width, 0.5/height); 
     27  // return 1; 
    2728   return tex2D(Texture, IN.texCoord); 
     29} 
     30 
     31float4 AlphaBlend_PS(VS_OUT IN, 
     32                uniform float width, 
     33                uniform float height, 
     34                uniform float alpha, 
     35                uniform sampler2D Texture: register(s0)) : COLOR  
     36{ 
     37   IN.texCoord += float2(0.5/width, 0.5/height); 
     38        return float4(tex2D(Texture, IN.texCoord).rgb, alpha); 
    2839} 
    2940 
     
    153164        //Color = pow(Color * half4(1.05f, 0.97f, 1.27f, 1.0f), Gain); 
    154165        return Color + 0.0000000000001 * Gain; 
     166        //return gLum; 
    155167        return float4(tex2D(GlobalLuminanceTexture, IN.texCoord).r, 
    156168                                  tex2D(GlobalLuminanceTexture, IN.texCoord).r, 
  • GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPPostProc/GTPPostProc.material

    r2137 r2398  
    3131                param_named_auto width viewport_width    
    3232                param_named_auto height viewport_height  
     33                 
     34        } 
     35        texture_unit 
     36        { 
     37           // filtering none     
     38        }                 
     39      } 
     40   } 
     41} 
     42 
     43material GTP/PostProc/Blend 
     44{ 
     45   technique  
     46   {  
     47      pass  
     48      { 
     49      scene_blend alpha_blend 
     50      depth_check off 
     51                vertex_program_ref GTP/PostProc/PostProc_VS 
     52        { 
     53        
     54        }  
     55                fragment_program_ref GTP/PostProc/AlphaBlend_PS 
     56        {  
     57                        param_named_auto width viewport_width    
     58                param_named_auto height viewport_height  
     59                param_named_auto alpha frame_time 9.0 
    3360                 
    3461        } 
     
    179206      { 
    180207        scene_blend alpha_blend 
     208        depth_write off 
     209        depth_check off 
    181210        vertex_program_ref GTP/PostProc/PostProc_VS 
    182211        {        
     
    187216          param_named_auto height viewport_height  
    188217          param_named Stretch float 1.2 
    189           param_named timeBlur float 0.025 
     218          param_named_auto timeBlur frame_time 0.2 
     219          //param_named timeBlur float 1 
    190220        } 
    191221        texture_unit 
  • GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPPostProc/GTPPostProc.program

    r2024 r2398  
    1717        source GTPPostProc.hlsl 
    1818        entry_point Copy_PS 
     19        target ps_2_0 
     20}  
     21 
     22fragment_program GTP/PostProc/AlphaBlend_PS hlsl 
     23{ 
     24        source GTPPostProc.hlsl 
     25        entry_point AlphaBlend_PS 
    1926        target ps_2_0 
    2027}  
  • GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPPostProc/GTPToneMap.compositor

    r2024 r2398  
    44    { 
    55        texture scene target_width target_height PF_FLOAT16_RGBA 
    6         texture luminance 256 256 PF_FLOAT16_RGBA                        
    7         texture rt0 256 256 PF_FLOAT16_RGBA         
     6                texture luminance target_width target_height PF_FLOAT16_RGBA                     
     7        texture rt0 512 512 PF_FLOAT16_RGBA         
    88        texture rt1 256 256 PF_FLOAT16_RGBA 
    99        texture rt2 128 128 PF_FLOAT16_RGBA 
     
    1515        { 
    1616            input previous                
    17         } 
     17       } 
    1818        target luminance 
    1919        { 
     
    2525            } 
    2626        } 
     27        
     28         
     29     
    2730        target rt0 
    2831        { 
    2932            input none             
    30             pass render_quad 
     33           pass render_quad 
    3134            { 
    32                 material GTP/PostProc/GlowBlurV 
    33                 input 0 luminance 
     35               material GTP/PostProc/GlowBlurV 
     36               input 0 luminance 
    3437            } 
    35         }  
     38        }   
     39         
    3640        target rt1 
    3741        { 
    3842            input none 
    39             pass render_quad 
     43           pass render_quad 
    4044            { 
    4145               material GTP/PostProc/GlowBlurH 
    42                 input 0 rt0                          
     46               input 0 rt0                           
    4347            } 
    4448        }  
     49                 
    4550        target rt2 
    4651        { 
     
    5257            } 
    5358        }  
     59         
    5460        target rt3 
    5561        { 
     
    6167            } 
    6268        }  
     69         
    6370        target rt4 
    6471        { 
     
    6875               material GTP/PostProc/GlowBlurV 
    6976               input 0 rt3                           
    70             } 
    71         }  
     77           } 
     78       }  
    7279        target rt5 
    7380        { 
     
    7784            { 
    7885            } 
     86        //    pass render_quad 
     87        //      { 
     88        //              material GTP/PostProc/Black                              
     89        //      } 
    7990        } 
    8091        target rt5 
     
    91102            } 
    92103        }  
     104        // target_output 
     105   //     { 
     106    //      input none 
     107    //     pass render_quad 
     108    //     { 
     109    //          material GTP/PostProc/Copy 
     110    //          input 0 rt5 
     111        //      } 
     112   //     }      
    93113        target_output 
    94114        { 
     
    100120              input 1 rt1 
    101121              input 2 luminance 
    102               input 3 rt5                        
     122             input 3 rt5                         
    103123          } 
    104124        } 
Note: See TracChangeset for help on using the changeset viewer.