Right now it’s impossible to create effects in-game where it’s possible to refract light within specific areas of the player’s viewport. With the ability to do this, much more realistic effects could be created. For instance, the effect could be applied over a fire so that any light sources / ambient light passing through the area would be bent as to create the ripple effect observable in real life.
Another cool usage example that I would find fun is the ability to create spherical areas / torus shaped areas that refract light. Maybe make a gun that bends the air around the barrel when you fire it.
Unfortunately the use cases of what I explicitly mentioned are fairly slim. There are other 3D adorned effects that are more than just particles that would be really cool to see, like the 3D viewport where you can specify a camera and an object to display its output onto (which has been suggested a million times, so I won’t bother with that).
This is certainly a cool idea, but I think it would just be too rarely used to add a ton of new code to the lighting. It would be easier if the developer just created a similar system from scratch. (Track the sun’s position, fire rays down, if striking a reflective object, do the math and fire a reflected ray)
Screen-space refraction/warp effects could be really nice to have. I wouldn’t know how most game engines implement this, but I know that one way to do it is to have special textures of which only the red/blue channels are used, red indicating the horizontal pixel offset and blue indicating the vertical pixel offset, and it just takes the already-rendered pixels at those offsets to render that area of the screen.
It would be nice if there was a similar way to create warp effects in a post-processing shader where you can specify the texture, intensity, and where it is placed in the world as if it were a billboard gui.
This would be somewhat possible via a shader, but unfortunately custom shaders were denied and the chances of roblox making this in general are fairly slim. The only drawback from a post processing effect VS an actual effect in the late render pipeline would be that a post processing effect simply handles the screen as if the displayed contents were a texture (I’m sure you know this), so it can’t actually go in and grab contents from something potentially off-screen via a refracted ray.
But yeah, I could see how that may be a way to go about it.
I meant a post-processing effect (like the objects we already have), but where you can specify where to put it on the screen and what texture to use. Wouldn’t need to be a custom shader necessarily.
Yes, but typically the refraction caused by the warp effect will not be that high that it needs off-screen pixels, I can imagine. Warp effects are also things that typically don’t stay on-screen for too long, so you can get away with a bit of inaccuracy in the warping.
I don’t see the “actual refraction” happening because it seems too performance intensive to me. Looking at the source picture you provided, I’m fairly sure it just warps on-screen pixels in post-processing too (although a little hard to tell from this image)
I know there will be questions about people with lower end PCs (myself included ). I’m sure it could be handled similarly to post processing effects, only rendering / running on the client at certain graphics levels.