jsocol / jsocol/indirect3d

Implement Gourard or Phong shading for TRIANGLE_STRIP primitives

Open
#19 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

lighting
Dominant language
TypeScript
Stars
3
Forks
0
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the TRIANGLE_STRIP implementation and the current flat-shading normal calculation. Trace how normals reach the shading step, then determine the vertex-normal and Gouraud or Phong changes needed; the work is done when adjacent non-coplanar surfaces shade more smoothly.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
computer-graphics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.