Pink Texture / Shader issues using the 2D lights from LWRP and building to WebGl
Hi. I have made a game that I was planning to build to WebGL and host on itch.io. It's a simple 2D platformer. I am running Unity 2019.2.15f1.
I followed a Braksys 2D Lights tutorial here and added 2D lights from the Lightweight Render Pipeline.
Sadly when the game loads in WebGL on my Chrome browser all game objects (even the Unity loading logo) are pink. I read around and I know this is because the game is not sure what shaders to use.
So I tried lots of stuff that hasn't worked :
I made a resources folder and added all my shaders in to ensure they would be included in the build.
I tried changing my graphics settings so that only WebGL2 was being used
I tried not stripping out unused shaders in my project settings
I tried checking all materials on objects are correctly assigned
I'm starting to think it may be as simple as that WebGL doesn't support the 2D lights from LWRP? If anyone has any ideas or suggestions it would be very much appreciated. Thanks,
Answer by jeudyraphael · Dec 08, 2020 at 12:19 AM
I would suggest to try it in URP, that's what I use currently for 2D projects with 2D lights / Shader Graph