Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danini-the-panini/unity3d-silhouette
Silhouette in Unity3D Pro using Render to Texture
https://github.com/danini-the-panini/unity3d-silhouette
Last synced: 15 days ago
JSON representation
Silhouette in Unity3D Pro using Render to Texture
- Host: GitHub
- URL: https://github.com/danini-the-panini/unity3d-silhouette
- Owner: danini-the-panini
- Created: 2014-05-18T14:40:44.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-05-18T14:48:02.000Z (over 10 years ago)
- Last Synced: 2023-06-11T05:35:18.191Z (over 1 year ago)
- Language: C
- Size: 453 KB
- Stars: 1
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Silhouette in Unity3D
=====================Notable Notes:
--------------Main Camera has a Child camera (called Silhouette Camera) that renders to a RenderTexture, which is assigned at run time in the SetupSilhouette script attached to Main Camera. The Silhouette Camera renders only the Silhouette layer, while the Main Camera renders everything but.
The object to silhouette has two children, one using normal diffuse, and one using the Silhouette shader. The silhouette object is assigned to the Silhouette layer.
The floor object is tagged "Silhouette Receiver" to hint to the SetupSilhouette script to attach the output RenderTexture to the ground material.
Things to mention
-----------------If using the web player and the player resizes, the silhouette will go off. If you want to make it work with resizing, you have to monitor the canvas size in the update of SetupSilhouette and make it recreate the Silhouette RenderTexture if the size changes.