implemented controls

This commit is contained in:
2025-01-11 15:20:39 +01:00
parent b3db9a7045
commit 884b53655b
15 changed files with 169 additions and 73 deletions

View File

@@ -10,7 +10,6 @@
#include <iostream>
#include "objs/sphere.h"
// TODO: instead of IMAGEWIDTH and IMAGEHEIGHT this should reflect the windowSize;
__global__ void raycastKernel(float* volumeData, FrameBuffer framebuffer) {
int px = blockIdx.x * blockDim.x + threadIdx.x;
@@ -148,9 +147,9 @@ void Raycaster::render() {
check_cuda_errors(cudaGraphicsMapResources(1, &this->resources));
check_cuda_errors(cudaGraphicsResourceGetMappedPointer((void**)&(this->fb->buffer), &(this->fb->buffer_size), resources));
// FIXME: might not be the best parallelization configuraiton
int tx = 16;
int ty = 16;
// FIXME: might not be the best parallelization configuration
int tx = 8;
int ty = 8;
dim3 threadSize(this->w / tx + 1, this->h / ty + 1);
dim3 blockSize(tx, ty);