Changeset 2941


Ignore:
Timestamp:
09/13/08 13:20:05 (16 years ago)
Author:
mattausch
Message:

changing camera stuff, not working yet

Location:
GTP/trunk/App/Demos/Vis/FriendlyCulling/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Camera.cpp

    r2936 r2941  
    5353{ 
    5454        Vector3 up = Vector3::UNIT_Z(); 
    55         Vector3 right = Normalize(CrossProd(dir, up)); 
    56         up = Normalize(CrossProd(right, dir)); 
    57  
    58         mBaseOrientation = Matrix4x4(right, up, -dir); 
     55        //Vector3 right = Normalize(CrossProd(dir, up)); 
     56        //up = Normalize(CrossProd(right, dir)); 
     57 
     58        //mBaseOrientation = Matrix4x4(right, up, -dir); 
     59        mBaseOrientation = MyLookAt(Vector3::ZERO(), dir, up);//Matrix4x4(right, up, -dir); 
    5960        mViewOrientation = mBaseOrientation; 
    6061} 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ShadowMapping.cpp

    r2940 r2941  
    605605        glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); 
    606606 
     607//glDisable(GL_CULL_FACE); 
     608 
    607609        glPolygonOffset(1.0f, 2000.0f); 
    608610        glEnable(GL_POLYGON_OFFSET_FILL); 
     611        //glDisable(GL_POLYGON_OFFSET_FILL); 
    609612 
    610613        glShadeModel(GL_FLAT); 
     
    757760        DEL_PTR(hpoly); 
    758761 
    759         //glEnable(GL_CULL_FACE); 
    760762 
    761763        glEnable(GL_LIGHTING); 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg

    r2928 r2941  
    104104        lightSpacePos /= lightSpacePos.w; 
    105105 
    106         float shadowDepth[9]; 
     106        /*float shadowDepth[9]; 
    107107 
    108108        float w = sampleWidth; 
    109109 
    110110        // pcf sampling using 3 x 3 tab 
    111  
    112111        shadowDepth[0] = tex2D(shadowMap, lightSpacePos.xy).x; 
    113112         
     
    122121        shadowDepth[8] = tex2D(shadowMap, lightSpacePos.xy - float2( 0, -w)).x; 
    123122 
    124         OUT.color = col; 
    125123         
    126124        float depth = lightSpacePos.z; 
     
    134132 
    135133        d /= 9.0f; 
    136          
    137         /*if ((amb < 0.9) && // hack: prevent shadowing the sky  
    138                 (lightSpacePos.z / lightSpacePos.w > shadowDepth)) 
     134        */ 
     135 
     136        OUT.color = col; 
     137 
     138        float shadowDepth = tex2D(shadowMap, lightSpacePos.xy).x; 
     139 
     140        if ((amb < 0.9f) && // hack: prevent shadowing the sky   
     141                (lightSpacePos.z > shadowDepth)) 
    139142        { 
    140143                OUT.color *= 0.1f; 
    141         }*/ 
    142          
    143         if (amb < 0.9) // hack: prevent shadowing the sky        
     144        } 
     145        /* 
     146        if (amb < 0.9f) // hack: prevent shadowing the sky       
    144147        { 
    145148                const float x = 0.1f; 
    146149                OUT.color *= x + (1.0f - x) * (1.0f - d); 
    147150        } 
    148          
     151        */ 
    149152        //OUT.color = lightSpacePos;//float4(lightSpacePos.z / lightSpacePos.w); 
    150153        //OUT.color = float4(shadowDepth); 
Note: See TracChangeset for help on using the changeset viewer.