- Home /
Weird Material clashing in LWRP with the CustomForwardRenderData
Im working on a mobile game with some fancy looking shaders with LWRP. Right now i added a post rendering shader that shows some interactives with the rendering feature from the custom render asset. The goal was to have my model be rendererd the same way as before when selected, but with a pulsating transparent glowing shader effect (made with a PBR shadergraph, but also the unlit version, no difference). If my shadergraph material is applied directly onto the model in the mesh renderer everything is fine and works properly btw. BUT when i add it via the renderer feature in my CustomForwardAssetData it gets weird. It looks like the materials are fighting for the space they are getting renderer onto and weird spots came up in the game view and editor view. When moving around in the editor the spots change up completly. Only when the model is at rotation (0,0,0) there are 0 spots. I then added a basic LWRP Lit material to the render feature. The problem looked solved, but when rotating the problem still occours, but only on surfaces with 90° angles.
I then switched to primitives to test this behaviour in a new Project:
no rotation, no scaling -> works fine
rotation that is not 0 -> problem occours
equal scaling (e.g. 2,2,2)with no rotating -> works sometimes
scaling with differend value (e.g. 1,2,3) -> problem occours
Im using the Unity Version 2019.2.10f1 and LWRP 6.9.2. All Materials were Opaque. No shadows, special lighting etc. But chaging the light wont affect this anyway.
Im still new to the lwrp renderer features, so maybe im missing a setting with priority to stop this, but after 15hours of testing and searching i came up empty handed. maybe someone had a similar Problem or has a solution to this. I would rly appreciate it!
Your answer
Follow this Question
Related Questions
Altering Material through Script Causes Transparent Rendering Error - C# 1 Answer
Why does the same material render differently here? 1 Answer
Why is my terrain pink? 2 Answers
Prevent material from rendering behind itself 0 Answers
Shader errors in Windows build ( renders black ) but not in Editor 2 Answers