Fixes 3D Viewer: Raytracing line artifact, lp:1680530
This commit is contained in:
parent
02a559678a
commit
350a6052c0
|
@ -918,7 +918,6 @@ void C3D_RENDER_RAYTRACING::reload( REPORTER *aStatusTextReporter )
|
||||||
}
|
}
|
||||||
m_accelerator = 0;
|
m_accelerator = 0;
|
||||||
|
|
||||||
//m_accelerator = new CGRID( m_object_container );
|
|
||||||
m_accelerator = new CBVH_PBRT( m_object_container );
|
m_accelerator = new CBVH_PBRT( m_object_container );
|
||||||
|
|
||||||
#ifdef PRINT_STATISTICS_3D_VIEWER
|
#ifdef PRINT_STATISTICS_3D_VIEWER
|
||||||
|
|
|
@ -50,9 +50,9 @@ void RAY::Init( const SFVEC3F& o, const SFVEC3F& d )
|
||||||
// Amy Williams Steve Barrus R. Keith Morley Peter Shirley
|
// Amy Williams Steve Barrus R. Keith Morley Peter Shirley
|
||||||
// University of Utah
|
// University of Utah
|
||||||
// http://people.csail.mit.edu/amy/papers/box-jgt.pdf
|
// http://people.csail.mit.edu/amy/papers/box-jgt.pdf
|
||||||
m_dirIsNeg[0] = m_Dir.x <= 0.0f;
|
m_dirIsNeg[0] = m_Dir.x < 0.0f;
|
||||||
m_dirIsNeg[1] = m_Dir.y <= 0.0f;
|
m_dirIsNeg[1] = m_Dir.y < 0.0f;
|
||||||
m_dirIsNeg[2] = m_Dir.z <= 0.0f;
|
m_dirIsNeg[2] = m_Dir.z < 0.0f;
|
||||||
|
|
||||||
|
|
||||||
// ray slope
|
// ray slope
|
||||||
|
|
|
@ -271,7 +271,7 @@ SFVEC3F CBBOX::Offset( const SFVEC3F &p ) const
|
||||||
// https://github.com/mmp/pbrt-v2/blob/master/src/core/geometry.cpp#L68
|
// https://github.com/mmp/pbrt-v2/blob/master/src/core/geometry.cpp#L68
|
||||||
// /////////////////////////////////////////////////////////////////////////
|
// /////////////////////////////////////////////////////////////////////////
|
||||||
#if 0
|
#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 t0 = 0.0f;
|
||||||
float t1 = FLT_MAX;
|
float t1 = FLT_MAX;
|
||||||
|
|
Loading…
Reference in New Issue