Commit Graph

143 Commits

Author SHA1 Message Date
Jozufozu
9ac8aea347 Shaking things out
- Use JOML better where we can.
  - Inline MatrixUtil#store and #toJoml
  - FlwShaderUniforms keeps a scratch matrix around for mutating the
    viewProjection.
  - Directly store a Quaternion4f in OrientedInstance to avoid creating
    new objects in the batching transformers.
- Move FrameContext creation to a functor.
- We do need to check the renderDebug flag still :ioa:
- Make VisualUpdatePlan's internal plan not null.
- Remove ClientMainMixin :sad:
  - Forge's new earlywindow stuff means there's no opportunity for
    Flywheel the mod to inject renderdoc before the window is
    initialized.
  - The workaround for now is to breakpoint in FML's
    DisplayWindow#initialize and evaluate
    `System.loadLibrary("renderdoc")` manually.
2023-11-24 14:29:03 -08:00
Jozufozu
90cfd967dc Instant backport
- Switch to 1.20.1
- It still compiles!
2023-11-23 22:45:39 -08:00
Jozufozu
5fc346ad7a Build system but no build
- Start with a cherry pick from 1.20/dev
- Copy over newer gradle wrapper related things from the forge 1.20 mdk
- Follow example from 1.20 mdk to update build.gradle and
  settings.gradle
- Update parchment version
2023-11-22 20:57:46 -08:00
PepperCode1
66f11018fe Sweeping changes
- Add VisualizationManager and VisualManager API
- Simplify and fix memory leaks in model utilities
- Pass partialTick directly to visuals and remove AnimationTickHolder
- Fix LevelAttached and FlwTaskExecutor not being thread-safe
- Reorganize and rename many things
- Remove unnecessary things
2023-11-18 11:46:04 -08:00
Jozufozu
3da51885d1 Housekeeping
- Update dependencies, forge version
- Bump LICENCE year
- Use fma in MatrixUtil and VertexTransformations
- Remove some dead variables from TransformCall
- Use onSpinWait in WaitGroup#await
- Do not allow adding negative numbers to a WaitGroup
- Thin abstraction for TaskNotifier
- Clean up WorkerThread task polling
2023-05-21 15:24:33 -07:00
Jozufozu
cb74fa4603 Merge branch '1.18/plan' into 1.18/next
# Conflicts:
#	src/main/java/com/jozufozu/flywheel/api/backend/Engine.java
#	src/main/java/com/jozufozu/flywheel/backend/engine/batching/BatchingEngine.java
#	src/main/java/com/jozufozu/flywheel/backend/engine/batching/TransformCall.java
#	src/main/java/com/jozufozu/flywheel/backend/engine/indirect/IndirectEngine.java
#	src/main/java/com/jozufozu/flywheel/backend/engine/instancing/InstancingEngine.java
#	src/main/java/com/jozufozu/flywheel/handler/EntityWorldHandler.java
#	src/main/java/com/jozufozu/flywheel/impl/instancing/InstancedRenderDispatcher.java
#	src/main/java/com/jozufozu/flywheel/impl/instancing/manager/InstanceManager.java
#	src/main/java/com/jozufozu/flywheel/impl/instancing/storage/AbstractStorage.java
#	src/main/java/com/jozufozu/flywheel/impl/visualization/VisualWorld.java
#	src/main/java/com/jozufozu/flywheel/mixin/instancemanage/InstanceRemoveMixin.java
#	src/main/java/com/jozufozu/flywheel/mixin/visualmanage/VisualAddMixin.java
#	src/main/java/com/jozufozu/flywheel/mixin/visualmanage/VisualUpdateMixin.java
2023-04-15 15:27:18 -07:00
PepperCode1
b4cef0b5c9 Add Rubidium compatibility
- Add proper Rubidium compatibility on our side
- Overwrite methods in Rubidium's FlywheelCompat class with stubs to
prevent crashes
2023-04-13 10:16:33 -07:00
Jozufozu
1627874e33 Putting our plan to the test
- Implement plan simplification
- Add unit tests for plan execution and simplification
2023-04-09 14:15:29 -07:00
PepperCode1
e7fd1c6178 Use external JOML
- Use JOML from its official Maven source instead of bundling classes
- Organize imports
2023-03-29 22:03:28 -07:00
Jozufozu
94bd6f4b98 Merge branch '1.18/culling' into 1.18/next
# Conflicts:
#	build.gradle
#	src/main/java/com/jozufozu/flywheel/Flywheel.java
#	src/main/java/com/jozufozu/flywheel/backend/Loader.java
#	src/main/java/com/jozufozu/flywheel/backend/instancing/InstanceWorld.java
#	src/main/java/com/jozufozu/flywheel/backend/instancing/batching/BatchingDrawTracker.java
#	src/main/java/com/jozufozu/flywheel/backend/instancing/instancing/MeshPool.java
#	src/main/java/com/jozufozu/flywheel/core/compile/ProgramCompiler.java
#	src/main/java/com/jozufozu/flywheel/core/crumbling/CrumblingRenderer.java
#	src/main/java/com/jozufozu/flywheel/core/model/ModelUtil.java
#	src/main/java/com/jozufozu/flywheel/mixin/LevelRendererMixin.java
#	src/main/java/com/jozufozu/flywheel/mixin/matrix/Matrix3fMixin.java
#	src/main/java/com/jozufozu/flywheel/mixin/matrix/Matrix4fMixin.java
2022-08-22 17:18:13 -07:00
PepperCode1
2fe69350ef No more leaks
- Free all DrawBuffers on renderer reload
- Add flw.debugMemorySafety flag to detect leaked untracked MemoryBlocks
- Replace VertexListProviderRegistry with static methods in
VertexListProvider and a VertexFormatMixin
- Make the DrawBuffer constructor accept a VertexFormat instead of a
RenderType
- Merge TStack into TransformStack
- Move all duck interfaces/extensions to extension package
- Make mixin style more consistent
2022-08-17 16:20:31 -07:00
PepperCode1
bb7d971ebe Merge branch '1.18/dev' into 1.18/next
Conflicts:
	.github/ISSUE_TEMPLATE/bug_report.yml
	gradle.properties
	src/main/java/com/jozufozu/flywheel/backend/instancing/DrawBuffer.java
	src/main/java/com/jozufozu/flywheel/mixin/RenderTypeMixin.java
2022-08-16 10:48:46 -07:00
PepperCode1
70616d381a Fix crash with Rubidium when using batching
- Backport fix from 1.18/next
- Downgrade and lock ForgeGradle version to fix build
- Update Forge to match 1.18/next
- Bump version
2022-08-13 13:54:52 -07:00
Jozufozu
9d657aed40 Things on the screen
- Specialize MeshPool for the indirect engine
 - Temporarily force the engine to be indirect
 - Fix compilation issues with test shaders
 - VertexAttribute supports DSA
 - Fix Miniball issues in dev-env
 - VertexList implements PointSet for use with Miniball
 - Meshes store their bounding spheres
 - Add hook/system property to load renderdoc on client launch
 - StructTypes provide separate StorageBufferWriter for indirect
2022-08-05 10:51:07 -07:00
Jozufozu
6234df6440 Culling experiments 2: not testing the GPU
- Skeleton for compute shader culling/indirect rendering
2022-07-29 21:46:09 -07:00
Jozufozu
4405f92639 Merge branch '1.18/dev' into 1.18/next
# Conflicts:
#	.github/ISSUE_TEMPLATE/bug_report.yml
#	build.gradle
#	gradle.properties
#	src/main/java/com/jozufozu/flywheel/Flywheel.java
#	src/main/java/com/jozufozu/flywheel/backend/Backend.java
#	src/main/java/com/jozufozu/flywheel/backend/Loader.java
#	src/main/java/com/jozufozu/flywheel/backend/OptifineHandler.java
#	src/main/java/com/jozufozu/flywheel/backend/instancing/AbstractInstance.java
#	src/main/java/com/jozufozu/flywheel/backend/instancing/InstanceManager.java
#	src/main/java/com/jozufozu/flywheel/backend/instancing/batching/BatchedMaterialGroup.java
#	src/main/java/com/jozufozu/flywheel/core/model/BakedModelBuilder.java
#	src/main/java/com/jozufozu/flywheel/core/model/Bufferable.java
#	src/main/java/com/jozufozu/flywheel/core/model/ModelUtil.java
#	src/main/java/com/jozufozu/flywheel/core/model/WorldModel.java
#	src/main/java/com/jozufozu/flywheel/core/model/WorldModelBuilder.java
#	src/main/java/com/jozufozu/flywheel/core/vertex/BlockVertexList.java
#	src/main/java/com/jozufozu/flywheel/core/vertex/BlockVertexListUnsafe.java
#	src/main/java/com/jozufozu/flywheel/core/vertex/PosTexNormalVertexListUnsafe.java
#	src/main/java/com/jozufozu/flywheel/mixin/FrustumMixin.java
2022-07-19 00:19:50 -07:00
PepperCode1
418672c065 Final fix-ups
- Revert mods.toml version to ${file.jarVersion}
- Fix license not being added to built jars
- Rename LICENCE.md to LICENSE.md
2022-07-15 19:29:42 -07:00
PepperCode1
17d8688fd7 Fix mixins sometimes not remapping
- Compress logo image
2022-07-15 09:42:14 -07:00
PepperCode1
a42c027b6f Scheme-a-version
- Fix Resources not being closed properly
- Change versioning scheme to match Create
- Add LICENSE to built jar
- Fix mods.toml version sync
- Move JOML code to non-src directory
- Update Gradle
- Organize imports
2022-07-15 00:00:54 -07:00
Jozufozu
273c99619f Oculus compatibility
- Rename OptifineHandler to ShadersModHandler
 - Rename functions to match fabric version
2022-07-10 18:08:59 -04:00
Jozufozu
1765aa74f8 Better buffer binding
- Directly call GlBuffer#bind before raw gl calls
 - Everything else is hidden now
 - GlStateTracker.State implements AutoCloseable for try-with-resources blocks
 - Wrap InstancedModel render calls in a GlStateTracker restore block
 - Improve EBO creation
 - Track CPU memory usage (wish java had ownership concepts)
 - Misc cleanups
2022-06-09 12:44:52 -07:00
PepperCode1
4c7b035f5d Instant legacy code
- Respect fog shape and type
  - Add uFogShape uniform
  - Add macro for current FogType
- Respect dimension constant ambient light when calculating diffuse
  - Add uConstantAmbientLight uniform
  - Redirect diffuse calculation to FLWDiffuse
  - Do not automatically include diffuse.glsl
- Fill CoreShaderInfoMap with info for vanilla and Forge core shaders
- Use try-with-resources when querying ResourceManager
- Move WorldProgram uniform uploading from bind to uploadUniforms
- Use correct layer when rendering bells (cutout -> solid)
- Update Starlight
2022-05-13 23:58:24 -07:00
Jozufozu
9a69ed1906 Layoff some workers
- Only one task engine for everything now
 - Fixes crash on LightUpdater init when Flywheel is off
 - Attempt to wrangle InstanceWorld init code
 - Misc. cleanup/renaming
2022-04-07 14:19:36 -07:00
PepperCode1
a419eab484 Update to 1.18.2
- Switch to SLF4J logging
- Bump version
- Add 0.6.1 changelog
2022-03-14 10:52:28 -07:00
PepperCode1
f24c1fafba Add, refactor, remove
- Add DiffuseLightCalculator
- Add ModelUtil.VANILLA_RENDERER for consistent virtual rendering
- Refactor OptifineHandler
- Remove MatrixTransformStack
2022-02-08 19:26:36 -08:00
Jozufozu
47e3aaa290 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
c153995121 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
Jozufozu
6c40b8be0b Repack JOML 2021-12-24 02:21:59 -08:00
Jozufozu
082fe8cdd8 Switch back to parchment, update forge 2021-12-23 23:09:51 -08:00
Jozufozu
7cf2741e68 Ready for release 2021-12-12 22:53:22 -08:00
Jozufozu
46745ae91d Bump version - 0.4.1 2021-12-11 17:32:39 -08:00
Jozufozu
0d388b0094 Update changelog 2021-12-09 18:51:09 -08:00
Jozufozu
ca459dd2ca Update to 1.18 2021-12-06 21:29:21 -08:00
Jozufozu
d4a8043534 Fix weird intellij issues with mixin's annotation processor
- Update forge/mixin version
2021-12-02 14:03:14 -08:00
PepperBell
fbc5836afb Improve StitchedSprite functionality
- Make StitchedSprite work like PartialModel
- Allow StitchedSprite instances to be created directly
- Allow StitchSprites to be created for any atlas
- Use texture stitch post event instead of lazy computation for filling
StitchedSprites
- Remove legacy method from AngleHelper
- Change artifact name from flywheel to flywheel-forge
- Organize imports
2021-11-24 18:43:05 -08:00
PepperBell
f14aca4517 Server crash fix and formatting
- Fix matrix mixins being applied on dedicated server
- Expand PartialModel functionality: add location getter and model
setter
- Remove Loader.getResourceType since selective reloading is deprecated
- Organize imports and mixin order
- Other formatting
- Update Gradle and Forge
2021-11-18 14:59:39 -08:00
Jozufozu
35b542fb68 Parchment and gradle changes 2021-11-08 13:19:48 -08:00
Jozufozu
ef48504caa UNTESTED - Replace ATs
- Matrices use #store
 - Accessor for pausedPartialTick
2021-09-26 19:40:53 -07:00
Jozufozu
5ce960c5d5 MDK println build test 2021-09-18 17:01:20 -07:00
Jozufozu
d53c9b0a32 It renders stuff
- The lightmap moved
 - Begin to move away from access transformers
 - .textureManager -> .getTextureManager()
 - RIP cutout, saw that coming
2021-09-16 20:03:45 -07:00
Jozufozu
a930bc97cc It launches
- yeet the fog
 - update mixin compatibility level
2021-09-15 13:49:18 -07:00
2ae580259c Remap, update forge, minecraft and java 2021-09-15 09:14:30 +02:00
6fd544837c update gradle and mixin 2021-09-15 08:33:12 +02:00
Jozufozu
9e066f8d41 Documentation and organization
- Add a package-info.java to many packages.
 - Annotate the world parameter in Backend#canUseInstancing as nullable.
 - New utility constructor for BlockModel
 - Note that IDynamicInstance#beginFrame and ITickableInstance#tick are run in parallel.
 - Refactor internals of InstancedRenderDispatcher to group things by InstanceWorlds.
 - InstanceWorlds take over most responsibility for dispatching calls.
 - Simplify massive private call chains in InstanceMaterial.
 - Reorganize methods and add some documentation in MaterialManager, MaterialGroup, InstanceMaterial, and Instancer.
 - Remove unused field from MaterialSpec.
 - Remove unused fields from Instancer and InstanceMaterial
 - Document RenderLayer
 - Add RenderLayer field to RenderLayerEvent
2021-07-27 17:31:58 -07:00
Jozufozu
e4a72544ea Update forge
- but not to 36.2.0 because gradle hates me
2021-07-23 16:45:38 -07:00
Jozufozu
2238a00bac Remap to Mojmap, update gradle 2021-07-15 11:36:24 -07:00
Jozufozu
c6b0996b8a Ready for 0.1.1 (finally)
- Might have bumped the version too early.
 - Fix crash rendering breaking overlay after reloading resource packs.
2021-07-14 16:52:35 -07:00
Jozufozu
30cc011ee9 Lids everywhere
- Ender chests and trapped chests, too
 - Chests orient themselves correctly
 - Lids do not position themselves correctly
 - Some math, will probably replace with JOML
2021-07-10 11:33:01 -07:00
Jozsef
608204ee0a Crash fix and refactor
- Check that sectionY is within the bounds of the chunk's section array, fixes #2
 - Refactor usages of Tile and Entity InstanceManagers to refer to the base class InstanceManager<>
2021-07-02 13:12:33 -07:00
Jozsef
f615825846 Pre-port tasks I
- Rename Client to FlywheelClient
 - Remove Shadow plugin
 - Remove generated source set
 - Remove unused properties in gradle.properties
 - Organize all imports
 - Thanks for the list pepper!
2021-06-30 12:43:54 -07:00