{"id":5006,"date":"2019-06-10T01:34:14","date_gmt":"2019-06-09T17:34:14","guid":{"rendered":"https:\/\/unitycoder.com\/blog\/?p=5006"},"modified":"2019-06-10T03:38:52","modified_gmt":"2019-06-09T19:38:52","slug":"editorscript-hdr-outline-for-worldspace-ui-panel-using-linerenderer","status":"publish","type":"post","link":"https:\/\/unitycoder.com\/blog\/2019\/06\/10\/editorscript-hdr-outline-for-worldspace-ui-panel-using-linerenderer\/","title":{"rendered":"EditorScript: HDR Outline for WorldSpace UI Panel using LineRenderer"},"content":{"rendered":"\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"976\" height=\"510\" data-attachment-id=\"5007\" data-permalink=\"https:\/\/unitycoder.com\/blog\/2019\/06\/10\/editorscript-hdr-outline-for-worldspace-ui-panel-using-linerenderer\/image-13\/\" data-orig-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2019\/06\/image.png?fit=976%2C510&amp;ssl=1\" data-orig-size=\"976,510\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2019\/06\/image.png?fit=300%2C157&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2019\/06\/image.png?fit=976%2C510&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2019\/06\/image.png?resize=976%2C510&#038;ssl=1\" alt=\"\" class=\"wp-image-5007\" srcset=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2019\/06\/image.png?w=976&amp;ssl=1 976w, https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2019\/06\/image.png?resize=300%2C157&amp;ssl=1 300w, https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2019\/06\/image.png?resize=768%2C401&amp;ssl=1 768w\" sizes=\"auto, (max-width: 976px) 100vw, 976px\" \/><figcaption>Left: Regular Outline with bad edges<br>Right: LineRenderer with HDR color (to make it work with >1.0 bloom)<\/figcaption><\/figure>\n\n\n\n<p>Needed hdr outline for ui panel, so here&#8217;s small editor helper script to assign linerenderer points around UI panel:<br><a href=\"https:\/\/github.com\/UnityCommunity\/UnityLibrary\/blob\/master\/Assets\/Scripts\/Editor\/ContextMenu\/CreateOutlineForPanelEditor.cs\">https:\/\/github.com\/UnityCommunity\/UnityLibrary\/blob\/master\/Assets\/Scripts\/Editor\/ContextMenu\/CreateOutlineForPanelEditor.cs<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"414\" height=\"305\" data-attachment-id=\"5008\" data-permalink=\"https:\/\/unitycoder.com\/blog\/2019\/06\/10\/editorscript-hdr-outline-for-worldspace-ui-panel-using-linerenderer\/image-1\/\" data-orig-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2019\/06\/image-1.png?fit=414%2C305&amp;ssl=1\" data-orig-size=\"414,305\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image-1\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2019\/06\/image-1.png?fit=300%2C221&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2019\/06\/image-1.png?fit=414%2C305&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2019\/06\/image-1.png?resize=414%2C305&#038;ssl=1\" alt=\"\" class=\"wp-image-5008\" srcset=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2019\/06\/image-1.png?w=414&amp;ssl=1 414w, https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2019\/06\/image-1.png?resize=300%2C221&amp;ssl=1 300w\" sizes=\"auto, (max-width: 414px) 100vw, 414px\" \/><figcaption>right click over image component to access this editor script. Note: You need to add LineRenderer component for this image panel first.<\/figcaption><\/figure>\n\n\n\n<p>*Note: i&#8217;m using UI always on top shader for the panel (it fixes the linerenderer z-fight issue, but also needed it for this project to display UI elements always on top) <a href=\"https:\/\/github.com\/UnityCommunity\/UnityLibrary\/blob\/master\/Assets\/Shaders\/2D\/UI\/UI_Always_On_Top.shader\">https:\/\/github.com\/UnityCommunity\/UnityLibrary\/blob\/master\/Assets\/Shaders\/2D\/UI\/UI_Always_On_Top.shader<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Needed hdr outline for ui panel, so here&#8217;s small editor helper script to assign linerenderer points around UI panel:https:\/\/github.com\/UnityCommunity\/UnityLibrary\/blob\/master\/Assets\/Scripts\/Editor\/ContextMenu\/CreateOutlineForPanelEditor.cs *Note: i&#8217;m using UI always on top shader for the panel (it fixes the linerenderer z-fight issue, but also needed it for this project to display [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5007,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[804,3],"tags":[21,907,1078,1106,650],"class_list":["post-5006","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripts","category-unity3d","tag-editor-script","tag-hdr","tag-outline","tag-panel","tag-ui"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2019\/06\/image.png?fit=976%2C510&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p1KTaT-1iK","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/5006","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/comments?post=5006"}],"version-history":[{"count":2,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/5006\/revisions"}],"predecessor-version":[{"id":5010,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/5006\/revisions\/5010"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/media\/5007"}],"wp:attachment":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/media?parent=5006"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/categories?post=5006"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/tags?post=5006"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}