Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17625

Directional lighting question

$
0
0

Hi Guys,

I have a basic directional lighting shader that I am working on and all is looking pretty good so far.

I notice on a low poly sphere that you can faintly see lighter areas on the edges of where the triangles are (appearing as quads, as per the geometry).

I am wondering why this is and why the shading isn't uniformally smooth across the geometry? The sphere was generated in Maya and looks perfectly fine when rendered within it.

I have attached my shader.

// *** Vertex shader ***
attribute vec3 in_Position;
attribute vec3 in_Normal;
attribute vec2 in_TextureCoord;

varying vec3 …

Viewing all articles
Browse latest Browse all 17625

Trending Articles