I’m on windows and my fragment shader does some raymarching. It writes to the frame buffer just fine, but I have no idea how I can write to another render target and how to read that from the application. I would like to get a buffer that for each pixel contains the world coordinates of the end point of the ray that produced the color of the pixel. I hoped that something along the line of fragData = vec4(rayX, rayY, rayZ, 0.0) would do the job, but I either get index out of bounds or and empty bitmap or no rendered image at all.
Can you point me to documentation or an example?