Page 1 of 1

Custom render texture template

PostPosted: Fri Jan 19, 2018 2:12 pm
by joelrowney
I`m currently looking to see i can use a custom render texture with the shader editor, but havent been able to construct a shader template that works, but then i realy dont know what i`m doing (hence using a texture editor)

the shader includes seem quite straight forward as outlined in the documentation

https://docs.unity3d.com/Manual/CustomR ... tures.html

hopefully this will be of interest to somebody with a higher skill level than i.

Re: Custom render texture template

PostPosted: Fri Jan 19, 2018 3:04 pm
by Amplify_Borba
Hey there joelrowney, great to hear from you again!

Could you elaborate on what you're trying to achieve via a Custom Render Texture?
We would be glad to assist you if you could provide some additional details, or even a screenshot/video of the effect you mean to achieve.

Looking forward to your reply!

Re: Custom render texture template

PostPosted: Wed Jan 24, 2018 1:04 am
by joelrowney
Its sure getting busier on here. you guys are doing an amazing job at progressing the editor and also supporting your now huge community of users.
I have been looking at using custom render textures for a couple of things. the simplest one just to quickly get the output of a shader into a texture. there are other ways of course, but after reading the unity documentation it seemed like they could also be use to produce a screen buffer so that it may be possible to make some progressive effect along the lines of https://www.shadertoy.com/view/XddSRX
or indeed feedback loops like old tv effects.
thanks for taking the time to reply to my questions and again for help you have given me in the past.

Re: Custom render texture template

PostPosted: Wed Jan 24, 2018 12:03 pm
by Amplify_Borba
joelrowney wrote:Its sure getting busier on here. you guys are doing an amazing job at progressing the editor and also supporting your now huge community of users.
I have been looking at using custom render textures for a couple of things. the simplest one just to quickly get the output of a shader into a texture. there are other ways of course, but after reading the unity documentation it seemed like they could also be use to produce a screen buffer so that it may be possible to make some progressive effect along the lines of https://www.shadertoy.com/view/XddSRX
or indeed feedback loops like old tv effects.
thanks for taking the time to reply to my questions and again for help you have given me in the past.


Thank you for the kind words and for sharing this information with the community!

We do provide a few Post-Processing examples that make use of the Custom Render Textures functionality, which also make use of our Post Process Texture Template.
You can check out both Post processing samples located within the ASE package at AmplifyShaderEditor/Examples/Official/TemplateExamples/PostProcess, which contains the FilmGrain and Sobel effects.

Both are using a script in the camera that implements post processing through the OnRenderImage Camera class function, which allows modifying the final image rendered by the camera by processing it with shader based filters, and the Graphics.Blit function, which will render the source texture using the material with the post-processing shader and save it to the destination texture by automatically copying the "source" texture to the material's main texture ( or _MainTex in the shader code ).

More information here: Writing Post-Processing Effects

Please let me know if this information is helpful, thanks!