Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@limdaepl
Copy link
Contributor

@limdaepl limdaepl commented Mar 27, 2025

Introduces instanced line rendering:

  • Generalize InstancedMesh(Mesh) to InstancedObject(WorldObject) (no real changes) and refactor InstancedMesh to inherit from Mesh and InstancedObject
  • Introduce InstancedLine class inheriting from Line and InstancedObject
  • Add instancing support to LineShader (copied the relevant parts from MeshShader)
  • Add instancing support to line.wgsl (copied the relevant parts from mesh.wgsl)

The duplications in the shader classes and shader code can probably be generalized to some degree as well, but I am not familiar enough with the templating engine to know how to do that.

Requires #1057 because the multiple inheritance breaks the pick info even more.

@limdaepl limdaepl requested a review from Korijn as a code owner March 27, 2025 15:01
@limdaepl limdaepl force-pushed the feature/instanced-lines branch from f7d0ffa to 551c4b4 Compare March 27, 2025 15:10
@limdaepl limdaepl force-pushed the feature/instanced-lines branch from 551c4b4 to 5f7fe34 Compare March 31, 2025 07:51
almarklein
almarklein previously approved these changes Mar 31, 2025
Copy link
Member

@almarklein almarklein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@almarklein
Copy link
Member

The liter complaints. We use ruff for linting (pip install ruff or similar):

  • ruff . in the repo root auto-formats everything.
  • ruff check checks for linting errors.

@Korijn Korijn merged commit b6ea4d4 into pygfx:main Mar 31, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants