File tree Expand file tree Collapse file tree 3 files changed +8
-9
lines changed
examples_tests/22.RaytracedAO Expand file tree Collapse file tree 3 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -221,12 +221,12 @@ void main()
221
221
const uint realOutputID = outputID+i;
222
222
if (validRay)
223
223
{
224
- throughput /= float(staticViewData.samplesPerPixelPerDispatch);
224
+ throughput.rgb /= float(staticViewData.samplesPerPixelPerDispatch);
225
225
226
226
const float tt = 1.0;
227
- rays[realOutputID].origin = nbl_glsl_MC_getWorldSpacePosition()+nbl_glsl_MC_getNormalizedWorldSpaceV()*tt;//-direction*0.5*maxT;/*+newray.direction*err?; TODO */
228
- rays[realOutputID].maxT = tt*2.0;
229
- rays[realOutputID].direction = -nbl_glsl_MC_getNormalizedWorldSpaceV()*tt ;
227
+ rays[realOutputID].origin = pc.cummon.cameraPosition;// nbl_glsl_MC_getWorldSpacePosition()+nbl_glsl_MC_getNormalizedWorldSpaceV()*tt;//-direction*0.5*maxT;/*+newray.direction*err?; TODO */
228
+ rays[realOutputID].maxT = FLT_MAX;// tt*2.0;
229
+ rays[realOutputID].direction = -nbl_glsl_MC_getNormalizedWorldSpaceV();
230
230
rays[realOutputID].mask = -1;
231
231
rays[realOutputID]._active = 1;
232
232
rays[realOutputID].backfaceCulling = int(packHalf2x16(throughput.ab));
Original file line number Diff line number Diff line change @@ -29,8 +29,8 @@ void main()
29
29
if (hit.shapeid<0)
30
30
continue;
31
31
32
- // color.r -= float(hit.shapeid);//staticViewData.samplesPerPixelPerDispatch;
33
- // color.g -= float(hit.primid);//staticViewData.samplesPerPixelPerDispatch;
32
+ color.r -= float(hit.shapeid);//staticViewData.samplesPerPixelPerDispatch;
33
+ color.g -= float(hit.primid);//staticViewData.samplesPerPixelPerDispatch;
34
34
35
35
// hit buffer needs clearing
36
36
hits[rayID].shapeid = -1;
Original file line number Diff line number Diff line change @@ -99,9 +99,8 @@ class IOpenGLPipeline
99
99
{
100
100
// pack the constant data as OpenGL uniform update functions expect packed arrays
101
101
{
102
- const bool isRowMajor = is_scalar_or_vec () || m.rowMajor ;
103
- const uint32_t rowOrColCnt = isRowMajor ? m.mtxRowCnt : m.mtxColCnt ;
104
- const uint32_t len = isRowMajor ? m.mtxColCnt : m.mtxRowCnt ;
102
+ const uint32_t rowOrColCnt = m.rowMajor ? m.mtxRowCnt : m.mtxColCnt ;
103
+ const uint32_t len = m.rowMajor ? m.mtxColCnt : m.mtxRowCnt ;
105
104
for (uint32_t i = 0u ; i < count; ++i)
106
105
for (uint32_t c = 0u ; c < rowOrColCnt; ++c)
107
106
{
You can’t perform that action at this time.
0 commit comments