Commit Graph

230 Commits

Author SHA1 Message Date
Jozufozu
94c5b4455d Switch to MIT Licence 2021-08-02 20:07:49 -07:00
Jozufozu
d21f2c73ee Wrong display value for chunk caching command 2021-08-02 14:22:21 -07:00
Jozufozu
7f4399c768 Fix chunk caching race condition add toggle
- /flywheel chunkCaching on|off
 - synchronized ftw
2021-08-02 00:06:26 -07:00
Jozufozu
5f7093fa0e Update changelog and remove dead QuaternionTransformStack.java 2021-07-30 14:34:04 -07:00
Jozufozu
e20612cd30 Fix issue with missing banner pattern textures
Fixes #12

What the heck

CrumblingRenderer gets classloaded early because of its event listener.

CrumblingRenderer had an innocent static reference to a member of ModelBakery.

This caused ModelBakery to classload before additional enums could be injected into BannerPattern.

¯\_(ツ)_/¯
2021-07-29 18:50:47 -07:00
Jozufozu
b47bd45510 Model changes
- Buffered models directly consume IModels
 - Document IModel more
 - Move contraption world render spoofing to flywheel
 - Miscellaneous new RenderMaths
 - Added WorldModel, renders many blocks given a world instance
 - Fix broken transparency on contraptions when using Flywheel
2021-07-29 01:37:47 -07:00
Jozufozu
21269e9dd5 Expose ClippingHelper in BeginFrameEvent 2021-07-28 18:13:47 -07:00
Jozufozu
eded055be8 More info in RenderLayerEvent 2021-07-28 14:18:24 -07:00
Jozufozu
7f58d51017 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
88241c2a58 Merge branch 'dev' into shader-pipeline
# Conflicts:
#	src/main/java/com/jozufozu/flywheel/backend/ShaderSources.java
2021-07-26 21:58:53 -07:00
Jozufozu
e4bf7f715f Update LightVolume to use enum wrapper for glActiveTexture 2021-07-26 16:18:38 -07:00
Jozufozu
6786e11795 Consistent naming for normal debug mode 2021-07-26 13:42:38 -07:00
Jozufozu
0cdb0c1ff3 Optimize imports 2021-07-23 23:46:30 -07:00
Jozufozu
fd96df1abe MaterialManager and MaterialGroup refactor
- Material manager builder
 - No more overload render method/IProgramCallback
 - MaterialRenderers accept a Program consumer instead
2021-07-23 23:45:31 -07:00
Jozufozu
38418b2f91 Update forge
- but not to 36.2.0 because gradle hates me
2021-07-23 16:45:38 -07:00
Jozufozu
721b3b8633 Basic model abstraction
- Stop providing a buffered model supplier
 - Instead, provide an IModel supplier
 - IModel exposes basic properties of models
 - IModel exposes a method to copy the model to a VecBuffer
2021-07-23 12:26:32 -07:00
Jozufozu
7ad7512e7e Merge branch 'dev' into vanilla-opt
# Conflicts:
#	src/main/java/com/jozufozu/flywheel/backend/instancing/Instancer.java
2021-07-22 14:09:28 -07:00
Jozufozu
1ca23c514f Instance stealing 2021-07-22 14:07:02 -07:00
Jozufozu
418676a0f0 MaterialGroups and massive refactors
- Move material stuff to its own package
 - The various render functions in the material tree now bind to specific render layers
 - Instancers can choose which layer to use
 - The layers are SOLID, CUTOUT, and TRANSPARENT
 - More layers are likely unnecessary, but we'll see
 - Deprecate functions in MaterialManager in favor of more builderesque ones using MaterialGroups
2021-07-21 20:28:20 -07:00
Jozufozu
fe836645aa Instancers like suppliers
- Instancers accept model suppliers instead of models directly
 - gpu resource allocation is deferred until render time
2021-07-19 15:45:00 -07:00
Jozufozu
90173360f4 Prime update divisors
- Smooths out load when ticking too many instances
2021-07-18 18:21:30 -07:00
Jozufozu
e5db27379e Parallel and caching
- NEEDS MORE TESTING
 - Tick and update instances in parallel
 - Mixin to cache chunk lookups
2021-07-18 18:00:09 -07:00
Jozufozu
0d474d0d04 Instanced Shulker boxes
- Preliminary concept of RenderStates
 - Vanilla has this too but it's bloated
2021-07-18 15:05:12 -07:00
Jozufozu
04b906d06f Utilities created during an attempt at signs
- Cuboids can be inverted across Y and Z
 - TransformStack scaling
 - VecBuffer coloring
2021-07-17 17:06:49 -07:00
Jozufozu
7a14827a7b Merge branch 'dev' into shader-pipeline 2021-07-15 12:00:40 -07:00
Jozufozu
f19444e271 Mojmixins 2021-07-15 11:51:57 -07:00
Jozufozu
09e52e974f Remap to Mojmap, update gradle 2021-07-15 11:36:24 -07:00
Jozufozu
30dad72cba Merge branch 'dev' into shader-pipeline 2021-07-14 17:23:47 -07:00
Jozufozu
dfbba8e3d0 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
28a3813652 Fix gl error spam
- CrumblingProgram was trying to upload a uniform before the location was queried.
 - Adjust WorldProgram init to mitigate this in the future.
2021-07-14 15:47:44 -07:00
Jozufozu
1da67aaf1a Fix crash on resource reload
- Backend wasn't properly cleaning up its state
 - Sneaky error in WorldAttached
2021-07-14 15:35:52 -07:00
Jozufozu
349ea33431 Better errors still
- Actually can print something that underlines a span
 - Resolve imports and use the resolutions during building
 - Doesn't actually make sense to have #checkErrors
 - Simplify some regexes
 - Parse structs
2021-07-14 15:20:49 -07:00
Jozufozu
b2a670d4de Merge branch 'dev' into shader-pipeline 2021-07-13 23:31:16 -07:00
Jozufozu
6ed59fb877 Hacky program link debug info
- Log which gl ids are assigned to different programs
 - Log name and basic state information
2021-07-13 15:57:14 -07:00
Jozufozu
a2b740f0d8 Merge branch 'dev' into shader-pipeline
# Conflicts:
#	src/main/java/com/jozufozu/flywheel/core/WorldContext.java
2021-07-12 23:53:35 -07:00
Jozufozu
126cecd856 Protect against java versioning
- Cast ByteBuffers to Buffer before calling #rewind or #flip
2021-07-12 16:45:36 -07:00
Jozufozu
a2100dc758 Clean up
- Material managers should not be inside WorldContext
 - InstancedRenderDispatcher now stores the material managers
 - Delete crumbling material manager on renderer reload
 - CrumblingRenderer gets its own class
 - CrumblingRenderer is less jank overall
 - Defer InstancedRenderRegistry deprecated function removal until 0.3
2021-07-12 16:42:43 -07:00
Jozufozu
d2350667a2 Fix bell not stopping at the bottom of its swing 2021-07-12 15:19:20 -07:00
Jozufozu
3b288738ce Fix import ordering 2021-07-12 15:02:08 -07:00
Jozufozu
2a0757e867 Atlases, bells, breaking
- Bell instance
 - Fix some inconsistencies with PartBuilder
 - Store information on texture atlasses
 - Crumbling overlay fixes
2021-07-12 14:52:54 -07:00
Jozufozu
4a27fbd438 Correctly render chests
- Give up on quaternions
 - Lids lazily update transform matrices
 - MatrixTransformStack
2021-07-11 15:54:51 -07:00
Jozufozu
0a463da724 Actually backwards compat is important
- Reintroduce InstancedRenderRegistry#register methods
 - Deprecate the methods
2021-07-10 18:42:15 -07:00
Jozufozu
fd610d2b62 Rename builders
- *Registrater -> *Config
 - build -> register
2021-07-10 11:36:30 -07:00
Jozufozu
80e851a1f1 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
Jozufozu
9501d01494 Merge branch 'dev' into vanilla-opt
# Conflicts:
#	src/main/java/com/jozufozu/flywheel/FlywheelClient.java
2021-07-09 13:45:52 -07:00
Jozufozu
18848b14e1 PartialModel gets called from the right place 2021-07-09 13:39:56 -07:00
Jozufozu
60d7ca6e91 4d chest
- Refactor InstancedRenderRegistry to allow for 3rd party TEs to have instances
 - Add ChestInstance, incomplete but there
 - Add basic api for building vanilla formatted models
 - Better instance factory registration
2021-07-09 13:24:26 -07:00
Jozufozu
8c470f3158 Sporadic work done in an airport
- Initial ErrorBuilder class
 - Random documentation
2021-07-07 22:08:33 -07:00
Jozufozu
865926e783 Common type and character positions
- Shader source abstractions now inherit from AbstractShaderElement
 - Spans keep track of line and column positions
2021-07-06 12:38:32 -07:00
Jozufozu
a5d282a0ef Load a single file
- Use the new immutable sources system to load a single file
 - It doesn't compile it yet
 - Slightly less verbose name
2021-07-05 12:09:13 -07:00
Jozsef
35ffef8d4b Merge branch 'dev' into shader-pipeline 2021-07-02 13:23:02 -07:00
Jozsef
c79c41c16f 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
07b93e4ec5 More loading tweaks
- Immutable function map
 - Parse #use directives on load
 - Recursive include gathering
 - More sane spec loading in WorldContext
 - StateSensitiveMultiProgram builder
 - Rename confusing game state things
2021-07-02 12:34:12 -07:00
Jozsef
2874efc68e Merge branch 'dev' into shader-pipeline 2021-06-30 16:29:39 -07:00
Jozsef
04733e3d2d Even more AT culling 2021-06-30 15:50:23 -07:00
Jozsef
9561265c3b Cull AT 2021-06-30 15:43:38 -07:00
Jozsef
2c560d6f4e Merge branch 'dev' into shader-pipeline 2021-06-30 13:10:50 -07:00
Jozsef
8bf0b31039 Fix else formatting 2021-06-30 13:03:02 -07:00
Jozsef
8c161457f1 Merge branch 'dev' into shader-pipeline
# Conflicts:
#	src/main/java/com/jozufozu/flywheel/backend/ShaderSources.java
2021-06-30 12:58:21 -07:00
Jozsef
6817ddec45 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
Jozsef
cc063a37c5 More fun parsing stuff
- Start loading things via ShaderSources
 - More Span functionality
 - Parse function arguments
2021-06-30 11:42:33 -07:00
JozsefA
cd5b9b06b5 Merge branch 'dev' into shader-pipeline 2021-06-27 18:50:38 -07:00
JozsefA
f85fce3603 Reset StitchedSprites when the atlas is stitched
- Might fix simi's slime issue
2021-06-26 16:05:15 -07:00
JozsefA
5e59fa73b8 Merge branch 'dev' into shader-pipeline 2021-06-26 13:07:27 -07:00
JozsefA
2cad7233ef Always dispatch render layer events 2021-06-26 13:05:21 -07:00
JozsefA
469dec0a49 Start work on shader pipeline system
- Unbulit, untested so far
 - Will ultimately supersede shader contexts/templating
 - Laying framework for better compile errors via Span.java
2021-06-25 18:01:50 -07:00
JozsefA
3fb48d248a Instanced entities are compatible with optifine
- Fix mixin related crash on startup
 - Change defaultRequire to 0
2021-06-24 19:37:31 -07:00
JozsefA
c8152bd499 Comment out debug line 2021-06-24 14:21:19 -07:00
JozsefA
ae4455543a Change behavior of tagged struct parsing in shaders
- Explicit call to Shader#parseStructs is required before they can be read.
 - Fixes a startup crash on some drivers (apparently nvidia is cool with #[...], but other drivers fail)
2021-06-24 14:20:24 -07:00
JozsefA
a8ae0383aa Fix complaint about an unknown custom packet identifier 2021-06-24 10:42:25 -07:00
JozsefA
13c484d747 Fix crash on resource reload
- Properly delete MaterialManagers and ShaderContexts
 - Reload renderers on resource reload
 - More utility methods in WorldAttached
2021-06-24 01:20:03 -07:00
JozsefA
0bb85e4437 Cleanup flywheel event listeners, fix crash on server startup 2021-06-23 13:19:03 -07:00
JozsefA
c887d326c6 Print final shader source on compilation error 2021-06-23 09:08:34 -07:00
JozsefA
12748cc208 Add fabulous depth fix 2021-06-22 20:06:00 -07:00
JozsefA
7d6ec7d28f Little tweaks and add the logo to mods.toml 2021-06-19 16:52:23 -07:00
JozsefA
69cf9e9b21 Commands, config, and a logo
- Added /flywheel backend command to replace /create experimentalRendering
 - Added /flywheel normalOverlay command
 - Need to think more about a good way to do this in a client only way
 - Added basic config
 - Logo in README.md (thanks, dani!)
2021-06-18 22:52:33 -07:00
JozsefA
4af63c6fee Nuke mod class 2021-06-16 13:03:40 -07:00
JozsefA
6b0ce3115d Update mods.toml 2021-06-16 12:57:52 -07:00
JozsefA
5913d1aef1 Add licence 2021-06-16 11:58:17 -07:00
JozsefA
f460e229df Squish
- Squash all commits before separating flywheel from create
2024-03-07 19:08:15 -08:00