About Me

Hi. I'm Josh Ols. Lead Graphics Developer for RUST LTD.


View Joshua Ols's profile on LinkedIn

« Unity Shader Gotcha #11 - World Normals | Main | Alloy 2.1 Released »

Unity Shader Gotcha #10 - Exclude PrePass

So with surface shaders, sometimes you need to make a forward-only shader for odd lighting models (skin, hair, eyes, etc) and blending modes (premultiplied alpha, additive, etc). In these cases you need to remember to use the attribute "exclude_path:prepass". If you forget, though it might look fine on the PC, it will have broken visuals on MacOSX when used in deferred mode. We've also found that it will get weird results when used with third-party frameworks like Candela SSRR in deferred mode.

Bottom line, for all custom forward-only shaders ALWAYS include the attribute "exclude_path:prepass" in your surface definition pragma!

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
All HTML will be escaped. Hyperlinks will be created for URLs automatically.