jsocol / indirect3d

The worst pure-software 3D engine ever!

Home Page:http://jamessocol.com/indirect3d

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement Gourard or Phong shading for TRIANGLE_STRIP primitives

jsocol opened this issue · comments

Currently the implementation uses flat shading—calculating the surface normal vector and using it at each point on the surface—rather than Gourard or (Blinn–)Phong shading. That's quicker and computationally simple, but it leads to sharp edges when shading adjacent but not coplanar surfaces. Calculating vertex normals for TRIANGLE_STRIP primitives will enable using Gourard or Phong shading which should be much smoother at the edges.