Hello, I am trying to make a reaction diffusion shader using ASE. You can see an example here: https://github.com/keijiro/RDSystem
The problem is that I need to use a custom render texture which requires the shader to be set up a certain way. The Unity documentation has an example shader for use with custom render textures: https://docs.unity3d.com/Manual/CustomR ... tures.html
I tried creating a template using the guide from the ASE documentation but I am not very familiar with shader code and was unable to get it working. There's no vertex function in the Unity example shader for instance, and I was unable to figure out what to do.
I would really appreciate any help getting this to work.
Template for use with custom render textures?
- Amplify_Borba
- Posts: 1239
- Joined: Mon Jul 24, 2017 9:50 am
Re: Template for use with custom render textures?
Hello! You're able to author shaders in ASE that make use of custom render textures, simply drag the asset into a Texture Sample node.
If you want to create a Custom Render Texture with an ASE shader, however, you should make sure that you use our Post Process template, as it is the most adequate one to be used as a base for the shader, and you'll also need to have a script on your camera with the OnRenderImage method defined in order to write to the custom render texture.
Within this method you'll need to perform a Blit operation, in which the source texture contains the current image from the frame buffer ( which is one of the parameters of the OnRenderImage method ), and the destination texture will be your Custom Render Texture.
Please let me know if this helps, thanks!
If you want to create a Custom Render Texture with an ASE shader, however, you should make sure that you use our Post Process template, as it is the most adequate one to be used as a base for the shader, and you'll also need to have a script on your camera with the OnRenderImage method defined in order to write to the custom render texture.
Within this method you'll need to perform a Blit operation, in which the source texture contains the current image from the frame buffer ( which is one of the parameters of the OnRenderImage method ), and the destination texture will be your Custom Render Texture.
Please let me know if this helps, thanks!
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
Re: Template for use with custom render textures?
I'm not sure I've quite understood you. Just to make sure we're talking about the same thing: a Custom Render Texture is different to a Render Texture; with a Custom Render Texture you can give it a material which then updates the texture. I believe this does the same thing as you described in your post, you just don't need to do the blitting or writing yourself. And then you can create a regular shader which uses the results of the Custom Render Texture.
I'm just uncertain about how to make my own template that will create a shader that the Custom Render Texture expects.
I'm just uncertain about how to make my own template that will create a shader that the Custom Render Texture expects.
- Amplify_Borba
- Posts: 1239
- Joined: Mon Jul 24, 2017 9:50 am
Re: Template for use with custom render textures?
Apologies for my misunderstanding, you're correct in your last reply that a template will be necessary for this matter, and we'll definitely be adding an official one to the package as soon as possible.
I'll be sure to keep you posted regarding any new developments, thank you for understanding!
I'll be sure to keep you posted regarding any new developments, thank you for understanding!
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
Re: Template for use with custom render textures?
Oooo, excellent. I can't wait! Thank you very much. 
- Amplify_Borba
- Posts: 1239
- Joined: Mon Jul 24, 2017 9:50 am
Re: Template for use with custom render textures?
No problem, we'll be sure to get in touch as soon as we have any updates regarding this!
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
Re: Template for use with custom render textures?
Hello! Just wondering if there's any updates on this. Am very excited for it.
- Amplify_Borba
- Posts: 1239
- Joined: Mon Jul 24, 2017 9:50 am
Re: Template for use with custom render textures?
Hey there, we've recently added the necessary templates for this, the Custom RT Init and Update, which are Packed inside the AmplifyShaderEditor > Plugins > EditorResources > Templates > CustomRTTemplates.unitypackage.
There's also a new sample, the Custom Render Texture Rain, which is packed inside the AmplifyShaderEditor > Examples > Custom RT Samples.unitypackage, and requires both Custom RT Init and Custom RT Update templates to be imported into project first.
Apologies for not getting back to you earlier, please let us know if you come across any issues, thanks!
There's also a new sample, the Custom Render Texture Rain, which is packed inside the AmplifyShaderEditor > Examples > Custom RT Samples.unitypackage, and requires both Custom RT Init and Custom RT Update templates to be imported into project first.
Apologies for not getting back to you earlier, please let us know if you come across any issues, thanks!
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
Re: Template for use with custom render textures?
Re: Template for use with custom render textures?
Yay, it works wonderfully. I managed to recreate Conway's Game of Life in a shader. I'm not sure I got the rules exactly right, but it proves the concept! Thanks for the template!

