{"id":4366,"date":"2016-09-16T21:24:29","date_gmt":"2016-09-16T13:24:29","guid":{"rendered":"http:\/\/unitycoder.com\/blog\/?p=4366"},"modified":"2018-01-18T17:55:35","modified_gmt":"2018-01-18T09:55:35","slug":"grayscale-image-effect-with-exclude-layers","status":"publish","type":"post","link":"https:\/\/unitycoder.com\/blog\/2016\/09\/16\/grayscale-image-effect-with-exclude-layers\/","title":{"rendered":"Grayscale Image Effect with Exclude Layers"},"content":{"rendered":"<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"4367\" data-permalink=\"https:\/\/unitycoder.com\/blog\/2016\/09\/16\/grayscale-image-effect-with-exclude-layers\/grayscale-image-effect-exclude-layers\/\" data-orig-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2016\/09\/grayscale-image-effect-exclude-layers.gif?fit=577%2C238&amp;ssl=1\" data-orig-size=\"577,238\" 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=\"grayscale-image-effect-exclude-layers\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2016\/09\/grayscale-image-effect-exclude-layers.gif?fit=577%2C238&amp;ssl=1\" class=\"alignnone size-full wp-image-4367\" src=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2016\/09\/grayscale-image-effect-exclude-layers.gif?resize=577%2C238\" alt=\"grayscale-image-effect-exclude-layers\" width=\"577\" height=\"238\" \/><\/p>\n<p>Testing grayscale image effect with added ExcludeLayers option (*just took the script parts from CameraMotionBlur effect, since it supports excluding layers)<\/p>\n<p><strong>Instructions:<\/strong><br \/>\n<span class=\"pl-c\">&#8211; Attach the script below to your camera *You need to import default effects package first (Assets\/Import Package\/Effects)<br \/>\n&#8211; Select excludeLayers (by default its Nothing)<br \/>\n&#8211; Set your excluded gameobjects to that layer<\/span><\/p>\n<p><strong>Shader source:<\/strong><br \/>\n<a href=\"https:\/\/github.com\/UnityCommunity\/UnityLibrary\/blob\/master\/Assets\/Scripts\/ImageEffects\/GrayscaleLayers.cs\"> https:\/\/github.com\/UnityCommunity\/UnityLibrary\/blob\/master\/Assets\/Scripts\/ImageEffects\/GrayscaleLayers.cs<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Testing grayscale image effect with added ExcludeLayers option (*just took the script parts from CameraMotionBlur effect, since it supports excluding layers) Instructions: &#8211; Attach the script below to your camera *You need to import default effects package first (Assets\/Import Package\/Effects) &#8211; Select excludeLayers (by default [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4367,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_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},"jetpack_post_was_ever_published":false},"categories":[13,3],"tags":[675,866,911,910,14],"class_list":["post-4366","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-shaders","category-unity3d","tag-grayscale","tag-image-effect","tag-layer","tag-selective","tag-shader"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2016\/09\/grayscale-image-effect-exclude-layers.gif?fit=577%2C238&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p1KTaT-18q","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/4366","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=4366"}],"version-history":[{"count":5,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/4366\/revisions"}],"predecessor-version":[{"id":4705,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/4366\/revisions\/4705"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/media\/4367"}],"wp:attachment":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/media?parent=4366"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/categories?post=4366"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/tags?post=4366"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}