Moved transfer function functions to their own file

This commit is contained in:
2025-01-11 11:50:19 +01:00
parent 417913af2b
commit 1711bcf756
5 changed files with 200 additions and 204 deletions

View File

@@ -0,0 +1,20 @@
#ifndef TRANSFER_FUNCTION_H
#define TRANSFER_FUNCTION_H
#include "linalg/linalg.h"
#include "consts.h"
#include "shading.h"
// --------------------------- Color mapping ---------------------------
// --------------------------- Volume sampling ---------------------------
__device__ float sampleVolumeNearest(float* volumeData, const int volW, const int volH, const int volD, int vx, int vy, int vz);
__device__ float sampleVolumeTrilinear(float* volumeData, const int volW, const int volH, const int volD, float fx, float fy, float fz);
// --------------------------- Transfer function ---------------------------
__device__ float4 transferFunction(float density, const Vec3& grad, const Point3& pos, const Vec3& rayDir);
#endif // TRANSFER_FUNCTION_H