- Home /
CustomRenderTexture not working
I want my custom shader I wrote to output to a texture which I can then use as an input to another shader. As of now I am using a CustomRenderTexture with the shader attached through an update material to achieve this.
This works well on linux (gl 4.5) and macOS (metal), but not on Android (either vulkan or gles). And regardless, in general it's causing a lot of problems. An empty CustomRenderTexture on macOS does not even initialize, but does so on Android.
Is this even a stable and reliable feature of Unity to be used in production? Should I go a different way about this?
Answer by lsvmth · Nov 09, 2019 at 12:45 PM
If anyone is looking for a solution, I managed to get it working in an older version of Unity — namely 2017.4.34f1 LTS.
Answer by Lucas-Camara · Oct 22, 2020 at 12:00 PM
I'm with the same problem for windows build in 2019.4.13 (LTS). The CustomRenderTexture works perfectly in the Editor, but it doesn't work in the build.
I tested using 2019.4.16 LTS URP for windows build and it is working!
Answer by jffonseca · Mar 04, 2020 at 07:17 PM
Im having the same problem om 2019.2.19f1. Is there any update on this problem? ,I'm having the same problem on 2019.2.19f1 . Any updates on this?
Answer by Peter_123 · Nov 06, 2020 at 12:56 PM
Same problem with 2019.4.12 LTS. CustomRenderTexture that works OK in Editor does not work in build.
To exclude problems with loading asset (perhaps something wasn't loading in the .asset?) I have instead of using references to assets created CustomRenderTexture from script. It again was running fine while in Editor, but after building, it produced only blank white outputs.
Answer by Peeling · Feb 01, 2021 at 03:28 PM
I'm having this exact problem in 2020.1.2f1. Simple custom render texture, works in editor, does not work in a PC player build.
Using URP.
Your answer
Follow this Question
Related Questions
[Unity SRP] How do I clear 3d RW RenderTexture? 1 Answer
How to render a RenderTexture into a specific mipLevel 0 Answers
Complex Depth Shader 0 Answers
RenderTexture on RawImage does not render anything 1 Answer
Render texture and shader issues 0 Answers