Fixes 3D Viewer: Raytracing line artifact, lp:1680530

This commit is contained in:
Mario Luzeiro 2018-11-13 23:56:26 +00:00 committed by Wayne Stambaugh
parent 9610f8f208
commit f3d1f31e1d
3 changed files with 4 additions and 5 deletions

View File

@ -918,7 +918,6 @@ void C3D_RENDER_RAYTRACING::reload( REPORTER *aStatusTextReporter )
}
m_accelerator = 0;
//m_accelerator = new CGRID( m_object_container );
m_accelerator = new CBVH_PBRT( m_object_container );
#ifdef PRINT_STATISTICS_3D_VIEWER

View File

@ -50,9 +50,9 @@ void RAY::Init( const SFVEC3F& o, const SFVEC3F& d )
// Amy Williams Steve Barrus R. Keith Morley Peter Shirley
// University of Utah
// http://people.csail.mit.edu/amy/papers/box-jgt.pdf
m_dirIsNeg[0] = m_Dir.x <= 0.0f;
m_dirIsNeg[1] = m_Dir.y <= 0.0f;
m_dirIsNeg[2] = m_Dir.z <= 0.0f;
m_dirIsNeg[0] = m_Dir.x < 0.0f;
m_dirIsNeg[1] = m_Dir.y < 0.0f;
m_dirIsNeg[2] = m_Dir.z < 0.0f;
// ray slope

View File

@ -271,7 +271,7 @@ SFVEC3F CBBOX::Offset( const SFVEC3F &p ) const
// https://github.com/mmp/pbrt-v2/blob/master/src/core/geometry.cpp#L68
// /////////////////////////////////////////////////////////////////////////
#if 0
bool CBBOX::Intersect( const RAY &aRay, float *aOutHitt0, float *aOutHitt1 )
bool CBBOX::Intersect( const RAY &aRay, float *aOutHitt0, float *aOutHitt1 ) const
{
float t0 = 0.0f;
float t1 = FLT_MAX;