{"id":5220,"date":"2020-03-18T17:56:45","date_gmt":"2020-03-18T15:56:45","guid":{"rendered":"https:\/\/unitycoder.com\/blog\/?p=5220"},"modified":"2020-03-21T12:06:47","modified_gmt":"2020-03-21T10:06:47","slug":"shader-color-cycling","status":"publish","type":"post","link":"https:\/\/unitycoder.com\/blog\/2020\/03\/18\/shader-color-cycling\/","title":{"rendered":"Shader: Color Cycling"},"content":{"rendered":"\n<p>Color Cycling Shader test, because.<\/p>\n\n\n\n<p><strong>Shader Source:<\/strong><br><a href=\"https:\/\/github.com\/UnityCommunity\/UnityLibrary\/blob\/master\/Assets\/Shaders\/2D\/Effects\/ColorCycle.shader\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"https:\/\/github.com\/UnityCommunity\/UnityLibrary\/blob\/master\/Assets\/Shaders\/2D\/Effects\/ColorCycle.shader (opens in a new tab)\">https:\/\/github.com\/UnityCommunity\/UnityLibrary\/blob\/master\/Assets\/Shaders\/2D\/Effects\/ColorCycle.shader<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"130\" height=\"128\" data-attachment-id=\"5221\" data-permalink=\"https:\/\/unitycoder.com\/blog\/2020\/03\/18\/shader-color-cycling\/color_cycling\/\" data-orig-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2020\/03\/color_cycling.gif?fit=130%2C128&amp;ssl=1\" data-orig-size=\"130,128\" 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=\"color_cycling\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2020\/03\/color_cycling.gif?fit=130%2C128&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2020\/03\/color_cycling.gif?resize=130%2C128&#038;ssl=1\" alt=\"\" class=\"wp-image-5221\"\/><figcaption>Deluxe Paint Effect 9000<br><br><\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"256\" height=\"16\" data-attachment-id=\"5222\" data-permalink=\"https:\/\/unitycoder.com\/blog\/2020\/03\/18\/shader-color-cycling\/gradient-rainbow\/\" data-orig-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2020\/03\/gradient-rainbow.png?fit=256%2C16&amp;ssl=1\" data-orig-size=\"256,16\" 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=\"gradient-rainbow\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2020\/03\/gradient-rainbow.png?fit=256%2C16&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2020\/03\/gradient-rainbow.png?resize=256%2C16&#038;ssl=1\" alt=\"\" class=\"wp-image-5222\"\/><figcaption>Gradient used<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"398\" height=\"267\" data-attachment-id=\"5223\" data-permalink=\"https:\/\/unitycoder.com\/blog\/2020\/03\/18\/shader-color-cycling\/image-5-4\/\" data-orig-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2020\/03\/image-5.png?fit=398%2C267&amp;ssl=1\" data-orig-size=\"398,267\" 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-5\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2020\/03\/image-5.png?fit=398%2C267&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2020\/03\/image-5.png?resize=398%2C267&#038;ssl=1\" alt=\"\" class=\"wp-image-5223\" srcset=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2020\/03\/image-5.png?w=398&amp;ssl=1 398w, https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2020\/03\/image-5.png?resize=300%2C201&amp;ssl=1 300w\" sizes=\"auto, (max-width: 398px) 100vw, 398px\" \/><figcaption>Use grayscale texture as maintex<\/figcaption><\/figure>\n\n\n\n<p>How it works?<br>Gray color value is used to pick color from the gradient, if gray texture pixel is 0.5, then you get that turquoise color from gradient texture.<br><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"512\" height=\"128\" data-attachment-id=\"5230\" data-permalink=\"https:\/\/unitycoder.com\/blog\/2020\/03\/18\/shader-color-cycling\/image-6-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2020\/03\/image-6.png?fit=512%2C128&amp;ssl=1\" data-orig-size=\"512,128\" 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-6\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2020\/03\/image-6.png?fit=512%2C128&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2020\/03\/image-6.png?resize=512%2C128&#038;ssl=1\" alt=\"\" class=\"wp-image-5230\" srcset=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2020\/03\/image-6.png?w=512&amp;ssl=1 512w, https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2020\/03\/image-6.png?resize=300%2C75&amp;ssl=1 300w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Color Cycling Shader test, because. Shader Source:https:\/\/github.com\/UnityCommunity\/UnityLibrary\/blob\/master\/Assets\/Shaders\/2D\/Effects\/ColorCycle.shader How it works?Gray color value is used to pick color from the gradient, if gray texture pixel is 0.5, then you get that turquoise color from gradient texture.<\/p>\n","protected":false},"author":1,"featured_media":5221,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_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},"jetpack_post_was_ever_published":false},"categories":[13,3],"tags":[79,284,1167,1168,14],"class_list":["post-5220","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-shaders","category-unity3d","tag-color","tag-cycle","tag-cycling","tag-deluxe-paint","tag-shader"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2020\/03\/color_cycling.gif?fit=130%2C128&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p1KTaT-1mc","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/5220","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=5220"}],"version-history":[{"count":2,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/5220\/revisions"}],"predecessor-version":[{"id":5231,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/5220\/revisions\/5231"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/media\/5221"}],"wp:attachment":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/media?parent=5220"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/categories?post=5220"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/tags?post=5220"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}