Ignore:
Timestamp:
09/27/06 16:04:44 (18 years ago)
Author:
szirmay
Message:
 
Location:
GTP/trunk/App/Demos/Illum/Ogre/Media/materials/programs
Files:
1 added
1 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);      
Note: See TracChangeset for help on using the changeset viewer.