Changeset 2837


Ignore:
Timestamp:
07/15/08 11:35:23 (16 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/App/Demos/Vis/FriendlyCulling
Files:
4 edited
1 moved

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/FriendlyCulling.vcproj

    r2834 r2837  
    244244                        </File> 
    245245                        <File 
     246                                RelativePath=".\src\Halton.cpp" 
     247                                > 
     248                        </File> 
     249                        <File 
     250                                RelativePath=".\src\Halton.h" 
     251                                > 
     252                        </File> 
     253                        <File 
    246254                                RelativePath=".\src\Matrix4x4.cpp" 
    247255                                > 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp

    r2836 r2837  
    2929#include "PerformanceGraph.h" 
    3030#include "Environment.h" 
     31#include "Halton.h" 
    3132 
    3233 
     
    169170bool upKeyPressed = false; 
    170171bool downKeyPressed = false; 
    171 bool nineKeyPressed = false; 
    172 bool eightKeyPressed = false; 
     172bool descendKeyPressed = false; 
     173bool ascendKeyPressed = false; 
    173174 
    174175bool useSsao = false; 
     
    186187bool useFullScreen = false; 
    187188 
     189float expFactor = 0.1f; 
    188190 
    189191// ssao number of samples 
     
    275277 
    276278static CGparameter sSamplesParamSsao;  
    277  
    278 static CGparameter sOldTexParam; 
    279279static CGparameter sOldTexParamSsao; 
    280  
    281280static CGparameter sNoiseMultiplierParam; 
     281static CGparameter sExpFactorParamSsao; 
     282 
    282283 
    283284static void cgErrorCallback() 
     
    313314        int returnCode = 0; 
    314315 
     316        Vector3 camPos(.0f, .0f, .0f); 
     317 
    315318        cout << "=== reading environment file === " << endl; 
    316319 
    317         env.Read("src/default.env"); 
    318  
    319         env.GetIntParam(string("assumedVisibleFrames"), assumedVisibleFrames); 
    320         env.GetIntParam(string("maxBatchSize"), maxBatchSize); 
    321         env.GetIntParam(string("trianglesPerVirtualLeaf"), trianglesPerVirtualLeaf); 
    322  
    323         env.GetFloatParam(string("keyForwardMotion"), keyForwardMotion); 
    324         env.GetFloatParam(string("keyRotation"), keyRotation); 
    325  
    326         env.GetIntParam(string("winWidth"), winWidth); 
    327         env.GetIntParam(string("winHeight"), winHeight); 
    328  
    329         env.GetBoolParam(string("useFullScreen"), useFullScreen); 
    330         //env.GetIntParam(string("numSssaoSamples"), numSsaoSamples); 
    331  
    332         Vector3 camPos; 
    333         env.GetVectorParam(string("camPosition"), camPos); 
    334  
    335         cout << "assumedVisibleFrames: " << assumedVisibleFrames << endl;  
    336         cout << "maxBatchSize: " << maxBatchSize << endl; 
    337         cout << "trianglesPerVirtualLeaf: " << trianglesPerVirtualLeaf << endl; 
    338  
    339         cout << "keyForwardMotion: " << keyForwardMotion << endl; 
    340         cout << "keyRotation: " << keyRotation << endl; 
    341         cout << "winWidth: " << winWidth << endl; 
    342         cout << "winHeight: " << winHeight << endl; 
    343         cout << "useFullScreen: " << useFullScreen << endl; 
    344         cout << "camPosition: " << camPos << endl; 
    345  
     320        string envFileName = "default.env"; 
     321        if (!env.Read(envFileName)) 
     322        { 
     323                cerr << "loading environment " << envFileName << " failed!" << endl; 
     324        } 
     325        else 
     326        { 
     327                env.GetIntParam(string("assumedVisibleFrames"), assumedVisibleFrames); 
     328                env.GetIntParam(string("maxBatchSize"), maxBatchSize); 
     329                env.GetIntParam(string("trianglesPerVirtualLeaf"), trianglesPerVirtualLeaf); 
     330 
     331                env.GetFloatParam(string("keyForwardMotion"), keyForwardMotion); 
     332                env.GetFloatParam(string("keyRotation"), keyRotation); 
     333 
     334                env.GetIntParam(string("winWidth"), winWidth); 
     335                env.GetIntParam(string("winHeight"), winHeight); 
     336 
     337                env.GetBoolParam(string("useFullScreen"), useFullScreen); 
     338                //env.GetIntParam(string("numSssaoSamples"), numSsaoSamples); 
     339                env.GetFloatParam(string("expFactor"), expFactor); 
     340 
     341                env.GetVectorParam(string("camPosition"), camPos); 
     342 
     343                cout << "assumedVisibleFrames: " << assumedVisibleFrames << endl;  
     344                cout << "maxBatchSize: " << maxBatchSize << endl; 
     345                cout << "trianglesPerVirtualLeaf: " << trianglesPerVirtualLeaf << endl; 
     346 
     347                cout << "keyForwardMotion: " << keyForwardMotion << endl; 
     348                cout << "keyRotation: " << keyRotation << endl; 
     349                cout << "winWidth: " << winWidth << endl; 
     350                cout << "winHeight: " << winHeight << endl; 
     351                cout << "useFullScreen: " << useFullScreen << endl; 
     352                cout << "camPosition: " << camPos << endl; 
     353                cout << "expFactor: " << expFactor << endl; 
     354        } 
    346355 
    347356        /////////////////////////// 
     
    560569                sOldModelViewProjMatrixParam = cgGetNamedParameter(sCgSsaoProgram, "oldModelViewProj"); 
    561570                sMaxDepthParamSsao = cgGetNamedParameter(sCgSsaoProgram, "maxDepth"); 
     571                sExpFactorParamSsao = cgGetNamedParameter(sCgSsaoProgram, "expFactor"); 
    562572 
    563573                cgGLSetParameter1f(sMaxDepthParamSsao, myfar / 10.0f); 
     574                cgGLSetParameter1f(sExpFactorParamSsao, expFactor); 
    564575 
    565576                sSamplesParamSsao = cgGetNamedParameter(sCgSsaoProgram, "samples"); 
     
    588599                sColorsTexParam = cgGetNamedParameter(sCgDeferredProgram, "colors");   
    589600                sNormalsTexParam = cgGetNamedParameter(sCgDeferredProgram, "normals");  
    590  
    591                 sOldTexParam = cgGetNamedParameter(sCgDeferredProgram, "oldTex");   
    592601        } 
    593602        else 
     
    647656        glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, colorsBuffer); 
    648657         
    649         glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGBA32F_ARB, texWidth, texHeight); 
     658        glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGBA16F_ARB, texWidth, texHeight); 
    650659        int samples = 8; 
    651660        //glEnable(GL_MULTISAMPLE_ARB); 
     
    656665        glBindTexture(GL_TEXTURE_2D, colorsTex); 
    657666 
    658         glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA32F_ARB, texWidth, texHeight, 0, GL_RGBA, GL_FLOAT, NULL); 
     667        glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16F_ARB, texWidth, texHeight, 0, GL_RGBA, GL_FLOAT, NULL); 
    659668        //glGenerateMipmapEXT(GL_TEXTURE_2D); 
    660669        glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, colorsTex, 0); 
     
    742751        glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, colorsBuffer1); 
    743752         
    744         glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGBA32F_ARB, texWidth, texHeight); 
     753        glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGBA16F_ARB, texWidth, texHeight); 
    745754        glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_RENDERBUFFER_EXT, colorsBuffer1); 
    746755         
     
    748757        glBindTexture(GL_TEXTURE_2D, colorsTex1); 
    749758 
    750         glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA32F_ARB, texWidth, texHeight, 0, GL_RGBA, GL_FLOAT, NULL); 
     759        glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16F_ARB, texWidth, texHeight, 0, GL_RGBA, GL_FLOAT, NULL); 
    751760        //glGenerateMipmapEXT(GL_TEXTURE_2D); 
    752761        glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, colorsTex1, 0); 
     
    777786        glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, colorsBuffer2); 
    778787         
    779         glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGBA32F_ARB, texWidth, texHeight); 
     788        glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGBA16F_ARB, texWidth, texHeight); 
    780789        glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_RENDERBUFFER_EXT, colorsBuffer2); 
    781790         
     
    783792        glBindTexture(GL_TEXTURE_2D, colorsTex2); 
    784793 
    785         glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA32F_ARB, texWidth, texHeight, 0, GL_RGBA, GL_FLOAT, NULL); 
     794        glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16F_ARB, texWidth, texHeight, 0, GL_RGBA, GL_FLOAT, NULL); 
    786795        //glGenerateMipmapEXT(GL_TEXTURE_2D); 
    787796        glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, colorsTex2, 0); 
     
    789798        //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); 
    790799        //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); 
    791  
    792800        //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); 
    793801        //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); 
     802 
    794803        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); 
    795804        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); 
     
    890899                "", 
    891900                "'-'/'+'        - decreases/increases max batch size", 
    892                 "'4'/'5'        - decreases/increases triangles per virtual bvh leaf (sets bvh depth)", 
    893                 "'6'/'7'        - decreases/increases assumed visible frames", 
    894                 "'8'/'9'        - downward/upward motion", 
     901                "'1'/'2'        - downward/upward motion", 
     902                "'3'/'4'        - decreases/increases triangles per virtual bvh leaf (sets bvh depth)", 
     903                "'5'/'6'        - decreases/increases assumed visible frames", 
    895904                "", 
    896905                "'R'            - use render queue", 
     
    11001109        if (downKeyPressed) 
    11011110                KeyHorizontalMotion(-KeyShift()); 
    1102         if (eightKeyPressed) 
     1111        if (ascendKeyPressed) 
     1112                KeyVerticalMotion(KeyShift()); 
     1113        if (descendKeyPressed) 
    11031114                KeyVerticalMotion(-KeyShift()); 
    1104         if (nineKeyPressed) 
    1105                 KeyVerticalMotion(KeyShift()); 
    11061115 
    11071116        // place view on ground 
     
    12781287                traverser->SetMaxBatchSize(maxBatchSize);                
    12791288                break; 
    1280         case '6': 
    1281                 assumedVisibleFrames -= 1; 
    1282                 if (assumedVisibleFrames < 1) assumedVisibleFrames = 1; 
    1283                 traverser->SetAssumedVisibleFrames(assumedVisibleFrames); 
    1284                 break; 
    1285         case '7': 
    1286                 assumedVisibleFrames += 1; 
    1287                 traverser->SetAssumedVisibleFrames(assumedVisibleFrames);                
    1288                 break; 
    12891289        case 'M': 
    12901290        case 'm': 
     
    12921292                traverser->SetUseMultiQueries(useMultiQueries); 
    12931293                break; 
     1294        case '1': 
     1295                descendKeyPressed = true; 
     1296                break; 
     1297        case '2': 
     1298                ascendKeyPressed = true; 
     1299                break; 
     1300        case '3': 
     1301                if (trianglesPerVirtualLeaf >= 100) 
     1302                        trianglesPerVirtualLeaf -= 100; 
     1303                bvh->SetVirtualLeaves(trianglesPerVirtualLeaf); 
     1304                break; 
     1305        case '4': 
     1306                trianglesPerVirtualLeaf += 100; 
     1307                bvh->SetVirtualLeaves(trianglesPerVirtualLeaf); 
     1308                break; 
     1309        case '5': 
     1310                assumedVisibleFrames -= 1; 
     1311                if (assumedVisibleFrames < 1) assumedVisibleFrames = 1; 
     1312                traverser->SetAssumedVisibleFrames(assumedVisibleFrames); 
     1313                break; 
     1314        case '6': 
     1315                assumedVisibleFrames += 1; 
     1316                traverser->SetAssumedVisibleFrames(assumedVisibleFrames);                
     1317                break; 
     1318        case '7': 
     1319                expFactor *= 0.5f; 
     1320                break; 
    12941321        case '8': 
    1295                         eightKeyPressed = true; 
    1296                         break; 
    1297         case '9': 
    1298                         nineKeyPressed = true; 
    1299                         break; 
     1322                expFactor *= 2.0f; 
     1323                if (expFactor > 1.0f) expFactor = 1.0f; 
     1324                break; 
    13001325        case 'o': 
    13011326        case 'O': 
     
    13331358                } 
    13341359                break; 
    1335         case '4': 
    1336                 if (trianglesPerVirtualLeaf >= 100) 
    1337                         trianglesPerVirtualLeaf -= 100; 
    1338  
    1339                 bvh->SetVirtualLeaves(trianglesPerVirtualLeaf); 
    1340                 break; 
    1341         case '5': 
    1342                 trianglesPerVirtualLeaf += 100; 
    1343                 bvh->SetVirtualLeaves(trianglesPerVirtualLeaf); 
    1344                 break; 
    13451360        default: 
    13461361                return; 
     
    13941409                downKeyPressed = false; 
    13951410                break; 
    1396         case '8': 
    1397                 eightKeyPressed = false; 
    1398                 break; 
    1399          
    1400         case '9': 
    1401                 nineKeyPressed = false; 
     1411        case '1': 
     1412                descendKeyPressed = false; 
     1413                break; 
     1414        case '2': 
     1415                ascendKeyPressed = false; 
    14021416                break; 
    14031417         
     
    20942108 
    20952109                cgGLSetParameter1f(sNoiseMultiplierParam, RandomValue(3.0f, 17.0f)); 
     2110                cgGLSetParameter1f(sExpFactorParamSsao, expFactor); 
    20962111 
    20972112                GenerateSamples(); cgGLSetParameterArray2f(sSamplesParamSsao, 0, NUM_SAMPLES, (const float *)samples); 
     
    21092124                cgGLSetTextureParameter(sNormalsTexParam, normalsTex); 
    21102125                cgGLEnableTextureParameter(sNormalsTexParam); 
    2111  
    2112                 cgGLSetTextureParameter(sOldTexParam, oldTex); 
    2113                 cgGLEnableTextureParameter(sOldTexParam); 
    21142126        } 
    21152127 
     
    21462158                cgGLDisableTextureParameter(sPositionsTexParam); 
    21472159                cgGLDisableTextureParameter(sNormalsTexParam); 
    2148                 cgGLDisableTextureParameter(sOldTexParam); 
    21492160        } 
    21502161 
     
    22122223void GenerateSamples() 
    22132224{ 
     2225        static HaltonSequence halton; 
     2226 
     2227        float r[2]; 
     2228 
    22142229        // generates poisson distribution on disc 
    22152230        float minDist = 2.0f / sqrt((float)NUM_SAMPLES); 
     
    22272242                        ++ totalTries; 
    22282243 
    2229                         const float rx = RandomValue(-1, 1); 
    2230                         const float ry = RandomValue(-1, 1); 
     2244                        halton.GetNext(2, r); 
     2245 
     2246                        //const float rx = RandomValue(-1, 1); 
     2247                        //const float ry = RandomValue(-1, 1); 
     2248 
     2249                        const float rx = r[0] * 2.0f - 1.0f; 
     2250                        const float ry = r[1] * 2.0f - 1.0f; 
    22312251 
    22322252                        // check if in disk, else exit early 
     
    22602280                        } 
    22612281                } 
    2262                 //cout << "sample: " << samples[i] << " " << i /2 << " " << samples[i + 1] << " r: " << sqrt(samples[i] * samples[i]  + samples[i + 1] * samples[i + 1]) << " tries: " << totalTries << endl; 
     2282                //cout << "sample: " << samples[i] << " " << i / 2 << " " << samples[i + 1] << " r: " << sqrt(samples[i] * samples[i]  + samples[i + 1] * samples[i + 1]) << " tries: " << totalTries << endl; 
    22632283        } 
    22642284 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg

    r2836 r2837  
    55//#define NUM_SAMPLES 8 
    66#define NUM_SAMPLES 16 
     7 
     8// rule of thumb: approx 1 / NUM_SAMPLES 
     9#define SAMPLE_INTENSITY 0.2 
    710//#define SAMPLE_INTENSITY 0.125f 
    8 // rule of thumb: approx 1 / NUM_SAMPLES 
    9 #define SAMPLE_INTENSITY 0.22 //0.0625f 
    1011 
    1112#define AREA_SIZE 5e-1f 
    12  
     13#define VIEW_CORRECTION_SCALE 0.3f 
     14#define DISTANCE_SCALE 1e-6f 
    1315 
    1416struct fragment 
     
    2325struct pixel 
    2426{ 
    25   float4 color: COLOR0; 
     27        float4 color: COLOR0; 
    2628}; 
    2729 
     
    9698 
    9799                // distance between current position and sample position controls AO intensity. 
    98                 const float distanceScale = 1e-6f; 
    99  
    100100                float distance_intensity =  
    101                         (SAMPLE_INTENSITY * distanceScale) / (distanceScale + length_to_sample * length_to_sample); 
     101                        (SAMPLE_INTENSITY * DISTANCE_SCALE) / (DISTANCE_SCALE + length_to_sample * length_to_sample); 
    102102 
    103103                // if normal perpenticular to view dir, only half of the samples count 
    104                 float view_correction = 1.0f + 0.5f * (1.0f - dot(currentViewDir, currentNormal)); 
     104                float view_correction = 1.0f + VIEW_CORRECTION_SCALE * (1.0f - dot(currentViewDir, currentNormal)); 
    105105 
    106106                total_ao += cos_angle * distance_intensity * view_correction; 
     
    119119                                 uniform float3 currentViewDir, 
    120120                                 uniform float noiseMultiplier, 
    121                                  uniform float4 centerPosition) 
     121                                 uniform float4 centerPosition 
     122                                 ) 
    122123{ 
    123124        // the w coordinate from the persp. projection 
     
    158159 
    159160                // distance between current position and sample position controls AO intensity. 
    160                 const float distanceScale = 1e-6f; 
    161  
    162161                float distance_intensity =  
    163                         (SAMPLE_INTENSITY * distanceScale) / (distanceScale + length_to_sample * length_to_sample); 
    164  
    165                 const float view_correction_scale = 0.5f; 
     162                        (SAMPLE_INTENSITY * DISTANCE_SCALE) / (DISTANCE_SCALE + length_to_sample * length_to_sample); 
     163 
    166164                // if normal perpenticular to view dir, only half of the samples count 
    167                 float view_correction = 1.0f + view_correction_scale * (1.0f - dot(currentViewDir, currentNormal)); 
     165                float view_correction = 1.0f + VIEW_CORRECTION_SCALE * (1.0f - dot(currentViewDir, currentNormal)); 
    168166 
    169167                total_ao += cos_angle * distance_intensity * view_correction; 
     
    213211                                uniform sampler2D oldTex, 
    214212                                const uniform float4x4 oldModelViewProj, 
    215                                 uniform float maxDepth 
     213                                uniform float maxDepth, 
     214                                uniform float expFactor 
    216215                                ) 
    217216{ 
     
    230229        float4 col = shade(IN, colors, positions, normal.xyz, amb); 
    231230 
    232         //float ao = ssao(IN, positions, noiseTexture, samples, normal.xyz, viewDir, noiseMultiplier, centerPosition); 
    233         float4 new_col = globIllum(IN, colors, positions, noiseTexture, samples, normal.xyz, viewDir, noiseMultiplier, centerPosition);  
    234         float ao = new_col.w; 
    235  
    236         float4 attenuated_color = ao * col + new_col; 
    237         //float4 attenuated_color = ao * col; 
    238  
    239         //OUT.color = ao; 
    240         //OUT.color = ao * col; 
    241         //float4 col1 = attenuated_color; 
    242  
    243         const float x = 0.1f; 
     231        float ao = ssao(IN, positions, noiseTexture, samples, normal.xyz, viewDir, noiseMultiplier, centerPosition); 
     232        float4 attenuated_color = ao * col; 
     233 
     234        //float4 new_col = globIllum(IN, colors, positions, noiseTexture, samples, normal.xyz, viewDir, noiseMultiplier, centerPosition);  
     235        //float ao = new_col.w; 
     236        //float4 attenuated_color = ao * col + new_col; 
     237         
     238        const float x = expFactor; 
    244239 
    245240        float4 dummy = centerPosition * maxDepth; 
     
    254249 
    255250        float oldDepth = col1.w; 
    256  
    257         if ((tex.x >= 0.0f) && (tex.x < 1.0f) && (tex.y >= 0.0f) && (tex.y < 1.0f) && (abs(newDepth - oldDepth) < 9e-4f)) 
    258                 OUT.color = attenuated_color * x + col1 * float4(1.0f - x); 
     251        float depthDif = 1.0f - newDepth / oldDepth; 
     252 
     253        if ((tex.x >= 0.0f) && (tex.x < 1.0f) &&  
     254                (tex.y >= 0.0f) && (tex.y < 1.0f) &&  
     255                (abs(depthDif)  < 9e-4f)) 
     256                OUT.color = attenuated_color * expFactor + col1 * float4(1.0f - expFactor); 
    259257        else 
    260258                OUT.color = attenuated_color; 
    261259 
    262         //OUT.color = float4(centerPosition.w); 
    263         //OUT.color = float4(oldDepth); 
    264         //OUT.color = float4(newDepth); 
    265         //OUT.color = float4(abs(newDepth - oldDepth)); 
    266260        OUT.color.w = tex2D(colors, IN.texCoord.xy).w; 
    267261 
     
    273267                   uniform sampler2D colors, 
    274268                   uniform sampler2D positions, 
    275                    uniform sampler2D normals, 
    276                    uniform sampler2D oldTex 
     269                   uniform sampler2D normals 
    277270                   ) 
    278271{ 
     
    282275        float amb = normal.w; 
    283276 
    284         //OUT.color.xyz = IN.view; 
    285277        // expand normal 
    286278        normal = normalize(normal * 2.0f - float4(1.0f)); 
    287279 
    288280        float4 col = shade(IN, colors, positions, normal.xyz, amb); 
    289         //OUT.color = col; 
    290  
    291         float4 col1 = tex2D(oldTex, IN.texCoord.xy); 
    292  
    293         const float x = 0.01f; 
    294         OUT.color = col * x + col1 * float4(1.0f - x); 
     281        OUT.color = col; 
    295282 
    296283        return OUT; 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/mrt.cg

    r2836 r2837  
    105105  // hack: squeeze some information about ambient into the texture 
    106106  pix.norm.w = ambient.x; 
    107   pix.pos.w = IN.mypos.w; //IN.projPos.w; 
     107  pix.pos.w = IN.mypos.w; 
    108108  pix.col.w = IN.mypos.z / IN.mypos.w; 
    109109 
Note: See TracChangeset for help on using the changeset viewer.