x

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"

[Closed] occlusion only rendering?

is there an out-of-the-box technique to render some geometry only in the Hi-Z pass. or otherwise write to the depth buffer to cut down on overdraw when there are lots of opacity masked pixels flying around?

We're wrestling with large amounts of foliage draw, and the cost driver -- on XB1, anyway, which is our min spec -- is quad overdraw. Conventionally authored trees (eg, speedtree) are murder on perf because they use opacity masked cards in great profusion -- thus, tons of overdraw..

One idea which I've been considering is doing an offline analysis of the contents of those masked quad and creating geometry which renders into the depth buffer as if solid, sitting at or just 'behind' the entirely opaque portions of the leaf cards.We'd still be rendering a lot redundant pixels up close, but more distant views should benefit from real opaque geometry. Plus i could selectively enlarge the occluders farther from the camera, increasing the effective opacity of the whole tree in lower LODs and cutting down on overdraw even more

How would one go about creating an occlusion only-shader? It doesn't seem to be possible using the shader graph alone, unless I'm missing something. Would this be doable via a USF?

Product Version: Not Selected
Tags:
more ▼

asked Jan 10 '17 at 11:07 PM in Rendering

avatar image

Answers.Archive STAFF
1.9k 208 316 688

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

The question has been closed Jan 10 '17 at 11:08 PM by AndrewHurley for the following reason:

The question is answered, right answer was accepted


1 answer: sort voted first

Hi Steve, you can take a look at the depth prepass (FDeferredShadingSceneRenderer::RenderPrePass) and see how it works if you want to add your own custom rendering pass, but it's not for the faint of heart; it's all on DepthRendering.h/.cpp. You'll need to add your own drawing policy (which includes shaders), etc, but still has to work with the Material system, vertex factories, etc.

We don't have a lot of documentation for that, you can read Pablo Zurita's blog post as he describes a little how the policies work https://pzurita.wordpress.com/2015/02/16/optimizing-sorting-of-base-passes-in-unreal-engine-4/

more ▼

answered Jan 10 '17 at 11:07 PM

avatar image

Answers.Archive STAFF
1.9k 208 316 688

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

Follow this question

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

Answers to this question