openframeworks / openframeworks/openFrameworks
ofGLProgrammableRenderer would not update a ofShader's normalMatrix unless an ofMaterial is bound.
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
This leads to ofRotate, ofTranslate, ofMultMat etc not updating the normalMatrix.
Moving the responsibility of the normalMatrix from ofMaterial and into ofGLProgrammableRenderer::uploadCurrentMatrix() fixes this.
The uniform lookup is cached in ofShader so it will be silently ignored if the shader does not define that uniform.
https://github.com/andreasmuller/openFrameworks/commit/12d512c4919cad114ebaa6f77b7a7f1b8485381f
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with ofGLProgrammableRenderer::uploadCurrentMatrix() and inspect how ofMaterial currently handles the normalMatrix and how ofShader caches uniform lookups. Compare the referenced commit, then verify that matrix operations update the normalMatrix without an ofMaterial and that shaders without this uniform are silently ignored.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100