Thankfully it wasn't a problem with the data format, I was passing the

address of a ptr, not the address contained by the ptr. With that,
preliminary GPU octree interaction works perfectly
This commit is contained in:
MitchellHansen
2017-09-24 17:48:06 -07:00
parent 7c86c60f9f
commit 305ef917e0
6 changed files with 28 additions and 12 deletions

View File

@@ -364,11 +364,11 @@ __kernel void raycaster(
// Test for out of bounds contions, add fog
if (any(voxel >= *map_dim)){
//write_imagef(image, pixel, white_light(mix(fog_color, overshoot_color, 1.0 - max(dist / 700.0f, (float)0)), (float3)(lights[7], lights[8], lights[9]), face_mask));
write_imagef(image, pixel, white_light(mix(fog_color, overshoot_color, 1.0 - max(dist / 700.0f, (float)0)), (float3)(lights[7], lights[8], lights[9]), face_mask));
return;
}
if (any(voxel < 0)) {
//write_imagef(image, pixel, white_light(mix(fog_color, overshoot_color_2, 1.0 - max(dist / 700.0f, (float)0)), (float3)(lights[7], lights[8], lights[9]), face_mask));
write_imagef(image, pixel, white_light(mix(fog_color, overshoot_color_2, 1.0 - max(dist / 700.0f, (float)0)), (float3)(lights[7], lights[8], lights[9]), face_mask));
return;
}