Commit graph

708 commits

Author SHA1 Message Date
Kneelawk
98999fb551 Workflower
- Changed GitHub CI to run `publish` task so we can make sure that publishing actually works.
2024-05-04 16:56:46 -07:00
Kneelawk
7cb3fb8971 Workflowing 2024-05-04 16:56:46 -07:00
Kneelawk
1e6dfa06d0 Fix RenderStageCallback 2024-05-04 16:56:46 -07:00
Kneelawk
edce752499 Fix refmaps, again 2024-05-04 16:56:46 -07:00
Kneelawk
ce5a04749c Get Publishing! 2024-05-04 16:56:46 -07:00
Kneelawk
4145d80441 Use central javadoc-options file 2024-05-04 16:56:46 -07:00
Kneelawk
dd77686107 Add common publishing 2024-05-04 16:56:46 -07:00
PepperCode1
77fa0923f5 Best-effort untested Fabric model builders
- Also fix crash buffering fluids in BakedModelBufferer#bufferMultiBlock (Forge)
- The mesh order in models created by model builders is currently incorrect and will be fixed later
2024-05-04 16:56:46 -07:00
Jozufozu
2e7c33b355 Pretty groovy man
- Upgrade platform script plugin to pre-compiled groovy plugin
- It was getting really difficult to manage all the logic/plugins/types
  from the basic script, and implementing a real plugin gives us much
  better type safety and IDE access to upstream plugins
- Separate api/lib/backend/impl in platform projects
- Add platform module output to main runtime classpath so the fabric
  loader recognizes our additional modules
2024-05-04 16:56:46 -07:00
Jozufozu
52eef2e538 Unconventional
- Use convention plugins for common build logic
- Convention plugins get to be applied in the plugins block and can load
  other plugins
- Move GeneratePackageInfosTask to its own file in buildSrc
- Apply GeneratePackageInfosTask to every sourceSet
2024-05-04 16:56:46 -07:00
Jozufozu
82c7adedb7 Centrifuge
- Separate common project into 4 source sets
- Declare outgoing configurations for forge/fabric to depend on
- Re-compile source from each source set in each platform's compileJava
2024-05-04 16:56:45 -07:00
Kneelawk
1b41ba3e46 Fix forge remapping 2024-05-04 16:56:44 -07:00
Kneelawk
b30b1f7e0d Fix refmaps 2024-05-04 16:56:44 -07:00
Kneelawk
3c7ecddcc8 Fix artifactIds 2024-05-04 16:56:44 -07:00
Kneelawk
819863a112 Fix javadoc task 2024-05-04 16:56:44 -07:00
PepperCode1
6d36f66060 Remove old DependencyInjection#load method 2024-05-04 16:56:44 -07:00
PepperCode1
543f759fee Most of Fabric
- Organize almost all remaining code into one of four modules
- Fix some incorrect inter-module dependencies
- Get Fabric into a working state
  - The config, client commands, and model builders are still missing and registry freezing happens too late
2024-05-04 16:56:44 -07:00
Jozufozu
77c2181318 Graidiomatic
- Move common build script stuff to buildSrc
- Set ideaSyncTask finalizedBy generatePackageInfos directly in
  package-infos.gradle
- Enable loom multiproject optimization, though not sure if it makes a
  difference for us yet
2024-05-04 16:56:43 -07:00
PepperCode1
9d227c5887 Minor clean up and fixes 2024-05-04 16:56:43 -07:00
Jozufozu
b5066e36cf One line optimization
- Actually init vanilla visuals
2024-05-04 16:56:43 -07:00
Jozufozu
f471edc5f4 Gradle grumbles
- Apply java, maven-publish to all projects
- Prefer the tasks.named() syntax for configuring tasks
- Separate shared configuration for platform projects into a separate
  configure block
- Add more fields to processResources
- Make helper methods static
- Exclude duplicated package infos
2024-05-04 16:56:43 -07:00
Jozufozu
5b2339875e Compiling models
- Make model builders abstract
- Move BakedModelBufferer as is into forge project
- Create Forge*ModelBuilders with modeldata parameters
- Wrap ModelBuilder ctors in factory methods
- Add FlywheelLibPlatform api, similar to api.internal package but for
  lib-only/platform specific stuff
- Move TransformStack wrapping into FlywheelLibPlatform
- Create vanilla renderer through FlywheelLibPlatform
- Handle partial model initialization in separate event handler class
- Fix test configuration in common project
2024-05-04 16:56:43 -07:00
Jozufozu
87b9a922c3 Everything but models
- Trying to get xplat forge working, fabric can wait until the common
  project compiles
- Move backend manager event handling to separate class
- Move commands into forge for now
- Make FlwConfig an interface and move concrete impl into forge
- Remove event parameters from handlers than don't actually use them
- Add platform specific blockstate light emission for uniforms
- Remove example effect
- Add accessor for LevelRenderer#ticks
2024-05-04 16:56:42 -07:00
Jozufozu
69290410eb Out for a run
- Move loom.runs into subprojects closure
- Move common code sharing into subprojects closure
- Apply java plugin
- Fix runs not being generated by moving generatePackageInfos to the
  bottom
2024-05-04 16:56:42 -07:00
Jozufozu
d9c178cd6c Platform dependent wheeling
- Use ClientPlatform to:
  - Dispatch events
  - Create iris/oculus handler
- Move VisualizationEventHandler into forge project
2024-05-04 16:56:42 -07:00
Jozufozu
5e7e867bcd Deduplication and stubs
- Move common gradle business from each subproject into the
  rootProject.subprojects closure
- Add fabric.mod.json
- Register forge mixin configs
- Make blaze3d mixins remap = false
- Separate common, forge, and fabric mod entrypoints
2024-05-04 16:56:42 -07:00
Kneelawk
c027023709 Move events to platforms 2024-05-04 16:56:42 -07:00
Kneelawk
2163ad95c6 Move MinecraftMixin to platforms 2024-05-04 16:56:42 -07:00
Kneelawk
54f2ffd6ea Move Sodium mixin to platform code 2024-05-04 16:56:42 -07:00
Kneelawk
85fc7c8246 Begin on platform abstraction interface 2024-05-04 16:56:42 -07:00
Kneelawk
0d8a63f189 Add jsr305 compile dependency 2024-05-04 16:56:41 -07:00
Kneelawk
a6157c59b3 Re-add sodium/embeddium, iris/oculus, starlight dependencies 2024-05-04 16:56:41 -07:00
Kneelawk
99044bcf7b Re-add package-info generation 2024-05-04 16:56:41 -07:00
Kneelawk
0d43681d54 Begin architectury setup 2024-05-04 16:56:40 -07:00
Jozufozu
f51e2d2a1b Case'd into a corner
- Do not clear instance handles when clearing an instancer
  - Fixes case where a stolen handle gets cleared after changing
    instancers
- Use a concurrent queue for initializing instancers in DrawManager
  - Fixes race condition where only one of two instancers created in the
    same moment get initialized
2024-05-01 19:30:11 -07:00
Jozufozu
dbf1977c0d Like a deer in the headlights
- Freeze registries in FMLLoadCompleteEvent
- Pass registry objects into freeze callback consumers
  - Should make it more difficult to pass a callback to the wrong
    registry
2024-04-14 22:24:31 -07:00
PepperCode1
4cb2cabec8 Fix FogUniforms 2024-04-11 12:19:18 -07:00
PepperCode1
2365687950 Next level
- Rename all appropriate occurrences of "world" to "level"
- Simplify uniform buffers
- Fix indirect cull dispatch only binding frame uniforms
- Fix level renderer reload resetting debug mode
- Properly register backend argument
2024-04-11 12:12:13 -07:00
PepperCode1
2f7fce29c3 Arrays and alignment
- Allow array elements in layouts with lengths in range [1, 256]
- Align each layout element to its primitive size instead of always
aligning to 4 bytes; this is the same as C struct alignment
- Rename package lib.visual.components -> component
- Add more methods to layout API interfaces to allow retrieving
information such as padding size and alignment
2024-04-05 17:00:04 -07:00
Jozufozu
09cb15e2ed This context intentionally left blank
- Move Visual*Contexts inside their respective *Visual interfaces
- Acknowledge that TickableVisual.Context has no methods
- api_impl.vert: no need to try to pack in/out variables
2024-04-03 21:23:12 -07:00
Jozufozu
833fadbbdc Much ado
- Go through some TODOs
- Simplify FlatLit interface and directly store packed light
- Rename getters in Events
- Document Effects
- LitVisualStorage: atomics are slow
- BakedModelBufferer: vanilla leaks too, they'll be freed when the game
  exits
2024-04-02 12:36:40 -07:00
Jozufozu
506f2d5158 Unionized threads
- Allow the user to configure the number of worker threads
- Allow the user to disable parallelism entirely without a jvm flag
- Move thread count logic into FlwTaskExecutor and make
  ParallelTaskExecutor simply take a thread count as a parameter
2024-03-31 16:59:53 -07:00
Jozufozu
d5c5b998bc Cache deposits
- Make the scatter shader more cache friendly by doing one copy per
  workgroup and making copies up to 64 uints long
2024-03-31 16:08:12 -07:00
PepperCode1
2ee3944ca6 GLSL to the max
- Always compile with highest supported GLSL version
- Allow indirect shaders to compile with as low as GLSL 420
- Fix GL extension checks for indirect
- Explicitly initialize GlCompat as early as possible to avoid invalid
initialization off render thread
2024-03-31 15:53:23 -07:00
Jozufozu
08476b5779 Delicious words
- Check against totalAvailable in StagingBuffer#reserveForCopy
- Fixes garbage being rendered after uploading large amounts of data
2024-03-31 15:10:56 -07:00
Jozufozu
dfca589c5b Boundless changes
- Fix exception thrown uploading indirect instances when an instance was
  added in the same frame that the tail instance was deleted. We'd leave
  behind some set changed bits out of bounds of the instance list, and
  try to access those indices later
- Add out of bounds guards within forEachSetSpan, though I don't think
  they're actually necessary
- Add AtomicBitset#set and #clear range methods
- Update all changed bits at once when deleting instances rather than
  doing it in the loop
- Start iterating from the first set bit rather than 0 to save
  potentially thousands of iterations
- Smarter model index uploading
2024-03-31 12:56:01 -07:00
Jozufozu
395f4b1dfc Based crumbling
- Fix crumbling on instancing engine by passing a baseInstance uniform
2024-03-29 17:40:49 -07:00
Jozufozu
227d753e73 High noon
- Draw! meshes in contractual order on instancing engine
- Rename DrawSet -> InstancedRenderStage and consolidate associated code
  inside the class
- Re-use GroupKey between engines
- Sort instanced draws based on material and mesh index in model
- Make doCrumblingSort abstract on the instancer class and re-use it
  between engines
2024-03-29 16:33:06 -07:00
Jozufozu
96eb5ea47c Less omissions in mesh emission
- Cannibalize shade separated vertex consumer to function as the mesh
  emitter for baked model buffering
- Create one MeshEmitter per chunk RenderType to allow more coherency
  during multi block buffering
- MeshEmitters own BufferBuilders, and the buffering functions call
  #begin on the mesh emitters directly
- Each time the emitter sees a quad with a different shade flag than the
  previous run of quads, it emits a mesh and begins again
- Finally, the buffering functions call #end on the mesh emitters to
  emit trailing meshes and clear transient state
- Add diffuse debug mode
- Order indirect draws by mesh index first
- Remove non-shade separated option from buffering utilities because it
  allows you to opt in to incorrect behaviour
- Remove TessellatedModel
- Document mesh ordering contract in Model
2024-03-26 12:06:20 -07:00
Jozufozu
183ea1f0f8 Get reset visual
- Remove Visual#shouldReset and associated logic
- Instead, delete and add visuals when the level renderer is notified
  of a block state change (that has a block entity)
- This does remove some control from BEVs, but it greatly simplifies the
  API and API contract
2024-03-25 12:45:53 -05:00