- Program specs are now loaded from json instead of being defined in code and registered manually.
- Within the json spec, a program can define a list of states.
- A state consists of:
- A "when" clause.
- A list of strings to be #defined.
- A list of extensions to apply at program link time.
- Each frame, the first state whose "when" clause returns true will be used.
- A when clause consists of:
- A state provider defined by a resource location.
- A value to match.
- When the value returned by the provider matches the value defined in the when clause, the when clause is considered to be 'true'.
- There is syntactic sugar for when a provider returns a boolean value.
- This system is in its infancy, and there is plenty of room for improvement.
- All material shaders now use the template system.
- Because of the template system, we can know what attributes a material has, along with how they're formatted.
- All of the *Attribute enums are effectively inlined, as the context they used to provide is no longer needed.
- Create ContraptionMatrices class for better management of matrices during the contraption rendering process
- Fix diffuse lighting when rendering contraptions without Flywheel
- Clean up TileEntityRenderHelper
- Add disableDiffuseTransform to SuperByteBuffer and fix light calculation logic
- Instead, BufferBuilderReader can decode parts of a BufferBuilder.
- BufferedModel and its subclasses are now created directly with a ByteBuffer.
- ContraptionModel renamed to IndexedModel.
- InstancedModel and IndexedModel both now take model formats as arguments.
- All of this allows for better abstraction, composition, and control of models rendered with Flywheel.
- Instead, MaterialSpecs store the information
- RenderMaterials are now generic on InstanceData instead of InstancedModel
- RenderMaterials are directly constructed with and store a MaterialSpec
- Pass contraption world to movement behavior rendering
- Add hybrid lighting option to SuperByteBuffer (takes max of world light and vertex light)
- Create ContraptionWorldHolder for caching contraption worlds for contraptions that are not rendered with Flywheel
- Refactor some parts of contraption rendering
Also
- Partially fix incorrect vertex lighting (make sure to not sure Forge's lighting calculator)
- Reorder some lighting to make it more efficient
- Cleanup some things
- Lots of refactoring in the shader loading code.
- Abstract all the different shader source transformations into ProcessingStage.
- An ordered list of ProcessingStages is called a ShaderTransformer.
- When you acquire sources, a Shader now keeps track of the source location, shader type, and source code all together.
- Nothing is properly hooked up yet.
- A single shader file will be able to be compiled with different opengl targets.
- I plan on using this to implement meshlet rendering as an alternate backend-backend that will be used when available.
- It could also be used to enable compatibility with opengl 3.0 or potentially even 2.0.