* Quick and dirty test.
- VBO monitor renderer path has been hijacked to test not using VBOs,
instead we recreate the terminal geometry every frame.
- Add an explicit call the BufferSource.endBatch(). This actually fixes
the incompatibility with Batched Entity Rendering. Who knew it was that
easy?
Results: works with Iris without shaders enabled.
* Use entity RenderType for rendering terminals in world.
- FixedWidthFontRenderer now emits quads and fills out all the vertex
elements needed for the entity vertex format, which is, well, *all* of
them.
- FixedWidthFontRenderer now takes a PoseStack so it can offset the char
quads from the background.
- TERMINAL_MODE changed to quads so remaining custom RenderTypes work
with FWFR.
New progress at this commit:
- Iris and Canvas both render the hi-jacked VBO backend properly.
Issues:
- Char quads have a blacker background than empty quads due to
mismatched lightmaps.
- Items in hand have improper normals.
- TBO renderer is untested. Need to make sure it wasn't broken.
* More stuff
Progress:
- "VBO" code path now works fine with shaders.
- Printout GUI has lightmap issue.
- Pocket computer frames don't have right normals in world.
- Pocket computer lights don't work.
TODOs:
- Investigate whether VBOs can be used again without breaking compat.
If not, the code path needs to be renamed and the code for managing VBO
resources should be removed.
- Make sure TBO code path still works. Wouldn't be surprised if I broke
something there.
* Found a new rendertype for monitors, fixed normals
Progress:
- Monitors render fullbright in every direction.
- Normals are right on pocket computers and printouts, so lighting
effects like directional light and shadow maps looks correct.
- BEST monitor renderer settings will detect shader mods and
automatically enable shader compatible code path.
Details:
- The "textIntensity" rendertype is exactaly what we need for monitors.
It's shader doesn't apply a directional light so monitors look
fullbright consistent no matter what direction they're facing.
- Consolidated all references to rendertypes into RenderTypes class.
- Improved consistency of rendering classes. Methods pass a PoseStack
instead of a Matrix4f down the chain where possible so that normals
can be calculated, and most rendering classes now fill out all vertex
elements so they can be used with any vanilla vertex format.
- Rendering methods should prefer to take a VertexConsumer rather than a
BufferSource, the caller should provide appropriate buffer as that's
where the context for buffer choice is.
TODO:
- Investigate re-enabling VBOs, and, if not an option, clean up naming
and VBO related resource code.
* Re-enable vbos
Things were extremely slow without them in torture tests. They seem to
work fine with Iris. Will need to test with Canvas too. I don't know why
that hack with the inverse view rotation uniform works but fog doesn't
render correctly without it.
Unfortunately, the z-offset method does cause visible artifacts.
Background quads can sometimes be seen under the edges of adjacant
characters, giving the monitor a stitched together look. Will have to
investigate splitting all the background and char quads into two draw
calls and using glPolygonOffset on the characters :( which probably
means two vbos :( :(
Co-authored-by: Toad-Dev <748280+toad-dev@users.noreply.github.com>
* Add link to overhaul
* Reorganize the readme, merge "Contributing" text.
* Rename "Does this work with fabric's..." with Rendering Mod Compat
* Add VBO Notice
Another mod was using mixins to access this private field without any
null checking. I got the idea to use an EmbeddedChannel from Carpet,
which was having the same issue with this mod.
Fixes#53.
- Changed page background to render as one quad, instead of two halves.
- Set page background to a z-offset that is between zeroth (potentially
bold border) and subsequent background pages. Bold borders were at the
same z-offset before.
Fixes:
- Printouts being drawn slightly offset to the left in all cases, noticeable mainly when in item frames.
- Printout text two pixels off center within the background.
- Printout GUI not responding to left/right arrows. Scrolling seemed to work but same fix was added there for consistency.
Some of these keys aren't used in the versions that our 1.16 and 1.17
branches are based on, but they will be there in case we ever do a
feature update for those branches.
Fixes "ComputerCraft may be installed incorrectly" and "File not found"
errors that sometimes happened after switching single player worlds or
running /reload.
- Fix UpgradeSpeakerPeripheral not calling super.detach (so old
computers were never cleaned up)
- Correctly lock computer accesses inside SpeakerPeripheral
Fixes#1003.
Fingers crossed this is the last bug. Then I can bump the year and push
a new release tomorrow.