File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
examples_tests/22.RaytracedAO Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -1197,7 +1197,7 @@ void Renderer::render(nbl::ITimer* timer)
1197
1197
// jitter with AA AntiAliasingSequence
1198
1198
const auto modifiedViewProj = [&](uint32_t frameID)
1199
1199
{
1200
- const float stddev = 0 .707f ;
1200
+ const float stddev = 0 .5f ;
1201
1201
const float * sample = AntiAliasingSequence[frameID];
1202
1202
const float phi = core::PI<float >()*(2 .f *sample[1 ]-1 .f );
1203
1203
const float sinPhi = sinf (phi);
@@ -1326,11 +1326,10 @@ void Renderer::render(nbl::ITimer* timer)
1326
1326
1327
1327
uint32_t Renderer::traceBounce (uint32_t raycount)
1328
1328
{
1329
- if (raycount==0u )
1330
- return 0u ;
1331
-
1332
1329
const uint32_t readIx = (++m_raytraceCommonData.depth )&0x1u ;
1333
1330
const uint32_t writeIx = readIx^0x1u ;
1331
+ if (raycount==0u )
1332
+ return 0u ;
1334
1333
// trace bounce (accumulate contributions and optionally generate rays)
1335
1334
{
1336
1335
const bool continuation = m_raytraceCommonData.depth !=1u ;
@@ -1363,6 +1362,8 @@ uint32_t Renderer::traceBounce(uint32_t raycount)
1363
1362
m_raytraceCommonData.rayCountWriteIx = (++m_raytraceCommonData.rayCountWriteIx )&RAYCOUNT_N_BUFFERING_MASK;
1364
1363
glFinish (); // sync CPU to GL
1365
1364
const uint32_t nextTraceRaycount = *reinterpret_cast <uint32_t *>(m_littleDownloadBuffer->getBoundMemory ()->getMappedPointer ());
1365
+ if (nextTraceRaycount==0u )
1366
+ return 0u ;
1366
1367
1367
1368
auto commandQueue = m_rrManager->getCLCommandQueue ();
1368
1369
const cl_mem clObjects[] = {m_rayBuffer[writeIx].asRRBuffer .second ,m_intersectionBuffer[writeIx].asRRBuffer .second };
You can’t perform that action at this time.
0 commit comments