In short, I have a texture that I created in c++ and now I want to change the Sampler Source to Shared: Clamp.
The Texture I have is a UVolumeTexture, that is created by code and then put into an actor to show it with Raymarching in the scene. The problem with that is that because the texture is not clamped by default, you can see the bottom layer of the Volume Texture on top of the volume.
I know how to stop this when creating a material using a Volume Texture via blueprint. There, under the “Material Expression Texture Sample” tab of the Volume Texture you can change the Sampler Source to Clamp. I have tested it and it stops the bottom layer to show up on top of the texture. But in My project, this has to be done in the code between creating the texture and showing it in the scene.
So if anyone knows how to change the Sampler Source via c++ code, or clamp the texture another way, your help would be greatly appreciated.