{"id":4986,"date":"2019-05-23T01:59:16","date_gmt":"2019-05-22T17:59:16","guid":{"rendered":"https:\/\/unitycoder.com\/blog\/?p=4986"},"modified":"2019-05-23T01:59:16","modified_gmt":"2019-05-22T17:59:16","slug":"scrolling-texture-plotter-using-customrendertexture","status":"publish","type":"post","link":"https:\/\/unitycoder.com\/blog\/2019\/05\/23\/scrolling-texture-plotter-using-customrendertexture\/","title":{"rendered":"Scrolling Texture Plotter using CustomRenderTexture"},"content":{"rendered":"\n<p>Saw interesting question in the forums (<a rel=\"noreferrer noopener\" aria-label=\"link (opens in a new tab)\" href=\"https:\/\/forum.unity.com\/threads\/draw-signal-strength-scrolling-graph-with-a-shader.682465\/\" target=\"_blank\">link<\/a>) about drawing plotter like data that would scroll up, got idea about custom rendertextures (since it was similar to <a rel=\"noreferrer noopener\" aria-label=\"this effect (opens in a new tab)\" href=\"https:\/\/unitycoder.com\/blog\/2018\/05\/26\/fire-effect-using-customrendertexture\/\" target=\"_blank\">this effect<\/a>)<\/p>\n\n\n\n<p>Basic idea:<br> &#8211; use CustomRenderTexture, double buffered so it can read from itself<br> &#8211; draw color32 array into texture2D<br> &#8211; use that texture2D in your CustomRenderTexture as the bottom pixel row<br> &#8211; CustomRenderTexture keeps scrolling up by reading 1 pixel below <\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"452\" height=\"408\" data-attachment-id=\"4987\" data-permalink=\"https:\/\/unitycoder.com\/blog\/2019\/05\/23\/scrolling-texture-plotter-using-customrendertexture\/scrolling-texture-plotter-unity\/\" data-orig-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2019\/05\/scrolling-texture-plotter-unity.gif?fit=452%2C408&amp;ssl=1\" data-orig-size=\"452,408\" 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=\"scrolling-texture-plotter-unity\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2019\/05\/scrolling-texture-plotter-unity.gif?fit=452%2C408&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2019\/05\/scrolling-texture-plotter-unity.gif?resize=452%2C408&#038;ssl=1\" alt=\"\" class=\"wp-image-4987\"\/><figcaption>Scrolling Perlin Noise Colors (bottom 1 pixel row comes from the Texture2D)<\/figcaption><\/figure>\n\n\n\n<p><strong>Project sources:<\/strong><br><a href=\"https:\/\/github.com\/unitycoder\/ScrollingTexturePlotter\">https:\/\/github.com\/unitycoder\/ScrollingTexturePlotter<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Saw interesting question in the forums (link) about drawing plotter like data that would scroll up, got idea about custom rendertextures (since it was similar to this effect) Basic idea: &#8211; use CustomRenderTexture, double buffered so it can read from itself &#8211; draw color32 array [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4987,"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":[804,13,3],"tags":[1048,1097,1096,1095,142],"class_list":["post-4986","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripts","category-shaders","category-unity3d","tag-customrendertexture","tag-plot","tag-plotter","tag-scrolling","tag-texture"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2019\/05\/scrolling-texture-plotter-unity.gif?fit=452%2C408&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p1KTaT-1iq","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/4986","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=4986"}],"version-history":[{"count":1,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/4986\/revisions"}],"predecessor-version":[{"id":4988,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/4986\/revisions\/4988"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/media\/4987"}],"wp:attachment":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/media?parent=4986"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/categories?post=4986"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/tags?post=4986"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}