Commit Graph

2263 Commits

Author SHA1 Message Date
Jozufozu
421e11ebc1
Create FUNDING.yml 2022-01-25 10:13:24 -08:00
Jozufozu
5a2de8095c Update changelog and document Translate#nudge 2022-01-25 10:12:08 -08:00
Jozufozu
c490d15876 Initial move to client commands.
- Nothing fancy, just inlining packets.
2022-01-24 10:46:17 -08:00
Jozufozu
2638e79aa2 Add accessor to BlockEntityRenderer map. 2022-01-18 13:44:28 -08:00
Jozufozu
26ea6bd315 Bump version - 0.6.0 2022-01-17 18:26:28 -08:00
Jozufozu
1ad64c595c Merge branch '1.18/shader-sanity' into 1.18/dev 2022-01-17 16:56:39 -08:00
Jozufozu
bc55726da3 A fix and a refactor
- ModelPools no longer undbind their buffer during construction, as state should be maintained externally
 - Call BufferUploader#reset at the end of renderChunkLayer to partially fix crash rendering contraptions
 - Remove Engine#getName, it was replaced by FlwEngine
2022-01-17 16:19:18 -08:00
Jozufozu
b351baa824 Handle arbitrary numbers of GameStateProviders
- Use bitset instead of long.
 - We only ever iterate over the GameStateProviders, so use a list instead of a map.
 - GameStateProviders don't need IDs.
2022-01-13 15:58:51 -08:00
Jozufozu
298ca3e9f1 Reorganize and simplify
- StructTypes no longer need to be registered
 - Move backend.source to core.source
 - Move GameStateRegistry to core
 - Backend is static again
 - Loader maintains state internally
2022-01-12 21:25:03 -08:00
Jozufozu
a62bc66060 Better memoized shader compilation and global game state
- Properly separate compilation of vertex and fragment shaders
 - Game state is no longer per-program
 - Needs organization
2022-01-12 00:19:37 -08:00
Jozufozu
7d4055f263 More organized shader compilation 2022-01-11 13:17:55 -08:00
Jozufozu
e228427e72 Sodium compatibility 2022-01-10 15:08:02 -08:00
Jozufozu
2d63d8c7db Separate vertex and fragment shaders and templates 2022-01-10 14:38:26 -08:00
Jozufozu
12cab85f69 Merge branch '1.18/dev' into 1.18/shader-sanity
# Conflicts:
#	src/main/java/com/jozufozu/flywheel/backend/instancing/instancing/InstancingEngine.java
2022-01-09 22:35:42 -08:00
Jozufozu
f8ed5df41d Update changelog 2022-01-08 17:42:32 -08:00
Jozufozu
b2c03a4069 Conditional state restore and BufferUploader sanity check
- Only restore state that has changed
 - Sanity check to fix error condition on reset
2022-01-08 16:48:42 -08:00
Jozufozu
3391e3e168 GlStateTracker for better state restore
- Replaces both ShaderInstanceAccessor and BufferUploaderAccessor
2022-01-08 14:51:55 -08:00
Jozufozu
bfe123d167 Almost sane shaders
- No more ShaderContext. Programs are directly retrieved through ProgramCompilers.
 - Templates don't need generics
 - Remove ExtensibleGlProgram
2022-01-07 22:46:29 -08:00
Jozufozu
b6a00b54dd 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
06e1d5a901 Flatten core.shader and fix residual merge conflicts 2022-01-07 12:01:03 -08:00
Jozufozu
2254a693c9 Merge branch '1.18/dev' into 1.18/shader-sanity
# Conflicts:
#	src/main/java/com/jozufozu/flywheel/backend/source/FileResolution.java
#	src/main/java/com/jozufozu/flywheel/core/shader/GameStateProgram.java
#	src/main/java/com/jozufozu/flywheel/core/shader/gamestate/NormalDebugStateProvider.java
#	src/main/java/com/jozufozu/flywheel/core/shader/spec/BooleanGameStateCondition.java
#	src/main/java/com/jozufozu/flywheel/core/shader/spec/GameStateCondition.java
#	src/main/java/com/jozufozu/flywheel/core/shader/spec/ProgramState.java
#	src/main/java/com/jozufozu/flywheel/core/shader/spec/SpecificValueCondition.java
2022-01-07 11:52:42 -08:00
Jozufozu
01fb788fa3 Reduce merge conflicts with shader-sanity 2022-01-07 11:50:01 -08:00
Jozufozu
e4182a7f1e RenderLayers directly store DrawBuffers
- Inspired by pepper's BlockEntityTypeExtensions
 - Document the batching engine internals.
2022-01-06 15:25:00 -08:00
Jozufozu
5c4ff9ca2a 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
e0342c4b78 Better state restore in InstancingEngine
- Attempt to fix optifine issues
 - Replace <code> with {@code}
2022-01-06 13:04:16 -08:00
PepperCode1
8224e47619 Add 0.5.0a and 0.5.1 to issue template 2022-01-04 21:50:10 -08:00
Jozufozu
379fe60ce6 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
eb8dc6bc07 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
c196ed5d78 Consider RenderLayer when compiling shaders
- Disabled cutout logic in other layers
2022-01-01 15:19:49 -08:00
Jozufozu
1f5f2a5476 Compile everything on the fly
- Simplify game state system
 - Need some way to re-add errors on load.
 - Streamline shader compilation, reduce map lookups
 - Move pipeline package from backend to core
 - Simplify interfaces and remove unnecessary classes
2021-12-31 12:08:07 -08:00
Jozufozu
67b91a95f6 Merge branch '1.18/dev' into 1.18/shader-sanity
# Conflicts:
#	src/main/java/com/jozufozu/flywheel/backend/Backend.java
#	src/main/java/com/jozufozu/flywheel/backend/gl/shader/GlShader.java
#	src/main/java/com/jozufozu/flywheel/backend/pipeline/ProgramAssembler.java
#	src/main/java/com/jozufozu/flywheel/core/WorldContext.java
2021-12-31 00:25:24 -08:00
Jozufozu
4c0df23702 Write active backend to crash reports 2021-12-30 20:01:45 -08:00
Jozufozu
d38e2421c9 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
a8842d4c64 Shader sanity
- Drastically lower shader boilerplate for instance materials
 - Somewhat lower boilerplate for contexts
 - VertexTypes are responsible for shader headers
 - Better shader compiler errors (at least on nvidia)
 - Simplify template classes
 - Begin work on lazy shader compilation
2021-12-29 13:10:38 -08:00
Jozufozu
1d8a5dc84e Bump version - 0.5.0a 2021-12-29 10:59:34 -08:00
Jozufozu
123a548474 Fix crash on load when backend is off
- Closes #81
 - Disabled crashing on error poll
2021-12-28 20:39:32 -08:00
Jozufozu
92ad07c779 Batching is not actually compatible with shaders 2021-12-28 15:26:56 -08:00
Jozufozu
179eafecd3 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
78030b2f40 Fix contraption lighting
- Actually just one line.
2021-12-27 13:37:09 -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
PepperCode1
1e9e4e0054 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
c268b9cc9b Track VBO and EBO via vanilla 2021-12-24 16:15:20 -08:00
Jozufozu
6c40b8be0b Repack JOML 2021-12-24 02:21:59 -08:00
Jozufozu
f4cdbb73f7 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
1377732df4 Merge branch '1.18/dev' into 1.18/batching 2021-12-23 23:23:04 -08:00
Jozufozu
4d5391f5dc 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
082fe8cdd8 Switch back to parchment, update forge 2021-12-23 23:09:51 -08:00
Jozufozu
5cca71332d Bump version - 0.5.0 2021-12-22 22:37:27 -08:00
Jozufozu
7c1de5c06a Small config changes
- Make FlwCommands more readable
 - EmptyArgumentSerializer for EngineArgument
2021-12-22 22:29:52 -08:00