- Home /
ARCore: How to add support for normal maps in PlaneGrid shader?
Hi!
I need to assign a shader that supports normal maps to the PlanGrid material in the HelloAR scene example.
The problem is, every other shader I assign to this material is rendered with an average color calculated by the colors on the assigned texture and moreover I don't know how to modify the original PlaneGrid shader to support normal maps.
Does anyone know how to add normal map support to the PlaneGrid shader or maybe use another valid shader for the generated plane?
Thanks in advance and have a nice day!
yeah, you can use some other material for the planes. If you want to add normal maps to PlanGrid shader, you should edit the shader code...
Answer by misher · Sep 19, 2018 at 09:51 AM
Here you can find some examples for shaders, in particular for normal map. https://docs.unity3d.com/Manual/SL-SurfaceShaderExamples.html
Thank you misher, unfortunately the problem is that every shader except PlaneGrid renders with a unique color ins$$anonymous$$d of showing the attached texture. For example the shader you suggested me renders all black, while the same shader applied to a plane is rendered correctly.
Here is a screenshot with the same material and shader applied to a plane and to the runtime-generated plane of AR Core (the black one):