Download

Mirror shader

EDIT

Last video: water reflections and refraction - WIP 2

See details & screenshots on last post.

Neat mirror shader.

Now, let’s go for realtime planar reflections on a floor.

This is pretty neat.

How much control is there over the shader? I.e. can we treat it like a regular PBR shader?

Thanks!

There are several parts where you can get control:

  • First part: you can control metallic, roughness, normal, etc… all things relative to the surface of the mirror. You can add patterns, drawings, to the surface too.
  • Second part: you can add and control refraction, etc… all things relative to thickness of the mirror.
  • Third part: you can get control over reflections intensity, mixing reflections with specular highlights and refraction, etc… You could also tint or blur reflections here, or add any postprocess effect (grain, bloom, fringe or whatever you want), or mix between neat and blur reflections, according to a “steam map”, for example. Or add a postprocess material to the reflections themselves.

So a lot of control.

Now that I have a neat basic shader, i’ll post other videos to show more advanced uses of it (like I did with glasses shaders).

Great stuff here, how can i get my hands on this shader? also is it compatible with 4.11? Thanks!

@William K: thank you! I plan to release this shader as a part of a “Glasses shaders pack”, i’m working on. I’m working with 4.10 and didn’t already test it on a 4.11 preview version. Unless major changes in Epic’s source code, it should run. I’ll give news about this, each time an official release is published.

This looks amazing mr EdWasHere.

I really would like to have something like this.

Keep up the great work!

Very nice,

Unbelievably, this is the first actually good mirror shader I’ve seen in UE4. :o

When do you think your content might be out on the Marketplace? Any documentation until then, or are you keeping it to yourself?

Thanks, guys! Hopefully, it should be available in a few months, as part of a “Glasses shader pack” I’m working on.
Till then, no documentation, I’m affraid. But new videos, as teasers ! :wink:

:eek:

Well, looking forward to its release!

This is amazing. How is performance?

Thanks! About performance: that’s something I’ll have to evaluate precisely to give good informations to potential users.
For the moment, all I can tell is how it runs on my old pc.
My config: Intel Q6600, GTX 560, 4 Go Ram. A high-end pc… of last century!
With a resolution of 1280x720 (both cam & capture), it runs at 50 fps.
With a resolution of 1920x1080(both cam & capt), it runs at 30/35 fps.
I’m really curious to know how it would run on a good actual PC for gamers. I’ll test it on various configs and give you these informations.

Looks really nice! Is this done purely in the shader or did you use scene capture and render targets for this?

Awesome! Can’t wait to see this released!

Amazing work as always. I’m really looking forward for the glass shader pack, please keep us posted!

Thanks, men. It’s good to see such positive feedback. Very stimulating.

Yes, I use 1 scenecapture actor for this one and I think the other effects I’m working on (reflections on floors, on metallic surfaces, on polished stones, etc…) shouldn’t use more than that.
However, if you wanted a glass with such realtime reflections + other features like spec highlights, shadows, refraction, tint, I’m not sure 1 scenecapture would be enough… I’ll try and post something when it’s done. And for more complex setups, as a mirror reflecting another one, you’d probably need 2 ou 3 scenecaptures → not playable but I’ll try it too, for fun.

New video: Realtime reflections on marble panels.

Esoterical medieval mood for this one, with the help of a few assets from Infinity Blade Grassland pack.
Not yet fully satisfied by the way reflections and marble surfaces blend together.
For the moment, if I make the surface really glossy and reflect very clear, it doesn’t look like marble but more like a mirror with marble pattern printed onto.
But this already gives a good idea of what could be done.
Use 1 scenecapture actor.
Runs at 40 fps on an Intel Q6600, GTX 560 and 4 Go RAM with full quality screenspace reflections on the scene.

Hey there,
for someone like me this looks totally like magic happening :smiley:
Are you a Wizard? ;]

Just out of personal curiosity:
Is this done with in-editor nodes or pure HLSL?
How long did it take to get it this far?
Did you had any prior experience with shader?

Shader are kinda magic for me right now so this is really astonishing.

Hi,
A wizard? I wish I were… But, infortunately, no! :wink:
I don’t know HLSL. This is done with in-editor nodes. The UE4 material system is the real magic, here.
I started to work on this about 8 months ago. All I knew about materials was what I learned playing with UDK.

I can’t really tell in the video, but are you using some sort of Fresnel falloff? In my experience, something like marble would only really exhibit a strong reflection at glancing angles - maybe something to consider?