Skip to content

Conversation

almarklein
Copy link
Member

@almarklein almarklein commented Sep 22, 2023

Closes #152

Tasks

  • Implement material.color_mode for mesh, meshslice, line, and point.
    • Options are 'uniform', 'vertex', 'face', 'vertex_map' and 'face_map'.
    • With 'vertex' and 'face, the geometry.colors` are used.
    • With 'vertex_mapandface_map, the geometry.texcoordsare used, and then looked up intomaterial.map`.
    • Also has 'auto' which means use 'uniform' unless the material has a .map, in which case use vertex_map.
  • Meshslice now supports all color modes (previously only uniform color).
  • Lines now also support face colors, which means the line-pieces can be individually colored.
  • The material.vertex_colors flag raises a deprecationwarning for now.
  • The mesh material.face_colors (added in Quad drawing in Mesh Shader, when the input index has shape(nx4) #529) is simply removed.
  • Fixed that the anti-aliased fragments were previously dropped because of an incorrect render_mask.
    • This makes the points look slightly larger (i.e. they were a bit too small earlier).

Notes on aa

  • The mesh shader does not use aa, so a mesh with an opaque color is fully opaque.
  • Same for mesh slice at the moment.
  • Lines uses aa, so they always have transparent fragments.
  • Same for points. However, the render_mask was previously set to ignore the transparent fragments, which can be considered a bug.
  • Text also uses aa.

@almarklein almarklein marked this pull request as ready for review September 25, 2023 12:45
@almarklein almarklein requested a review from Korijn as a code owner September 25, 2023 12:45
Korijn
Korijn previously approved these changes Sep 25, 2023
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.

Mesh per-face coloring
2 participants