So, say I describe a perfectly linear field expanding outward from a point (A signed distance field of a sphere, basically) (as described by sqrt(x^2 + y^2 + z^2)
or more traditionally length(pos)
)... How could I, at any point in that field, find a refractive index that would be physically accurate... or atleast a good approximation? (Specifically one based off the Schwarzschild models)
Lets say, theoretically, that the SDF defined before is scaled in some arbitrary unit for distance (like meters) and we have a black hole that is 1 meter in diameter (in terms of its event horizon), how would I properly define the refractive indices around this region for every point in space around said event horizon (treating every point as an arbitrary 3D vector)?
Essentially what Im doing is changing the refractive indice based on the radial field I created at the start, and this change in refractive indices replicates the appearance of light bending increasingly through space, as light does when approaching a black hole.
Artistically speaking, I can just approximate / make something up based off the position with a 3D renderer and some basic math, however, I would prefer to make it as accurate as possible.