How to make realistic graphics like this?

Sorry for the off-topic, but I have to ask: How in the world do you get anything out of code on shadertoy?

Everything I’ve seen written there makes no sense in a regular vert/frag material shader way. Somehow a single frag shader creates geometries, the background, a lens flare and even controls the damn camera movement.

While being just over the length of the phong Lighting.frag. WAT.

I mean, when you copy paste it, it will look exactly as on shadertoy, projected on a flat surface that covers the whole screen. Yeah, that’s not very useful…
To do something meaningful with it you’d have to pass some information about your scene (camera…) to the fragment shader and then do the transformations yourself. Put it in a Filter and render it (for example) as a fullscreen effect (FilterPostProcessor).
I guess this really depends on what you want to render. You can also read the depth buffer to integrate the rendering into your scene.

The technique is called Ray Marching.

As an example:
Damn, can’t link the shader because shadertoy is down :unamused: But it’s the first one you get when searching for “clouds”.

Essentially copy pasted into my game, just for testing. Downsampled to 1/3 for better performance (getting 400-600 FPS on GTX 1070).

Of course I’m not gonna steal this 1:1 :wink: The goal is a volumetric Fog of War inspired by this:

2 Likes

I didn’t really see anything that would make me think screen space reflections. Env/cube maps attached to specific surfaces would do fine. Sure a bit of work. But that what i expect in such a “demo scene”.

Yeah, me too. Lots and lots of preprocessing.

Those scenes are always more impressive if they show moving things around like furniture or even walls. THEN I would be impressed. :slight_smile:

1 Like

look at the video. https://youtu.be/Gah8sHA1r_8?t=9s
Look carefully at the reflection on the couch. When the screen border gets closer, the reflection abruptly changes.
That’s a typical artifact of a screen space effect sampling the depth map for geometry information.
You got that with SSAO too . The only information is the one in the screen so there are discontinuities on the borders.

It would be fun if someday someone starts a thread like this and then also provides the assets used in the original. That would be a fun jam.

2 Likes

If we’re still talking about reflections, it says “Planar Reflections” in the description

so neither env maps or ssr surely?