Changeset 1969


Ignore:
Timestamp:
01/11/07 21:40:49 (17 years ago)
Author:
mattausch
Message:

global lines nearly useable!

Location:
GTP/trunk/Lib/Vis/Preprocessing
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/scripts/generate_viewcells.env

    r1746 r1969  
    4646 
    4747VssPreprocessor { 
    48         initialSamples 0 
    49         vssSamples 0 
    5048        useImportanceSampling true 
    5149        loadInitialSamples  false 
  • GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.cpp

    r1960 r1969  
    427427          glEndList(); 
    428428        } 
     429         
    429430        glCallList(glList); 
    430431  } else 
  • GTP/trunk/Lib/Vis/Preprocessing/src/GlobalLinesRenderer.cpp

    r1968 r1969  
    77#include "Exporter.h" 
    88#include "ViewCellsManager.h" 
     9#include "SamplingStrategy.h" 
    910 
    1011 
     
    161162                        return; 
    162163                } 
     164        case '5': 
     165                { 
     166                        VssRayContainer rays; 
     167 
     168                        HwGlobalLinesDistribution glStrategy(*globalLinesRenderer->mPreprocessor); 
     169 
     170                        SimpleRayContainer simpleRays; 
     171                        glStrategy.GenerateSamples(5, simpleRays); 
     172 
     173                        //cout << "simple ray: " << simpleRays[4] << endl; 
     174                        globalLinesRenderer->CastGlobalLines(simpleRays[1], rays); 
     175 
     176                        // visualize 
     177                        VssRayContainer outRays; 
     178                        VssRayContainer::const_iterator vit, vit_end = rays.end(); 
     179 
     180                        const float p = 8.0f / (float)rays.size(); 
     181 
     182                        for (vit = rays.begin(); vit != vit_end; ++ vit) 
     183                        { 
     184                                if (Random(1.0f) < p) 
     185                                { 
     186                                        outRays.push_back(*vit); 
     187                                } 
     188                        } 
     189 
     190                        globalLinesRenderer->Visualize(rays); 
     191 
     192                        CLEAR_CONTAINER(rays); 
     193                        return; 
     194                } 
    163195        case '8': 
    164196                { 
     
    170202                        VssRayContainer rays; 
    171203                        globalLinesRenderer->ApplyDepthPeeling(rays); 
     204 
     205                        // visualize 
    172206                        VssRayContainer outRays; 
    173207                        VssRayContainer::const_iterator vit, vit_end = rays.end(); 
     
    209243mOldTexture(NULL),  
    210244mPreprocessor(preprocessor), 
    211 mTexHeight(mTexHeight), 
    212 mTexWidth(mTexWidth), 
     245mTexHeight(texHeight), 
     246mTexWidth(texWidth), 
    213247mEpsilon(eps), 
    214248mMaxDepth(maxDepth), 
     
    325359void GlobalLinesRenderer::InitScene(const float alpha, const float beta) 
    326360{ 
     361        cout << "here44"<<endl; 
    327362        AxisAlignedBox3 bbox =  
    328363                globalLinesRenderer->mPreprocessor->mKdTree->GetBox(); 
    329          
     364        cout << "here77"<<endl; 
    330365        const float sceneSize = Magnitude(bbox.Diagonal()); 
    331366 
     
    356391        mViewPoint = mTermination - 0.5f * sceneSize * mEyeVec; 
    357392 
    358         cout << "termination point: " << mTermination << endl; 
    359         cout << "view point: " << mViewPoint << endl; 
    360         cout << "scene: " << bbox << endl; 
     393        //cout << "termination point: " << mTermination << endl; 
     394        //cout << "view point: " << mViewPoint << endl; 
     395        //cout << "scene: " << bbox << endl; 
    361396 
    362397        InitRenderTexture(mNewTexture); 
    363398        InitRenderTexture(mOldTexture); 
    364399         
    365         cout << "eye: " << mEyeVec << " left: " << mLeftVec << " up: " << mUpVec << endl; 
     400        //cout << "eye: " << mEyeVec << " left: " << mLeftVec << " up: " << mUpVec << endl; 
    366401} 
    367402 
     
    385420 
    386421        mEyeVec.RightHandedBase(mUpVec, mLeftVec); 
    387     mViewPoint = mTermination - 0.5f * sceneSize * mEyeVec; 
    388  
    389         cout << "termination point: " << mTermination << endl; 
    390         cout << "view point: " << mViewPoint << endl; 
    391         cout << "scene: " << bbox << endl; 
     422 
     423        //cout << "termination point: " << mTermination << endl; 
     424        //cout << "view point: " << mViewPoint << endl; 
     425        //cout << "scene: " << bbox << endl; 
    392426 
    393427        InitRenderTexture(mNewTexture); 
    394428        InitRenderTexture(mOldTexture); 
    395429         
    396         cout << "eye: " << mEyeVec << " left: " << mLeftVec << " up: " << mUpVec << endl; 
    397 } 
    398  
    399  
    400 void GlobalLinesRenderer::CastGlobalLines(const float alpha,  
     430        //cout << "eye: " << mEyeVec << " left: " << mLeftVec << " up: " << mUpVec << endl; 
     431} 
     432 
     433 
     434int GlobalLinesRenderer::CastGlobalLines(const float alpha,  
    401435                                                                                  const float beta,  
    402                                                                                   //const int samples, 
    403436                                                                                  VssRayContainer &rays) 
    404437{ 
     
    406439 
    407440        // bind pixel shader implementing the front depth buffer functionality 
    408         ApplyDepthPeeling(rays); 
    409 } 
    410  
    411  
    412 void GlobalLinesRenderer::CastGlobalLines(const SimpleRay &ray,  
     441        const int layers = ApplyDepthPeeling(rays); 
     442 
     443        return layers; 
     444} 
     445 
     446 
     447int GlobalLinesRenderer::CastGlobalLines(const SimpleRay &ray,  
    413448                                                                                  VssRayContainer &rays) 
    414449{ 
     450        const long startTime = GetTime(); 
     451        cout << "casting global lines ... " << endl; 
     452 
    415453        InitScene(ray); 
    416454 
    417455        // bind pixel shader implementing the front depth buffer functionality 
    418         ApplyDepthPeeling(rays); 
    419 } 
    420  
    421 void GlobalLinesRenderer::RenderObject(Intersectable *obj) 
    422 { 
    423         mRenderer->RenderIntersectable(obj); 
     456        const int layers = ApplyDepthPeeling(rays); 
     457 
     458        const float rays_per_sec = rays.size() / TimeDiff(startTime, GetTime()) * 1e-3; 
     459        cout << "cast " << rays.size() << " samples in " << layers << " layers in " << TimeDiff(startTime, GetTime()) * 1e-3 << " secs (" << rays_per_sec << " r / s)" << endl; 
     460        return layers; 
    424461} 
    425462 
     
    436473 
    437474                Intersectable::NewMail(); 
    438  
    439                 for (oit = mPreprocessor->mObjects.begin(); oit != oit_end; ++ oit) 
    440                 { 
    441                         //cout << (*oit)->GetId() << " "; 
    442                         RenderObject(*oit); 
    443                 } 
     475         
     476                mRenderer->RenderScene(); 
    444477        } 
    445478        glPopMatrix(); 
     
    534567        // depth and stencil. 
    535568        // Note that RT_COPY_TO_TEXTURE is required for depth textures on ATI hardware 
    536          
     569        cout << "texwidth: " << mTexWidth << " texheight: " << mTexHeight << endl; 
    537570        mNewTexture = new RenderTexture(mTexWidth, mTexHeight, true, true); 
    538571#ifdef ATI 
    539         mNewTexture->Initialize(true, true, false, true, true, 8, 8, 8, 8, RenderTexture::RT_COPY_TO_TEXTURE); 
     572        mNewTexture->Initialize(true, true, false, false, false, 8, 8, 8, 8, RenderTexture::RT_COPY_TO_TEXTURE); 
    540573#else 
    541         mNewTexture->Initialize(true, true, false, true, true, 8, 8, 8, 8);//, RenderTexture::RT_COPY_TO_TEXTURE); 
     574        mNewTexture->Initialize(true, true, false, false, false, 8, 8, 8, 8);//, RenderTexture::RT_COPY_TO_TEXTURE); 
    542575#endif 
    543576 
     
    545578 
    546579#ifdef ATI 
    547         mOldTexture ->Initialize(true, true, false, true, true, 8, 8, 8, 8, RenderTexture::RT_COPY_TO_TEXTURE); 
     580        mOldTexture ->Initialize(true, true, false, false, false, 8, 8, 8, 8, RenderTexture::RT_COPY_TO_TEXTURE); 
    548581#else 
    549         mOldTexture ->Initialize(true, true, false, true, true, 8, 8, 8, 8);//, RenderTexture::RT_COPY_TO_TEXTURE); 
     582        mOldTexture ->Initialize(true, true, false, false, false, 8, 8, 8, 8);//, RenderTexture::RT_COPY_TO_TEXTURE); 
    550583#endif 
    551584 
     
    579612                if (!mNewTexture->IsRectangleTexture())  
    580613                { 
    581                         sTexWidthParam = cgGetNamedParameter(sCgDepthPeelingProgram, "texWidth"); 
     614                        sTexWidthParam = cgGetNamedParameter(sCgDepthPeelingProgram, "invTexWidth"); 
    582615                } 
    583616 
    584617                sStepSizeParam = cgGetNamedParameter(sCgDepthPeelingProgram, "stepSize");  
    585618 
    586                 cgGLSetParameter1f(sTexWidthParam, (float)mTexWidth); 
     619                cgGLSetParameter1f(sTexWidthParam, 1.0f / (float)mTexWidth); 
    587620                cgGLSetParameter1f(sStepSizeParam, mEpsilon); 
    588621        } 
     
    600633                cgGLLoadProgram(sCgPassThroughProgram); 
    601634        } 
    602  
     635cout << "here45" << endl; 
    603636        const float alpha = 1.1; 
    604637        const float beta = 0.9; 
    605638        InitScene(alpha, beta); 
    606  
     639cout << "here4005" << endl; 
    607640        PrintGLerror("init"); 
    608641} 
     
    748781                        Vector3 clippedOldPt, clippedNewPt; 
    749782 
    750                         ClipToViewSpaceBox(oldPt, newPt, clippedOldPt, clippedNewPt); 
    751                         //clippedOldPt = oldPt; 
    752                         //clippedNewPt = newPt; 
    753  
    754                         // create rays in both directions 
    755                         if (termObj1) 
     783                        ClipToViewSpaceBox(oldPt, newPt, clippedOldPt, clippedNewPt);if(1) 
    756784                        { 
    757                                 vssRays.push_back(new VssRay(clippedOldPt, clippedNewPt, NULL, termObj1, pass)); 
    758                                 //cout << "new pt: " << newPt << endl; 
    759                         } 
    760  
    761                         if (mSampleReverse && termObj2) 
    762                         { 
    763                                 vssRays.push_back(new VssRay(clippedNewPt, clippedOldPt, NULL, termObj2, pass)); 
    764                                 //cout << "old pt: " << oldPt << endl; 
     785                                //clippedOldPt = oldPt; 
     786                                //clippedNewPt = newPt; 
     787 
     788                                // create rays in both directions 
     789                                if (termObj1) 
     790                                { 
     791                                        vssRays.push_back(new VssRay(clippedOldPt, clippedNewPt, NULL, termObj1, pass)); 
     792                                        //cout << "new pt: " << newPt << endl; 
     793                                } 
     794 
     795                                if (mSampleReverse && termObj2) 
     796                                { 
     797                                        vssRays.push_back(new VssRay(clippedNewPt, clippedOldPt, NULL, termObj2, pass)); 
     798                                        //cout << "old pt: " << oldPt << endl; 
     799                                } 
    765800                        } 
    766801                } 
     
    936971 
    937972 
    938 void GlobalLinesRenderer::ApplyDepthPeeling(VssRayContainer &rays) 
    939 { 
     973int GlobalLinesRenderer::ApplyDepthPeeling(VssRayContainer &rays) 
     974{ 
     975        int layers = 1; 
     976 
    940977        mNewTexture->BeginCapture(); 
    941978        { 
     
    952989        ProcessDepthBuffer(rays, false, 0); 
    953990 
    954         for(int i = 1; i < mMaxDepth; ++ i)  
     991        for(; layers < mMaxDepth; ++ layers)  
    955992        { 
    956993                // Peel another layer 
     
    9761013                // process the buffers for following layer 
    9771014                // jump out of loop for the first invalid buffer 
    978                 if (!ProcessDepthBuffer(rays, true, i)) 
     1015                if (!ProcessDepthBuffer(rays, true, layers)) 
    9791016                        break; 
    9801017        } 
    9811018 
    9821019        PrintGLerror("endpeeling"); 
    983 } 
    984  
    985  
    986 } 
     1020 
     1021        return layers; 
     1022} 
     1023 
     1024 
     1025} 
  • GTP/trunk/Lib/Vis/Preprocessing/src/GlobalLinesRenderer.h

    r1968 r1969  
    3535 
    3636        /** Casts global lines in the angle specified by alpha and 
    37                 beta.  
    38                 @returns Computed samples in the container rays 
     37                beta. The computed samples are stored in the ray container. 
     38                @returns # of layers 
    3939        */ 
    40         void CastGlobalLines(const float alpha,  
     40        int CastGlobalLines(const float alpha,  
    4141                                                 const float beta,  
    4242                                                 VssRayContainer &rays); 
     
    4646                @returns Computed samples in the container rays 
    4747        */ 
    48         void CastGlobalLines(const SimpleRay &ray,  
    49                                                  VssRayContainer &rays); 
     48        int CastGlobalLines(const SimpleRay &ray,  
     49                                                VssRayContainer &rays); 
    5050 
    5151 
     
    6060        int ComputePvs(ObjectContainer &objects, ObjectContainer &pvs) const; 
    6161 
    62         void RenderObject(Intersectable *obj); 
    63  
    64          
    6562        /** Draws the geometry for one pass. 
    6663        */ 
     
    6966        void GrabDepthBuffer(float *data, RenderTexture *rt); 
    7067        void GrabItemBuffer(unsigned char *data, RenderTexture *rt); 
    71         void ApplyDepthPeeling(VssRayContainer &rays); 
     68        int ApplyDepthPeeling(VssRayContainer &rays); 
    7269        void ExportDepthBuffer(); 
    7370        void ExportItemBuffer(); 
     
    120117                                           Vector3 &left); 
    121118 
     119        Preprocessor *mPreprocessor; 
     120 
    122121protected: 
    123122 
     
    129128        void InitRenderTexture(RenderTexture *rt); 
    130129 
    131         Preprocessor *mPreprocessor; 
     130         
    132131 
    133132        GlRenderer *mRenderer; 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp

    r1968 r1969  
    13521352 
    13531353        Environment::GetSingleton()->GetIntValue("Preprocessor.HwGlobalLines.texHeight", texHeight); 
    1354         Environment::GetSingleton()->GetIntValue("Preprocessor.HwGlobalLines.texHeight", texWidth); 
     1354        Environment::GetSingleton()->GetIntValue("Preprocessor.HwGlobalLines.texWidth", texWidth); 
    13551355        Environment::GetSingleton()->GetFloatValue("Preprocessor.HwGlobalLines.stepSize", eps); 
    13561356        Environment::GetSingleton()->GetIntValue("Preprocessor.HwGlobalLines.maxDepth", maxDepth); 
    13571357        Environment::GetSingleton()->GetBoolValue("Preprocessor.HwGlobalLines.sampleReverse", sampleReverse); 
    13581358 
    1359         mGlobalLinesRenderer =  
     1359        Debug << "****** hw global line options *******" << endl; 
     1360        Debug << "texWidth: " << texWidth << endl; 
     1361        Debug << "texHeight: " << texHeight << endl; 
     1362        Debug << "sampleReverse: " << sampleReverse << endl; 
     1363        Debug << "max depth: " << maxDepth << endl; 
     1364        Debug << "step size: " << eps << endl; 
     1365        Debug << endl; 
     1366 
     1367        globalLinesRenderer = mGlobalLinesRenderer =  
    13601368                new GlobalLinesRenderer(this, 
    13611369                                                                texHeight, 
     
    13641372                                                                maxDepth, 
    13651373                                                                sampleReverse); 
    1366  
     1374                                                                 
     1375cout << "here2" << endl; 
    13671376        mGlobalLinesRenderer->InitGl(); 
    1368 } 
    1369  
    1370 } 
     1377cout << "here8" << endl; 
     1378        //return mGlobalLinesRenderer; 
     1379} 
     1380 
     1381} 
  • GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlViewer.cpp

    r1942 r1969  
    11// =================================================================== 
    22// $Id$ 
    3 #ifdef USE_QT 
    43 
    54// Qt headers 
     
    186185updateGL(); 
    187186} 
     187 
    188188} 
    189189 
    190 #endif 
  • GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlViewer.h

    r1943 r1969  
    22#define __QTGLVIEWER_H 
    33 
    4 #ifdef USE_QT 
    54#include <QtOpenGL> 
    65 
     
    1211class QtGlViewer : public QGLWidget 
    1312{ 
    14   Q_OBJECT 
     13  //Q_OBJECT 
    1514 
    1615        friend class QtGlRendererWidget; 
     
    2120         
    2221        QtGlViewer(QWidget *parent, 
    23                                                 QtGlRendererWidget *renderer); 
     22                          QtGlRendererWidget *renderer); 
    2423         
    2524  virtual ~QtGlViewer(){}; 
     
    5352 
    5453#endif 
    55 #endif 
  • GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtInterface.vcproj

    r1947 r1969  
    6767                        OutputDirectory="Release" 
    6868                        IntermediateDirectory="Release" 
    69                         ConfigurationType="2" 
     69                        ConfigurationType="4" 
    7070                        CharacterSet="2"> 
    7171                        <Tool 
     
    8181                                Name="VCCustomBuildTool"/> 
    8282                        <Tool 
    83                                 Name="VCLinkerTool" 
    84                                 AdditionalDependencies="Preprocessor.lib qtmain.lib QtGui4.lib Qt3Support4.lib QAxContainer.lib QtCore4.lib QtOpenGL4.lib xerces-c_2.lib glew32.lib OpenGL32.Lib glu32.lib cg.lib cgGL.lib" 
    85                                 OutputFile="Release/QtInterface.dll" 
    86                                 LinkIncremental="1" 
    87                                 AdditionalLibraryDirectories="&quot;..\$(ConfigurationName)&quot;;&quot;..\..\lib\$(ConfigurationName)&quot;;..\..\src\GL;..\..\..\..\..\..\..\NonGTP\Zlib\lib;..\..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib;&quot;$(CG_LIB_PATH)&quot;;&quot;$(QTDIR)\lib&quot;" 
    88                                 GenerateDebugInformation="FALSE" 
    89                                 SubSystem="2" 
    90                                 OptimizeReferences="2" 
    91                                 EnableCOMDATFolding="2" 
    92                                 ImportLibrary="$(OutDir)/QtInterface.lib" 
    93                                 TargetMachine="1"/> 
    94                         <Tool 
    95                                 Name="VCMIDLTool"/> 
    96                         <Tool 
    97                                 Name="VCPostBuildEventTool" 
    98                                 Description="&quot;copy dll to preprocessor dir&quot;" 
    99                                 CommandLine="copy $(OutDir)\*.dll ..\..\bin\"/> 
    100                         <Tool 
    101                                 Name="VCPreBuildEventTool"/> 
    102                         <Tool 
    103                                 Name="VCPreLinkEventTool"/> 
    104                         <Tool 
    105                                 Name="VCResourceCompilerTool"/> 
    106                         <Tool 
    107                                 Name="VCWebServiceProxyGeneratorTool"/> 
    108                         <Tool 
    109                                 Name="VCXMLDataGeneratorTool"/> 
    110                         <Tool 
    111                                 Name="VCWebDeploymentTool"/> 
     83                                Name="VCLibrarianTool"/> 
     84                        <Tool 
     85                                Name="VCMIDLTool"/> 
     86                        <Tool 
     87                                Name="VCPostBuildEventTool"/> 
     88                        <Tool 
     89                                Name="VCPreBuildEventTool"/> 
     90                        <Tool 
     91                                Name="VCPreLinkEventTool"/> 
     92                        <Tool 
     93                                Name="VCResourceCompilerTool"/> 
     94                        <Tool 
     95                                Name="VCWebServiceProxyGeneratorTool"/> 
     96                        <Tool 
     97                                Name="VCXMLDataGeneratorTool"/> 
    11298                        <Tool 
    11399                                Name="VCManagedWrapperGeneratorTool"/> 
     
    175161                        OutputDirectory="$(ConfigurationName)" 
    176162                        IntermediateDirectory="$(ConfigurationName)" 
    177                         ConfigurationType="2" 
     163                        ConfigurationType="4" 
    178164                        CharacterSet="2"> 
    179165                        <Tool 
     
    189175                                Name="VCCustomBuildTool"/> 
    190176                        <Tool 
    191                                 Name="VCLinkerTool" 
    192                                 AdditionalDependencies="Preprocessor.lib qtmain.lib QtGui4.lib Qt3Support4.lib QAxContainer.lib QtCore4.lib QtOpenGL4.lib xerces-c_2.lib glew32.lib OpenGL32.Lib glu32.lib cg.lib cgGL.lib RTScene.lib RTWorld.lib" 
    193                                 OutputFile="Release/QtInterface.dll" 
    194                                 LinkIncremental="1" 
    195                                 AdditionalLibraryDirectories="&quot;$(QTDIR)\lib&quot;;..\..\..\..\..\..\..\NonGTP\Zlib\lib;&quot;$(CG_LIB_PATH)&quot;;..\..\src\GL;..\..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib;..\..\lib\Release;..\..\MultiLevelRayTracing\RTScene\Release;..\..\MultiLevelRayTracing\RTWorld\Release" 
    196                                 GenerateDebugInformation="FALSE" 
    197                                 SubSystem="2" 
    198                                 OptimizeReferences="2" 
    199                                 EnableCOMDATFolding="2" 
    200                                 ImportLibrary="Release/QtInterface.lib" 
    201                                 TargetMachine="1"/> 
     177                                Name="VCLibrarianTool" 
     178                                OutputFile="Release/$(ProjectName).lib"/> 
    202179                        <Tool 
    203180                                Name="VCMIDLTool"/> 
     
    216193                        <Tool 
    217194                                Name="VCXMLDataGeneratorTool"/> 
    218                         <Tool 
    219                                 Name="VCWebDeploymentTool"/> 
    220195                        <Tool 
    221196                                Name="VCManagedWrapperGeneratorTool"/> 
     
    238213                        </File> 
    239214                        <File 
    240                                 RelativePath=".\QtGlRendererDll.cpp"> 
     215                                RelativePath=".\QtGlViewer.cpp"> 
    241216                        </File> 
    242217                        <File 
     
    258233                                                Name="VCCustomBuildTool" 
    259234                                                Description="Performing moc on $(InputName).h" 
    260                                                 CommandLine="%qtdir%\bin\moc.exe $(InputDir)$(InputName).h -o $(InputDir)moc_$(InputName).cpp" 
     235                                                CommandLine="%qtdir%\bin\moc.exe $(InputDir)$(InputName).h -o $(InputDir)moc_$(InputName).cpp 
     236" 
    261237                                                Outputs="$(InputDir) moc_$(InputName).cpp"/> 
    262238                                </FileConfiguration> 
     
    288264                                                Outputs="$(InputDir) moc_$(InputName).cpp"/> 
    289265                                </FileConfiguration> 
     266                        </File> 
     267                        <File 
     268                                RelativePath=".\QtGlViewer.h"> 
    290269                        </File> 
    291270                </Filter> 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Ray.h

    r1942 r1969  
    341341   
    342342  Vector3 Extrap(const float t) const { 
    343         return mOrigin + mDirection * t; 
    344   } 
     343          return mOrigin + mDirection * t; 
     344  } 
     345 
     346  friend ostream &operator<<(ostream &s, const SimpleRay &r) 
     347  { 
     348          return s << "origin=" << r.mOrigin << " dir=" << r.mDirection; 
     349  }; 
    345350}; 
    346351 
  • GTP/trunk/Lib/Vis/Preprocessing/src/depth_peeling2d.cg

    r1964 r1969  
    22float3 main(in float4 col : COL0, 
    33            in float3 pos : WPOS, 
    4             uniform float texWidth, 
     4            uniform float invTexWidth, 
    55            uniform float stepSize, 
    66            uniform sampler2D depthTex) : COLOR 
    77{ 
    8    float zold = tex2D(depthTex, pos.xy / texWidth); 
     8   float zold = tex2D(depthTex, pos.xy * invTexWidth); 
    99 
    1010   if(pos.z < (zold + stepSize)) 
  • GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp

    r1968 r1969  
    271271#ifdef TRY_GLOBAL_LINES 
    272272         
    273         globalLinesRenderer = new GlobalLinesRenderer(preprocessor); 
    274         globalLinesRenderer->InitGl(); 
     273        preprocessor->PrepareHwGlobalLines(); 
     274        //globalLinesRenderer = new GlobalLinesRenderer(preprocessor); 
     275        //globalLinesRenderer->InitGl(); 
     276        cout << "here22" << endl; 
    275277        globalLinesRenderer->Run(); 
    276278 
    277         //delete renderer; 
    278279#else 
    279280 
Note: See TracChangeset for help on using the changeset viewer.