So im programming a raytracer at the moment and Im passing a 3d texture from the cpu to the gpu but the gpus texture has not the same values
The uniform part (its made in Unity):
RayTracingShader.SetTexture(0, "_VoxelPosTexture", tex);
The shader part:
Texture3D<float4> _VoxelPosTexture;
float4 color = _VoxelPosTexture.SampleLevel(sampler_VoxelPosTexture, int3(mapPos), 0);