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

@@ -48,6 +48,20 @@ extern __device__ Vec3 d_cameraDir;
extern __device__ Vec3 d_cameraUp;
extern __device__ Point3 d_lightPos;
// --------------------------- Transfer Function Constants ---------------------------
struct ColorStop {
float pos; // in [0,1]
Color3 color;
};
const int lenStopsPythonLike = 5;
const int lenStopsGrayscale = 2;
const int lenStopsBluePurpleRed = 3;
extern __constant__ ColorStop d_stopsPythonLike[5];
extern __constant__ ColorStop d_stopsGrayscale[2];
extern __constant__ ColorStop d_stopsBluePurleRed[3];
// --------------------------- Functions for handling external constants ---------------------------
void copyConstantsToDevice();