Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Sped Up Height Map Renderer #699

Merged
merged 3 commits into from
Feb 28, 2025

Conversation

TomaszTB
Copy link
Contributor

No description provided.

@TomaszTB TomaszTB force-pushed the feature/fast-height-map-renderer branch from 8e06b12 to b7308d2 Compare February 28, 2025 16:46
}

@Override
public void getRenderables(Array<Renderable> renderables, Pool<Renderable> pool)
{
renderables.add(renderable);
if (renderable != null)
Copy link
Contributor

Choose a reason for hiding this comment

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

If we create the renderable as a field = new Renderable();, we can remove this null check. And we can remove the call in the create(int maxCells) method that created the new object for the renderable. Saves a line, and removes the confusion around the null check.

shader.init(renderable);
renderable.shader = shader.getBaseShader();

LogTools.info("Vertex Buffer Size: {}", totalCells * FLOATS_PER_CELL);
intermediateVertexBuffer = new float[totalCells * FLOATS_PER_CELL];
LogTools.info("Vertex Buffer Size: {}", maxCells * FLOATS_PER_CELL);
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you find this LogTools useful? I'd say we can remove it.

@TomaszTB TomaszTB merged commit ff27b09 into develop Feb 28, 2025
63 of 68 checks passed
@TomaszTB TomaszTB deleted the feature/fast-height-map-renderer branch February 28, 2025 20:13
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.

2 participants