Problem with Alpha Texture shading

Hi, new member here! Our team is having a shading problem on an alpha texture on a model: the backside of the model/texture which is not being lit, looks exactly the same as the the side receiving light. I have done some research to try to fix the problem but I haven’t found a solution. Does anyone know how to fix this, so the unlit side looks dark? I have attached an image for you to see what I’m talking about:

Thanks,
John

That does look odd. Are you able to share the project to look at? It almost looks like the material is emissive.

Sure, here is the link: https://playcanvas.com/project/775326/overview/materialshading-test-scene

https://playcanvas.com/editor/scene/1111626

One of the graphics team may need to confirm but as far as I can tell it is because culling mode for that material was set to None and therefore it’s taken the front face lighting information?

Creating another set of polys for the back of the net on the model should fix this.

1 Like

Oh ok! Yeah we were thinking of doing that to solve the problem, right now the plane with the alpha texture only has polygons facing one side. Thanks!

@john.andersson - I took a look and the engine does support two-sided lighting, but unfortunately it is not currently exposed in the editor.

I forked your project and added a script with enables two-sided lighting here: https://playcanvas.com/project/775484/overview/twosided-lighting - you will have to launch the project to see the two-sided lighting until two-sided lighting is exposed in the editor - I added a GitHub issue here to do this: https://github.com/playcanvas/editor/issues/324

1 Like

Ok awesome, thanks! Would it be possible for you to give us that script so that our programmer can add it to our main project?

The script is in the project link above :slight_smile:

2 Likes

I’m blind… Thanks!