Jozufozu
38244deb51
GlStateTracker for better state restore
...
- Replaces both ShaderInstanceAccessor and BufferUploaderAccessor
2022-01-08 14:51:55 -08:00
Jozufozu
44d640fc47
Fix crash rendering biome-tinted blocks on contraptions
...
- Biome colors now line up with the world
2022-01-07 14:18:59 -08:00
Jozufozu
d1ee71de4e
Reduce merge conflicts with shader-sanity
2022-01-07 11:50:01 -08:00
Jozufozu
c0ddc860d9
RenderLayers directly store DrawBuffers
...
- Inspired by pepper's BlockEntityTypeExtensions
- Document the batching engine internals.
2022-01-06 15:25:00 -08:00
Jozufozu
eef3c7fc1c
Fix visual artifacts with contraptions while using opfine.
...
I think the buffers from the shadow pass were bleeding into the color pass.
2022-01-06 13:04:16 -08:00
Jozufozu
f6b49fb324
Better state restore in InstancingEngine
...
- Attempt to fix optifine issues
- Replace <code> with {@code}
2022-01-06 13:04:16 -08:00
Jozufozu
369157c989
Document, annotate, and rename
...
- Add documentation for new InstancedRenderRegistry
- Annotate TypeExtensions with Nullable
- Add method for creating bulk instances
2022-01-04 14:14:30 -08:00
PepperCode1
45ae6c4d90
Switch to instancing controllers
...
- Combine InstanceFactories and FlywheelRendered into
InstancingControllers
- Store these controllers directly in the BlockEntity/Entity type
instead of a map for efficiency
- Redo InstancedRenderRegistry to fit these changes
- Rename all tile to block entity
- Remove all interface I prefixes
- Organize imports
- Bump version to 0.5.1
2022-01-03 21:41:08 -08:00
Jozufozu
e9a4231d4e
Write active backend to crash reports
2021-12-30 20:01:45 -08:00
Jozufozu
79952fdc42
Fix crash on resource reload with flywheel disabled
...
- Closes #83
- Move engine selection to function
- Rename Backend.log to Backend.LOGGER
2021-12-30 15:15:25 -08:00
Jozufozu
9abfad00c6
Fix crash on load when backend is off
...
- Closes #81
- Disabled crashing on error poll
2021-12-28 20:39:32 -08:00
Jozufozu
b7e1aa581d
Batching is not actually compatible with shaders
2021-12-28 15:26:56 -08:00
Jozufozu
b5a9741caf
Go through GlVertexArray
...
- VAO state is now handled by GlVertexArray objects
- IndexedModel no longer inherits from VBOModel
- BufferedModel doesn't need #clearState
- Likely fixes crash on intel drivers
2021-12-27 19:14:19 -08:00
Jozufozu
4c4d6b77fc
Fix contraption lighting
...
- Actually just one line.
2021-12-27 13:37:09 -08:00
Jozufozu
283195bbd0
Towards starlight compat
...
- Steal Mods enum from Create.
- Cursemaven dep for starlight
Co-authored-by: Aeiou <3160746+aeiouenigma@users.noreply.github.com>
2021-12-26 15:41:20 -08:00
Jozufozu
dbfeeea477
No more diffuse divide
...
- Move PlacementSimulationWorld to Flywheel as VirtualRenderWorld
- Simplify ModelTransformer
- Model doesn't need #configure
2021-12-25 15:51:22 -08:00
PepperCode1
ec6e07f59e
Clean up
...
- Use Flywheel.rl and Flywheel.ID where ever possible
- Rename Flywheel.log to LOGGER
- Don't add namespace to network channel version
- Use counter for packet IDs
2021-12-24 23:26:18 -08:00
Jozufozu
e16b32e116
Track VBO and EBO via vanilla
2021-12-24 16:15:20 -08:00
Jozufozu
de6c4270b2
Repack JOML
2021-12-24 02:21:59 -08:00
Jozufozu
3ce1345d6a
Fix GL error spam and do some cleanup
...
- Add flywheel$ prefix to mixin duck interfaces/accessors
- Better chat messages for /flywheel backend command
- Track VAO via vanilla
2021-12-24 01:45:38 -08:00
Jozufozu
af209f525e
Contraptions and engines
...
- Sort of get the batching engine working for contraptions but this feels wrong
- TaskEngine gets passed in methods
- Better naming for TaskEngines
- Do BufferSource ourselves
- Change BufferBuilderMixin to allow for injection into BufferBuilder objects
2021-12-23 23:22:52 -08:00
Jozufozu
39439d6335
Small config changes
...
- Make FlwCommands more readable
- EmptyArgumentSerializer for EngineArgument
2021-12-22 22:29:52 -08:00
Jozufozu
c3bc231d0a
Fix models being backwards
...
- Regression in ModelUtil#rotateToFace
2021-12-22 22:01:05 -08:00
Jozufozu
d78f030264
Better config/backend to account for multiple engines
...
- Rename probably too many things
- Needs to be tested with Optifine
2021-12-22 21:35:48 -08:00
Jozufozu
a1bf03689c
Fix diffuse lighting in batching engine
...
- Complete hack that definitely won't come back to bite me
- Also slighting change some unsafe writing stuff
2021-12-22 16:11:56 -08:00
Jozufozu
21d0db1364
GlBuffer tracks its size
...
- GlVertexArray#enableArrays
2021-12-22 14:39:34 -08:00
Jozufozu
1594c56df2
Finally safe vertex formats
...
- true to false for Pepper
- IBufferedModel -> BufferedModel
- VertexFormat -> BufferLayout
- Use ImmutableList in BufferLayout
- LayoutItem naming consistency
- Try to reduce usage of raw BufferLayouts
- Move vertex interfaces to api package
- #createWriter and #createReader in VertexType
- Some documentation
2021-12-22 02:45:45 -08:00
Jozufozu
ceb09d3dfc
util and core cleanup
...
- Consolidate/audit utility classes
- Move more towards sane vertex types
2021-12-22 00:22:41 -08:00
Jozufozu
b0f6d07b0b
Make the BatchingEngine not jittery
...
- Stop having threads compete for a single BufferBuilder
- ...by skirting around minecraft's BufferSource
- Begin work on making vertex writing sane
2021-12-21 22:47:29 -08:00
Jozufozu
831f990153
Merge branch '1.18/dev' into 1.18/batching
...
# Conflicts:
# src/main/java/com/jozufozu/flywheel/core/model/BlockModel.java
2021-12-21 01:12:47 -08:00
Jozufozu
73134f2628
StructType doesn't need #asBatched and #asInstanced
...
- More organized this way
- BatchingTransformer function moved into Batched
2021-12-20 22:38:33 -08:00
PepperCode1
810cae681a
Improve virtual model rendering
...
- Use VirtualEmptyBlockGetter instead of mc.level
- Move getBufferBuilder from BlockModel to ModelUtil
- Add static .is method to VirtualEmptyModelData
2021-12-20 17:47:30 -08:00
Jozufozu
78a21bf0df
No need for getDirtyBitSet
...
- Faster and simpler to just do one loop
2021-12-17 22:41:22 -08:00
Jozufozu
54703d8c1a
Use task engine/sync to update instances
2021-12-17 02:17:39 -08:00
Jozufozu
80b3c1ed35
Proper task engine
...
- Manual threadpool
- More control
2021-12-17 01:03:52 -08:00
Jozufozu
3049601e4a
Simplify SBB
...
- SBB -> ModelTransformer
- Shader binding the minecraft way
- Engines are responsible for ending batches
2021-12-16 23:10:24 -08:00
Jozufozu
a668a7c7ac
Naive parallelism
...
- Submit many tasks to executor and then wait for them all to complete.
- Use WaitGroup
- SBB no longer stores params, instead accepts Params arg to render
- SBB keeps scratch variables local
- CPUInstancer keeps track of default params
- Separate #setup and #draw... functions in CPUInstancer
- Combine DirectBufferBuilder#updateAfterWriting with #intoDirectConsumer
- DirectVertexConsumer#split to distribute work
2021-12-16 10:49:26 -08:00
Jozufozu
8b472f4f51
Better SBB params
...
- Transform interface for grouping traits and combined behavior
- Move transforms to params, impl Transform
- Pass Params object to BatchingTransformers instead of SBB
2021-12-16 00:11:47 -08:00
Jozufozu
f1e63106fc
Batching Engine
...
- Implement alternate backend using SBBs
2021-12-15 17:12:48 -08:00
Jozufozu
d07dbbf1a4
Possible fix(es) for accessor crash
...
- Haven't been able to reproduce
- Try forcing PausedPartialTickAccessor to load early
- Try renaming the method
2021-12-15 16:19:52 -08:00
Jozufozu
0de377d5bb
Fix #extension crash on intel
2021-12-15 13:27:06 -08:00
PepperBell
07cff39a95
Sweeping up
...
- Remove deprecated methods and fields
- Bump pack format
- Fix CI badge link
- Update VanillaInstances javadoc
- Organize imports
2021-12-14 22:00:44 -08:00
Jozufozu
5e2235dab7
No need for InstancedMaterialRenderer
...
- Here's to premature abstraction
2021-12-13 21:27:15 -08:00
Jozufozu
d9bbd325ed
AMD driver workaround
...
- Just don't pool models
2021-12-13 19:55:50 -08:00
Jozufozu
0cafa48964
Fix vanishing minecarts
2021-12-12 22:30:46 -08:00
Jozufozu
7ff0a87b17
Use GL_ARB_conservative_depth when possible
...
- Allows the depth test to discard fragments before the fragment shader is run
2021-12-11 22:03:52 -08:00
Jozufozu
4a86c112dd
Cylindrical fog
...
- having the world position is very nice
- mojang manages to do multiple matrix multiplications
2021-12-11 17:31:09 -08:00
Jozufozu
5ebc592391
Fix misaligned contraption light
...
- That was a pain to debug
- Idk how that ever worked
2021-12-11 15:06:07 -08:00
Jozufozu
cee1a9b0fe
1.18.1
2021-12-11 14:18:43 -08:00
Jozufozu
abeced384d
Implemented
2021-12-10 14:50:01 -08:00