- Replace ModelUtil.VANILLA_RENDERER with the actual vanilla renderer
- Inline it and remove the static field
- Remove the BlockRenderDispatcher parameter from all BakedModelBufferer
functions
- Remove FlwLibLink#createVanillaBlockRenderDispatcher
- Fix exception thrown in light storage when vising nether and end
dimensions
- Try to make section collection more tolerant, but more work on a
fallback path is likely needed
- Atomically count instances in indirect instancer
- Fixes indirect draws/instancers never being deleted
- Fix baseDraw being set incorrectly on intel
- Handle setting baseDraw in GlCompat#safeMultiDrawElementsIndirect
- Add debug flag to disable frame/tick plan execution
- Should help debugging cases where a visual constructor produces a
visual in an invalid state like the weeping shulker bug
- Fix darkness when collecting light sections from high in the air
- Add dummy data layer impl to return a constant
- Empty sky section returns 15
- Empty block section returns 0
- Copy vanilla's logic for determining which data layer to use for a
given position's sky light value
- While I'm at it, retrieve light section storage via an accessor to
avoid allocating SectionPos objects
- Improve lut debug view
- BackendManager.defaultBackend now dynamically computes the result every time it is invoked
- Forge backend config value now uses a supplier to provide the default backend
- Fix Fabric backend config being saved to "flw_backends" but loaded from "flw_backend"
- Add light storage debug view courtesy of effect visuals
- Yellow boxes are filled in sections
- Red/green/blue bars represent the LUT
- Cyan boxes are the "wasted space" in the LUT. Freely representable
sections that are simply not filled in
- Switch to Y X Z ordering
- In theory this will be more coherent since the first lut step on the
GPU will have a more constrained range of values in the worst case
- LightLut now does incremental updates java-side
- Still requires a full upload when changed, though it does not take up
much space
- ShaderLightVisualStorage now actually triggers removal of light
section from the lut
- Don't initialize instancers if they have 0 instances
- Never shrink the index pool
- Actually process recently allocated meshes to avoid growing the list
forever
- Fix hiz test bounds clamping, good ol off by 1 error
- Remove check for useMin since it's never used and the depth reduce
shader is hard-coded already
- Replace monolithic lut building function with a class representing a
layer of the lut
- Actually need 2 classes because int[] and Object[] aren't trivial to
make a type parameter, and we don't really want to be boxing ints here
- No longer need sorted inputs
- Should fix index out of bounds crash caused by reserving space for the
wrong index layer
- This will make it much easier to change the coordinate ordering scheme
* Automated testing
* Testing testing
- Use 2 spaces for indents yaml
- Move setupTestMod to PlatformExtension
- Allow specifying the sourceSet for the testMod artifact
- Rename things to camelCase
- Use rootCompile from transitiveSourceSets for the testMod source sets
- Use a blanket remapTestModJar task in the gh actions build
* Fail slowly
- We want to know the results of both tests regardless
* Add workflow dispatch
* Shoes should be steel toed, dangerous stuff
* Update build.yml
* fix modid
* Update FlywheelTestModClient.java
* add debug logging
* fix syntax issues
* fix issues
* Update build.yml
* Add debug logging
* more logging
* get testmod from correct dir
* switch to env var
* Why wait?
- Immediately audit on client tick
* DidObfuscate
- Fix RenderSystemMixin on fabric
- setShaderFogShape's arguments need to be remapped, but the name of the
function should not be. Fortunately mixin allows matching by function
name alone
* Clever commit title
- Change the Fabric mod ID to match Forge
- Move "Flywheel Test Mod" to static
- Cleanup start/stop messages
- Use the client start event on Fabric
---------
Co-authored-by: Jozufozu <jozsefaug@gmail.com>
- Generic pain relief
- Use new Instance[] rather than capturing the class object of the
instance type
- Make InstancePage static, but manually track the instancer parent so
we can check when stealing
- Simplify array creation helpers and make them static
- Mark InstanceHandleImpl#state as UnknownNullability
- Only upload changed page frame descriptors
- In the instancer, track changed contents separately from changed
validity, so we can separately upload objects and descriptors
- Combine pages only when they're at most half full, and not empty
- This guarantees that we'll fully empty a page, allowing us to free the memory for use by other instancers
- Track mergeable pages via a separate bitset
- Try to shuffle over instances into pages with space
- Clear out now-unused logic from ObjectStorage
- Some cleanup and more comments in IndirectInstancer
- Make AbstractInstancer much more slim and move logic to BaseInstancer
- Extend paging concept to the indirect instancer
- Extend ObjectStorage to support more interesting layouts
- Instance creation on indirect is now entirely lock free and deletions
no longer require re-uploading the entire instancer
- MaterialEncoder would trigger an indexing of CutoutShaders.OFF, though
PipelineCompiler would explicitly not index OFF
- This caused a crash on instancing when MaterialEncoder would delete
all pipeline shaders while instancing was trying to upload the packed
ubershader uniform
* Backport changes from 1.21.1
* fix
* Fix building
* fix compile error
* fix
* fix build for real
* address reviews
* Fix sodium compat
* address requested changes
* mark rubidium as incompatible
* add missed call
* Should have worn steel toe boots
- Add "stub" sourceset to each subproject
- Directly pass vararg sourcesets to methods in PlatformExtension to
avoid automatically shipping jars with the api stubs
- We may have to include stubs in setupLoomMod, but I don't think so
- A lot of this can be stripped back out if we don't need stub sources
for the forge/fabric subprojects
* Guarded stubs
- Add Sodium 0.6 and Iris API stubs to stubs source set and remove Gradle dependencies on local Sodium jar, Iris, and Oculus
- Ensure usage of APIs that may not exist at runtime is in private classes and access is always guarded
- Change ShadersModHandler
- Rename to ShadersModHelper
- Convert methods to check for Iris' and Optifine's presence into static final fields
- Move implementation to impl source set in form of IrisCompat and OptifineCompat classes
- Rename CompatMods to CompatMod and add public field to access mod ID
- Set BlockEntityType's Sodium predicate to null after it is removed
- Update repository links
- Remove local libs repository
---------
Co-authored-by: Jozufozu <jozsefaug@gmail.com>
Co-authored-by: PepperCode1 <44146161+PepperCode1@users.noreply.github.com>
- Use vanilla light directions for diffuse lighting
- Copy mc's glsl code for it, but assume directions are normalized
- Add command/config to toggle use of light directions vs chunk accurate
diffuse
- Always use shade in getItemMaterial
- Do not reload resource packs when updating light smoothness config,
we don't need to anymore with lazy compilation
- Decide not to render entities directly in the renderEntity method
- Prevents allocating large lists every frame to filter entities from
the client level
- Add pick glint material and system time uniform
- Move _FlwCullData to beginning of uniform block to ensure alignment
- Add helper to convert item rendertype into flywheel material
- Make UberShaderComponent#build NotNull
- Move index update and key creation logic to PipelineCompiler
- Always update index when a resource location is requested to fix
MaterialEncoder misses
- Indices trigger pipeline compiler deletion when updated
- Make everything in the compiler chain's results not null
- Throw errors immediately when encountered
- Log error messages when falling back
- Do not eagerly grab utility programs in IndirectDrawManager so we can
actually catch errors and fall back
- Remove CompilerStats
- Remove fog shader registry
- Remove Registry and RegistryImpl
- Make shader indices mutable
- Track fog uber component in a static field in PipelineCompiler
- When a new fog source is added, delete the pipeline compilation
harness and recreate the fog uber component
- Inline SourceLoader
- Strip out almost all source registries
- Fog will be dealt with in a follow-up commit
- Remove most static #init methods
- Remove old ubershader indices from shaders