XNA Diffuse Shader Issue. Edge lighting problem. Image Attached

Posted by adtither on Game Development See other posts from Game Development or by adtither
Published on 2014-04-21T12:13:24Z Indexed on 2014/08/22 4:28 UTC
Read the original article Hit count: 310

Filed under:
|
|
|
|

DiffuseShadowIssue DiffuseCubeIssue

As you can see in this image the diffuse shading is working correctly in some places but in other places such as the the bottom of the sphere you can see the squares/triangles of the mesh.

Any idea what would be causing this? Let me know if you need anymore information related to code. I can upload my normals calculations and shader effect if required.

EDIT: Here's a link to the shader I'm using http://pastebin.com/gymVc7CP

Link to normals calculations: http://pastebin.com/KnMGdzHP

Seems to be an issue with edge lighting. Can't seem to see where I'm going wrong with the normals calculations though.

© Game Development or respective owner

Related posts about XNA

Related posts about shaders