Skip to content

Commit 5845452

Browse files
committed
bugfix in gridUVTessellator, artifacts in tutorial08 are gone now
1 parent e774504 commit 5845452

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

kernels/common/subdiv/tessellation.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,12 @@ namespace embree
149149
{
150150
mic_i u_i ( step );
151151

152-
const mic_m m_u = u_i < grid_u_segments;
153152
const mic_m m_v = v_i < grid_v_segments;
154153

155154
for (unsigned int x=0;x<grid_u_res;x+=16, u_i += 16)
156155
{
156+
const mic_m m_u = u_i < grid_u_segments;
157+
157158
const mic_f u = select(m_u, mic_f(u_i) * inv_grid_u_segments, 1.0f);
158159
const mic_f v = select(m_v, mic_f(v_i) * inv_grid_v_segments, 1.0f);
159160
ustore16f(&u_array[index + x],u);
@@ -176,11 +177,11 @@ namespace embree
176177
{
177178
avxi u_i ( step );
178179

179-
const avxb m_u = u_i < grid_u_segments;
180180
const avxb m_v = v_i < grid_v_segments;
181181

182182
for (unsigned int x=0;x<grid_u_res;x+=8, u_i += 8)
183183
{
184+
const avxb m_u = u_i < grid_u_segments;
184185
const avxf u = select(m_u, avxf(u_i) * inv_grid_u_segments, 1.0f);
185186
const avxf v = select(m_v, avxf(v_i) * inv_grid_v_segments, 1.0f);
186187
storeu8f(&u_array[index + x],u); // FIXME: store not always 8 bytes aligned !!

tutorials/tutorial08/tutorial08_device.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ Vec3fa renderPixelStandard(float x, float y, const Vec3fa& vx, const Vec3fa& vy,
228228
shadow.time = 0;
229229

230230
/* trace shadow ray */
231-
rtcOccluded(g_scene,shadow);
231+
rtcOccluded(g_scene,shadow);
232232

233233
/* add light contribution */
234234
if (shadow.geomID == RTC_INVALID_GEOMETRY_ID)

0 commit comments

Comments
 (0)