Skip to content

Conversation

@NoahBussingerUbique
Copy link
Collaborator

@NoahBussingerUbique NoahBussingerUbique commented Dec 10, 2025

Improvements

  • Tessellation wireframe mode flag
  • Remove comments
  • Compile time flag for gpu tessellation
  • PolygonLayer port to tessellation
  • Optimize interpolation with halfs
  • Disable tessellation in simulator
  • Unify subdivision factor space
  • Disable 2d hardware tessellation

@NoahBussingerUbique NoahBussingerUbique force-pushed the feature/gpu-tessellation-tier1 branch from 2969b7d to 97b17b7 Compare December 11, 2025 13:50


RasterShaderOpenGl::RasterShaderOpenGl(bool projectOntoUnitSphere)
: programName(projectOntoUnitSphere ? "UBMAP_RasterShaderUnitSphereOpenGl" : "UBMAP_RasterShaderOpenGl")
Copy link
Contributor

Choose a reason for hiding this comment

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

Aside: why does this shader have two variants if it doesn't use the value?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have no idea. Wondered it myself. I took it over from the other shaders and considered it a todo for the repo improvements issue.


void Quad2dTessellatedOpenGl::computeGeometry(bool texCoordsOnly) {
// Data mutex covered by caller Quad2dTessellatedOpenGL::setup()
if (!texCoordsOnly) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Style: split function (tex-coords part and geometry part).
Style 2: clearer as function, take input as param and return result, assign at call site vertices = computeVertexPositions(frame)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Its currently like this because of consistency with the Quad2dOpenGl.cpp. But I could of course change both.

bool Polygon2dOpenGl::isReady() { return ready; }

void Polygon2dOpenGl::setVertices(const ::SharedBytes & vertices_, const ::SharedBytes & indices_, const ::Vec3D & origin) {
void Polygon2dOpenGl::setSubdivisionFactor(int32_t factor) {}
Copy link
Contributor

Choose a reason for hiding this comment

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

Could be confusing that the tesselated / non-tesselated types are mixed behind the same interface. We need to manually keep track of where a tesselated object is used.
Would it be an option to have a separate type hierarchy for the tesselated types, or does that make integration much more complicated?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Agree.
Thinking about it, the tessellated interfaces which would extend the normal ones would be almost empty though. The only change i did to the interfaces i think was the addition of the setSubdivisionFactor to the polygon interface. The reason i did this was for consistency with the quad interface, there for some reason the subdivision gets done on the level of the metal/opengl backend.

Copy link
Collaborator

@maurhofer-ubique maurhofer-ubique left a comment

Choose a reason for hiding this comment

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

Note: I observed some strange precision issues on certain phones but don't have one with me at the moment. I'll try to find one to reproduce the issues.

@NoahBussingerUbique NoahBussingerUbique force-pushed the feature/gpu-tessellation-tier1 branch from 2268b63 to 04fa9ba Compare January 21, 2026 16:22
@NoahBussingerUbique NoahBussingerUbique force-pushed the feature/gpu-tessellation-tier1 branch from 04fa9ba to dfd1d3b Compare January 21, 2026 16:34
@github-actions
Copy link

github-actions bot commented Jan 26, 2026

🖼️ Image Diff Test Failure

The image comparison tests failed. Rendered images don't match the expected golden images.

Investigate:

  1. 📎 Download image diff artifacts (look for test-image-diffs-590)
  2. Check *_diff.png (red = differences)
  3. Compare *_actual.png vs *_golden.png

To approve the changes:

  • Run this workflow manually and check “Update golden images (approve changes)”
  • Or locally:
    mvn -f jvm/pom.xml test -DupdateGolden=true

Last updated: Run #590

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

android enhancement New feature or request ios

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants