Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

DepthMask for masking renderer objects

Hi! Anyone that happens to know how to create the following effect in UE4? alt text

Basically what happens is that I have applied a material with a shader in unity that masks everything thats behind the object with the assigned "DepthMask-material", the blue-ish color is the background color thats applied by the camera.

If we happen to have some shader/material-guru around here, then maybe he/she happens to know how to convert this unity-shader into a material that could be used for post processing or something :):

Shader "DepthMask" { SubShader { Tags {"Queue" = "Geometry-1" } Lighting Off Pass { ZWrite On ZTest LEqual ColorMask A
} } }

Any ideas?

Thanks in advance!

Product Version: Not Selected
depthmask.png (178.5 kB)
more ▼

asked Dec 03 '14 at 09:56 AM in Rendering

avatar image

31 8 12 17

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hey Inx51 -

Tom Looman has a great tutorial on using Custom Depth which should help you achieve the results you are after.


Thank You

Eric Ketchum

more ▼

answered Jan 05 '15 at 02:44 PM

avatar image

Lovecraft_K ♦♦ STAFF
36.7k 702 260 736

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question