mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-11-14 06:24:12 +01:00
Compare commits
2 Commits
2ae177966c
...
60c5eb6824
Author | SHA1 | Date | |
---|---|---|---|
|
60c5eb6824 | ||
|
4f0c1cc1ae |
@ -1,55 +0,0 @@
|
||||
package dev.engine_room.flywheel.backend.compile;
|
||||
|
||||
// TODO: recycle to be invoked by the shader compiler
|
||||
public class SourceChecks {
|
||||
// public static final BiConsumer<ErrorReporter, SourceFile> LAYOUT_VERTEX = checkFunctionArity("flw_layoutVertex", 0);
|
||||
// public static final BiConsumer<ErrorReporter, SourceFile> INSTANCE_VERTEX = checkFunctionParameterTypeExists("flw_instanceVertex", 1, 0);
|
||||
// public static final BiConsumer<ErrorReporter, SourceFile> MATERIAL_VERTEX = checkFunctionArity("flw_materialVertex", 0);
|
||||
// public static final BiConsumer<ErrorReporter, SourceFile> MATERIAL_FRAGMENT = checkFunctionArity("flw_materialFragment", 0);
|
||||
// public static final BiConsumer<ErrorReporter, SourceFile> CONTEXT_VERTEX = checkFunctionArity("flw_contextVertex", 0);
|
||||
// public static final BiConsumer<ErrorReporter, SourceFile> CONTEXT_FRAGMENT = checkFunctionArity("flw_contextFragment", 0).andThen(checkFunctionArity("flw_initFragment", 0));
|
||||
// public static final BiConsumer<ErrorReporter, SourceFile> PIPELINE = checkFunctionArity("main", 0);
|
||||
//
|
||||
// public static BiConsumer<ErrorReporter, SourceFile> checkFunctionArity(String name, int arity) {
|
||||
// return (errorReporter, file) -> checkFunctionArity(errorReporter, file, name, arity);
|
||||
// }
|
||||
//
|
||||
// public static BiConsumer<ErrorReporter, SourceFile> checkFunctionParameterTypeExists(String name, int arity, int param) {
|
||||
// return (errorReporter, file) -> {
|
||||
// var func = checkFunctionArity(errorReporter, file, name, arity);
|
||||
//
|
||||
// if (func == null) {
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// var maybeStruct = func.getParameterType(param)
|
||||
// .findStruct();
|
||||
//
|
||||
// if (maybeStruct.isEmpty()) {
|
||||
// errorReporter.generateMissingStruct(file, func.getParameterType(param), "struct not defined");
|
||||
// }
|
||||
// };
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * @return {@code null} if the function doesn't exist, or if the function has the wrong arity.
|
||||
// */
|
||||
// @Nullable
|
||||
// private static ShaderFunction checkFunctionArity(ErrorReporter errorReporter, SourceFile file, String name, int arity) {
|
||||
// Optional<ShaderFunction> maybeFunc = file.findFunction(name);
|
||||
//
|
||||
// if (maybeFunc.isEmpty()) {
|
||||
// errorReporter.generateMissingFunction(file, name, "\"" + name + "\" function not defined");
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// ShaderFunction func = maybeFunc.get();
|
||||
// ImmutableList<ShaderVariable> params = func.getParameters();
|
||||
// if (params.size() != arity) {
|
||||
// errorReporter.generateFunctionArgumentCountError(name, arity, func.getArgs());
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// return func;
|
||||
// }
|
||||
}
|
@ -62,7 +62,7 @@ public abstract class InstanceAssemblerComponent implements SourceComponent {
|
||||
FLOAT_UNPACKING_FUNCS.put(FloatRepr.UNSIGNED_INT, e -> e.cast("float"));
|
||||
FLOAT_UNPACKING_FUNCS.put(FloatRepr.NORMALIZED_UNSIGNED_INT, e -> e.cast("float").div(4294967295f));
|
||||
|
||||
FLOAT_UNPACKING_FUNCS.put(FloatRepr.FLOAT, e -> e.callFunction("uintBitsToFloat")); // FIXME: GLSL 330+
|
||||
FLOAT_UNPACKING_FUNCS.put(FloatRepr.FLOAT, e -> e.callFunction("uintBitsToFloat"));
|
||||
}
|
||||
|
||||
protected final Layout layout;
|
||||
|
@ -22,7 +22,6 @@ import net.minecraft.world.level.LightLayer;
|
||||
import net.minecraft.world.level.lighting.LayerLightEventListener;
|
||||
|
||||
/**
|
||||
* TODO: AO data
|
||||
* A managed arena of light sections for uploading to the GPU.
|
||||
*
|
||||
* <p>Each section represents an 18x18x18 block volume of light data.
|
||||
@ -116,7 +115,6 @@ public class LightStorage {
|
||||
}
|
||||
|
||||
// Now actually do the collection.
|
||||
// TODO: Should this be done in parallel?
|
||||
sectionsToCollect.forEach(this::collectSection);
|
||||
|
||||
updatedSections.clear();
|
||||
|
@ -11,7 +11,6 @@ import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
|
||||
// TODO: Add freezing
|
||||
@SuppressWarnings("unchecked")
|
||||
public final class VisualizerRegistryImpl {
|
||||
@Nullable
|
||||
|
@ -7,26 +7,6 @@ import net.minecraft.client.model.geom.ModelLayers;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
|
||||
/**
|
||||
* TODO:
|
||||
* <table>
|
||||
* <tr><td>{@link BlockEntityType#SIGN}</td><td> {@link net.minecraft.client.renderer.blockentity.SignRenderer SignRenderer}</td></tr>
|
||||
* <tr><td>{@link BlockEntityType#PISTON}</td><td> {@link net.minecraft.client.renderer.blockentity.PistonHeadRenderer PistonHeadRenderer}</td></tr>
|
||||
* <tr><td>{@link BlockEntityType#CONDUIT}</td><td> {@link net.minecraft.client.renderer.blockentity.ConduitRenderer ConduitRenderer}</td></tr>
|
||||
* <tr><td>{@link BlockEntityType#ENCHANTING_TABLE}</td><td> {@link net.minecraft.client.renderer.blockentity.EnchantTableRenderer EnchantTableRenderer}</td></tr>
|
||||
* <tr><td>{@link BlockEntityType#LECTERN}</td><td> {@link net.minecraft.client.renderer.blockentity.LecternRenderer LecternRenderer}</td></tr>
|
||||
* <tr><td>{@link BlockEntityType#MOB_SPAWNER}</td><td> {@link net.minecraft.client.renderer.blockentity.SpawnerRenderer SpawnerRenderer}</td></tr>
|
||||
* <tr><td>{@link BlockEntityType#BED}</td><td> {@link net.minecraft.client.renderer.blockentity.BedRenderer BedRenderer}</td></tr>
|
||||
* <tr><td>^^ Interesting - Major vv</td></tr>
|
||||
* <tr><td>{@link BlockEntityType#END_PORTAL}</td><td> {@link net.minecraft.client.renderer.blockentity.TheEndPortalRenderer TheEndPortalRenderer}</td></tr>
|
||||
* <tr><td>{@link BlockEntityType#END_GATEWAY}</td><td> {@link net.minecraft.client.renderer.blockentity.TheEndGatewayRenderer TheEndGatewayRenderer}</td></tr>
|
||||
* <tr><td>{@link BlockEntityType#BEACON}</td><td> {@link net.minecraft.client.renderer.blockentity.BeaconRenderer BeaconRenderer}</td></tr>
|
||||
* <tr><td>{@link BlockEntityType#SKULL}</td><td> {@link net.minecraft.client.renderer.blockentity.SkullBlockRenderer SkullBlockRenderer}</td></tr>
|
||||
* <tr><td>{@link BlockEntityType#BANNER}</td><td> {@link net.minecraft.client.renderer.blockentity.BannerRenderer BannerRenderer}</td></tr>
|
||||
* <tr><td>{@link BlockEntityType#STRUCTURE_BLOCK}</td><td> {@link net.minecraft.client.renderer.debug.StructureRenderer StructureRenderer}</td></tr>
|
||||
* <tr><td>{@link BlockEntityType#CAMPFIRE}</td><td> {@link net.minecraft.client.renderer.blockentity.CampfireRenderer CampfireRenderer}</td></tr>
|
||||
* </table>
|
||||
*/
|
||||
public class VanillaVisuals {
|
||||
public static void init() {
|
||||
builder(BlockEntityType.CHEST)
|
||||
|
Loading…
Reference in New Issue
Block a user