Giter Club home page Giter Club logo

unity-outline's People

Contributors

snapchip avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

mengtest

unity-outline's Issues

'Draw On Top' doesn't work in URP when Unity does a 'CopyDepth' pass

The 'draw on top' option works fine EXCEPT when Unity does a 'CopyDepth' pass.

For example with these setting (depth texture enabled and MSAA off)

image

Then the 'draw on top' option does not work, the outlines will always be on top. This only happens in the game view.

When MSAA is enabled, the issue is not there or when the depth texture is disabled and post processing is also disabled on the camera, it's also fine.

I did some research and found that whether or not the 'draw on top' option works, is related to whether or not Unity does a 'CopyDepth' pass. The pass is here.

https://github.com/Unity-Technologies/Graphics/blob/716e8e06a2ba235052572dff41b98074e6065dee/com.unity.render-pipelines.universal/Runtime/Passes/CopyDepthPass.cs

And here in this script

https://github.com/Unity-Technologies/Graphics/blob/716e8e06a2ba235052572dff41b98074e6065dee/com.unity.render-pipelines.universal/Runtime/ForwardRenderer.cs

you see they do some logic like this

bool requiresDepthPrepass = requiresDepthTexture && !CanCopyDepth(ref renderingData.cameraData); requiresDepthPrepass |= isSceneViewCamera; requiresDepthPrepass |= isPreviewCamera; requiresDepthPrepass |= renderPassInputs.requiresDepthPrepass; requiresDepthPrepass |= renderPassInputs.requiresNormalsTexture;

which corressponds to the issue not being active when the scene view is active or when unity can't copy depth. So when unity does a deph prepass instead of the copy depth pass, all works fine..

Multiple Passes in URP

Hi,
I like to thank you for this amazing shader!
I like to ask you if it is possible to add more than one render feature?
I've added 2 Outline Features with differend layers. But only the first in the list is drawn.
Any ideas?
Thanks in advance

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.