Closed fender closed 3 years ago
Interesting. Looks like it's using TEXTURE2D_ARGS define from GLES2.hlsl when building to iOS instead of the correct file for some reason, can't explain it otherwise.
Added an explicit branch for metal, can you check with this file? https://drive.google.com/file/d/1zbie-7oizCgouoNpQ3AOGueYxPXuFZnc/view?usp=sharing
@guycalledfrank I'm actually having trouble getting Unity to reproduce that error consistently. I try "reimporting" the shader folder with and without the changes to that file and there are no errors either way. Any tips?
It does show the errors here but with old line numbers even after updating your file and reimporting the entire shaders folder and restarting Unity
Weird. Maybe some shaders are cached somewhere? You might try deleting Library folder contents, so Unity is forced to reimport the assets. Alternatively try moving some nodes in the shader graphs you use and resaving them,
So pressing Save Asset in the shader editor seemed to be the only way to do get it to clear the cache. 🤷 Errors are gone, thanks. 👍
@guycalledfrank Note that I had to also add the same for SHADER_API_VULKAN
for Linux builds to work.
When building for iOS there are some shader errors on URP: