implemented controls

This commit is contained in:
djaidjai committed 2025-01-11 15:20:39 +01:00
1 parent b3db9a7045
commit 884b53655b
15 files changed
+169 -73

No files matched your search

+3 -4
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);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.