Enablement work for future core shader support #269
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR lays some early groundwork for a hybridized renderer that is capable of using vanilla core shaders (if necessary) and more efficient shaders otherwise.
These changes are not sufficient to use resource packs that modify terrain shaders. If you are a user, do not expect that builds from this PR will function with core shaders.
The change set is as follows:
VanillaShaderChunkRenderer
, which draws chunks from our vertex buffers using the appropriate vanilla core shader. This renderer is rather inefficient compared to the regular one, as it only issues multidraw calls for one section at a time, rather than one region. This is because the vanilla shader expects the chunk offset uniform to be updated for each section.DefaultVertexFormat.BLOCK
.VanillaShaderChunkRenderer
(otherwise, the normal renderer is used).More work is needed for this to be usable in practice. In particular: