Published: January 13, 2018
21
280
1.5k

You can use the depth buffer with a bump offset function to map textures to the geometry in your scene. Very handy for dynamic UI elements, character damage effects, etc...#UE4 #gamedev #indiedev

This is the important bit, influence parameter controls the amount of distortion based on the depth height map we've created #UE4 #gamedev #indiedev

Image in tweet by Klemen

Here's a damage type example. I use a sprite with a camera offset and an additional depth test to cut out pixels from the background, very useful as a quick dynamic decal effect, it will project on anything that writes to the depth buffer! #UE4 #gamedev #indiedev

@klemen_lozar Really cool, handling offset using depth buffer is pretty nice ! I tried it in #unity3d with a custom shader and it works well 🙂 #indiedev #gamedev #madewithunity

@blackfirestu Nice one!

@klemen_lozar That's cool! I used this technique to map a caustics effect onto geometry under a water plane https://x.com/skilful/status/8...

@skilful Did you get any distortion around the edges of the screen with your approach?

@klemen_lozar @t_looman Material graph or it didn't happen

@TheRealSpoonDog @t_looman Check out my reply to the thread.

@klemen_lozar Do you have a Blog or something?

@NachtmahrDev I do, http://klemenlozar.com but my latest stuff is here

@klemen_lozar This is similar on how water shader's texture works with the depth buffer right? I tried to do this before and ended up using as gradient texture to add texture on depth buffer. This is genius! Thanks for the tip!

@klemen_lozar You should be definitely doing a YouTube channel bro 😭

@klemen_lozar Would you point me to some reference material to understand all of this, I find it rather interesting but I never developed in unreal. Thank you!

@klemen_lozar Very cool idea indeed! I will check it out!

@klemen_lozar Magic, Magix, Magixs.

@klemen_lozar Those are great effects, THX for sharing😀

@klemen_lozar @AlanNoon That's clever!

@klemen_lozar Man you're a freaking wizard

Share this thread

Read on Twitter

View original thread

Navigate thread

1/23