guycalledfrank / bakery-issues

Bug tracker for Bakery
4 stars 0 forks source link

Metal URP shader errors #55

Closed fender closed 3 years ago

fender commented 3 years ago

When building for iOS there are some shader errors on URP:

image
guycalledfrank commented 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

fender commented 3 years ago

@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?

fender commented 3 years ago

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

image
guycalledfrank commented 3 years ago

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,

fender commented 3 years ago

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. 👍

fender commented 3 years ago

@guycalledfrank Note that I had to also add the same for SHADER_API_VULKAN for Linux builds to work.