Hello there,
i have a problem with changeing the backgroundcolor
while doing gpu raycasting (volume rendeirng).
When i change the color, the color of the bounding box is still black with the rendered volume inside
but the area around is colored with the backgroundcolor i have set with glClearColor.
How the background is drawn? Plain color or a skybox?
You need to add the contribution of the background color at the end of the ray you cast minus all attenuation along the ray segment in the volume.
To you can render to a texture the background first then fetch the texture in the raycasting shader.
draw fullscreenquad and texture it with the raycast result
What do you exactly mean by writing
“You need to add the contribution of the background color at the end of the ray you cast minus all attenuation along the ray segment in the volume.”
?
I also thought about to render the background to texture and bind it to the sahder. But what to do then ? I tried Alphablending but that gives very bad results.