1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-19 13:40:49 +03:00

0027974: Visualization, ray tracing - Improve ray tracing engine

* Multiple importance sampling for path tracing
* Improved light sources sampling (better handling several light sources)
* Fixed issues in light source intersection (light distance is taken into account)
* Add new TCL sample - OCCT Ball model for demonstrating physically-based materials
* Fix potential issue on NVIDIA GPUs ("Error: Failed to upload light source buffer")
* Path tracing materials reviewed; directional light source was smoother by default
This commit is contained in:
dbp
2016-10-20 12:10:47 +03:00
committed by apn
parent 0d0481c787
commit 6e728f3b5c
19 changed files with 2186 additions and 747 deletions

View File

@@ -591,17 +591,17 @@ protected: //! @name data types related to ray-tracing
//! Defines OpenGL texture samplers.
enum ShaderSamplerNames
{
OpenGl_RT_SceneNodeInfoTexture = 0,
OpenGl_RT_SceneMinPointTexture = 1,
OpenGl_RT_SceneMaxPointTexture = 2,
OpenGl_RT_SceneTransformTexture = 3,
OpenGl_RT_EnvironmentMapTexture = 0,
OpenGl_RT_GeometryVertexTexture = 4,
OpenGl_RT_GeometryNormalTexture = 5,
OpenGl_RT_GeometryTexCrdTexture = 6,
OpenGl_RT_GeometryTriangTexture = 7,
OpenGl_RT_SceneNodeInfoTexture = 1,
OpenGl_RT_SceneMinPointTexture = 2,
OpenGl_RT_SceneMaxPointTexture = 3,
OpenGl_RT_SceneTransformTexture = 4,
OpenGl_RT_EnvironmentMapTexture = 8,
OpenGl_RT_GeometryVertexTexture = 5,
OpenGl_RT_GeometryNormalTexture = 6,
OpenGl_RT_GeometryTexCrdTexture = 7,
OpenGl_RT_GeometryTriangTexture = 8,
OpenGl_RT_RaytraceMaterialTexture = 9,
OpenGl_RT_RaytraceLightSrcTexture = 10,
@@ -747,9 +747,6 @@ protected: //! @name methods related to ray-tracing
//! Updates 3D scene light sources for ray-tracing.
Standard_Boolean updateRaytraceLightSources (const OpenGl_Mat4& theInvModelView, const Handle(OpenGl_Context)& theGlContext);
//! Updates environment map for ray-tracing.
Standard_Boolean updateRaytraceEnvironmentMap (const Handle(OpenGl_Context)& theGlContext);
//! Checks to see if the OpenGL structure is modified.
Standard_Boolean toUpdateStructure (const OpenGl_Structure* theStructure);