- Hook into ClientChunkCache#onLightUpdate for light updates to be
compatible with both vanilla and starlight at once
- Bump embeddium/occulus versions
- Move embedding uniform names to static finals and fix culling program
complaining about missing uniform names
- Light minecart visuals on init
- Upload instancers and model indices in separate loops in an
IndirectCullingGroup
- Reset changed bitset and update last* in separate method
- Don't need to upload instances anymore if the model index changes
- Compose transformations of embeddings
- Make EmbeddedEnvironment abstract and move light stuffs into
TopLevelEmbeddedEnvironment
- Add NestedEmbeddedEnvironment that only handles matrices, and tracks
a parent EmbeddedEnvironment
- AbstractEmbeddedEnvironment handles most of the deletion/update logic,
and also creates further NestedEmbeddedEnvironments
- EnvironmentStorage now only tracks environments and does not creat
them.
- Store packed instances in a uint[] in indirect
- Split the object buffer into an instance buffer and a model index
buffer
- Rename StructInstanceComponent to SsboInstanceComponent
- Expand abstraction in InstanceAssemblerComponent to allow both types
of instance assemblers to reuse per-element unpacking generation
- Separate FlwInstance struct generation into separate component,
InstanceStructComponent
- Also inline LayoutInterpreter into this class
- Move necessary internal definitions for components from api_impl to
common components_header shaders
- Use the same api_impl shader between pipelines
- Do not delete light volume memory when invalidated. Keep the block
around, and then use it again later when we collect more light
- Do not allocate fresh memory blocks when growing a light volume. Turns
out self-blitting is perfectly fine since we always start from the
volume's origin
- Inline BoxSet back into light volume. The precise tracking it did is
no longer relevant now that the embedding api has been simplified
- Light volumes now directly
- Simplify light invalidation api/impl
- There are 2 use cases for invalidating collected light:
- The embedding visual receives a light update
- The embedding visual moves
- In either case, it's in the visual's best interest to re-collect any
light it might need, rather than relying on the impl to copy
potentially outdated light.
- Do not sample the light volume if no light is collected
- Improve debug modes
- Calculate colors in the fragment shader to reflect any per-fragment
material/embedding alterations to the vertex output
- Fix light volume debug mode spewing rainbow seizure garbage
- Add light color debug mode
- Fix frame uniforms reserving too much space
- Fix level uniforms reserving too little space
- Actually move flw_constantAmbientLight to level uniforms
Squashed commit history:
* Add basic view.h matrices
* Add last values
* Add clean matrices
* Finish adding most view.h things to frame.glsl
* Document cameraIn- uniforms
* Add options uniform
* Begin on player uniforms
* Add more player uniforms
* Add level uniforms
* Fix uniform bindings
* Update options
* Fix offset alignments
* Add new uniforms to cull shader
* Fix simple things
* Make alpha 1 if team exists but does not have a color
* Fix mixin method names
* Provide all uniforms to cull shaders
* Move constant ambient light uniform to level group
* Level uniforms gets context from context
* Remove `clean` matrices for now
- Track exactly what blocks are contained in a light volume via BoxSet
- Fix segfault when a volume is expanded
- Shrink the volume when enough data is discarded
- I think the texture management is broken for this case
- Environment/Embedding ownership is complicated, reference counting to
the rescue!
- VisualEmbeddings are acquired on construction and deleted manually
- Instancers acquire/delete their environments
- EmbeddedEnvironment now has three (3) delete methods
- Add EnvironmentStorage to create, track, update, and delete
environments
- Remove InstancingEngine/IndirectEngine and move shared logic to
EngineImpl
- There's probably more that can be done to make DrawManager cleaner
now
- Consolidate context shaders into the common shaders, guarded by ifdefs
- Make ContextShaders into an enum
- Cache shaders by name instead of SourceComponents so the defines for
contexts actually get compiled
- Move all embedding stuff into backend.embed
- Cannibalize GPULightVolume into an api better suited for environments
- Separate light storage from 3d texture management
- Add #delete to Environment
- Add light volume debug mode
- Fix unpacking of some layout elements (only for instancing)
- All byte backed and short backed elements (incorrect assumption that
system is little endian)
- All signed byte and signed short elements (missing sign extension)
- Matrices with byte backed and short backed reprs in some cases
(incorrect assumption that matrix rows are 4 byte aligned)
- IntegerRepr.INT scalar (invalid implicit cast)
- FloatRepr.NORMALIZED_INT scalar (missing cast to signed int)
- IntegerRepr.INT vector (invalid implicit cast)
- FloatRepr.NORMALIZED_INT vector (missing cast to signed int)
- FloatRepr.NORMALIZED_SHORT vector (incorrect divisor)
- Add explicit casts from uint to float since some drivers have a bug
where uint over float division is invalid
- Lower GLSL requirement of instancing from 420 to 330
- Fix lib instance writers assuming little endian when writing overlay
and light
- Move overlay clamping to vertex input shader and clamp to 15 instead
of 10
- Create abstract InstanceAssemblerComponent class
- Change return type of SourceComponent.name() to String and improve
implementations
- Make lib instance shaders multiply color value instead of overriding
it
- Improve MultiBlockModelBuilder
- Accept an Iterable<BlockPos> instead of a
Collection<StructureBlockInfo> and assume all block state data is
already contained within the render world
- Accept a Function instead of a Map as the model data lookup
- Allow enabling fluid rendering (all rendered fluids are currently
unshaded)
- Refactor VirtualEmptyBlockGetter
- Move elementary implementations into abstract VirtualBlockGetter
class
- Extract virtual LevelLightEngine into separate VirtualLightEngine
class with ability to lookup light values per pos
- Turn VirtualEmptyBlockGetter into a class and make all methods final
to ensure instances of this class are actually empty even if subclassed
- Make BakedModelBufferer class package private
- Remove unused VertexTransformations class
- Remove Experimental annotation from
VisualizationContext.createEmbedding
- Display actual backend instead of preferred backend when checking
backend
- Remove engine message and use standard messages that display backend
ID
- Simplify command code
- Replace all literal components with translatable components
- Pass 1 instead of 0 for partialTick on tick
- Extract base AtomicReferenceCounted and ReferenceCounted abstract
classes
- Double buffer capacity instead of adding constant on resize in
VertexWriter
- Move Samplers class from backend.engine to backend
- Make VisualizationContext, InstancerProvider, VisualEmbedding all
BackendImplemented
- Add Engine#createVisualizationContext
- Remove Engine#instancer and variants
- VisualEmbeddings are created by backends, and data will be pushed into
them by visuals.
- VisualEmbedding extends VisualizationContext
- The implementation of VisualEmbedding also implements Environment
- Environment is an internal replacement for Context
- Instancers are keyed by Environments
- Default environment is a noop essentially
- Clean up texture binder stuff that's no longer needed
- Move all sampler binding to program link time
- Centralize sampler bindings/names to Samplers
- Move diffuse, light, and overlay textures into the api
- Add builder for context shader
- Fix generated_indirect -> generated_instancing
- Inline all unnecessary context stuff
- Move ContextShaders into backend.compile
- Instancers are parameterized by a nullable VisualEmbedding
- I don't like this, but the code currently compiles, so I want a
checkpoint before I try my next idea
- Add EmbeddedLevel to api
- Move all context api/lib stuffs into backend
- Move context shaders into internal
- Inline Shader and TextureSource interfaces
- Move matrix bounding sphere transform into util
- Add uniforms to cull shader to allow it to work with embedded levels
- Engine has 2 instancer methods, one that accepts an EmbeddedLevel and
one without the parameter
- Change VisualizationContext#withContext to #embed
- Remove crumbling stuff from Contexts
- Fix garbage indices on instancing engine
- glDrawElements* wants indices as a byte offset, we were giving it
a word offset
- Rename BufferedMesh -> PooledMesh
- PooledMesh no longer stores things it can fetch from the inner mesh
- Use one vao for all drawcalls in instancing engine
- PooledMesh issues *BaseVertex calls
- Move crumbling logic into InstancedDrawManager
- Move programs acquisition into InstancedDrawManager
- Move owned gl objects into InstancedDrawManager
- Models now return a list of ConfiguredMeshes, i.e. mesh-material pairs
- BufferedMeshes now poll the index pool as needed
- Inline BufferedMesh#write
- Expand packed overlay_light attribute into components
- Make light a short backed vec2
- Divide light input by 256 directly instead of discarding lower bits
- Remove debug overlay enum, instead only use OVERRIDE
- Add overlay debug mode
- Use texture buffers instead of instanced arrays
- Fixes issues with instance layouts using int elements
- Fixes attribute binding hardware limitations
- Create one texture for the entire instancing engine and bind each
instancer's vbo when it's time to draw
- Generate glsl to fetch FlwInstances from a usamplerBuffer according to
the instance layout
- Use RGBA32UI to get the most data from each texel fetch
- Align instance stride to 16 to avoid complexity in unpacking
- Clamp overlay from 0 to 10 rather than 3 to 10 to fix everything
appearing washed out
- Fix normalized short backed float vectors being unpacked incorrectly
- Set overlay in shadow instance component to fix shadows appearing red
- Indicative of the ivec issue being present for divisor 0 vertex
attributes
- Break instance overlay/light back into 2 layout elements
- Write light directly as an int
- Make light a short backed float element
- Clamp overlay coords in common.frag to avoid explosions
- Explosions: integer vertex attributes sometimes blow up to massive
sizes, greater than Short.MAX_VALUE which should not be possible.
- Reorganize some texture/uniform binding code
- Reimplement normal debug mode
- Add debug mode for instance ID and light coordinates
- Pass an id into _flw_main
- Allow specifying how the debug color is applied, not sure if I want
to keep it though
- Do not store the debug mode in config
- Make MeshPool common between instancing and indirect
- Remove empty instancers and delete meshes on indirect
- Inline IndirectModel into IndirectInstancer since it was basically
just a thin wrapper
- Share one meshpool between all culling groups
- Always upload draw commands because the mesh may have moved
- No longer need to set the base instance in the apply shader
- For instancing, remove empty instancers and delete meshes
- Specify in InstancerProvider's contract that instancers should not be
kept around, but reusing them within one frame in guaranteed to be
safe
- Do all instancer updates in flush, and remove unnecessary checks that
would be made later in the frame
- Remove isEmpty from Mesh
- Remove staging buffer param from indirect mesh pool
- Add VisualizationContext#withContext to formalize the way contexts are
"pushed"
- Also push a render origin so contexts have better control over
visuals' positions
- Make InstancerProvider NonExtendable
- Move PlanStorage to lib as PlanMap and add documentation
- Remove FastPlanStorage in favor of ForEachPlan
- Move plan distribution next to other distribution methods
- Rename PlanUtil -> Distribute
- Move Engine#intancer to DirectInstancerProvider interface
- InstancerProvider allows access to the DirectInstancerProvider it's
wrapping. This is to allow mods to change the context or RenderStage
if they need
- Mark new methods and interfaces as experimental
- Should we mark them for removal in version 2?
- Remove NonExtendable from some context interfaces
- Remove PlannedVisual
- Dynamic/Tickable visuals create plans
- Add Simple*Visual to lib to replace the old api interfaces
- Better dynamic plan storage, no need to optimize on every change
- Special case the Simple*Visuals in Storage as to not lose performance
- Needs better documentation
- Add RunnablePlan
- Do not crash when an ubershader'd component is missing
- Reset instancing/indirect programs immediately on reload to invalidate
them in case ubershader loading fails
- Transformed had snuck up to attribute location 17
- Combine overlay and light attributes into one
- Flip order of overlay and light in instances to be consistent with
the internal vertex layout
- Contexts shouldn't be responsible for binding the api defined textures
- Move light and overlay binding to TextureBinder
- Clean up & standardize material/texture setup/teardown calls
- Revert removal of MaterialRenderState texture stuff
- Add SimpleContext + Builder
- Rename Textures -> TextureSource
- Add API methods to set basic float uniforms, more to come later
- Throw errors if a context tries to set uniforms/textures with reserved
names.
- Oops didn't actually put everything in last time.
- Create one context per crumbling stage.
- Let contexts handle setting both the diffuse and crumbling texture.
- Begin context refactor.
- Rename (old) Context -> ContextShader and remove gl program method.
- Add (new) Context which does not need to be registered.
- Contexts are responsible for binding textures given a material.
- Instancers are created in a specific context.
- Add Shader interface for attaching textures.
- Add Textures interface for fetching textures to pass to a Shader.
- Remove texture related code from MaterialRenderState.
- Key culling groups by context.
- Key DrawSets by context.
- Add LineModelBuilder and use that instead of the manual mesh creation
in HitboxComponent.
- Clone mojang's line shader, adapted as a flywheel material.
- Do not scale the view.
- Set flw_vertexPos by multiplying by the inverse view projection.
- Remove centerline material.
- Use #define make padded vec3 uniforms available as actual vec3s.
- Add flw_viewProjectionInverse to uniforms.
- Minecarts actually delete the stuff from SimpleEntityVisual.
- Add entity view vectors to BoundingBoxComponent.
- Add "centerline" material, similar to wireframe.
- Add SmartRecycler to create recyclers based on a parameter.
- Add SimpleEntityVisual which is composed of many EntityComponents.
- Would be nice to expand on this system, particularly to add components
when registering visualizers.
- Misc. doc updates.
- Add BoundingBoxComponent for drawing entity bounding boxes.
- Render lines with a wireframe material.
- Add viewport size and default line width uniforms.