#Fullscreen Outline Shader

1 messages · Page 1 of 1 (latest)

wooden schooner
#

I followed a guide to create a fullscreen outline shader and it works well, but I have a couple issues.

In the first image, the shader doesn't add an outline to the top side of the voxels for some reason.

In the second image, the shader doesn't add an outline on this edge.

I will admit I am very inexperienced when it comes to shaders, but I've tried many different shaders to try and get these outlines in my voxel game, and this is the only one that has gotten this far. I would just like to fix these couple of issues.

I attached an image of the shader, and this is the guide I used: https://www.youtube.com/watch?v=VGEz8oKyMpY

Until now, it's been tricky to make your own post processing effects in URP. It's going to become much easier in Unity 2022 through the new Fullscreen Shader Graph, and in this tutorial video, I'm going to create an outline post process to see how it all works!

✨ Snapshot Shaders Pro Sale: https://itch.io/s/89921/snapshot-shaders-...

▶ Play video
#

Also bonus: if you know how to make the outlines look a bit more anti-aliased instead of pixely that'd be great too

raven juniper
wooden schooner
#

i do see that "depth" is an option according to the link you sent but im not sure if thats exactly what i want or how to implement

#

also maybe its important to note its a voxel game if that simplifies anything

raven juniper
wooden schooner
#

ok cool so really i dont even need normals at all if i do that

raven juniper
#

It seems like a perfect solution, but the downside is it's not very accurate, especially at glancing angles or objects that are making contact

wooden schooner
#

wdym by this

#

should be fine for voxels no?

#

there wont be moving objects

#

its just a building game

raven juniper
#

If there will be no objects that can touch the voxels, that won't be an issue
Glancing angles might be, when view a voxel nearly from the side, one of the sides will have a steep depth difference and may become fully painted as outline

wooden schooner
#

ah

#

yea thats an issue then

raven juniper
#

The opposite issue may be that corners facing the camera have very little depth difference and might not draw outlines at all

#

Which is why it's not uncommon to mix methods to their advantages, though that can get expensive to render

#

The custom discontinuity source method like the image demonstrates involves arbitrary colors for different parts of meshes which are only used for the edge detection

#

Very precise control, and usually doesn't require any other texture maps, but is more work

wooden schooner
#

so that method would work? just gotta figure that out then