Hey, I have a raymarching setup rendering some metaballs.
[code] //interpolate eye position from billboard fragment coordinates
vec2 position = -1.0+2.0*gl_FragCoord.xy/resolution.xy;
position.x *= resolution.x/resolution.y;
//define camera position and target
vec3 camera = vec3(0, 0, 5);
vec3 target = vec3(position,0.0) + vec3(0.0,0.0,1.5);
vec3 ray = normalize(target-camera);[/code]
Now I want to combine that render with a traditional raster based rendering (either as 2 passes and later using z-composite, or if possible all in one setup). So for starters, the question would be how I could match the perspective of both setups? Ideally I’d like to grab the transform/rotate/viewing-angle info from the main camera and somehow apply it to above raymarcher setup. Any ideas?