unity-renderer
unity-renderer copied to clipboard
Outline Shader Advance
Shader info
MUST :
--> outlining alpha
--> control the online shape.
--> single solid color
--> or gradient outward
--> or it could also act as a mask for ultrarainbow color movement
--> rendered behind objects, and the inner mass of color may be faded with a overlay color mass when clicking, the effect may blink or change color.
MUST NOT -- DONTS
X : red lines: cant use duplication of geometry, and cant replace the geometry shader X : not based on geometry displacement
checklist
- [x] Shader Base
- [x] Specs
- [x] Demo Scene
- [x] outlining hull
- [x] control the online shape.
- [x] single solid color
- [x] Script control
- [x] Internal Fill
- [x] rendered behind objects, and the inner mass of color may be faded with a overlay color mass when clicking, the effect may blink or change color.
-- GPU Skinning
- [ ] Avatar Outline (GPU Skinning)
Extra Features To Add
- [ ] outlining alpha (Later Upgrade)
- [ ] or gradient outward (Later Upgrade)
- [ ] or it could also act as a mask for ultrarainbow color movement (Later Upgrade)
Advance Outline Progress
Technique : - Hull - Edge Scanned based Programming Language : URP HLSL (non CG)
Stage : Alpha
Progress Here
Advance Outline Progress
Technique : - Hull - Edge Scanned based
Programming Language : URP HLSL (non CG)
Stage : Controls in Stable Mode / Project Implementation / Review
https://decentralandteam.slack.com/files/U040DBW2RFU/F044G76Q7MH/advance_outline_control-1.m4v
Working on feedback adjustments
- [x] Transparent objects issue (ZDepth related)
- [x] Objects with open uvs
- [ ] Multiple mesh objects
For transparent objects that have problems solution is
- Add this transparent object to a Layer ( TransparentOutlined on my example here)
- Add those 2 render features that only apply on this layer
Coin issue is Overlapping UV's , cant be solved in the outline shader as we do calculations on that area of the shader.
I need to come up with another solution OR change the uvs of the coin
We can keep the outlines connected by setting the Overlay Amount to 0 in such scenarios
Transparency issue solved within the shader and the transparent material (use v2 shader and on the shader material disable the receive shadows)
New Post Effect Core To URP (WIP / during translation)
Outline Replica from PostProcess to URP Render Feature
Current Features : Color , Width , Object Occlusion , Pseudo Blur
State : Wip , need to write the controls , clean it and stabilize the code.
Progress :
All cases EXCEPT CPU Skinning (Toon Shader) are working fine.
I will need some time to implement the outline to the custom GPU Skinning.!
Shader based (per object without layers control) WIP progress. Based on the previous Render Feature version but in shader .
Finalizing this shader only approach with internal on/off feature flag
Outline Combined Solution to a shader only setup
WIP on Avatar (on rest of the items works as expected)
Work in progress
https://images.zenhubusercontent.com/337227404/6de3d415-aed7-47d3-933d-f914a9c3fd5a/outline_combinedsolution_progress_1_1.m4v
Progress 2 on Outline Avatar ,
More stable but i need to separate and use more passes to behave as we need it. Plus i need to separate objects from Avatar as i am forced to use different algorithms , again everything is going to be controlled from one shader only
Working on it.
https://images.zenhubusercontent.com/337227404/4c18cf36-a0c3-4974-bf88-958fd69614bb/outline_on_avatar_progress_2_1.m4v
Implemented Outliner Straight into Toon Shader
Working GPU Skinning included (also in separate version)
Needs some tweaking to get the exact same look.
-
Fixed glitch now as you can see in the video we have rock steady outline .
-
Unfortunately now we have partial transparency passing through the shader ONLY in camera view , so it probably a combination passes again , will find fix that one as well.
Transparency coming through ALMOST solved!!!
Solved all issues with Toon shader , now it accepts the outline internally.
Some tweaks are left to complete this for the avatar .
Object outline needs some tweaking as well and its done.
https://images.zenhubusercontent.com/337227404/08ef9b50-da71-4a87-bd46-72f143e21396/toon_outline_merge_1.m4v
Outline in Toon Shader
https://images.zenhubusercontent.com/337227404/217660a4-204f-4249-9658-114cd63c0d46/outline_in_toon_1.m4vr
@MichaelBitsakis is everything ready for integration? Please ask @olavra to review when so.
@xavi-dcl We need to review this with @olavra and do an integration with @AjimenezDCL .
- Outline on Avatar on single material
- No extra work from Devs works as is.
- Tested on wearables