1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0024130: Implementing ray tracing visualization core

The purpose of this functionality is to bring a basic ray-tracing solution to existing OCCT visualization toolkit (TKOpenGL).
Currently ray-tracing visualization core supports sharp shadows, specular reflections, transparency and adaptive anti-aliasing.
However, the basis for all ray-tracing algorithms is versatile, allowing you to add new ray-tracing features easily (such as ambient occlusion).
All ray-tracing computations are performed on the GPU using OpenCL framework, allowing real-time rendering performance.

It is important to note, that real-time ray-tracing is possible using high-performance GPUs with support of OpenCL 1.1 and higher (such as NVIDIA GeForce 660 or ATI/AMD Radeon 7850).
When using low-end GPUs (such as NVIDIA GeForce 640) the ray-tracing performance may slow down significantly.
Therefore, even with NVIDIA GeForce 640 you can render scenes with the millions of triangles. The support of OpenCL-enabled CPUs and integrated graphics cards is not guaranteed.
This commit is contained in:
dbp
2013-10-31 15:35:18 +04:00
committed by bugmaster
parent 008aef40eb
commit e276548b09
52 changed files with 6266 additions and 287 deletions

View File

@@ -12,7 +12,7 @@ class COMMONSAMPLE_EXPORT MDIWindow: public QMainWindow
Q_OBJECT
public:
MDIWindow( DocumentCommon* aDocument, QWidget* parent, Qt::WindowFlags wflags );
MDIWindow( DocumentCommon* aDocument, QWidget* parent, Qt::WindowFlags wflags, bool theRT = false );
MDIWindow( View* aView, DocumentCommon* aDocument, QWidget* parent, Qt::WindowFlags wflags );
~MDIWindow();
@@ -20,6 +20,18 @@ public:
void fitAll();
virtual QSize sizeHint() const;
#ifdef HAVE_OPENCL
void setRaytracedShadows( int state );
void setRaytracedReflections( int state );
void setRaytracedAntialiasing( int state );
bool ShadowsEnabled() { return myShadowsEnabled; }
bool ReflectionsEnabled() { return myReflectionsEnabled; }
bool AntialiasingEnabled() { return myAntialiasingEnabled; }
#endif
signals:
void selectionChanged();
void message(const QString&, int );
@@ -36,6 +48,14 @@ protected:
protected:
DocumentCommon* myDocument;
View* myView;
#ifdef HAVE_OPENCL
bool myShadowsEnabled;
bool myReflectionsEnabled;
bool myAntialiasingEnabled;
#endif
};
#endif