playcanvas / playcanvas/engine
Refactor MeshInstance.setParameter
Open
Nobody has claimed this yet.
area: graphics
enhancement
- Dominant language
- JavaScript
- Stars
- 16.8k
- Forks
- 2k
- Avg merge
- 4h 32m
- Merged PRs (30d)
- 222
Description
There are two issues with the current implementation:
- The interface is different than setting those properties on the Material, and requires setting up uniforms directly, which is an internal detail of the engine.
- It only allows to overwrite a property that is set up on material. If Material does not have a property (for example emissive texture), the shader which gets compiled does not support this property, and setting it on MeshInstance is ignored as the shader does not need the uniform, and its not recompiled to support it.
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 by locating MeshInstance.setParameter and the related Material and shader-compilation paths. Compare MeshInstance parameter setting with Material property setting, then trace how missing Material properties affect shader uniforms. Done means the interface and unsupported-property behavior are defined and covered by relevant tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100