Free Selection Outline
BookSun's Ideas
$0.0
(no ratings)
Date |
Price |
---|---|
日期和时间 |
价钱($) |
04/16(2021) |
0.0 |
11/20(2024) |
0.0 |
Jump AssetStore
Handy, Free and Powerful 3-style outline is now available!
No double cameras! No layers occupied!
No front cull pass shader needed!
No batching broken!
Smooth outline for any sharp angle geometry.Based on Built-In render pipelineNot compatible with URP and HDRP.Remember to Assign two related shaders (PostprocessOutline and Target) into the ProjectSettings->Graphic->Always Included Shaders.Otherwise this function would not work properly after you built your game.How to use:Add the script called "SelectionOutlineController.cs" to the camera you want to affect.Then play the demo scene, click and hold on any object in the scene and it will show the outline.Parameters:Selection Mode:1,Only outline the single object you select.2 ,outline its children too.Outline Type:1,Outline the whole object .2,Outline the whole object but colorize the occluded parts.3,Only outline the visible parts .Alpha Mode:1,Read the alpha data of MainTex and cause holes.2,Only outline the intact geometry.Outline Color: The outline Color.Occluded Color: The color that the occluded parts will be tinted with.Outline Width:Outline's width.Outline Hardness: How much the outline color blend in.An object must be given a collider and the collider must be put at the same place where the its renderer is.So that it can be selected (By Raycast).Selection codes are in the Update function of the script. Write your own codes there if you want.Advice:It'd be better that the main texture property of the selected object was named as "_MainTex", and the alpha data are stored in its Alpha channel.So the transparent and clipped objects can be outlined properly.Waring:Remember to Assign two related shaders (PostprocessOutline and Target) into the ProjectSettings->Graphic->Always Included Shaders.Otherwise this function would not work properly after you built your game.This function requires 3 full-screen-size rendertextures,and the outline shader contains for-loop.The cost of this is acceptable on PC,but if you are gonna use it on mobile platforms, you'd better optimize this by yourself.