Ignore:
Timestamp:
11/06/08 17:48:52 (16 years ago)
Author:
mattausch
Message:

added converter for vbo format from ralf

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

Legend:

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

    r3106 r3107  
    261261        const int dsh = h / 2; 
    262262 
     263        //const int dsw = w; 
     264        //const int dsh = h; 
     265 
    263266        mIllumFbo = new FrameBufferObject(dsw, dsh, FrameBufferObject::DEPTH_NONE); 
    264267        //mIllumFbo = new FrameBufferObject(w, h, FrameBufferObject::DEPTH_NONE); 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp

    r3106 r3107  
    5050#include "Light.h" 
    5151#include "SceneEntityConverter.h" 
    52 #include "ObjConverter.h" 
    5352#include "SkyPreetham.h" 
    5453#include "Texture.h" 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaderenv.h

    r3106 r3107  
    2626 
    2727 
     28//////// 
     29//-- reprojection 
     30 
     31#define MIN_DEPTH_DIFF 1e-2f 
     32#define PRECISION_SCALE 1e-1f 
     33 
     34 
    2835///////// 
    2936//-- shadowing 
     
    4249 
    4350#define MAX_LOD_LEVEL 10 
    44  
    45 //#define MIN_DEPTH_DIFF 5e-3f 
    46 #define MIN_DEPTH_DIFF 1e-2f 
    47 //#define MIN_DEPTH_DIFF 1e-3f 
    48 #define PRECISION_SCALE 1e-1f 
    49  
    50 // burnout 
     51// burnout (really bright regions will be saturated to white) 
    5152#define WHITE_LUMINANCE 3e4f 
    5253 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg

    r3106 r3107  
    362362         
    363363        float4 projPos = mul(modelViewProj, eyeSpacePos); 
    364         const float w = 1 / projPos.w; 
     364        const float w = 1.0f / projPos.w; 
    365365        projPos *= w; 
    366366        float scaleFactor = SAMPLE_RADIUS * w; 
    367367         
    368         const float2 ao = ssao(IN, colors, noiseTex, samples, normal,  
    369                                    eyeSpacePos.xyz, scaleFactor, bl, br, tl, tr, normalize(viewDir)); 
     368        float2 ao = float2(1.0f, 0); 
     369        // note: this should be done with the stencil buffer 
     370        if (eyeSpaceDepth < 1e10f) 
     371                ao = ssao(IN, colors, noiseTex, samples, normal,  
     372                          eyeSpacePos.xyz, scaleFactor, bl, br, tl, tr, normalize(viewDir)); 
    370373 
    371374 
     
    381384        return OUT; 
    382385} 
     386 
    383387 
    384388float Filter(float2 texCoord,  
     
    415419        float4 ao = tex2Dlod(ssaoTex, float4(IN.texCoord, 0, 0)); 
    416420 
    417         //if ((ao.y < 10.0f) && (col.w < 1e10f)) 
    418         //      ao.x = Filter(IN.texCoord, ssaoTex, filterOffs, filterWeights, 1.0f / (1.0f + ao.y));//ao.z); 
     421        if ((ao.y < 10.0f) && (col.w < 1e10f)) 
     422                ao.x = Filter(IN.texCoord, ssaoTex, filterOffs, filterWeights, 1.0f / (1.0f + ao.y));//ao.z); 
    419423 
    420424        OUT.illum_col = col * ao.x; 
Note: See TracChangeset for help on using the changeset viewer.