-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example for additional pass #13
Comments
Did you close this because you solved it? If so some insight would be valuable for others. |
Yes. It was embarrassingly simple after I started reading through the code. It's essentially exactly the same as the DrawRenderers but without the override material or pass index. The thing that was tripping me up was I had a lightmode tag in my shader. I set it to the name of my pass, which fixed the issue, but I think shouldn't need it at all for an unlit shader (I need to look in to this further).
|
Hi, is there a good example or recommendation on how to render another pass in a shader (without a new material), or another shader entirely?
I'm trying to do an unlit render of objects with a color id map on each object to a RenderTexture (to look up later), in addition to the regular lit pass. I know I could use the Graphics api to re-render all those objects, but as far as I know, that's extra unnecessary work.
In the current examples with DrawRenderers, it looks like you need to use another material, which means then I can't have per-instance texture inputs. I also can't specify another pass without specifying a material. Do I need to make a new custom pass that takes all filtered objects, reads the current shader the object and renders with a named pass?
Thanks
The text was updated successfully, but these errors were encountered: