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

Terrain Uber Shader #100

Merged
merged 15 commits into from
Oct 11, 2022
Merged

Terrain Uber Shader #100

merged 15 commits into from
Oct 11, 2022

Conversation

JamesTKhan
Copy link
Owner

@JamesTKhan JamesTKhan commented Aug 17, 2022

This PR replaces the TerrainShader with TerrainUberShader. I have left the code for the legacy TerrainShader in tact for now but deprecated it. The new terrain shader eliminates branching as much as possible and falls more in line with libGDX shader architecture.

There should be no visual change in terrains with this PR. The reason for switching to an uber shader is performance, as the current approach would not scale well when more terrain features are implemented.

@JamesTKhan JamesTKhan linked an issue Aug 17, 2022 that may be closed by this pull request
@JamesTKhan JamesTKhan marked this pull request as ready for review August 18, 2022 06:08
@JamesTKhan JamesTKhan changed the title WIP Terrain Uber Shader Terrain Uber Shader Aug 18, 2022
@JamesTKhan
Copy link
Owner Author

PR merge was delayed due to a hard to track down bug that only happened some times. Ended up being blending enabled on the context, Fixed by disabling blending on terrain shader.

@JamesTKhan JamesTKhan merged commit 5ba1aa2 into master Oct 11, 2022
@JamesTKhan JamesTKhan deleted the terrain-uber-shader branch October 17, 2022 22:10
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.

Investigate turning Terrain shader into an uber shader
1 participant