I am trying to mimic reflections in image composition using shaders.
I have gotten this far:
In this image the floor is "reflecting" the back wall, however the reflection is uncanny because the scale and the positions of the objects are very wrong.
For example the plant is nowhere even close to where it should be. Assuming I have a ground truth set of values for the camera parameters, is there a way I could "move" the reflections to better match what I expect to see? It doesn't have to be perfect, just better than what I have.
The way I am generating the image is the same as learnopengl's code:
void main()
{
float ratio = 1.00 / 1.52;
vec3 I = normalize(Position - cameraPos);
vec3 R = refract(I, normalize(Normal), ratio);
FragColor = vec4(texture(skybox, R).rgb, 1.0);
}
EDIT:
An important thing I should mention is, I don't have geometry, just a still image and information of where the floor is. So I don't have any depth, normals, or anything like that for most of the image.