From baa668505fdeeb029edf1695dfabd056a7484515 Mon Sep 17 00:00:00 2001 From: Luna0x01 Date: Mon, 6 Jan 2025 03:54:48 +0530 Subject: [PATCH] finish porting everything (black screen for now) --- .../com/mojang/blaze3d/vertex/PoseStack.java | 6 +- .../client/gui/SodiumGameOptionPages.java | 15 +- .../sodium/client/gui/SodiumGameOptions.java | 9 + .../sodium/client/gui/SodiumOptionsGUI.java | 12 + .../sodium/client/gui/options/OptionImpl.java | 2 + .../model/light/flat/FlatLightPipeline.java | 7 +- .../light/smooth/SmoothLightPipeline.java | 5 + .../render/chunk/DefaultChunkRenderer.java | 1 + .../render/chunk/RenderSectionManager.java | 3 +- .../render/chunk/ShaderChunkRenderer.java | 55 ++- .../chunk/compile/ChunkBuildBuffers.java | 35 +- .../chunk/compile/pipeline/BlockRenderer.java | 5 + .../tasks/ChunkBuilderMeshingTask.java | 7 +- .../resources/assets/iris/lang/cs_cz.json | 54 --- .../resources/assets/iris/lang/de_ch.json | 28 -- .../resources/assets/iris/lang/de_de.json | 84 ----- .../resources/assets/iris/lang/en_pt.json | 36 -- .../resources/assets/iris/lang/en_ud.json | 59 ---- .../resources/assets/iris/lang/en_us.json | 68 ---- .../resources/assets/iris/lang/es_ar.json | 68 ---- .../resources/assets/iris/lang/es_es.json | 67 ---- .../resources/assets/iris/lang/et_ee.json | 59 ---- .../resources/assets/iris/lang/fa_ir.json | 30 -- .../resources/assets/iris/lang/fi_fi.json | 59 ---- .../resources/assets/iris/lang/fr_fr.json | 28 -- .../resources/assets/iris/lang/hu_hu.json | 68 ---- .../resources/assets/iris/lang/it_it.json | 66 ---- .../resources/assets/iris/lang/ja_jp.json | 66 ---- .../resources/assets/iris/lang/ko_kr.json | 68 ---- .../resources/assets/iris/lang/lol_us.json | 33 -- .../main/resources/assets/iris/lang/lzh.json | 28 -- .../resources/assets/iris/lang/nl_nl.json | 23 -- .../resources/assets/iris/lang/pl_pl.json | 60 ---- .../resources/assets/iris/lang/pr_pt.json | 23 -- .../resources/assets/iris/lang/pt_br.json | 68 ---- .../resources/assets/iris/lang/ru_ru.json | 72 ---- .../resources/assets/iris/lang/sk_sk.json | 58 ---- .../resources/assets/iris/lang/th_th.json | 55 --- .../resources/assets/iris/lang/tr_tr.json | 54 --- .../resources/assets/iris/lang/uk_ua.json | 68 ---- .../resources/assets/iris/lang/zh_cn.json | 68 ---- .../resources/assets/iris/lang/zh_tw.json | 68 ---- .../assets/iris/textures/gui/widgets.png | Bin 3587 -> 0 bytes .../shaders/java/net/coderbot/iris/Iris.java | 91 ++--- .../java/net/coderbot/iris/UpdateChecker.java | 29 -- .../impl/IrisChunkShaderBindingPoints.java | 14 - .../block_context/BlockContextHolder.java | 2 +- .../block_context/ChunkBuildBuffersExt.java | 2 +- .../impl/options/IrisSodiumOptions.java | 4 +- .../impl/options/OptionImplExtended.java | 7 - .../ChunkRenderBackendExt.java | 8 - .../shader_overrides/IrisChunkProgram.java | 100 ------ .../IrisChunkProgramOverrides.java | 219 ------------ .../shader_overrides/IrisShaderTypes.java | 10 - .../shader_overrides/IrisTerrainPass.java | 17 - .../IrisChunkMeshAttributes.java | 14 - .../IrisGlVertexAttributeFormat.java | 11 - .../vertex_format/IrisModelVertexFormats.java | 7 - .../EntityVertexBufferWriterNio.java | 96 ------ .../EntityVertexBufferWriterUnsafe.java | 93 ----- .../entity_xhfp/ExtendedGlyphVertexType.java | 33 -- .../entity_xhfp/ExtendedQuadVertexType.java | 33 -- .../GlyphVertexBufferWriterNio.java | 95 ----- .../GlyphVertexBufferWriterUnsafe.java | 92 ----- .../entity_xhfp/QuadViewEntity.java | 65 ---- .../terrain_xhfp/QuadViewTerrain.java | 73 ---- .../XHFPModelVertexBufferWriterNio.java | 150 -------- .../XHFPModelVertexBufferWriterUnsafe.java | 147 -------- .../terrain_xhfp/XHFPModelVertexType.java | 63 ---- .../mixin/IrisSodiumCompatMixinPlugin.java | 63 ---- .../block_id/MixinChunkBuildBuffers.java | 71 ---- .../block_id/MixinChunkRenderRebuildTask.java | 80 ----- .../MixinFlatLightPipeline.java | 22 -- .../MixinSmoothLightPipeline.java | 20 -- .../options/MixinChunkRenderManager.java | 26 -- .../sodium/mixin/options/MixinOptionImpl.java | 32 -- .../options/MixinSodiumGameOptionPages.java | 62 ---- .../mixin/options/MixinSodiumGameOptions.java | 28 -- .../mixin/options/MixinSodiumOptionsGUI.java | 51 --- .../MixinTextureAtlasSprite.java | 28 -- .../mixin/separate_ao/MixinBlockRenderer.java | 47 --- .../mixin/separate_ao/MixinFluidRenderer.java | 43 --- .../shader_overrides/MixinChunkProgram.java | 57 --- .../MixinChunkRenderManager.java | 27 -- .../MixinChunkRenderShaderBackend.java | 180 ---------- .../shader_overrides/MixinShaderType.java | 28 -- .../shader_overrides/ShaderTypeAccessor.java | 13 - .../shadow_map/MixinChunkRenderManager.java | 173 ---------- .../shadow_map/MixinGameRendererContext.java | 26 -- .../shadow_map/MixinSodiumWorldRenderer.java | 136 -------- .../ChunkMeshAttributeAccessor.java | 13 - .../GlVertexAttributeFormatAccessor.java | 13 - .../MixinChunkMeshAttribute.java | 46 --- .../MixinChunkOneshotGraphicsState.java | 57 --- .../MixinGlVertexFormatBuilder.java | 36 -- .../vertex_format/MixinModelVertexUtil.java | 58 ---- .../MixinMultidrawChunkRenderBackend.java | 46 --- .../MixinSodiumWorldRenderer.java | 27 -- ...ferBuilder_ExtendedVertexFormatCompat.java | 41 --- .../iris/gl/texture/DepthCopyStrategy.java | 14 +- .../gui/element/ShaderPackSelectionList.java | 11 +- .../iris/gui/screen/ShaderPackScreen.java | 17 +- .../iris/mixin/MixinGameRenderer.java | 4 +- .../iris/mixin/MixinGlStateManager.java | 6 +- .../iris/mixin/MixinLevelRenderer.java | 27 +- .../iris/mixin/shadows/ChunkInfoAccessor.java | 12 - .../mixin/shadows/MixinBeaconRenderer.java | 25 -- .../texture/TextureAtlasSpriteAccessor.java | 3 - .../coderbot/iris/pipeline/HandRenderer.java | 7 +- .../iris/pipeline/HorizonRenderer.java | 2 +- .../iris/pipeline/ShadowRenderer.java | 6 +- .../iris/postprocess/CenterDepthSampler.java | 2 +- .../coderbot/iris/shadow/ShadowMatrices.java | 4 +- .../coderbot/iris/shadows/Matrix4fAccess.java | 23 -- .../iris/uniforms/CapturedRenderingState.java | 2 +- .../iris/uniforms/CelestialUniforms.java | 27 +- .../coderbot/iris/uniforms/IdMapUniforms.java | 10 +- .../iris/uniforms/MatrixUniforms.java | 12 +- .../resources/assets/iris/iris-logo.png | Bin .../resources/assets/iris/lang/cs_cz.json | 3 + .../resources/assets/iris/lang/de_ch.json | 2 + .../resources/assets/iris/lang/de_de.json | 19 +- .../resources/assets/iris/lang/en_pt.json | 2 + .../resources/assets/iris/lang/en_ud.json | 3 + .../resources/assets/iris/lang/en_us.json | 17 +- .../resources/assets/iris/lang/es_ar.json | 2 + .../resources/assets/iris/lang/es_es.json | 4 + .../resources/assets/iris/lang/et_ee.json | 24 +- .../resources/assets/iris/lang/fa_ir.json | 5 +- .../resources/assets/iris/lang/fi_fi.json | 5 +- .../resources/assets/iris/lang/fr_fr.json | 2 + .../resources/assets/iris/lang/hu_hu.json | 4 +- .../resources/assets/iris/lang/it_it.json | 4 +- .../resources/assets/iris/lang/ja_jp.json | 2 + .../resources/assets/iris/lang/ko_kr.json | 15 +- .../resources/assets/iris/lang/lol_us.json | 36 +- .../resources/assets/iris/lang/lzh.json | 2 + .../resources/assets/iris/lang/nl_nl.json | 56 +-- .../resources/assets/iris/lang/pl_pl.json | 35 +- .../resources/assets/iris/lang/pr_pt.json | 2 + .../resources/assets/iris/lang/pt_br.json | 9 +- .../resources/assets/iris/lang/ru_ru.json | 23 +- .../resources/assets/iris/lang/sk_sk.json | 3 + .../resources/assets/iris/lang/th_th.json | 5 +- .../resources/assets/iris/lang/tr_tr.json | 3 + .../resources/assets/iris/lang/uk_ua.json | 7 +- .../resources/assets/iris/lang/zh_cn.json | 35 +- .../resources/assets/iris/lang/zh_tw.json | 49 ++- .../assets/iris/textures/gui/widgets.png | Bin 6880 -> 3587 bytes common/src/shaders/resources/centerDepth.fsh | 22 +- common/src/shaders/resources/centerDepth.vsh | 10 +- common/src/shaders/resources/colorSpace.csh | 145 -------- common/src/shaders/resources/colorSpace.vsh | 11 - .../iris-batched-entity-rendering.mixins.json | 30 -- ...tching.json => iris-fantastic.mixins.json} | 4 +- .../resources/iris-vertexformat.mixins.json | 17 + common/src/shaders/resources/iris.mixins.json | 50 +++ .../resources/mixins.iris.bettermipmaps.json | 13 - .../resources/mixins.iris.compat.dh.json | 16 - .../resources/mixins.iris.compat.indigo.json | 13 - .../resources/mixins.iris.compat.indium.json | 13 - .../mixins.iris.compat.lightoverlay.json | 14 - .../resources/mixins.iris.compat.sodium.json | 33 -- .../resources/mixins.iris.devenvironment.json | 14 - .../resources/mixins.iris.fantastic.json | 16 - .../mixins.iris.fixes.maxfpscrash.json | 13 - .../mixins.iris.integrationtest.json | 12 - common/src/shaders/resources/mixins.iris.json | 109 ------ .../resources/mixins.iris.vertexformat.json | 21 -- .../vendored/java/kroppeb/stareval/Util.java | 13 - .../element/tree/AccessExpressionElement.java | 17 +- .../element/tree/BinaryExpressionElement.java | 23 +- .../stareval/element/tree/FunctionCall.java | 16 +- .../element/tree/UnaryExpressionElement.java | 16 +- .../tree/partial/PartialBinaryExpression.java | 2 +- .../stareval/exception/ParseException.java | 2 +- .../expression/BasicVariableExpression.java | 31 -- .../stareval/expression/CallExpression.java | 84 ----- .../expression/ConstantExpression.java | 21 -- .../stareval/expression/Expression.java | 16 - .../expression/VariableExpression.java | 10 - .../function/AbstractTypedFunction.java | 67 ---- .../stareval/function/B2BFunction.java | 26 -- .../stareval/function/BB2BFunction.java | 29 -- .../function/BasicFunctionContext.java | 36 -- .../stareval/function/F2FFunction.java | 24 -- .../stareval/function/F2IFunction.java | 24 -- .../stareval/function/FF2BFunction.java | 29 -- .../stareval/function/FF2FFunction.java | 29 -- .../stareval/function/FFF2BFunction.java | 32 -- .../stareval/function/FFF2FFunction.java | 32 -- .../stareval/function/FunctionContext.java | 9 - .../stareval/function/FunctionResolver.java | 131 ------- .../stareval/function/FunctionReturn.java | 12 - .../stareval/function/I2FFunction.java | 24 -- .../stareval/function/I2IFunction.java | 24 -- .../stareval/function/II2BFunction.java | 29 -- .../stareval/function/II2IFunction.java | 29 -- .../stareval/function/III2BFunction.java | 32 -- .../stareval/function/III2IFunction.java | 32 -- .../java/kroppeb/stareval/function/Type.java | 182 ---------- .../stareval/function/TypedFunction.java | 72 ---- .../stareval/function/V2FFunction.java | 23 -- .../stareval/function/V2IFunction.java | 23 -- .../kroppeb/stareval/parser/BinaryOp.java | 12 +- .../kroppeb/stareval/parser/OpResolver.java | 21 +- .../java/kroppeb/stareval/parser/Parser.java | 44 +-- .../stareval/parser/ParserOptions.java | 91 +++-- .../java/kroppeb/stareval/parser/UnaryOp.java | 6 +- .../stareval/resolver/ExpressionResolver.java | 325 ------------------ fabric/build.gradle.kts | 11 + .../mods/sodium/fabric/SodiumFabricMod.java | 2 +- fabric/src/main/resources/fabric.mod.json | 5 +- 213 files changed, 684 insertions(+), 6975 deletions(-) delete mode 100644 common/src/main/resources/assets/iris/lang/cs_cz.json delete mode 100644 common/src/main/resources/assets/iris/lang/de_ch.json delete mode 100644 common/src/main/resources/assets/iris/lang/de_de.json delete mode 100644 common/src/main/resources/assets/iris/lang/en_pt.json delete mode 100644 common/src/main/resources/assets/iris/lang/en_ud.json delete mode 100644 common/src/main/resources/assets/iris/lang/en_us.json delete mode 100644 common/src/main/resources/assets/iris/lang/es_ar.json delete mode 100644 common/src/main/resources/assets/iris/lang/es_es.json delete mode 100644 common/src/main/resources/assets/iris/lang/et_ee.json delete mode 100644 common/src/main/resources/assets/iris/lang/fa_ir.json delete mode 100644 common/src/main/resources/assets/iris/lang/fi_fi.json delete mode 100644 common/src/main/resources/assets/iris/lang/fr_fr.json delete mode 100644 common/src/main/resources/assets/iris/lang/hu_hu.json delete mode 100644 common/src/main/resources/assets/iris/lang/it_it.json delete mode 100644 common/src/main/resources/assets/iris/lang/ja_jp.json delete mode 100644 common/src/main/resources/assets/iris/lang/ko_kr.json delete mode 100644 common/src/main/resources/assets/iris/lang/lol_us.json delete mode 100644 common/src/main/resources/assets/iris/lang/lzh.json delete mode 100644 common/src/main/resources/assets/iris/lang/nl_nl.json delete mode 100644 common/src/main/resources/assets/iris/lang/pl_pl.json delete mode 100644 common/src/main/resources/assets/iris/lang/pr_pt.json delete mode 100644 common/src/main/resources/assets/iris/lang/pt_br.json delete mode 100644 common/src/main/resources/assets/iris/lang/ru_ru.json delete mode 100644 common/src/main/resources/assets/iris/lang/sk_sk.json delete mode 100644 common/src/main/resources/assets/iris/lang/th_th.json delete mode 100644 common/src/main/resources/assets/iris/lang/tr_tr.json delete mode 100644 common/src/main/resources/assets/iris/lang/uk_ua.json delete mode 100644 common/src/main/resources/assets/iris/lang/zh_cn.json delete mode 100644 common/src/main/resources/assets/iris/lang/zh_tw.json delete mode 100644 common/src/main/resources/assets/iris/textures/gui/widgets.png delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/IrisChunkShaderBindingPoints.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/options/OptionImplExtended.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/shader_overrides/ChunkRenderBackendExt.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/shader_overrides/IrisChunkProgram.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/shader_overrides/IrisChunkProgramOverrides.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/shader_overrides/IrisShaderTypes.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/shader_overrides/IrisTerrainPass.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/IrisChunkMeshAttributes.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/IrisGlVertexAttributeFormat.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/IrisModelVertexFormats.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/entity_xhfp/EntityVertexBufferWriterNio.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/entity_xhfp/EntityVertexBufferWriterUnsafe.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/entity_xhfp/ExtendedGlyphVertexType.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/entity_xhfp/ExtendedQuadVertexType.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/entity_xhfp/GlyphVertexBufferWriterNio.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/entity_xhfp/GlyphVertexBufferWriterUnsafe.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/entity_xhfp/QuadViewEntity.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/terrain_xhfp/QuadViewTerrain.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/terrain_xhfp/XHFPModelVertexBufferWriterNio.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/terrain_xhfp/XHFPModelVertexBufferWriterUnsafe.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/terrain_xhfp/XHFPModelVertexType.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/IrisSodiumCompatMixinPlugin.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/block_id/MixinChunkBuildBuffers.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/block_id/MixinChunkRenderRebuildTask.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/directional_shading/MixinFlatLightPipeline.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/directional_shading/MixinSmoothLightPipeline.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/options/MixinChunkRenderManager.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/options/MixinOptionImpl.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/options/MixinSodiumGameOptionPages.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/options/MixinSodiumGameOptions.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/options/MixinSodiumOptionsGUI.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/pbr_animation/MixinTextureAtlasSprite.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/separate_ao/MixinBlockRenderer.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/separate_ao/MixinFluidRenderer.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/shader_overrides/MixinChunkProgram.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/shader_overrides/MixinChunkRenderManager.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/shader_overrides/MixinChunkRenderShaderBackend.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/shader_overrides/MixinShaderType.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/shader_overrides/ShaderTypeAccessor.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/shadow_map/MixinChunkRenderManager.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/shadow_map/MixinGameRendererContext.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/shadow_map/MixinSodiumWorldRenderer.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/ChunkMeshAttributeAccessor.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/GlVertexAttributeFormatAccessor.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/MixinChunkMeshAttribute.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/MixinChunkOneshotGraphicsState.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/MixinGlVertexFormatBuilder.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/MixinModelVertexUtil.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/MixinMultidrawChunkRenderBackend.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/MixinSodiumWorldRenderer.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/entity/MixinBufferBuilder_ExtendedVertexFormatCompat.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/mixin/shadows/ChunkInfoAccessor.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/mixin/shadows/MixinBeaconRenderer.java delete mode 100644 common/src/shaders/java/net/coderbot/iris/shadows/Matrix4fAccess.java rename common/src/{main => shaders}/resources/assets/iris/iris-logo.png (100%) delete mode 100644 common/src/shaders/resources/colorSpace.csh delete mode 100644 common/src/shaders/resources/colorSpace.vsh delete mode 100644 common/src/shaders/resources/iris-batched-entity-rendering.mixins.json rename common/src/shaders/resources/{mixins.iris.optimized-stitching.json => iris-fantastic.mixins.json} (64%) create mode 100644 common/src/shaders/resources/iris-vertexformat.mixins.json create mode 100644 common/src/shaders/resources/iris.mixins.json delete mode 100644 common/src/shaders/resources/mixins.iris.bettermipmaps.json delete mode 100644 common/src/shaders/resources/mixins.iris.compat.dh.json delete mode 100644 common/src/shaders/resources/mixins.iris.compat.indigo.json delete mode 100644 common/src/shaders/resources/mixins.iris.compat.indium.json delete mode 100644 common/src/shaders/resources/mixins.iris.compat.lightoverlay.json delete mode 100644 common/src/shaders/resources/mixins.iris.compat.sodium.json delete mode 100644 common/src/shaders/resources/mixins.iris.devenvironment.json delete mode 100644 common/src/shaders/resources/mixins.iris.fantastic.json delete mode 100644 common/src/shaders/resources/mixins.iris.fixes.maxfpscrash.json delete mode 100644 common/src/shaders/resources/mixins.iris.integrationtest.json delete mode 100644 common/src/shaders/resources/mixins.iris.json delete mode 100644 common/src/shaders/resources/mixins.iris.vertexformat.json delete mode 100644 common/src/vendored/java/kroppeb/stareval/Util.java delete mode 100644 common/src/vendored/java/kroppeb/stareval/expression/BasicVariableExpression.java delete mode 100644 common/src/vendored/java/kroppeb/stareval/expression/CallExpression.java delete mode 100644 common/src/vendored/java/kroppeb/stareval/expression/ConstantExpression.java delete mode 100644 common/src/vendored/java/kroppeb/stareval/expression/Expression.java delete mode 100644 common/src/vendored/java/kroppeb/stareval/expression/VariableExpression.java delete mode 100644 common/src/vendored/java/kroppeb/stareval/function/AbstractTypedFunction.java delete mode 100644 common/src/vendored/java/kroppeb/stareval/function/B2BFunction.java delete mode 100644 common/src/vendored/java/kroppeb/stareval/function/BB2BFunction.java delete mode 100644 common/src/vendored/java/kroppeb/stareval/function/BasicFunctionContext.java delete mode 100644 common/src/vendored/java/kroppeb/stareval/function/F2FFunction.java delete mode 100644 common/src/vendored/java/kroppeb/stareval/function/F2IFunction.java delete mode 100644 common/src/vendored/java/kroppeb/stareval/function/FF2BFunction.java delete mode 100644 common/src/vendored/java/kroppeb/stareval/function/FF2FFunction.java delete mode 100644 common/src/vendored/java/kroppeb/stareval/function/FFF2BFunction.java delete mode 100644 common/src/vendored/java/kroppeb/stareval/function/FFF2FFunction.java delete mode 100644 common/src/vendored/java/kroppeb/stareval/function/FunctionContext.java delete mode 100644 common/src/vendored/java/kroppeb/stareval/function/FunctionResolver.java delete mode 100644 common/src/vendored/java/kroppeb/stareval/function/FunctionReturn.java delete mode 100644 common/src/vendored/java/kroppeb/stareval/function/I2FFunction.java delete mode 100644 common/src/vendored/java/kroppeb/stareval/function/I2IFunction.java delete mode 100644 common/src/vendored/java/kroppeb/stareval/function/II2BFunction.java delete mode 100644 common/src/vendored/java/kroppeb/stareval/function/II2IFunction.java delete mode 100644 common/src/vendored/java/kroppeb/stareval/function/III2BFunction.java delete mode 100644 common/src/vendored/java/kroppeb/stareval/function/III2IFunction.java delete mode 100644 common/src/vendored/java/kroppeb/stareval/function/Type.java delete mode 100644 common/src/vendored/java/kroppeb/stareval/function/TypedFunction.java delete mode 100644 common/src/vendored/java/kroppeb/stareval/function/V2FFunction.java delete mode 100644 common/src/vendored/java/kroppeb/stareval/function/V2IFunction.java delete mode 100644 common/src/vendored/java/kroppeb/stareval/resolver/ExpressionResolver.java diff --git a/common/src/api/java/com/mojang/blaze3d/vertex/PoseStack.java b/common/src/api/java/com/mojang/blaze3d/vertex/PoseStack.java index 9eae8e02f..24f16691e 100644 --- a/common/src/api/java/com/mojang/blaze3d/vertex/PoseStack.java +++ b/common/src/api/java/com/mojang/blaze3d/vertex/PoseStack.java @@ -5,9 +5,9 @@ import dev.vexor.radium.compat.mojang.Util; import dev.vexor.radium.compat.mojang.math.Mth; -import org.joml.Matrix3f; -import org.joml.Matrix4f; -import org.joml.Quaternionf; +import net.coderbot.iris.vendored.joml.Matrix3f; +import net.coderbot.iris.vendored.joml.Matrix4f; +import net.coderbot.iris.vendored.joml.Quaternionf; public class PoseStack { private final Deque poseStack = Util.make(Queues.newArrayDeque(), arrayDeque -> { diff --git a/common/src/main/java/net/caffeinemc/mods/sodium/client/gui/SodiumGameOptionPages.java b/common/src/main/java/net/caffeinemc/mods/sodium/client/gui/SodiumGameOptionPages.java index 2143d04c7..bc9872a69 100644 --- a/common/src/main/java/net/caffeinemc/mods/sodium/client/gui/SodiumGameOptionPages.java +++ b/common/src/main/java/net/caffeinemc/mods/sodium/client/gui/SodiumGameOptionPages.java @@ -10,6 +10,7 @@ import net.caffeinemc.mods.sodium.client.gui.options.storage.MinecraftOptionsStorage; import net.caffeinemc.mods.sodium.client.gui.options.storage.SodiumOptionsStorage; import net.caffeinemc.mods.sodium.client.services.PlatformRuntimeInformation; +import net.coderbot.iris.compat.sodium.impl.options.IrisSodiumOptions; import net.minecraft.client.MinecraftClient; import net.minecraft.client.util.Window; import net.minecraft.text.TranslatableText; @@ -44,6 +45,7 @@ public static OptionPage general() { .setControl(opt -> new SliderControl(opt, 0, 100, 1, ControlValueFormatter.brightness())) .setBinding((opts, value) -> opts.gamma = (value * 0.01f), (opts) -> (int) (opts.gamma / 0.01D)) .build()) + .add(IrisSodiumOptions.createMaxShadowDistanceSlider(vanillaOpts)) .build()); groups.add(OptionGroup.createBuilder() @@ -85,6 +87,7 @@ public static OptionPage general() { (opts, value) -> opts.vsync = value, opts -> opts.vsync) .setImpact(OptionImpact.VARIES) + .setFlags(OptionFlag.REQUIRES_RENDERER_RELOAD) .build()) .add(OptionImpl.createBuilder(int.class, vanillaOpts) .setName(new TranslatableText("options.framerateLimit")) @@ -93,6 +96,7 @@ public static OptionPage general() { .setBinding((opts, value) -> { opts.maxFramerate = (value); }, opts -> opts.maxFramerate) + .setFlags(OptionFlag.REQUIRES_RENDERER_RELOAD) .build()) .build()); @@ -114,16 +118,7 @@ public static OptionPage quality() { List groups = new ArrayList<>(); groups.add(OptionGroup.createBuilder() - .add(OptionImpl.createBuilder(GraphicsMode.class, vanillaOpts) - .setName(new TranslatableText("options.graphics")) - .setTooltip(new TranslatableText("sodium.options.graphics_quality.tooltip")) - .setControl(option -> new CyclingControl<>(option, GraphicsMode.class)) - .setBinding( - (opts, value) -> opts.fancyGraphics = value.isFancy(), - opts -> GraphicsMode.fromBoolean(opts.fancyGraphics)) - .setImpact(OptionImpact.HIGH) - .setFlags(OptionFlag.REQUIRES_RENDERER_RELOAD) - .build()) + .add(IrisSodiumOptions.createLimitedVideoSettingsButton(vanillaOpts)) .build()); groups.add(OptionGroup.createBuilder() diff --git a/common/src/main/java/net/caffeinemc/mods/sodium/client/gui/SodiumGameOptions.java b/common/src/main/java/net/caffeinemc/mods/sodium/client/gui/SodiumGameOptions.java index 2e62a5386..b9d27cc37 100644 --- a/common/src/main/java/net/caffeinemc/mods/sodium/client/gui/SodiumGameOptions.java +++ b/common/src/main/java/net/caffeinemc/mods/sodium/client/gui/SodiumGameOptions.java @@ -8,6 +8,7 @@ import net.caffeinemc.mods.sodium.client.services.PlatformRuntimeInformation; import net.caffeinemc.mods.sodium.client.util.FileUtil; import net.caffeinemc.mods.sodium.client.render.chunk.translucent_sorting.SortBehavior; +import net.coderbot.iris.Iris; import net.minecraft.text.Text; import net.minecraft.text.TranslatableText; @@ -171,6 +172,14 @@ public static void writeToDisk(SodiumGameOptions config) throws IOException { } FileUtil.writeTextRobustly(GSON.toJson(config), path); + + try { + if (Iris.getIrisConfig() != null) { + Iris.getIrisConfig().save(); + } + } catch (IOException e) { + e.printStackTrace(); + } } public boolean isReadOnly() { diff --git a/common/src/main/java/net/caffeinemc/mods/sodium/client/gui/SodiumOptionsGUI.java b/common/src/main/java/net/caffeinemc/mods/sodium/client/gui/SodiumOptionsGUI.java index 0ecb13f08..7c1dfc01f 100644 --- a/common/src/main/java/net/caffeinemc/mods/sodium/client/gui/SodiumOptionsGUI.java +++ b/common/src/main/java/net/caffeinemc/mods/sodium/client/gui/SodiumOptionsGUI.java @@ -1,5 +1,6 @@ package net.caffeinemc.mods.sodium.client.gui; +import com.google.common.collect.ImmutableList; import com.mojang.blaze3d.platform.GlStateManager; import net.caffeinemc.mods.sodium.client.SodiumClientMod; import net.caffeinemc.mods.sodium.client.data.fingerprint.HashedFingerprint; @@ -16,6 +17,7 @@ import net.caffeinemc.mods.sodium.client.gui.widgets.FlatButtonWidget; import net.caffeinemc.mods.sodium.client.services.PlatformRuntimeInformation; import net.caffeinemc.mods.sodium.client.util.Dim2i; +import net.coderbot.iris.gui.screen.ShaderPackScreen; import net.minecraft.client.MinecraftClient; import net.minecraft.client.gui.screen.Screen; import net.minecraft.client.render.BufferBuilder; @@ -57,13 +59,18 @@ public class SodiumOptionsGUI extends RenderableScreen implements ScreenPromptab protected boolean hasPendingChanges; private @Nullable ScreenPrompt prompt; + private OptionPage shaderPacks; + public SodiumOptionsGUI(Screen prevScreen) { this.prevScreen = prevScreen; + this.shaderPacks = new OptionPage(new TranslatableText("options.iris.shaderPackSelection"), ImmutableList.of()); + this.pages.add(SodiumGameOptionPages.general()); this.pages.add(SodiumGameOptionPages.quality()); this.pages.add(SodiumGameOptionPages.performance()); this.pages.add(SodiumGameOptionPages.advanced()); + this.pages.add(shaderPacks); this.checkPromptTimers(); } @@ -130,6 +137,11 @@ public static Screen createScreen(Screen currentScreen) { } public void setPage(OptionPage page) { + if (page == shaderPacks) { + client.setScreen(new ShaderPackScreen(this)); + return; + } + this.currentPage = page; this.rebuildGUI(); diff --git a/common/src/main/java/net/caffeinemc/mods/sodium/client/gui/options/OptionImpl.java b/common/src/main/java/net/caffeinemc/mods/sodium/client/gui/options/OptionImpl.java index c49ffccf3..effa71bea 100644 --- a/common/src/main/java/net/caffeinemc/mods/sodium/client/gui/options/OptionImpl.java +++ b/common/src/main/java/net/caffeinemc/mods/sodium/client/gui/options/OptionImpl.java @@ -39,6 +39,7 @@ public class OptionImpl implements OptionExtended { private boolean highlight; private boolean selected; + private BooleanSupplier iris$dynamicallyEnabled; private OptionImpl(OptionStorage storage, Text name, @@ -166,6 +167,7 @@ public void setSelected(boolean selected) { this.selected = selected; } + public static class Builder { private final OptionStorage storage; private Text name; diff --git a/common/src/main/java/net/caffeinemc/mods/sodium/client/model/light/flat/FlatLightPipeline.java b/common/src/main/java/net/caffeinemc/mods/sodium/client/model/light/flat/FlatLightPipeline.java index cd9ec0423..25ed27dca 100644 --- a/common/src/main/java/net/caffeinemc/mods/sodium/client/model/light/flat/FlatLightPipeline.java +++ b/common/src/main/java/net/caffeinemc/mods/sodium/client/model/light/flat/FlatLightPipeline.java @@ -5,6 +5,7 @@ import net.caffeinemc.mods.sodium.client.model.light.data.QuadLightData; import net.caffeinemc.mods.sodium.client.model.quad.ModelQuadView; import net.caffeinemc.mods.sodium.client.model.quad.properties.ModelQuadFlags; +import net.coderbot.iris.block_rendering.BlockRenderingSettings; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Direction; @@ -43,7 +44,11 @@ public void calculate(ModelQuadView quad, BlockPos pos, QuadLightData out, Direc } Arrays.fill(out.lm, lightmap); - Arrays.fill(out.br, this.lightCache.getLevel().getBrightness(face, true)); + if (BlockRenderingSettings.INSTANCE.shouldDisableDirectionalShading()) { + Arrays.fill(out.br, 1f); + } else { + Arrays.fill(out.br, this.lightCache.getLevel().getBrightness(face, true)); + } } /** diff --git a/common/src/main/java/net/caffeinemc/mods/sodium/client/model/light/smooth/SmoothLightPipeline.java b/common/src/main/java/net/caffeinemc/mods/sodium/client/model/light/smooth/SmoothLightPipeline.java index ee66da5cb..81536239e 100644 --- a/common/src/main/java/net/caffeinemc/mods/sodium/client/model/light/smooth/SmoothLightPipeline.java +++ b/common/src/main/java/net/caffeinemc/mods/sodium/client/model/light/smooth/SmoothLightPipeline.java @@ -5,6 +5,7 @@ import net.caffeinemc.mods.sodium.client.model.light.data.QuadLightData; import net.caffeinemc.mods.sodium.client.model.quad.ModelQuadView; import net.caffeinemc.mods.sodium.client.model.quad.properties.ModelQuadFlags; +import net.coderbot.iris.block_rendering.BlockRenderingSettings; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Direction; import net.minecraft.util.math.MathHelper; @@ -216,6 +217,10 @@ private void applyInsetPartialFaceVertex(BlockPos pos, Direction dir, float n1d, } private void applySidedBrightness(QuadLightData out, Direction face, boolean shade) { + if (BlockRenderingSettings.INSTANCE.shouldDisableDirectionalShading()) { + return; + } + float brightness = this.lightCache.getLevel().getBrightness(face, shade); float[] br = out.br; diff --git a/common/src/main/java/net/caffeinemc/mods/sodium/client/render/chunk/DefaultChunkRenderer.java b/common/src/main/java/net/caffeinemc/mods/sodium/client/render/chunk/DefaultChunkRenderer.java index b829cb651..981898743 100644 --- a/common/src/main/java/net/caffeinemc/mods/sodium/client/render/chunk/DefaultChunkRenderer.java +++ b/common/src/main/java/net/caffeinemc/mods/sodium/client/render/chunk/DefaultChunkRenderer.java @@ -1,5 +1,6 @@ package net.caffeinemc.mods.sodium.client.render.chunk; +import com.mojang.blaze3d.vertex.PoseStack; import org.lwjgl.system.MemoryUtil; import net.caffeinemc.mods.sodium.client.SodiumClientMod; import net.caffeinemc.mods.sodium.client.gl.device.CommandList; diff --git a/common/src/main/java/net/caffeinemc/mods/sodium/client/render/chunk/RenderSectionManager.java b/common/src/main/java/net/caffeinemc/mods/sodium/client/render/chunk/RenderSectionManager.java index 29b442e6b..2a8dd98d6 100644 --- a/common/src/main/java/net/caffeinemc/mods/sodium/client/render/chunk/RenderSectionManager.java +++ b/common/src/main/java/net/caffeinemc/mods/sodium/client/render/chunk/RenderSectionManager.java @@ -46,6 +46,7 @@ import net.caffeinemc.mods.sodium.client.world.LevelSlice; import net.caffeinemc.mods.sodium.client.world.cloned.ChunkRenderContext; import net.caffeinemc.mods.sodium.client.world.cloned.ClonedChunkSectionCache; +import net.coderbot.iris.Iris; import net.minecraft.client.MinecraftClient; import net.minecraft.client.texture.Sprite; import net.minecraft.client.world.ClientWorld; @@ -152,7 +153,7 @@ private void createTerrainRenderList(Viewport viewport, int frame, boolean spect private float getSearchDistance() { float distance; - if (SodiumClientMod.options().performance.useFogOcclusion) { + if (SodiumClientMod.options().performance.useFogOcclusion && Iris.getCurrentPack().isEmpty()) { distance = this.getEffectiveRenderDistance(); } else { distance = this.getRenderDistance(); diff --git a/common/src/main/java/net/caffeinemc/mods/sodium/client/render/chunk/ShaderChunkRenderer.java b/common/src/main/java/net/caffeinemc/mods/sodium/client/render/chunk/ShaderChunkRenderer.java index 388a4732a..c4daede9c 100644 --- a/common/src/main/java/net/caffeinemc/mods/sodium/client/render/chunk/ShaderChunkRenderer.java +++ b/common/src/main/java/net/caffeinemc/mods/sodium/client/render/chunk/ShaderChunkRenderer.java @@ -1,5 +1,6 @@ package net.caffeinemc.mods.sodium.client.render.chunk; +import com.mojang.blaze3d.vertex.PoseStack; import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; import net.caffeinemc.mods.sodium.client.gl.attribute.GlVertexFormat; import net.caffeinemc.mods.sodium.client.gl.device.CommandList; @@ -8,8 +9,16 @@ import net.caffeinemc.mods.sodium.client.render.chunk.terrain.TerrainRenderPass; import net.caffeinemc.mods.sodium.client.render.chunk.vertex.format.ChunkVertexType; import net.caffeinemc.mods.sodium.client.gl.shader.*; +import net.coderbot.iris.Iris; +import net.coderbot.iris.pipeline.WorldRenderingPipeline; +import net.coderbot.iris.shaderpack.transform.StringTransformations; +import net.coderbot.iris.shaderpack.transform.Transformations; import net.minecraft.util.Identifier; +import org.apache.commons.io.IOUtils; +import java.io.IOException; +import java.io.InputStream; +import java.nio.charset.StandardCharsets; import java.util.Map; public abstract class ShaderChunkRenderer implements ChunkRenderer { @@ -63,6 +72,46 @@ private GlProgram createShader(String path, ChunkShaderOpt } } + private static String getShaderPath(Identifier name) { + return String.format("/assets/%s/shaders/%s", name.getNamespace(), name.getPath()); + } + + private static String getShaderSource(String path) { + try { + InputStream in = ShaderLoader.class.getResourceAsStream(path); + Throwable var2 = null; + + String var3; + try { + if (in == null) { + throw new RuntimeException("Shader not found: " + path); + } + + var3 = IOUtils.toString(in, StandardCharsets.UTF_8); + } catch (Throwable var13) { + var2 = var13; + throw var13; + } finally { + if (in != null) { + if (var2 != null) { + try { + in.close(); + } catch (Throwable var12) { + var2.addSuppressed(var12); + } + } else { + in.close(); + } + } + + } + + return var3; + } catch (IOException var15) { + throw new RuntimeException("Could not read shader sources", var15); + } + } + protected void begin(TerrainRenderPass pass) { pass.startDrawing(); @@ -71,10 +120,6 @@ protected void begin(TerrainRenderPass pass) { WorldRenderingPipeline pipeline = Iris.getPipelineManager().getPipelineNullable(); GlProgram program = null; - if (pipeline instanceof IrisRenderingPipeline irisRenderingPipeline) { - irisRenderingPipeline.getSodiumPrograms().getFramebuffer(pass).bind(); - program = irisRenderingPipeline.getSodiumPrograms().getProgram(pass); - } if (program == null) { program = this.compileProgram(options); @@ -100,4 +145,6 @@ public void delete(CommandList commandList) { this.programs.values() .forEach(GlProgram::delete); } + + } diff --git a/common/src/main/java/net/caffeinemc/mods/sodium/client/render/chunk/compile/ChunkBuildBuffers.java b/common/src/main/java/net/caffeinemc/mods/sodium/client/render/chunk/compile/ChunkBuildBuffers.java index eae5389de..713f90425 100644 --- a/common/src/main/java/net/caffeinemc/mods/sodium/client/render/chunk/compile/ChunkBuildBuffers.java +++ b/common/src/main/java/net/caffeinemc/mods/sodium/client/render/chunk/compile/ChunkBuildBuffers.java @@ -1,5 +1,6 @@ package net.caffeinemc.mods.sodium.client.render.chunk.compile; +import it.unimi.dsi.fastutil.objects.Object2IntMap; import it.unimi.dsi.fastutil.objects.Reference2ReferenceOpenHashMap; import net.caffeinemc.mods.sodium.client.model.quad.properties.ModelQuadFacing; import net.caffeinemc.mods.sodium.client.render.chunk.compile.buffers.BakedChunkModelBuilder; @@ -12,6 +13,11 @@ import net.caffeinemc.mods.sodium.client.render.chunk.vertex.builder.ChunkMeshBufferBuilder; import net.caffeinemc.mods.sodium.client.render.chunk.vertex.format.ChunkVertexType; import net.caffeinemc.mods.sodium.client.util.NativeBuffer; +import net.coderbot.iris.block_rendering.BlockRenderingSettings; +import net.coderbot.iris.compat.sodium.impl.block_context.BlockContextHolder; +import net.coderbot.iris.compat.sodium.impl.block_context.ChunkBuildBuffersExt; +import net.minecraft.block.BlockState; +import org.spongepowered.asm.mixin.Unique; import java.nio.ByteBuffer; import java.util.ArrayList; @@ -22,9 +28,12 @@ * passes. This makes a best-effort attempt to pick a suitable size for each scratch buffer, but will never try to * shrink a buffer. */ -public class ChunkBuildBuffers { +public class ChunkBuildBuffers implements ChunkBuildBuffersExt { private final Reference2ReferenceOpenHashMap builders = new Reference2ReferenceOpenHashMap<>(); + @Unique + private BlockContextHolder contextHolder; + private final ChunkVertexType vertexType; public ChunkBuildBuffers(ChunkVertexType vertexType) { @@ -39,6 +48,14 @@ public ChunkBuildBuffers(ChunkVertexType vertexType) { this.builders.put(pass, new BakedChunkModelBuilder(vertexBuffers)); } + + Object2IntMap blockStateIds = BlockRenderingSettings.INSTANCE.getBlockStateIds(); + + if (blockStateIds != null) { + this.contextHolder = new BlockContextHolder(blockStateIds); + } else { + this.contextHolder = new BlockContextHolder(); + } } public void init(BuiltSectionInfo.Builder renderData, int sectionIndex) { @@ -108,4 +125,20 @@ public void destroy() { builder.destroy(); } } + + @Override + public void iris$setLocalPos(int localPosX, int localPosY, int localPosZ) { + this.contextHolder.setLocalPos(localPosX, localPosY, localPosZ); + } + + @Override + public void iris$setMaterialId(BlockState state, short renderType) { + this.contextHolder.set(state, renderType); + } + + @Override + public void iris$resetBlockContext() { + this.contextHolder.reset(); + } + } diff --git a/common/src/main/java/net/caffeinemc/mods/sodium/client/render/chunk/compile/pipeline/BlockRenderer.java b/common/src/main/java/net/caffeinemc/mods/sodium/client/render/chunk/compile/pipeline/BlockRenderer.java index 6d8c60fc5..2934081ac 100644 --- a/common/src/main/java/net/caffeinemc/mods/sodium/client/render/chunk/compile/pipeline/BlockRenderer.java +++ b/common/src/main/java/net/caffeinemc/mods/sodium/client/render/chunk/compile/pipeline/BlockRenderer.java @@ -16,6 +16,7 @@ import net.caffeinemc.mods.sodium.client.render.chunk.terrain.material.Material; import net.caffeinemc.mods.sodium.client.render.chunk.vertex.format.ChunkVertexEncoder; import net.caffeinemc.mods.sodium.client.util.DirectionUtil; +import net.coderbot.iris.block_rendering.BlockRenderingSettings; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.client.MinecraftClient; @@ -42,12 +43,16 @@ public class BlockRenderer { private final int[] quadColors = new int[4]; + private boolean useSeparateAo; + public BlockRenderer(ColorProviderRegistry colorRegistry, LightPipelineProvider lighters) { this.colorProviderRegistry = colorRegistry; this.lighters = lighters; this.occlusionCache = new BlockOcclusionCache(); this.useAmbientOcclusion = MinecraftClient.isAmbientOcclusionEnabled(); + + this.useSeparateAo = BlockRenderingSettings.INSTANCE.shouldUseSeparateAo(); } public void renderModel(BlockRenderContext ctx, ChunkBuildBuffers buffers) { diff --git a/common/src/main/java/net/caffeinemc/mods/sodium/client/render/chunk/compile/tasks/ChunkBuilderMeshingTask.java b/common/src/main/java/net/caffeinemc/mods/sodium/client/render/chunk/compile/tasks/ChunkBuilderMeshingTask.java index 77e2eb585..020c46c00 100644 --- a/common/src/main/java/net/caffeinemc/mods/sodium/client/render/chunk/compile/tasks/ChunkBuilderMeshingTask.java +++ b/common/src/main/java/net/caffeinemc/mods/sodium/client/render/chunk/compile/tasks/ChunkBuilderMeshingTask.java @@ -24,6 +24,8 @@ import net.caffeinemc.mods.sodium.client.util.task.CancellationToken; import net.caffeinemc.mods.sodium.client.world.LevelSlice; import net.caffeinemc.mods.sodium.client.world.cloned.ChunkRenderContext; +import net.coderbot.iris.compat.sodium.impl.block_context.ChunkBuildBuffersExt; +import net.coderbot.iris.vertices.ExtendedDataHelper; import net.minecraft.block.BlockState; import net.minecraft.block.entity.BlockEntity; import net.minecraft.block.material.Material; @@ -103,7 +105,6 @@ public ChunkBuildOutput execute(ChunkBuildContext buildContext, CancellationToke var block = blockState.getBlock(); var blockType = block.getBlockType(); - if (BlockRenderType.isInvisible(blockType) && block.hasBlockEntity()) { continue; } @@ -112,6 +113,8 @@ public ChunkBuildOutput execute(ChunkBuildContext buildContext, CancellationToke modelOffset.setPosition(x & 15, y & 15, z & 15); + buffers.iris$setMaterialId(blockState, ExtendedDataHelper.BLOCK_RENDER_TYPE); + if (BlockRenderType.isModel(blockType)) { BakedModel model = cache.getBlockModels() .getBakedModel(blockState); @@ -125,6 +128,8 @@ public ChunkBuildOutput execute(ChunkBuildContext buildContext, CancellationToke cache.getFluidRenderer().render(slice, blockState, blockState, blockPos, modelOffset, collector, buffers); } + buffers.iris$resetBlockContext(); + if (block.hasBlockEntity()) { BlockEntity entity = slice.getBlockEntity(blockPos); BlockEntityRenderer renderer = null; diff --git a/common/src/main/resources/assets/iris/lang/cs_cz.json b/common/src/main/resources/assets/iris/lang/cs_cz.json deleted file mode 100644 index b47bd963c..000000000 --- a/common/src/main/resources/assets/iris/lang/cs_cz.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "iris.shaders.reloaded": "Shadery znovu načteny!", - "iris.shaders.toggled": "Shadery přepnuty na %s!", - "iris.keybind.reload": "Znovu načíst shadery", - "iris.keybind.shaderPackSelection": "Obrazovka výběru shaderů", - "iris.keybind.toggleShaders": "Přepnout shadery", - "iris.keybinds": "Iris", - "iris.shaders.reloaded.failure": "Nepodařilo se znovu načíst shadery! Důvod: %s", - "iris.shaders.toggled.failure": "Nepodařilo se přepnout shadery! Důvod: %s", - "iris.sodium.failure.title": "Nepodařilo se načíst Iris!", - "iris.sodium.failure.download": "Stáhnout Sodium", - "iris.sodium.failure.reason.notFound": "Pro dobrý výkon vyžaduje Iris modifikaci Sodium, která ale není nainstalovaná. Stáhněte si prosím Sodium, vložte jej do vaší složky mods a restartujte hru.", - "iris.sodium.failure.reason.incompatible": "Pro dobrý výkon vyžaduje Iris modifikaci Sodium, ale byla nalezena její nekompatibilní verze. Stáhněte si prosím správnou verzi Sodia, vložte jej do vaší složky mods, odeberte nesprávnou verzi a restartujte hru.", - - "options.iris.apply": "Použít", - "options.iris.refresh": "Obnovit", - "options.iris.openShaderPackFolder": "Otevřít složku se shadery...", - "options.iris.shaderPackSettings": "Nastavení shaderů...", - "options.iris.shaderPackList": "Seznam balíčků shaderů...", - "options.iris.refreshShaderPacks": "Obnovit balíčky shaderů", - "options.iris.shaderPackSelection": "Balíčky shaderů...", - "options.iris.shaderPackSelection.title": "Balíčky shaderů", - "options.iris.shaderPackSelection.addedPack": "Přidán balíček shaderů \"%s\"", - "options.iris.shaderPackSelection.addedPacks": "Přidáno %s balíčků shaderů", - "options.iris.shaderPackSelection.failedAdd": "Soubory nebyly platnými balíčky shaderů", - "options.iris.shaderPackSelection.failedAddSingle": "\"%s\" není platný balíček shaderů", - "options.iris.shaderPackSelection.copyError": "Nepodařilo se přidat balíček shaderů \"%s\"", - "options.iris.shaderPackSelection.copyErrorAlreadyExists": "\"%s\" je již ve složce balíčků shaderů!", - "options.iris.shaderPackOptions.tooManyFiles": "Nelze importovat více souborů nastavení shaderů naráz!", - "options.iris.shaderPackOptions.failedImport": "Nepodařilo se importovat soubor nastavení shaderu \"%s\"", - "options.iris.shaderPackOptions.importedSettings": "Nastavení shaderů importována z \"%s\"", - "options.iris.shaders.disabled": "Shadery: Zakázány", - "options.iris.shaders.enabled": "Shadery: Povoleny", - "options.iris.shaders.nonePresent": "Shadery: Nejsou přítomny žádné balíčky", - "options.iris.back": "Zpěr", - "options.iris.reset": "Resetovat", - "options.iris.reset.tooltip": "Resetovat VŠECHNY možnosti a použít?", - "options.iris.reset.tooltip.holdShift": "Podržte SHIFT a klikněte pro resetování", - "options.iris.importSettings.tooltip": "Importovat nastavení ze souboru", - "options.iris.exportSettings.tooltip": "Exportovat použitá nastavení do souboru", - "options.iris.setToDefault": "Nastavit možnost na výchozí hodnotu?", - "options.iris.profile": "Profil", - "options.iris.profile.custom": "Vlastní", - "options.iris.shadowDistance": "Maximální vzdálenost stínů", - "options.iris.shadowDistance.enabled": "Umožňuje vám změnit maximální vykreslovací vzdálenost pro stíny. Terén a entity za touto vzdáleností nebudou vrhat stíny. Snížení vzdálenosti stínů může výrazně zvýšit výkon.", - "options.iris.shadowDistance.disabled": "Váš aktuální balíček shaderů již má nastavenou vykreslovací vzdálenost pro stíny; nemůžete ji změnit.", - - "pack.iris.select.title": "Vybrat", - "pack.iris.configure.title": "Nastavit", - "pack.iris.list.label": "+ Přetáhněte sem shadery pro jejich přidání", - - "label.iris.true": "Zap", - "label.iris.false": "Vyp" -} diff --git a/common/src/main/resources/assets/iris/lang/de_ch.json b/common/src/main/resources/assets/iris/lang/de_ch.json deleted file mode 100644 index a000cbbc6..000000000 --- a/common/src/main/resources/assets/iris/lang/de_ch.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "iris.shaders.reloaded": "Shaders neu glade!", - "iris.shaders.toggled": "Shaders umgschalte zu %s!", - "iris.keybind.reload": "Shaders neu lade", - "iris.keybind.shaderPackSelection": "Shaderpack uswähle", - "iris.keybind.toggleShaders": "Shaders i/uschalte", - "iris.keybinds": "Iris", - "iris.shaders.reloaded.failure": "Shader neu lade hed ned funktioniert! Grund: %s", - "iris.shaders.toggled.failure": "Shader i/uschalte hed ned funktioniert! Grund: %s", - - "options.iris.apply": "Awende", - "options.iris.refresh": "Neu lade", - "options.iris.openShaderPackFolder": "Shader Pack Ordner öffne...", - "options.iris.refreshShaderPacks": "Shader Packs aktualisiere", - "options.iris.shaderPackSelection": "Shader Packs...", - "options.iris.shaderPackSelection.title": "Shader Packs", - "options.iris.shaderPackSelection.addedPack": "Shader Pack hinzuegfüegt \"%s\"", - "options.iris.shaderPackSelection.addedPacks": "%s Shader Packs hinzuegfüegt", - "options.iris.shaderPackSelection.failedAdd": "Dateie sind kei gültigi Shader Packs gsi", - "options.iris.shaderPackSelection.failedAddSingle": "\"%s\" isch keis gültiges Shader Pack", - "options.iris.shaderPackSelection.copyError": "Shader Pack \"%s\" hinzuefüege hed ned funktioniert", - "options.iris.shaderPackSelection.copyErrorAlreadyExists": "\"%s\" isch bereits i dim Shader Pack Ordner", - "options.iris.shaders.disabled": "Shaders: Usgschalte", - "options.iris.shaders.enabled": "Shaders: Igschalte", - - "pack.iris.select.title": "Uswähle", - "pack.iris.list.label": "+ zum hinzuefüege Shader Packs hie ine zieh" -} diff --git a/common/src/main/resources/assets/iris/lang/de_de.json b/common/src/main/resources/assets/iris/lang/de_de.json deleted file mode 100644 index e40ce02c3..000000000 --- a/common/src/main/resources/assets/iris/lang/de_de.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "iris.shaders.reloaded": "Shader neu geladen!", - "iris.shaders.disabled": "Shader deaktiviert!", - "iris.shaders.toggled": "Shader umgeschaltet auf: %s!", - - "iris.shaders.debug.enabled": "Debugging wurde aktiviert, die Debug-Protokollierung wird ausführlicher sein!", - "iris.shaders.debug.disabled": "Debugging wurde deaktiviert.", - "iris.shaders.debug.failure": "Debugging kann nicht aktiviert werden, da dieser Computer keine Debug-Funktionen unterstützt.", - "iris.shaders.debug.restart": "Es liegt kein Debug-Kontext vor, starte bitte neu, um Debugging zu aktivieren.", - - "iris.keybind.reload": "Shader neu laden", - "iris.keybind.shaderPackSelection": "Shader-Auswahlbildschirm", - "iris.keybind.toggleShaders": "Shader umschalten", - "iris.keybinds": "Iris", - - "iris.shaders.reloaded.failure": "Shader konnte nicht neu geladen werden! Grund: %s", - "iris.shaders.toggled.failure": "Shader konnte nicht umgeschaltet werden! Grund: %s", - - "iris.sodium.failure.title": "Iris konnte nicht geladen werden!", - "iris.sodium.failure.download": "Sodium herunterladen", - "iris.sodium.failure.reason.notFound": "Iris erfordert Sodium für optimale Leistung, aber Sodium ist nicht installiert. Bitte lade Sodium herunter, füge es deinem Mods-Ordner hinzu und starte das Spiel neu.", - "iris.sodium.failure.reason.incompatible": "Iris erfordert Sodium für optimale Leistung, aber es wurde eine inkompatible Version gefunden. Bitte lade die passende Version von Sodium herunter, füge sie deinem Mods-Ordner hinzu, entferne die falsche Version und starte das Spiel neu.", - - "iris.nec.failure.title": "[%s] Not Enough Crashes erkannt!", - "iris.nec.failure.description": "Not Enough Crashes kann das Spiel bei der Behandlung von Abstürzen stark beeinträchtigen und liefert keine genauen Ergebnisse.\nGute Alternativen sind MixinTrace und Crafty Crashes, die die Ursache eines Absturzes zuverlässiger identifizieren können und das Spiel nicht in einen fehlerhaften Zustand versetzen.", - - "iris.unsupported.irisorpc": "Iris oder diesem Computer", - "iris.unsupported.iris": "Iris", - "iris.unsupported.pc": "diesem Computer", - "iris.unsupported.pack": "Shaderpaket inkompatibel!", - "iris.unsupported.pack.description": "Dieses Shaderpaket enthält Funktionen, die von %s nicht unterstützt werden%s Bitte versuche ein anderes Paket.", - - "options.iris.apply": "Anwenden", - "options.iris.refresh": "Aktualisieren", - "options.iris.openShaderPackFolder": "Shader-Ordner öffnen ...", - "options.iris.shaderPackSettings": "Shader-Einstellungen ...", - "options.iris.shaderPackList": "Shader-Liste ...", - "options.iris.refreshShaderPacks": "Shader/Liste aktualisieren", - - "options.iris.shaderPackSelection": "Shaderpakete ...", - "options.iris.shaderPackSelection.title": "Shaderpakete", - "options.iris.shaderPackSelection.addedPack": "Shaderpaket \"%s\" hinzugefügt", - "options.iris.shaderPackSelection.addedPacks": "%s Shaderpakete hinzugefügt", - "options.iris.shaderPackSelection.failedAdd": "Die Dateien waren keine zulässigen Shaderpakete", - "options.iris.shaderPackSelection.failedAddSingle": "\"%s\" ist kein zulässiges Shaderpaket", - "options.iris.shaderPackSelection.copyError": "Konnte Shaderpaket \"%s\" nicht hinzufügen", - "options.iris.shaderPackSelection.copyErrorAlreadyExists": "\"%s\" befindet sich bereits im Shader-Ordner!", - - "options.iris.shaderPackOptions.tooManyFiles": "Es können nicht mehrere Shader-Einstellungsdateien importiert werden!", - "options.iris.shaderPackOptions.failedImport": "Shader-Einstellungsdatei \"%s\" konnte nicht importiert werden", - "options.iris.shaderPackOptions.importedSettings": "Shader-Einstellungen aus \"%s\" importiert", - - "options.iris.shaders.disabled": "Shader: Deaktiviert", - "options.iris.shaders.enabled": "Shader: Aktiviert", - "options.iris.shaders.nonePresent": "Shader: Keine vorhanden", - - "options.iris.back": "Zurück", - "options.iris.reset": "Zurücksetzen", - "options.iris.reset.tooltip": "ALLE Einstellungen zurücksetzen und anwenden?", - "options.iris.reset.tooltip.holdShift": "Zum Zurücksetzen UMSCHALTEN/SHIFT gedrückt halten und klicken", - - "options.iris.importSettings.tooltip": "Einstellungen aus Datei importieren", - "options.iris.exportSettings.tooltip": "Angewandte Einstellungen in eine Datei exportieren", - "options.iris.mustDisableFullscreen": "Bitte deaktiviere zuerst den Vollbildmodus!", - "options.iris.setToDefault": "Diese Einstellung auf den Standardwert zurücksetzen?", - - "options.iris.profile": "Profil", - "options.iris.profile.custom": "Benutzerdefiniert", - - "options.iris.shadowDistance": "Max. Schattendistanz", - "options.iris.shadowDistance.enabled": "Erlaubt es dir, die maximale Distanz für Schatten zu ändern. Gelände und Objekte, die weiter entfernt sind als die eingestellte Distanz, werden keine Schatten werfen. Das Senken der Distanz kann die Leistung erheblich verbessern.", - "options.iris.shadowDistance.disabled": "Dein aktuelles Shaderpaket hat bereits eine Distanz für Schatten gesetzt; du kannst sie nicht ändern.", - "options.iris.shadowDistance.sodium_tooltip": "Die Distanz für Schatten bestimmt, wie weit das Gelände entfernt sein darf, um keinen Schatten mehr zu werfen. Bei geringeren Distanzen werden weniger Schatten berechnet, was die Bildrate verbessert. Diese Option kann nicht geändert werden bei Paketen, die explizit eine Distanz für Schatten vorgeben. Die tatsächliche Distanz für Schatten wird von der Einstellung \"Sichtweite\" begrenzt.", - - "options.iris.gui.hide": "GUI ausblenden", - "options.iris.gui.show": "GUI anzeigen", - - "pack.iris.select.title": "Auswählen", - "pack.iris.configure.title": "Konfigurieren", - "pack.iris.list.label": "+ Um Shader hinzuzufügen, ziehe sie in dieses Fenster hinein", - - "label.iris.true": "An", - "label.iris.false": "Aus" -} diff --git a/common/src/main/resources/assets/iris/lang/en_pt.json b/common/src/main/resources/assets/iris/lang/en_pt.json deleted file mode 100644 index 754106cfb..000000000 --- a/common/src/main/resources/assets/iris/lang/en_pt.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "iris.shaders.reloaded": "Washed ye eyes clean!", - "iris.shaders.toggled": "Ye placed yer glass eye back in named %s!", - "iris.keybind.reload": "Polished yer eyes smooth", - "iris.keybind.shaderPackSelection": "Glass eye Choosin Screen", - "iris.keybind.toggleShaders": "Toggle ye special glass", - "iris.keybinds": "Yer Iris Wheel bounds", - "iris.shaders.reloaded.failure": "Failed to clean ye Glass eyes! Reason: %s", - "iris.shaders.toggled.failure": "Failed to place ye Glass eyes back in! Reason: %s", - "iris.sodium.failure.title": "Iris failed to load!", - "iris.sodium.failure.reason": "Yee 'ave Sodium in yer mods folder, however Iris includes it. Please close the game 'n remove Sodium from yer mods Coffer.", - - "options.iris.apply": "Apply", - "options.iris.refresh": "Refresh", - "options.iris.openShaderPackFolder": "Open yer Coffer o' Glass Eyes", - "options.iris.refreshShaderPacks": "Refresh yer Eyes", - "options.iris.shaderPackSelection": "Collection of Eyes...", - "options.iris.shaderPackSelection.title": "Glass Eyes", - "options.iris.shaderPackSelection.addedPack": "Placed another glass eye in \"%s\"", - "options.iris.shaderPackSelection.addedPacks": "Added %s Glass eyes", - "options.iris.shaderPackSelection.failedAdd": "Files were nay a valid Glass eye", - "options.iris.shaderPackSelection.failedAddSingle": "\"%s\" is nay a valid Glass eye", - "options.iris.shaderPackSelection.copyError": "Could nay add Glass Eyes \"%s\"", - "options.iris.shaderPackSelection.copyErrorAlreadyExists": "\"%s\" is already in yer Glass eye Coffer!", - "options.iris.shaders.disabled": "Glass Eyes: Disabled", - "options.iris.shaders.enabled": "Glass Eyes: Enabled", - "options.iris.shadowDistance": "Height o' t'shadow mast", - "options.iris.shadowDistance.enabled": "Allows you to change height o' t'mast fer yer shadows. Terrain and entities beyond t'mast will not cast shadows. Lowering t'shadow mast can significantly increase performance.", - "options.iris.shadowDistance.disabled": "Yer current Glass eye has already set a height for t'shadow mast; yee cannot change it.", - - "pack.iris.select.title": "Select", - "pack.iris.list.label": "+ Drop yer Glass eye files in this ole window t' add yer Glass eyes", - "iris.sodium.failure.download": "Download Sodium", - "iris.sodium.failure.reason.notFound": "Iris needs e' Sodium for smooth sailin', but Sodium ain't found. Find the Sodium, add it to t'mods, and open the game.", - "iris.sodium.failure.reason.incompatible": "Iris needs e' Sodium for smooth sailin', but the one here ain't it. Find t'correct Sodium, add it to t'mods, throw overboard t'old one, and open the game." -} diff --git a/common/src/main/resources/assets/iris/lang/en_ud.json b/common/src/main/resources/assets/iris/lang/en_ud.json deleted file mode 100644 index 7b0ee0df8..000000000 --- a/common/src/main/resources/assets/iris/lang/en_ud.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "iris.shaders.reloaded": "¡pǝpɐoןǝᴚ sɹǝpɐɥS", - "iris.shaders.disabled": "¡pǝןqɐsᴉp sɹǝpɐɥS", - "iris.shaders.toggled": "¡ %s oʇ sɹǝpɐɥs pǝןƃƃo⊥", - "iris.shaders.debug.enabled": "¡ǝsoqɹǝʌ ǝɹoɯ ǝq ןןᴉʍ ƃuᴉƃƃoן ƃnqǝp ´pǝןqɐuǝ uǝǝq sɐɥ ƃuᴉƃƃnqǝᗡ", - "iris.shaders.debug.disabled": "˙pǝןqɐsᴉp uǝǝq sɐɥ ƃuᴉƃƃnqǝᗡ", - "iris.shaders.debug.failure": "˙sǝɹnʇɐǝɟ ƃnqǝp ʇɹoddns ʇou sǝop ɹǝʇndɯoɔ ɹnoʎ ´ƃuᴉƃƃnqǝp ǝןqɐuǝ ʇouuɐϽ", - "iris.shaders.debug.restart": "˙ƃuᴉƃƃnqǝp ǝlqɐuǝ oʇ ʇɹɐʇsǝɹ ǝsɐǝld 'ʇxǝʇuoɔ ƃnqǝp ɐ ǝʌɐɥ ʇou op no⅄", - "iris.keybind.reload": "sɹǝpɐɥS pɐoןǝᴚ", - "iris.keybind.shaderPackSelection": "uǝǝɹɔS uoᴉʇɔǝןǝS ʞɔɐdɹǝpɐɥS", - "iris.keybind.toggleShaders": "sɹǝpɐɥS ǝןƃƃo⊥", - "iris.keybinds": "sᴉɹI", - "iris.shaders.reloaded.failure": "%s :uosɐǝᴚ ¡sɹǝpɐɥs pɐoןǝɹ oʇ pǝןᴉɐℲ", - "iris.shaders.toggled.failure": "%s :uosɐǝᴚ ¡sɹǝpɐɥs ǝןƃƃoʇ oʇ pǝןᴉɐℲ", - "iris.sodium.failure.title": "¡pɐoן oʇ pǝןᴉɐɟ sᴉɹI", - "iris.sodium.failure.download": "Download Sodium", - "iris.sodium.failure.reason.notFound": "˙ǝɯɐƃ ǝɥʇ ɥɔunɐן-ǝɹ puɐ ´ɹǝpןoɟ spoɯ ɹnoʎ uᴉ ʇᴉ ǝɔɐןd ´ɯnᴉpoS pɐoןuʍop ǝsɐǝןԀ ˙pǝןןɐʇsuᴉ ʇou sᴉ ɯnᴉpoS ʇnq ´ǝɔuɐɯɹoɟɹǝd pooƃ ɹoɟ ɯnᴉpoS sǝɹᴉnbǝɹ sᴉɹI", - "iris.sodium.failure.reason.incompatible": "˙ǝɯɐƃ ǝɥʇ ɥɔunɐן-ǝɹ puɐ ´uoᴉsɹǝʌ ʇɔǝɹɹoɔuᴉ ǝɥʇ ǝʌoɯǝɹ ´ɹǝpןoɟ spoɯ ɹnoʎ uᴉ ʇᴉ ǝɔɐןd ´ɯnᴉpoS ɟo uoᴉsɹǝʌ ʇɔǝɹɹoɔ ǝɥʇ pɐoןuʍop ǝsɐǝןԀ ˙punoɟ sɐʍ uoᴉsɹǝʌ ǝןqᴉʇɐdɯoɔuᴉ uɐ ʇnq ´ǝɔuɐɯɹoɟɹǝd pooƃ ɹoɟ ɯnᴉpoS sǝɹᴉnbǝɹ sᴉɹI", - - "options.iris.apply": "ʎןdd∀", - "options.iris.refresh": "ɥsǝɹɟǝᴚ", - "options.iris.openShaderPackFolder": "˙˙˙ɹǝpןoℲ ʞɔɐԀ ɹǝpɐɥS uǝdO", - "options.iris.shaderPackSettings": "˙˙˙sƃuᴉʇʇǝS ʞɔɐԀ ɹǝpɐɥS", - "options.iris.shaderPackList": "˙˙˙ʇsᴉꞀ ʞɔɐԀ ɹǝpɐɥS", - "options.iris.refreshShaderPacks": "sʞɔɐԀ ɹǝpɐɥS ɥsǝɹɟǝᴚ", - "options.iris.shaderPackSelection": "˙˙˙sʞɔɐԀ ɹǝpɐɥS", - "options.iris.shaderPackSelection.title": "sʞɔɐԀ ɹǝpɐɥS", - "options.iris.shaderPackSelection.addedPack": "\"%s\" ʞɔɐԀ ɹǝpɐɥS pǝpp∀", - "options.iris.shaderPackSelection.addedPacks": "sʞɔɐԀ ɹǝpɐɥS %s pǝpp∀", - "options.iris.shaderPackSelection.failedAdd": "sʞɔɐԀ ɹǝpɐɥS pᴉןɐʌ ʇou ǝɹǝʍ sǝןᴉℲ", - "options.iris.shaderPackSelection.failedAddSingle": "ʞɔɐԀ ɹǝpɐɥS pᴉןɐʌ ɐ ʇou sᴉ \"%s\"", - "options.iris.shaderPackSelection.copyError": "\"%s\" ʞɔɐԀ ɹǝpɐɥS ppɐ ʇou pןnoϽ", - "options.iris.shaderPackSelection.copyErrorAlreadyExists": "¡ɹǝpןoɟ sʞɔɐԀ ɹǝpɐɥS ɹnoʎ uᴉ ʎpɐǝɹןɐ sᴉ \"%s\"", - "options.iris.shaderPackOptions.tooManyFiles": "¡sǝןᴉɟ sƃuᴉʇʇǝS ɹǝpɐɥS ǝןdᴉʇןnɯ ʇɹodɯᴉ ʇouuɐϽ", - "options.iris.shaderPackOptions.failedImport": "\"%s\" ǝןᴉɟ sƃuᴉʇʇǝS ɹǝpɐɥS ʇɹodɯᴉ oʇ pǝןᴉɐℲ", - "options.iris.shaderPackOptions.importedSettings": "\"%s\" ɯoɹɟ sƃuᴉʇʇǝS ɹǝpɐɥS pǝʇɹodɯI", - "options.iris.shaders.disabled": "pǝןqɐsᴉᗡ :sɹǝpɐɥS", - "options.iris.shaders.enabled": "pǝןqɐuƎ :sɹǝpɐɥS", - "options.iris.shaders.nonePresent": "ʇuǝsǝɹԀ sʞɔɐԀ oN :sɹǝpɐɥS", - "options.iris.back": "ʞɔɐᗺ", - "options.iris.reset": "ʇǝsǝᴚ", - "options.iris.reset.tooltip": "¿ʎןddɐ puɐ suoᴉʇdo ꞀꞀ∀ ʇǝsǝᴚ", - "options.iris.reset.tooltip.holdShift": "ʇǝsǝɹ oʇ ʞɔᴉןɔ puɐ ⊥ℲIHS pןoH", - "options.iris.importSettings.tooltip": "ǝןᴉɟ ɯoɹɟ sƃuᴉʇʇǝs ʇɹodɯI", - "options.iris.exportSettings.tooltip": "ǝןᴉɟ oʇ sƃuᴉʇʇǝs pǝᴉןddɐ ʇɹodxƎ", - "options.iris.setToDefault": "¿ǝnןɐʌ ʇןnɐɟǝp oʇ uoᴉʇdo ʇǝS", - "options.iris.profile": "ǝןᴉɟoɹԀ", - "options.iris.profile.custom": "ɯoʇsnϽ", - "options.iris.shadowDistance": "ǝɔuɐʇsᴉᗡ ʍopɐɥS xɐW", - "options.iris.shadowDistance.enabled": "˙ǝɔuɐɯɹoɟɹǝd ǝsɐǝɹɔuᴉ ʎןʇuɐɔᴉɟᴉuƃᴉs uɐɔ ǝɔuɐʇsᴉp ʍopɐɥs ǝɥʇ ƃuᴉɹǝʍoꞀ ˙sʍopɐɥs ʇsɐɔ ʇou ןןᴉʍ ǝɔuɐʇsᴉp sᴉɥʇ puoʎǝq sǝᴉʇᴉʇuǝ puɐ uᴉɐɹɹǝ⊥ ˙sʍopɐɥs ɹoɟ ǝɔuɐʇsᴉp ɯnɯᴉxɐɯ ǝɥʇ ǝƃuɐɥɔ oʇ noʎ sʍoןן∀", - "options.iris.shadowDistance.disabled": "˙ʇᴉ ǝƃuɐɥɔ ʇouuɐɔ noʎ ؛sʍopɐɥs ɹoɟ ǝɔuɐʇsᴉp ɹǝpuǝɹ ɐ ʇǝs ʎpɐǝɹןɐ sɐɥ ʞɔɐd ɹǝpɐɥs ʇuǝɹɹnɔ ɹno⅄", - - "pack.iris.select.title": "ʇɔǝןǝS", - "pack.iris.configure.title": "ǝɹnƃᴉɟuoϽ", - "pack.iris.list.label": "ppɐ oʇ sʞɔɐԀ ɹǝpɐɥS doɹᗡ puɐ ƃɐɹᗡ +", - - "label.iris.true": "uO", - "label.iris.false": "ɟɟO" -} diff --git a/common/src/main/resources/assets/iris/lang/en_us.json b/common/src/main/resources/assets/iris/lang/en_us.json deleted file mode 100644 index 085da7bd4..000000000 --- a/common/src/main/resources/assets/iris/lang/en_us.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "iris.shaders.reloaded": "Shaders Reloaded!", - "iris.shaders.disabled": "Shaders disabled!", - "iris.shaders.toggled": "Toggled shaders to %s!", - "iris.shaders.debug.enabled": "Debugging has been enabled, debug logging will be more verbose!", - "iris.shaders.debug.disabled": "Debugging has been disabled.", - "iris.shaders.debug.failure": "Cannot enable debugging, your computer does not support debug features.", - "iris.shaders.debug.restart": "You do not have a debug context, please restart to enable debugging.", - "iris.keybind.reload": "Reload Shaders", - "iris.keybind.shaderPackSelection": "Shaderpack Selection Screen", - "iris.keybind.toggleShaders": "Toggle Shaders", - "iris.keybinds": "Iris", - "iris.shaders.reloaded.failure": "Failed to reload shaders! Reason: %s", - "iris.shaders.toggled.failure": "Failed to toggle shaders! Reason: %s", - "iris.sodium.failure.title": "Iris failed to load!", - "iris.sodium.failure.download": "Download Sodium", - "iris.sodium.failure.reason.notFound": "Iris requires Sodium for good performance, but Sodium is not installed. Please download Sodium, place it in your mods folder, and re-launch the game.", - "iris.sodium.failure.reason.incompatible": "Iris requires Sodium for good performance, but an incompatible version was found. Please download the correct version of Sodium, place it in your mods folder, remove the incorrect version, and re-launch the game.", - "iris.nec.failure.title": "[%s] Not Enough Crashes detected!", - "iris.nec.failure.description": "Not Enough Crashes can severely break the game while handling crashes, and does not provide accurate results.\nGood alternatives are MixinTrace and Crafty Crashes, which can identify the cause of a crash more reliably and does not put the game in an invalid state.", - "iris.unsupported.irisorpc": "Iris or your PC", - "iris.unsupported.iris": "Iris", - "iris.unsupported.pc": "your PC", - "iris.unsupported.pack": "Shaderpack incompatible!", - "iris.unsupported.pack.description": "The shaderpack you are trying to load contains features unsupported by %s. Please try another pack. List %s", - "options.iris.apply": "Apply", - "options.iris.refresh": "Refresh", - "options.iris.openShaderPackFolder": "Open Shader Pack Folder...", - "options.iris.shaderPackSettings": "Shader Pack Settings...", - "options.iris.shaderPackList": "Shader Pack List...", - "options.iris.refreshShaderPacks": "Refresh Shader Packs", - "options.iris.shaderPackSelection": "Shader Packs...", - "options.iris.shaderPackSelection.title": "Shader Packs", - "options.iris.shaderPackSelection.addedPack": "Added Shader Pack \"%s\"", - "options.iris.shaderPackSelection.addedPacks": "Added %s Shader Packs", - "options.iris.shaderPackSelection.failedAdd": "Files were not valid Shader Packs", - "options.iris.shaderPackSelection.failedAddSingle": "\"%s\" is not a valid Shader Pack", - "options.iris.shaderPackSelection.copyError": "Could not add Shader Pack \"%s\"", - "options.iris.shaderPackSelection.copyErrorAlreadyExists": "\"%s\" is already in your Shader Packs folder!", - "options.iris.shaderPackOptions.tooManyFiles": "Cannot import multiple Shader Settings files!", - "options.iris.shaderPackOptions.failedImport": "Failed to import Shader Settings file \"%s\"", - "options.iris.shaderPackOptions.importedSettings": "Imported Shader Settings from \"%s\"", - "options.iris.shaders.disabled": "Shaders: Disabled", - "options.iris.shaders.enabled": "Shaders: Enabled", - "options.iris.shaders.nonePresent": "Shaders: No Packs Present", - "options.iris.back": "Back", - "options.iris.reset": "Reset", - "options.iris.reset.tooltip": "Reset ALL options and apply?", - "options.iris.reset.tooltip.holdShift": "Hold SHIFT and click to reset", - "options.iris.importSettings.tooltip": "Import settings from file", - "options.iris.exportSettings.tooltip": "Export applied settings to file", - "options.iris.mustDisableFullscreen": "Please disable fullscreen first!", - "options.iris.setToDefault": "Set option to default value?", - "options.iris.profile": "Profile", - "options.iris.profile.custom": "Custom", - "options.iris.shadowDistance": "Max Shadow Distance", - "options.iris.shadowDistance.enabled": "Allows you to change the maximum distance for shadows. Terrain and entities beyond this distance will not cast shadows. Lowering the shadow distance can significantly increase performance.", - "options.iris.shadowDistance.disabled": "Your current shader pack has already set a render distance for shadows; you cannot change it.", - "options.iris.gui.hide": "Hide GUI", - "options.iris.gui.show": "Show GUI", - - "pack.iris.select.title": "Select", - "pack.iris.configure.title": "Configure", - "pack.iris.list.label": "+ Drag and Drop Shader Packs to add", - - "label.iris.true": "On", - "label.iris.false": "Off" -} diff --git a/common/src/main/resources/assets/iris/lang/es_ar.json b/common/src/main/resources/assets/iris/lang/es_ar.json deleted file mode 100644 index ec3012e45..000000000 --- a/common/src/main/resources/assets/iris/lang/es_ar.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "iris.shaders.reloaded": "¡Shaders Recargados!", - "iris.shaders.disabled": "¡Shaders desactivados!", - "iris.shaders.toggled": "¡Shaders cambiados a %s!", - "iris.shaders.debug.enabled": "¡Se habilitó la depuración, el registro de depuración va a ser más detallado!", - "iris.shaders.debug.disabled": "La depuración se desactivó.", - "iris.shaders.debug.failure": "No se puede habilitar la depuración, tu computadora no admite funciones de depuración.", - "iris.shaders.debug.restart": "No tenés un contexto de depuración, por favor reiniciá para habilitar la depuración.", - "iris.keybind.reload": "Recargar Shaders", - "iris.keybind.shaderPackSelection": "Pantalla de Selección de Shaders", - "iris.keybind.toggleShaders": "Cambiar Shaders", - "iris.keybinds": "Iris", - "iris.shaders.reloaded.failure": "¡Error al recargar los shaders! Razón: %s", - "iris.shaders.toggled.failure": "¡Error al activar los shaders! Razón: %s", - "iris.sodium.failure.title": "¡Iris no se pudo cargar!", - "iris.sodium.failure.download": "Descargá Sodium", - "iris.sodium.failure.reason.notFound": "Iris requiere de Sodium para un buen rendimiento, pero Sodium no está instalado. Por favor, descargá Sodium, colocalo en tu carpeta de mods y volvé a iniciar el juego.", - "iris.sodium.failure.reason.incompatible": "Iris requiere de Sodium para un buen rendimiento, pero se encontró una versión incompatible. Por favor, descargá la versión correcta de Sodium, colocala en tu carpeta de mods, eliminá la versión incorrecta y volvé a iniciar el juego.", - "iris.nec.failure.title": "¡[%s] Not Enough Crashes detectado!", - "iris.nec.failure.description": "No es recomendable usar Not Enough Crashes porque puede romper el juego severamente al manejar los errores y no brindar resultados precisos.\nBuenas alternativas son MixinTrace y Crafty Crashes, que pueden identificar la causa de un error de manera más confiable y no dejan al juego en un estado inválido.", - "iris.unsupported.irisorpc": "Iris o tu PC", - "iris.unsupported.iris": "Iris", - "iris.unsupported.pc": "tu PC", - "iris.unsupported.pack": "¡Shader incompatible!", - "iris.unsupported.pack.description": "El shaderpack que estás intentando cargar contiene características no soportadas por %s. Por favor, probá con otro pack. Lista %s", - "options.iris.apply": "Aplicar", - "options.iris.refresh": "Recargar", - "options.iris.openShaderPackFolder": "Abrir carpeta de Shader Packs...", - "options.iris.shaderPackSettings": "Configuración del Shader Pack...", - "options.iris.shaderPackList": "Lista de Shader Packs...", - "options.iris.refreshShaderPacks": "Refresh Shader Packs", - "options.iris.shaderPackSelection": "Shader Packs...", - "options.iris.shaderPackSelection.title": "Shader Packs", - "options.iris.shaderPackSelection.addedPack": "Se agregó el Shader Pack \"%s\"", - "options.iris.shaderPackSelection.addedPacks": "Se agregaron %s Shader Packs", - "options.iris.shaderPackSelection.failedAdd": "Los archivos no eran Shader Packs válidos", - "options.iris.shaderPackSelection.failedAddSingle": "\"%s\" no es un Shader Pack válido", - "options.iris.shaderPackSelection.copyError": "No se pudo agregar el Shader Pack \"%s\"", - "options.iris.shaderPackSelection.copyErrorAlreadyExists": "¡\"%s\" ya está en tu carpeta de Shader Packs!", - "options.iris.shaderPackOptions.tooManyFiles": "¡No se pueden importar varios archivos de configuración de Shaders!", - "options.iris.shaderPackOptions.failedImport": "Error al importar el archivo de configuración de Shaders \"%s\"", - "options.iris.shaderPackOptions.importedSettings": "Se importaron las configuraciones del Shader desde \"%s\"", - "options.iris.shaders.disabled": "Shaders: Desactivados", - "options.iris.shaders.enabled": "Shaders: Activados", - "options.iris.shaders.nonePresent": "Shaders: No hay Packs", - "options.iris.back": "Volver", - "options.iris.reset": "Reinciar", - "options.iris.reset.tooltip": "¿Restablecer TODAS las opciones y aplicar?", - "options.iris.reset.tooltip.holdShift": "Mantené presionado SHIFT y hacé clic para restablecer", - "options.iris.importSettings.tooltip": "Importar configuración desde un archivo", - "options.iris.exportSettings.tooltip": "Exportar la configuración aplicada a un archivo", - "options.iris.mustDisableFullscreen": "¡Por favor, desactivá la pantalla completa primero!", - "options.iris.setToDefault": "¿Establecer la opción al valor por defecto?", - "options.iris.profile": "Perfil", - "options.iris.profile.custom": "Personalizado", - "options.iris.shadowDistance": "Distancia máxima de sombras", - "options.iris.shadowDistance.enabled": "Permite cambiar la distancia máxima para las sombras. El terreno y las entidades más allá de esta distancia no proyectarán sombras. Reducir la distancia de las sombras puede mejorar significativamente el rendimiento.", - "options.iris.shadowDistance.disabled": "Tu paquete de shaders actual ya estableció una distancia de renderizado para las sombras; no podés cambiarla.", - "options.iris.gui.hide": "Esconder GUI", - "options.iris.gui.show": "Mostrar GUI", - - "pack.iris.select.title": "Seleccionar", - "pack.iris.configure.title": "Configurar", - "pack.iris.list.label": "+ Arrastrá y soltá Shader Packs para agregar", - - "label.iris.true": "Activado", - "label.iris.false": "Desactivado" -} diff --git a/common/src/main/resources/assets/iris/lang/es_es.json b/common/src/main/resources/assets/iris/lang/es_es.json deleted file mode 100644 index 45c529e0a..000000000 --- a/common/src/main/resources/assets/iris/lang/es_es.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "iris.shaders.reloaded": "¡Shaders recargados!", - "iris.shaders.disabled": "¡Shaders desactivados!", - "iris.shaders.toggled": "¡Cambiados los shaders a %s!", - "iris.shaders.debug.enabled": "Activada la depuración, ¡los registros de depuración serán más detallados!", - "iris.shaders.debug.disabled": "Desactivada la depuración.", - "iris.shaders.debug.failure": "No se pudo activar la depuración, tu ordenador no soporta esas características.", - "iris.shaders.debug.restart": "No tienes un contexto de depuración, por favor reinicia para activarla.", - "iris.keybind.reload": "Recargar Shaders", - "iris.keybind.shaderPackSelection": "Pantalla de Selección de Shaders", - "iris.keybind.toggleShaders": "Alternar Shaders", - - "iris.shaders.reloaded.failure": "¡Error al recargar los Shaders! Razón: %s", - - "iris.shaders.toggled.failure": "¡Error al activar shaders! Razón: %s", - "iris.sodium.failure.title": "¡Iris no pudo iniciarse!", - "iris.sodium.failure.download": "Descarga Sodium", - "iris.sodium.failure.reason.notFound": "Iris necesita Sodium para obtener un buen rendimiento, pero no está instalado. Por favor descarga Sodium, ponlo en tu carpeta de mods, y arranca el juego de nuevo.", - "iris.sodium.failure.reason.incompatible": "Iris necesita Sodium para obtener un buen rendimiento, pero se encontró una versión incompatible. Por favor descarga la versión correcta de Sodium, ponla en tu carpeta de mods, quita la versión incorrecta, y arranca el juego de nuevo.", - "iris.unsupported.irisorpc": "Iris o tu PC", - "iris.unsupported.iris": "Iris", - "iris.unsupported.pc": "tu PC", - "iris.unsupported.pack": "¡Shader incompatible!", - "iris.unsupported.pack.description": "El Shader Pack que estás intentando cargar contiene características no soportadas por %s. Por favor, prueba otro pack. Lista %s", - - "options.iris.apply": "Aplicar", - "options.iris.refresh": "Recargar", - "options.iris.openShaderPackFolder": "Abrir carpeta de Shader Packs...", - "options.iris.shaderPackSettings": "Configuración del Shader Pack...", - "options.iris.shaderPackList": "Lista de Shader Packs...", - "options.iris.refreshShaderPacks": "Recargar Shaders", - "options.iris.shaderPackSelection": "Shader Packs...", - "options.iris.shaderPackSelection.title": "Shader Packs", - "options.iris.shaderPackSelection.addedPack": "Añadido el Shader Pack \"%s\"", - "options.iris.shaderPackSelection.addedPacks": "Añadidos %s Shader Packs", - "options.iris.shaderPackSelection.failedAdd": "Los archivos no eran Shader Packs válidos", - "options.iris.shaderPackSelection.failedAddSingle": "\"%s\" no es un Shader Pack válido", - "options.iris.shaderPackSelection.copyError": "No se ha podido añadir el Shader Pack \"%s\"", - "options.iris.shaderPackSelection.copyErrorAlreadyExists": "¡\"%s\" ya está en tu carpeta de Shader Packs!", - "options.iris.shaderPackOptions.tooManyFiles": "¡No se pueden importar múltiple archivos de configuración de Shaders!", - "options.iris.shaderPackOptions.failedImport": "Falló la importación del archivo de configuración de Shaders \"%s\"", - "options.iris.shaderPackOptions.importedSettings": "Importada configuración de Shaders desde \"%s\"", - "options.iris.shaders.disabled": "Shaders: Desactivados", - "options.iris.shaders.enabled": "Shaders: Activados", - "options.iris.shaders.nonePresent": "Shaders: No hay Packs", - "options.iris.back": "Volver", - "options.iris.reset": "Reiniciar", - "options.iris.reset.tooltip": "¿Reiniciar TODAS las opciones y aplicar?", - "options.iris.reset.tooltip.holdShift": "Mantén SHIFT y haz clic para reiniciar", - "options.iris.importSettings.tooltip": "Importar configuración desde archivo", - "options.iris.exportSettings.tooltip": "Exportar configuración a archivo", - "options.iris.mustDisableFullscreen": "¡Desactiva la pantalla completa primero!", - "options.iris.setToDefault": "¿Reiniciar la opción a su valor por defecto?", - "options.iris.profile": "Perfil", - "options.iris.profile.custom": "Personalizado", - "options.iris.shadowDistance": "Máxima Distancia de Sombras", - "options.iris.shadowDistance.enabled": "Te permite cambiar la distáncia máxima para las sombras. El terreno y las entidades tras esta distáncia no emitirán sombras. Reducir la distáncia de sombras puede incrementar el rendimiento significativamente.", - "options.iris.shadowDistance.disabled": "Tu shader pack ya ha establecido una distáncia de renderizado para las sombreas; no puedes cambiarla.", - "options.iris.gui.hide": "Ocultar GUI", - "options.iris.gui.show": "Mostrar GUI", - - "pack.iris.select.title": "Seleccionar", - "pack.iris.configure.title": "Configurar", - "pack.iris.list.label": "+ Arrastra Shader Packs aquí para añadirlos", - "label.iris.true": "On", - "label.iris.false": "Off" -} diff --git a/common/src/main/resources/assets/iris/lang/et_ee.json b/common/src/main/resources/assets/iris/lang/et_ee.json deleted file mode 100644 index fb8415f00..000000000 --- a/common/src/main/resources/assets/iris/lang/et_ee.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "iris.shaders.reloaded": "Varjutajad taaslaaditud!", - "iris.shaders.disabled": "Varjutajad keelatud!", - "iris.shaders.toggled": "Varjutajad on nüüd %s!", - "iris.shaders.debug.enabled": "Silumine on nüüd lubatud, silumislogi on nüüdsest täpsem!", - "iris.shaders.debug.disabled": "Silumine on nüüd keelatud.", - "iris.shaders.debug.failure": "Silumist ei saa lubada, sinu arvuti ei toeta silumisfunktsioone.", - "iris.shaders.debug.restart": "Sul puudub silumiskontekst, silumiseks palun taaskäivita.", - "iris.keybind.reload": "Laadi varjutajad uuesti", - "iris.keybind.shaderPackSelection": "Varjutajapaki valikukuva", - "iris.keybind.toggleShaders": "Lülita varjutajad sisse/välja", - "iris.keybinds": "Iris", - "iris.shaders.reloaded.failure": "Varjutajate taaslaadimine ebaõnnestus! Põhjus: %s", - "iris.shaders.toggled.failure": "Varjutajate lülitamine ebaõnnestus! Põhjus: %s", - "iris.sodium.failure.title": "Irise laadimine ebaõnnestus!", - "iris.sodium.failure.download": "Laadi Sodium alla", - "iris.sodium.failure.reason.notFound": "Iris vajab hea jõudluse saavutamiseks Sodiumi, ent Sodium ei ole paigaldatud. Palun laadi Sodium alla, aseta see oma mods kausta ning taaskäivita mäng.", - "iris.sodium.failure.reason.incompatible": "Iris vajab hea jõudluse saavutamiseks Sodiumi, ent leiti ühildumatu Sodiumi versioon. Palun laadi sobiv Sodiumi versioon alla, aseta see oma mods kausta, kustuta sobimatu versioon ning taaskäivita mäng.", - - "options.iris.apply": "Rakenda", - "options.iris.refresh": "Värskenda", - "options.iris.openShaderPackFolder": "Ava varjutajapakkide kaust...", - "options.iris.shaderPackSettings": "Varjutajapaki seadistused...", - "options.iris.shaderPackList": "Varjutajapakkide nimekiri...", - "options.iris.refreshShaderPacks": "Värskenda varjutajapakid", - "options.iris.shaderPackSelection": "Varjutajapakid...", - "options.iris.shaderPackSelection.title": "Varjutajapakid", - "options.iris.shaderPackSelection.addedPack": "Varjutajapakk \"%s\" lisatud", - "options.iris.shaderPackSelection.addedPacks": "%s varjutajapakki lisatud", - "options.iris.shaderPackSelection.failedAdd": "Failid ei olnud sobivad varjutajapakid", - "options.iris.shaderPackSelection.failedAddSingle": "\"%s\" ei ole sobiv varjutajapakk", - "options.iris.shaderPackSelection.copyError": "Varjutajapakki \"%s\" ei saanud lisada", - "options.iris.shaderPackSelection.copyErrorAlreadyExists": "\"%s\" on juba varjutajapakkide kaustas!", - "options.iris.shaderPackOptions.tooManyFiles": "Mitme varjutaja seadistusfaile ei saa importida!", - "options.iris.shaderPackOptions.failedImport": "Varjutaja seadistusfaili \"%s\" importimine ebaõnnestus", - "options.iris.shaderPackOptions.importedSettings": "Varjutaja seadistused imporditud asukohast \"%s\"", - "options.iris.shaders.disabled": "Varjutajad: keelatud", - "options.iris.shaders.enabled": "Varjutajad: lubatud", - "options.iris.shaders.nonePresent": "Varjutajad: pakid puuduvad", - "options.iris.back": "Tagasi", - "options.iris.reset": "Lähtesta", - "options.iris.reset.tooltip": "Lähtestad KÕIK valikud ja rakendad?", - "options.iris.reset.tooltip.holdShift": "Lähtestamiseks hoia Shifti ja klõpsa", - "options.iris.importSettings.tooltip": "Impordi seadistused failist", - "options.iris.exportSettings.tooltip": "Ekspordi rakendatud seadistused faili", - "options.iris.setToDefault": "Seadistad valiku vaikeväärtusele?", - "options.iris.profile": "Profiil", - "options.iris.profile.custom": "Kohandatud", - "options.iris.shadowDistance": "Maks. varjukaugus", - "options.iris.shadowDistance.enabled": "Võimaldab muuta varjude maksimaalset kaugust. Sellest kaugem maastik ning olemid ei heida varjusid. Varjukauguse vähendamine võib jõudlust märkimisväärselt suurendada.", - "options.iris.shadowDistance.disabled": "Sinu praegune varjutajapakk on varjude nähtavuskauguse juba seadnud, sa ei saa seda muuta.", - - "pack.iris.select.title": "Vali", - "pack.iris.configure.title": "Seadista", - "pack.iris.list.label": "+ Varjutajapakkide lisamiseks sikuta need siia", - - "label.iris.true": "Sees", - "label.iris.false": "Väljas" -} diff --git a/common/src/main/resources/assets/iris/lang/fa_ir.json b/common/src/main/resources/assets/iris/lang/fa_ir.json deleted file mode 100644 index b7856d49c..000000000 --- a/common/src/main/resources/assets/iris/lang/fa_ir.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "iris.shaders.reloaded": "shader ها بارگیری مجدد شدند!", - "iris.keybind.reload": "بارگیری مجدد shader ها", - "iris.keybinds": "Iris", - "iris.shaders.reloaded.failure": "خطا در بارگیری مجدد shader ها ، علت : %s", - "iris.sodium.failure.title": "Iris اشکال در بارگذاری", - "iris.sodium.failure.reason": "شما Sodium پرونده اجرایی را در پوشه mods بازی خود دارید، اما Iris پرونده اجرایی Sodium را به همراه دارد،‌ لطفا بازی را ببندید و پرونده اجرایی Sodium را از پوشه mods بازی حذف کنید.", - "options.iris.shadowDistance": "حداکثر فاصله سایه ها", - "options.iris.shadowDistance.enabled": "به شما قابلیت تغییر میزان حداکثر فاصله سایه ها را می‌دهد. موجودات خارج از این فاصله هیچ سایه ای نمی‌اندازند. کم کردن این گزینه می‌تواند تاثیر زیادی در عملکرد بهتر بازی داشته باشد.", - "options.iris.shadowDistance.disabled": "Shaderpack انتخابی شما میزان حداکثر فاصله سایه ها را تایین کرده است و شما نمی توانید آن را تغییر دهد.", - - - "options.iris.apply": "اعمال", - "options.iris.refresh": "تازه سازی", - "options.iris.openShaderPackFolder": "باز کردن پوشه shader pack ها...", - "options.iris.refreshShaderPacks": "تازه سازی shader pack", - "options.iris.shaderPackSelection": "Shader Packs...", - "options.iris.shaderPackSelection.title": "Shader Packs", - "options.iris.shaderPackSelection.addedPack": "shader pack %s اضافه شد!", - "options.iris.shaderPackSelection.addedPacks": "shader pack های %s اضافه شدند!", - "options.iris.shaderPackSelection.failedAdd": "اسناد مورد نظر یک shader pack قابل قبول نبودند", - "options.iris.shaderPackSelection.failedAddSingle": "\"%s\" یک shader pack قابل قبول نیست!", - "options.iris.shaderPackSelection.copyError": "\"%s\"خطا در بارگیری shader", - "options.iris.shaderPackSelection.copyErrorAlreadyExists": "\"%s\" در حال حاضر در پوشه shader pack های شما وجود دارد!", - "options.iris.shaders.disabled": "Shaders: غیرفعال", - "options.iris.shaders.enabled": "Shaders: فعال", - - "pack.iris.select.title": "انتخاب", - "pack.iris.list.label": "+ فایل shader موردنظر را بکشید و در اینجا بندازید." -} diff --git a/common/src/main/resources/assets/iris/lang/fi_fi.json b/common/src/main/resources/assets/iris/lang/fi_fi.json deleted file mode 100644 index 1d00ca431..000000000 --- a/common/src/main/resources/assets/iris/lang/fi_fi.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "iris.shaders.reloaded": "Shaderit ladattiin uudelleen!", - "iris.shaders.disabled": "Shaderit poistettiin käytöstä!", - "iris.shaders.toggled": "Vaihdettiin shadereiksi %s!", - "iris.shaders.debug.enabled": "Virheenkorjaustila otettiin käyttöön, lokitiedot ovat tarkempia!", - "iris.shaders.debug.disabled": "Virheenkorjaustila poistettiin käytöstä.", - "iris.shaders.debug.failure": "Virheenkorjaustilaa ei voida ottaa käyttöön, tietokoneesi ei tue virheenkorjausominaisuuksia.", - "iris.shaders.debug.restart": "Sinulla ei ole virheenkorjausyhteyttä, käynnistä pelisi uudelleen ottaaksesi virheenkorjauksen käyttöön.", - "iris.keybind.reload": "Uudelleenlataa shaderit", - "iris.keybind.shaderPackSelection": "Shader-paketin valitsemisruutu", - "iris.keybind.toggleShaders": "Ota shaderit käyttöön / pois käytöstä", - "iris.keybinds": "Iris", - "iris.shaders.reloaded.failure": "Shaderien lataus epäonnistui! Syy: %s", - "iris.shaders.toggled.failure": "Shaderien käyttöönotto epäonnistui! Syy: %s", - "iris.sodium.failure.title": "Iriksen lataus epäonnistui!", - "iris.sodium.failure.download": "Lataa Sodium", - "iris.sodium.failure.reason.notFound": "Iris vaatii Sodiumin hyvän suorituskyvyn takaamiseksi, mutta Sodiumia ei ole asennettu. Lataa Sodium, laita se modit-kansioosi, ja käynnistä pelisi uudelleen.", - "iris.sodium.failure.reason.incompatible": "Iris vaatii Sodiumin hyvän suorituskyvyn takaamiseksi, mutta Sodium versiosi on yhteensopimaton. Lataa yhteensopiva Sodium versio, laita se modit-kansioosi ja poista yhteensopimaton versio, käynnistä sitten pelisi uudelleen.", - - "options.iris.apply": "Ota käyttöön", - "options.iris.refresh": "Lataa uudelleen", - "options.iris.openShaderPackFolder": "Avaa shader-pakettikansio...", - "options.iris.shaderPackSettings": "Shader-pakettiasetukset...", - "options.iris.shaderPackList": "Shader-pakettiluettelo...", - "options.iris.refreshShaderPacks": "Lataa shader-paketit uudelleen", - "options.iris.shaderPackSelection": "Shader-paketit...", - "options.iris.shaderPackSelection.title": "Shader-paketit", - "options.iris.shaderPackSelection.addedPack": "Lisätty shader-paketti \"%s\"", - "options.iris.shaderPackSelection.addedPacks": "Lisätty %s shader-pakettia", - "options.iris.shaderPackSelection.failedAdd": "Tiedostot eivät ole yhteensopivia shader-paketteja", - "options.iris.shaderPackSelection.failedAddSingle": "\"%s\" ei ole yhteensopiva shader-paketti", - "options.iris.shaderPackSelection.copyError": "Ei voitu lisätä shader-pakettia \"%s\"", - "options.iris.shaderPackSelection.copyErrorAlreadyExists": "\"%s\" on jo shader-pakettikansiossasi", - "options.iris.shaderPackOptions.tooManyFiles": "Ei voida tuoda useampaa shader-asetustiedostoa!", - "options.iris.shaderPackOptions.failedImport": "Shader-asetustiedoston \"%s\" tuominen epäonnistui", - "options.iris.shaderPackOptions.importedSettings": "Tuotu shader-asetustiedosto kohteesta \"%s\"", - "options.iris.shaders.disabled": "Shaderit: Pois päältä", - "options.iris.shaders.enabled": "Shaderit: Päällä", - "options.iris.shaders.nonePresent": "Shaderit: Ei paketteja", - "options.iris.back": "Takaisin", - "options.iris.reset": "Nollaa", - "options.iris.reset.tooltip": "Nollaa KAIKKI asetukset?", - "options.iris.reset.tooltip.holdShift": "Pidä vaihto-näppäintä pohjassa ja paina nollaa", - "options.iris.importSettings.tooltip": "Tuo asetukset tiedostosta", - "options.iris.exportSettings.tooltip": "Vie käyttöön otetut asetukset tiedostoon", - "options.iris.setToDefault": "Aseta asetus oletusarvoon?", - "options.iris.profile": "Profiili", - "options.iris.profile.custom": "Mukautettu", - "options.iris.shadowDistance": "Varjojen enimmäisetäisyys", - "options.iris.shadowDistance.enabled": "Sallii varjojen enimmäisetäisyydeen määrittämisen. Maasto ja kohteet asetetun etäisyyden jälkeen eivät enää tuota varjoja. Varjoetäisyyden alentaminen saattaa nostaa pelin kuvataajuutta huomattavasti.", - "options.iris.shadowDistance.disabled": "Käyttöön ottamasi shader-paketti määrittää varjoetäisyyden jo; et voi muuttaa sitä.", - - "pack.iris.select.title": "Valitse", - "pack.iris.configure.title": "Mukauta", - "pack.iris.list.label": "+ Raahaa ja pudota shader-paketti lisätäksesi sen", - - "label.iris.true": "Päällä", - "label.iris.false": "Pois" -} diff --git a/common/src/main/resources/assets/iris/lang/fr_fr.json b/common/src/main/resources/assets/iris/lang/fr_fr.json deleted file mode 100644 index dfed66616..000000000 --- a/common/src/main/resources/assets/iris/lang/fr_fr.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "iris.shaders.reloaded": "Shaders rechargés !", - "iris.shaders.toggled": "Shaders basculés sur %s !", - "iris.keybind.reload": "Recharger les shaders", - "iris.keybind.shaderPackSelection": "Écran de sélection du pack de shaders", - "iris.keybind.toggleShaders": "Activation des shaders", - "iris.keybinds": "Iris", - "iris.shaders.reloaded.failure": "Échec lors du rechargement des shaders ! Raison : %s", - "iris.shaders.toggled.failure": "Échec lors de l'activation des shaders ! Raison : %s", - - "options.iris.apply": "Appliquer", - "options.iris.refresh": "Rafraichir", - "options.iris.openShaderPackFolder": "Ouvrir le dossier des packs de shaders...", - "options.iris.refreshShaderPacks": "Rafraichir les packs de shaders", - "options.iris.shaderPackSelection": "Packs de shaders...", - "options.iris.shaderPackSelection.title": "Packs de shaders", - "options.iris.shaderPackSelection.addedPack": "Pack de shaders ajouté : \"%s\"", - "options.iris.shaderPackSelection.addedPacks": "%s pack de shaders ajoutés", - "options.iris.shaderPackSelection.failedAdd": "Les fichiers ne sont pas des pack de shaders valides", - "options.iris.shaderPackSelection.failedAddSingle": "\"%s\" n'est pas un pack de shaders valide", - "options.iris.shaderPackSelection.copyError": "Erreur lors de l'ajout du pack de shaders \"%s\"", - "options.iris.shaderPackSelection.copyErrorAlreadyExists": "\"%s\" est déjà dans votre dossier de packs de shaders !", - "options.iris.shaders.disabled": "Shaders : Désactivés", - "options.iris.shaders.enabled": "Shaders : Activés", - - "pack.iris.select.title": "Sélectionner", - "pack.iris.list.label": "+ Glissez-déposez vos packs de shaders ici pour les ajouter" -} diff --git a/common/src/main/resources/assets/iris/lang/hu_hu.json b/common/src/main/resources/assets/iris/lang/hu_hu.json deleted file mode 100644 index a0cda564d..000000000 --- a/common/src/main/resources/assets/iris/lang/hu_hu.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "iris.shaders.reloaded": "Shader-ek újratöltve!", - "iris.shaders.disabled": "Shader-ek kikapcsolva!", - "iris.shaders.toggled": "%s Shader átkapcsolva!", - "iris.shaders.debug.enabled": "A hibakeresés be lett kapcsolva, ezáltal az események naplózása részletesebb lesz!", - "iris.shaders.debug.disabled": "A hibakeresés ki lett kapcsolva.", - "iris.shaders.debug.failure": "A hibakeresést nem lehet bekapcsolni, a számítógéped nem támogatja ezt a funkciót.", - "iris.shaders.debug.restart": "Nincs a hibakereséshez kontextus, kérlek indítsd újra a játékot a naplózáshoz.", - "iris.keybind.reload": "Shader-ek újratöltése", - "iris.keybind.shaderPackSelection": "Shader Pack választó képernyő", - "iris.keybind.toggleShaders": "Shader-ek váltása", - "iris.keybinds": "Iris", - "iris.shaders.reloaded.failure": "Nem sikerült a shader-ek újratöltése! A hiba oka: %s", - "iris.shaders.toggled.failure": "Nem sikerült a shader-eket bekapcsolni! A hiba oka: %s", - "iris.sodium.failure.title": "Az Iris nem tudott betöltődni!", - "iris.sodium.failure.download": "Töltsd le a Sodium modot", - "iris.sodium.failure.reason.notFound": "Az Iris-nak szüksége van a Sodium modra a megfelelő teljesítményhez, de a Sodium mod nincs telepítve.\nKérlek töltsd le a Sodium modot, helyezd a mods mappába, és indítsd újra a játékot.", - "iris.sodium.failure.reason.incompatible": "Az Iris-nak szüksége van a Sodium modra a megfelelő teljesítményhez, de a Sodium modnak nem a megfelelő verziója van feltelepítve.\nKérlek töltsd le a helyes verziót, majd helyezd a mods mappába és törölj minden más verziót, végük indítsd újra a játékot.", - "iris.nec.failure.title": "[%s] Not Enough Crashes észlelve!", - "iris.nec.failure.description": "A Not Enough Crashes súlyosan rongálhatja a játékot, ezentúé nem ad pontos részleteket a hibákról.\nJó alternatívák a MixinTrace és a Crafty Crashes, ezek megbízhatóan tudják elemezni a hiba forrását.", - "iris.unsupported.irisorpc": "Iris vagy a PC-d", - "iris.unsupported.iris": "Iris", - "iris.unsupported.pc": "a PC-d", - "iris.unsupported.pack": "Ez a Shader Pack nem kompatibilis!", - "iris.unsupported.pack.description": "A Shader Pack amit szeretnél használni, %s által nem támogatott tulajdonságokat próbál betölteni. Kérlek prábálj egy másik packot. Lista %s", - "options.iris.apply": "Elfogadás", - "options.iris.refresh": "Újratöltés", - "options.iris.openShaderPackFolder": "Shader Pack mappa megnyitása...", - "options.iris.shaderPackSettings": "Shader Pack beállításai...", - "options.iris.shaderPackList": "Shader Pack lista...", - "options.iris.refreshShaderPacks": "Shader Pack-ok újratöltése", - "options.iris.shaderPackSelection": "Shader Pack-ok...", - "options.iris.shaderPackSelection.title": "Shader Pack-ok", - "options.iris.shaderPackSelection.addedPack": "\"%s\" nevű Shader Pack hozzáadva", - "options.iris.shaderPackSelection.addedPacks": "%s Shader Pack lett hozzáadva", - "options.iris.shaderPackSelection.failedAdd": "A megadott fájlok nem Shader Pack-ok", - "options.iris.shaderPackSelection.failedAddSingle": "\"%s\" nevű fájl nem Shader Pack", - "options.iris.shaderPackSelection.copyError": "\"%s\" nevű Shader Pack-ot nem lehet hozzáadni", - "options.iris.shaderPackSelection.copyErrorAlreadyExists": "\"%s\" nevű Shader Pack már hozzá lett adva!", - "options.iris.shaderPackOptions.tooManyFiles": "Egyszerre több Shader Beállítás (Shader Settings) fájl hozzáadása nem lehetséges!", - "options.iris.shaderPackOptions.failedImport": "Ezt a Shader Beállítás (Shader Settings) fájlt \"%s\" nem lehet hozzáadni", - "options.iris.shaderPackOptions.importedSettings": "\"%s\" helyen lévő Shader Beállítások (Shader Settings) importálva lettek.", - "options.iris.shaders.disabled": "Shader-ek: Kikapcsolva", - "options.iris.shaders.enabled": "Shader-ek: Bekapcsolva", - "options.iris.shaders.nonePresent": "Shader-ek: Nincs listázható pack", - "options.iris.back": "Mégse", - "options.iris.reset": "Visszaállítás", - "options.iris.reset.tooltip": "MINDEN beállítás visszaállítása és elfogadása?", - "options.iris.reset.tooltip.holdShift": "Tartsd lenyomva a SHIFT billentyűt és kattints a visszaállításra", - "options.iris.importSettings.tooltip": "Beállítások importálása fájlból", - "options.iris.exportSettings.tooltip": "Beállítások exportálása fájlba", - "options.iris.mustDisableFullscreen": "Kérlek, először kapcsold ki a teljes kijelzős módot!", - "options.iris.setToDefault": "Opció alapértékre állítása?", - "options.iris.profile": "Profil", - "options.iris.profile.custom": "Egyedi", - "options.iris.shadowDistance": "Max árnyék távolsága", - "options.iris.shadowDistance.enabled": "Az árnyékok maximális távolságát tudod állítani. Az entitások és a terep nem fog árnyékot vetni ezen a távolságon túl. Kisebb érték megadásával teljesítmény javulást érhetsz el.", - "options.iris.shadowDistance.disabled": "A jelenlegi Shader Pack már állított be távolságot az árnyékokhoz; nem változtathatsz rajta.", - "options.iris.gui.hide": "Grafikus kezelőfelület (GUI) elrejtése", - "options.iris.gui.show": "Grafikus kezelőfelület (GUI) megjelenítése", - - "pack.iris.select.title": "Kiválasztás", - "pack.iris.configure.title": "Konfigurálás", - "pack.iris.list.label": "+ Húzz és Dobj Shader Pack-okat ide hogy hozzáadj a listához", - - "label.iris.true": "Be-", - "label.iris.false": "Ki-" -} diff --git a/common/src/main/resources/assets/iris/lang/it_it.json b/common/src/main/resources/assets/iris/lang/it_it.json deleted file mode 100644 index 37f0556c3..000000000 --- a/common/src/main/resources/assets/iris/lang/it_it.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "iris.shaders.reloaded": "Shaders Ricaricate!", - "iris.shaders.disabled": "Shaders disabilitate!", - "iris.shaders.toggled": "Cambiate le shaders su %s!", - "iris.shaders.debug.enabled": "Il Debugging è stato attivato, saranno presente più log!", - "iris.shaders.debug.disabled": "Il Debugging è stato disabilitato.", - "iris.shaders.debug.failure": "Impossibile attivare il debugging, il tuo computer non supporta questa feature.", - "iris.shaders.debug.restart": "Non hai contesto di debug, per favore riavvia per attivare il debugging", - "iris.keybind.reload": "Riavvia Shaders", - "iris.keybind.shaderPackSelection": "Schermata di selezione Pacchetti di Shaders", - "iris.keybind.toggleShaders": "Attiva/Disattiva Shaders", - "iris.keybinds": "Iris", - "iris.shaders.reloaded.failure": "Impossibile ricaricare le shaders! Motivo: %s", - "iris.shaders.toggled.failure": "Impossibile attivare le shaders! Motico: %s", - "iris.sodium.failure.title": "Iris non è riuscito a caricarsi!", - "iris.sodium.failure.download": "Scarica Sodium", - "iris.sodium.failure.reason.notFound": "Iris ha bisogno di Sodium per una buona performance, ma Sodium non è installato. Per favore scarica Sodium, mettilo nella cartella delle mod e riavvia il gioco.", - "iris.sodium.failure.reason.incompatible": "Iris ha bisogno di Sodium per una buona performance, ma una versione incompatibile è stata trovata. Per favore scarica la corretta verisone di Sodium, mettilo nella cartella delle mod, elimina la vecchia versione e riavvia il gioco.", - "iris.nec.failure.title": "[%s] Not Enough Crashes Trovato!", - "iris.nec.failure.description": "Not Enough Crashes può rompere il gioco durante i crash e non dà risultati accurati. Buone alternative sono MixinTrace e Crafty Crashes, che possono identificare la causa di un crash meglio e non mettono il gioco in uno stato invalido.", - "iris.unsupported.irisorpc": "Iris o il tuo PC", - "iris.unsupported.iris": "Iris", - "iris.unsupported.pc": "il tuo PC", - "iris.unsupported.pack": "Pacchetto di Shaders incompatibile!", - "iris.unsupported.pack.description": "Il pacchetto di shaders che stai cercando di caricare contiene features non supportate da %s. Per favore prova un altro pacchetto. Lista %s", - "options.iris.apply": "Applica", - "options.iris.refresh": "Riavvia", - "options.iris.openShaderPackFolder": "Apri La cartella delle shaders...", - "options.iris.shaderPackSettings": "Impostazioni shaders...", - "options.iris.shaderPackList": "Lista delle shaders...", - "options.iris.refreshShaderPacks": "Aggiorna le Shaders", - "options.iris.shaderPackSelection": "Shaders...", - "options.iris.shaderPackSelection.title": "Shaders ", - "options.iris.shaderPackSelection.addedPack": "Aggiunto il pacchetto di Shaders \"%s\"", - "options.iris.shaderPackSelection.addedPacks": "Aggiunti %s Pacchetti di Shaders", - "options.iris.shaderPackSelection.failedAdd": "Files non erano Shaders Valide", - "options.iris.shaderPackSelection.failedAddSingle": "\"%s\" non è un pacchetto di shaders", - "options.iris.shaderPackSelection.copyError": "Impossibile aggiungere la shader \"%s\"", - "options.iris.shaderPackSelection.copyErrorAlreadyExists": "\"%s\" è già aggiunto alla tua cartella delle shaders", - "options.iris.shaderPackOptions.tooManyFiles": "Impossibile aggiungere diverse impostazioni delle shaders!", - "options.iris.shaderPackOptions.failedImport": "Impossibile importare Il file di impostazioni delle shaders \"%s\"", - "options.iris.shaderPackOptions.importedSettings": "Importate le impostazioni delle shaders da \"%s\"", - "options.iris.shaders.disabled": "Shaders: Disabilitate", - "options.iris.shaders.enabled": "Shaders: Abilitate", - "options.iris.shaders.nonePresent": "Shaders: Nessuna Shader presente", - "options.iris.back": "Indietor", - "options.iris.reset": "Resetta", - "options.iris.reset.tooltip": "Resetta TUTTE le opzioni e applica?", - "options.iris.reset.tooltip.holdShift": "Tieni premuto SHIFT e click per resettare", - "options.iris.importSettings.tooltip": "Importa impostazioni da un file", - "options.iris.exportSettings.tooltip": "Esporta le impostazioni su un file", - "options.iris.mustDisableFullscreen": "Per favore disabilita lo schermo intero prima!", - "options.iris.setToDefault": "Impostare l'opzione al valore default?", - "options.iris.profile": "Profilo", - "options.iris.profile.custom": "Custom", - "options.iris.shadowDistance": "Massima Distanza delle ombre", - "options.iris.shadowDistance.enabled": "Permette di cambiare la massima distanza per le ombre. Terreno ed entità oltre questa distanza non creeranno ombre. Abbassare questa opzione può aumentare la tua performance di molto.", - "options.iris.shadowDistance.disabled": "La tua shader pack corrente ha già una distanza per le ombre e non puoi cambiarla.", - "options.iris.gui.hide": "Nascondi GUI", - "options.iris.gui.show": "Mostra GUI", - "pack.iris.select.title": "Seleziona", - "pack.iris.configure.title": "Configura", - "pack.iris.list.label": "+ Trascina e Rilascia le Shaders per aggiungerle", - "label.iris.true": "Attivato", - "label.iris.false": "Disattivato" -} diff --git a/common/src/main/resources/assets/iris/lang/ja_jp.json b/common/src/main/resources/assets/iris/lang/ja_jp.json deleted file mode 100644 index 2462e1328..000000000 --- a/common/src/main/resources/assets/iris/lang/ja_jp.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "iris.shaders.reloaded": "シェーダーを再読み込みしました!", - "iris.shaders.disabled": "シェーダーを無効化しました!", - "iris.shaders.toggled": "シェーダーを %s に切り替えました!", - "iris.shaders.debug.enabled": "デバッグが有効になりました。デバッグログに詳細情報が表示されます。", - "iris.shaders.debug.disabled": "デバッグが無効になりました。", - "iris.shaders.debug.failure": "お使いのコンピューターはデバッグ機能に対応していないため、デバッグを有効にできません。", - "iris.shaders.debug.restart": "デバッグコンテキストがありません。 デバッグを有効にするには、ゲームを再起動してください。", - "iris.keybind.reload": "シェーダーを再読み込み", - "iris.keybind.shaderPackSelection": "シェーダーパック選択画面", - "iris.keybind.toggleShaders": "シェーダーを切り替え", - "iris.keybinds": "Iris", - "iris.shaders.reloaded.failure": "シェーダーの再読み込みに失敗しました! 理由: %s", - "iris.shaders.toggled.failure": "シェーダーの切り替えに失敗しました! 理由: %s", - "iris.sodium.failure.title": "Irisの読み込みに失敗しました!", - "iris.sodium.failure.download": "Sodiumをダウンロード", - "iris.sodium.failure.reason.notFound": "パフォーマンス向上のため、Irisを使用するにはSodiumが必要です。 Sodiumをダウンロードし、modsフォルダーに導入してから、ゲームを再起動してください。", - "iris.sodium.failure.reason.incompatible": "互換性のないバージョンのSodiumが検出されました。 対応しているバージョンのSodiumをダウンロードし、modsフォルダーに導入してから、ゲームを再起動してください。", - "iris.unsupported.irisorpc": "Irisまたはお使いのコンピューター", - "iris.unsupported.iris": "Iris", - "iris.unsupported.pc": "お使いのコンピューター", - "iris.unsupported.pack": "シェーダーパックが非対応です!", - "iris.unsupported.pack.description": "読み込もうとしているシェーダーパックには、%sで非対応の機能が含まれています。 他のシェーダーパックをご使用ください。 非対応の機能: %s", - "options.iris.apply": "適応", - "options.iris.refresh": "更新", - "options.iris.openShaderPackFolder": "パックフォルダーを開く...", - "options.iris.shaderPackSettings": "シェーダーの設定...", - "options.iris.shaderPackList": "シェーダー一覧...", - "options.iris.refreshShaderPacks": "シェーダーの更新", - "options.iris.shaderPackSelection": "シェーダーパック...", - "options.iris.shaderPackSelection.title": "シェーダーパック", - "options.iris.shaderPackSelection.addedPack": "シェーダー「%s」を追加しました", - "options.iris.shaderPackSelection.addedPacks": "%s個のシェーダーを追加しました。", - "options.iris.shaderPackSelection.failedAdd": "無効なファイルです", - "options.iris.shaderPackSelection.failedAddSingle": "「%s」は無効なシェーダーです。", - "options.iris.shaderPackSelection.copyError": "シェーダー「%s」を追加できませんでした", - "options.iris.shaderPackSelection.copyErrorAlreadyExists": "「%s」は既にパックフォルダーに存在します!", - "options.iris.shaderPackOptions.tooManyFiles": "シェーダー設定ファイルは複数個インポートできません!", - "options.iris.shaderPackOptions.failedImport": "シェーダー設定ファイル「%s」のインポートに失敗しました!", - "options.iris.shaderPackOptions.importedSettings": "シェーダー設定を「%s」からインポートしました。", - "options.iris.shaders.disabled": "シェーダー: OFF", - "options.iris.shaders.enabled": "シェーダー: ON", - "options.iris.shaders.nonePresent": "シェーダー: 未選択", - "options.iris.back": "戻る", - "options.iris.reset": "リセット", - "options.iris.reset.tooltip": "全ての設定をリセットしますか?", - "options.iris.reset.tooltip.holdShift": "Shiftキーを押しながらクリックでリセット", - "options.iris.importSettings.tooltip": "ファイルから設定をインポート", - "options.iris.exportSettings.tooltip": "設定をファイルへエクスポート", - "options.iris.mustDisableFullscreen": "フルスクリーンを解除してください!", - "options.iris.setToDefault": "この設定をリセットしますか?", - "options.iris.profile": "プロファイル", - "options.iris.profile.custom": "カスタム", - "options.iris.shadowDistance": "影の最大描画距離", - "options.iris.shadowDistance.enabled": "影が描画される最大の距離を設定できます。 指定された値より遠くの地形やエンティティには影が描画されません。 最大描画距離を下げることで、パフォーマンスが向上することがあります。", - "options.iris.shadowDistance.disabled": "お使いのシェーダーパックでは既に最大描画距離が設定されているため、ここでは変更できません。", - "options.iris.gui.hide": "GUIを非表示", - "options.iris.gui.show": "GUIを表示", - - "pack.iris.select.title": "シェーダー選択", - "pack.iris.configure.title": "シェーダー設定", - "pack.iris.list.label": "+ ドラッグアンドドロップでシェーダーを追加", - - "label.iris.true": "ON", - "label.iris.false": "OFF" -} diff --git a/common/src/main/resources/assets/iris/lang/ko_kr.json b/common/src/main/resources/assets/iris/lang/ko_kr.json deleted file mode 100644 index 3bb52bb92..000000000 --- a/common/src/main/resources/assets/iris/lang/ko_kr.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "iris.shaders.reloaded": "셰이더를 다시 불러왔습니다.", - "iris.shaders.disabled": "셰이더가 비활성화되었습니다.", - "iris.shaders.toggled": "셰이더를 %s(으)로 변경하였습니다.", - "iris.shaders.debug.enabled": "디버그 모드가 활성화되었습니다. 디버그 로그에 더 많은 내용이 기록됩니다.", - "iris.shaders.debug.disabled": "디버그 모드가 비활성화되었습니다.", - "iris.shaders.debug.failure": "이 컴퓨터는 디버그 기능을 지원하지 않습니다.", - "iris.shaders.debug.restart": "디버그 콘텍스트가 없습니다. 다시 시작하여 디버그 모드를 활성화하십시오.", - "iris.keybind.reload": "셰이더 새로고침", - "iris.keybind.shaderPackSelection": "셰이더 팩 선택 창", - "iris.keybind.toggleShaders": "셰이더 전환", - "iris.keybinds": "Iris", - "iris.shaders.reloaded.failure": "셰이더를 새로고침하지 못하였습니다: %s", - "iris.shaders.toggled.failure": "셰이더를 전환하지 못하였습니다: %s", - "iris.sodium.failure.title": "Iris를 불러오지 못하였습니다.", - "iris.sodium.failure.download": "Sodium 다운로드", - "iris.sodium.failure.reason.notFound": "Iris를 최상의 성능으로 쓰기 위한 Sodium이 설치되어 있지 않습니다. Sodium을 내려받아 mods 폴더에 넣어 게임을 다시 실행하십시오.", - "iris.sodium.failure.reason.incompatible": "Iris를 최상의 성능으로 쓰기 위한 Sodium의 버전이 호환되지 않습니다. Iris와 맞는 버전의 Sodium을 내려받아 mods 폴더에 넣고, 호환되지 않는 버전의 Sodium을 제거한 뒤 게임을 다시 실행하십시오.", - "iris.nec.failure.title": "[%s] Not Enough Crashes 모드가 감지되었습니다.", - "iris.nec.failure.description": "Not Enough Crashes는 충돌이 처리될 때 게임을 예기치 못하게 중단시킬 수 있으며 정확한 충돌 결과를 표시하지 않습니다.\n이에 대한 좋은 대체재로서, MixinTrace와 Crafty Crashes는 충돌 원인을 보다 안정적으로 식별하며 게임을 중단하지 않습니다.", - "iris.unsupported.irisorpc": "Iris 또는 사용자의 PC", - "iris.unsupported.iris": "Iris", - "iris.unsupported.pc": "사용자의 PC", - "iris.unsupported.pack": "셰이더 팩이 호환되지 않습니다.", - "iris.unsupported.pack.description": "불러오려는 셰이더 팩이 %s에 의해 지원되지 않는 기능을 포함하고 있습니다. 다른 팩으로 다시 시도하십시오. 목록 %s", - "options.iris.apply": "적용", - "options.iris.refresh": "새로고침", - "options.iris.openShaderPackFolder": "셰이더 팩 폴더 열기", - "options.iris.shaderPackSettings": "셰이더 팩 설정...", - "options.iris.shaderPackList": "셰이더 팩 목록...", - "options.iris.refreshShaderPacks": "셰이더 팩 목록 새로고침", - "options.iris.shaderPackSelection": "셰이더 팩 설정...", - "options.iris.shaderPackSelection.title": "셰이더 팩 설정", - "options.iris.shaderPackSelection.addedPack": "\"%s\" 셰이더 팩을 추가하였습니다.", - "options.iris.shaderPackSelection.addedPacks": "%s 셰이더 팩을 추가하였습니다.", - "options.iris.shaderPackSelection.failedAdd": "잘못된 셰이더 팩입니다.", - "options.iris.shaderPackSelection.failedAddSingle": "\"%s\"은(는) 잘못된 셰이더 팩입니다.", - "options.iris.shaderPackSelection.copyError": "\"%s\" 셰이더 팩을 추가할 수 없습니다.", - "options.iris.shaderPackSelection.copyErrorAlreadyExists": "\"%s\" 셰이더 팩이 이미 폴더에 존재합니다.", - "options.iris.shaderPackOptions.tooManyFiles": "셰이더 설정을 중복하여 적용할 수 없습니다.", - "options.iris.shaderPackOptions.failedImport": "\"%s\" 파일에서 셰이더 설정을 가져오지 못하였습니다.", - "options.iris.shaderPackOptions.importedSettings": "\"%s\" 파일에서 셰이더 설정을 가져왔습니다.", - "options.iris.shaders.disabled": "셰이더: 비활성화됨", - "options.iris.shaders.enabled": "셰이더: 활성화됨", - "options.iris.shaders.nonePresent": "셰이더: 팩이 없습니다", - "options.iris.back": "뒤로 가기", - "options.iris.reset": "초기화", - "options.iris.reset.tooltip": "모든 옵션이 초기화됩니다. 계속하시겠습니까?", - "options.iris.reset.tooltip.holdShift": "[Shift] 키를 누르고 클릭하여 초기화", - "options.iris.importSettings.tooltip": "파일에서 설정 가져오기", - "options.iris.exportSettings.tooltip": "설정을 파일로 내보내기", - "options.iris.mustDisableFullscreen": "전체 화면 모드를 해제하십시오.", - "options.iris.setToDefault": "옵션을 기본값으로 되돌리시겠습니까?", - "options.iris.profile": "프로필", - "options.iris.profile.custom": "사용자 지정", - "options.iris.shadowDistance": "최대 그림자 범위", - "options.iris.shadowDistance.enabled": "최대 그림자 표시 범위를 조정할 수 있습니다. 이 거리보다 멀리 있는 개체와 지형은 그림자를 표시하지 않습니다. 그림자 거리를 줄이면 성능 향상에 도움이 될 수 있습니다.", - "options.iris.shadowDistance.disabled": "현재 사용하고 있는 셰이더 팩은 이미 그림자 표시 범위가 설정되어 있어 바꿀 수 없습니다.", - "options.iris.gui.hide": "GUI 숨기기", - "options.iris.gui.show": "GUI 보이기", - - "pack.iris.select.title": "선택", - "pack.iris.configure.title": "설정", - "pack.iris.list.label": "+ 추가할 셰이더 팩을 끌어다 놓으십시오.", - - "label.iris.true": "켜짐", - "label.iris.false": "꺼짐" -} diff --git a/common/src/main/resources/assets/iris/lang/lol_us.json b/common/src/main/resources/assets/iris/lang/lol_us.json deleted file mode 100644 index 08a0ec983..000000000 --- a/common/src/main/resources/assets/iris/lang/lol_us.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "iris.shaders.reloaded": "Shadews wewoaded!", - "iris.shaders.toggled": "Toggwed shadews to %s!", - "iris.keybind.reload": "Wewoad shadews", - "iris.keybind.shaderPackSelection": "Shadewpack sewection scween", - "iris.keybind.toggleShaders": "Toggwe Shadews", - "iris.keybinds": "Iwis", - "iris.shaders.reloaded.failure": "Faiwed to wewoad shadews! Reason: %s", - "iris.shaders.toggled.failure": "Faiwed to toggwe shadews! Reason: %s", - "iris.sodium.failure.title": "Iwis faiwed to woad!", - "iris.sodium.failure.reason": "You have Sodium in youw mods fowdew, howevew Iwis incwudes it. Pwease cwose da game, and wemove Sodium from youw mods fowdew.", - - "options.iris.apply": "Appwy", - "options.iris.refresh": "Refwesh", - "options.iris.openShaderPackFolder": "Open Shadew Pack Fowdew...", - "options.iris.refreshShaderPacks": "Refwesh Shadew Packs", - "options.iris.shaderPackSelection": "Shadew Packs...", - "options.iris.shaderPackSelection.title": "Shadew Packs", - "options.iris.shaderPackSelection.addedPack": "Added Shadew Pack \"%s\"", - "options.iris.shaderPackSelection.addedPacks": "Added %s Shadew Packs", - "options.iris.shaderPackSelection.failedAdd": "Fiwes wewe not vawid Shadew Packs", - "options.iris.shaderPackSelection.failedAddSingle": "\"%s\" ish not a vawid Shadew Pack", - "options.iris.shaderPackSelection.copyError": "Couwd not add Shadew Pack \"%s\"", - "options.iris.shaderPackSelection.copyErrorAlreadyExists": "\"%s\" ish awwready in youw Shadew Packs fowdew!", - "options.iris.shaders.disabled": "Shadews: Disabwed", - "options.iris.shaders.enabled": "Shadews: Enabwed", - "options.iris.shadowDistance": "Mwax Swadow Dwistance", - "options.iris.shadowDistance.enabled": "Awwows you to change da mwaximum dwistance fow swadows. Tewwain and entities beyond dis dwistance wiww not cast swadows. Lowering da shadow distance can sigwificantlwy incwease pewfowmance.", - "options.iris.shadowDistance.disabled": "Youw cuwwent shadew pack has awweady set a wendew dwistance fow swadows; you cawwot chwange wit.", - - "pack.iris.select.title": "Sewect", - "pack.iris.list.label": "+ Dwag and Dwop Shadew Packs to add" -} diff --git a/common/src/main/resources/assets/iris/lang/lzh.json b/common/src/main/resources/assets/iris/lang/lzh.json deleted file mode 100644 index 30a389040..000000000 --- a/common/src/main/resources/assets/iris/lang/lzh.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "iris.shaders.reloaded": "旣重載影!", - "iris.shaders.toggled": "用以%s之影!", - "iris.keybind.reload": "重載影", - "iris.keybind.shaderPackSelection": "擇影囊之幕", - "iris.keybind.toggleShaders": "影之啟閉", - "iris.keybinds": "Iris", - "iris.shaders.reloaded.failure": "以%s故,弗能重載影!", - "iris.shaders.toggled.failure": "以%s故,弗能用影!", - - "options.iris.apply": "然", - "options.iris.refresh": "重整", - "options.iris.openShaderPackFolder": "啟影囊之資料夾……", - "options.iris.refreshShaderPacks": "重載影囊", - "options.iris.shaderPackSelection": "影囊……", - "options.iris.shaderPackSelection.title": "影囊", - "options.iris.shaderPackSelection.addedPack": "旣添影囊 \"%s\"", - "options.iris.shaderPackSelection.addedPacks": "旣添影囊 %s ", - "options.iris.shaderPackSelection.failedAdd": "非可行之影囊", - "options.iris.shaderPackSelection.failedAddSingle": "「%s」者,非可行之影囊也", - "options.iris.shaderPackSelection.copyError": "弗能添新影囊 \"%s\"", - "options.iris.shaderPackSelection.copyErrorAlreadyExists": "\"%s\" 旣存於影囊資料夾中!", - "options.iris.shaders.disabled": "影:關", - "options.iris.shaders.enabled": "影:開", - - "pack.iris.select.title": "擇", - "pack.iris.list.label": "曳影囊於此" -} diff --git a/common/src/main/resources/assets/iris/lang/nl_nl.json b/common/src/main/resources/assets/iris/lang/nl_nl.json deleted file mode 100644 index d0116de09..000000000 --- a/common/src/main/resources/assets/iris/lang/nl_nl.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "iris.shaders.reloaded": "Shaders herladen!", - "iris.keybind.reload": "Herlaad Shaders", - "iris.shaders.reloaded.failure": "Shaders herladen is mislukt! Reden: %s", - - "options.iris.apply": "Toepassen", - "options.iris.refresh": "Verversen", - "options.iris.openShaderPackFolder": "Open de Shader Pack map...", - "options.iris.refreshShaderPacks": "Ververs Shader Pack", - "options.iris.shaderPackSelection": "Shader Packs...", - "options.iris.shaderPackSelection.title": "Shader Packs", - "options.iris.shaderPackSelection.addedPack": "Shader Pack \"%s\" toegevoegd", - "options.iris.shaderPackSelection.addedPacks": "%s Shader Packs toegevoegd", - "options.iris.shaderPackSelection.failedAdd": "Bestanden zijn geen geldige Shader Packs", - "options.iris.shaderPackSelection.failedAddSingle": "\"%s\" is geen geldige Shader Pack", - "options.iris.shaderPackSelection.copyError": "Kon Shader Pack \"%s\" niet toevoegen", - "options.iris.shaderPackSelection.copyErrorAlreadyExists": "\"%s\" staat al in uw Shader Packs map!", - "options.iris.shaders.disabled": "Shaders: Uitgeschakeld", - "options.iris.shaders.enabled": "Shaders: Ingeschakeld", - - "pack.iris.select.title": "Selecteren", - "pack.iris.list.label": "+ Voeg Shader Packs toe door te slepen en neer te zetten" -} diff --git a/common/src/main/resources/assets/iris/lang/pl_pl.json b/common/src/main/resources/assets/iris/lang/pl_pl.json deleted file mode 100644 index adcb5037e..000000000 --- a/common/src/main/resources/assets/iris/lang/pl_pl.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "iris.shaders.reloaded": "Przeładowano Shadery!", - "iris.shaders.disabled": "Shadery wyłączone!", - "iris.shaders.toggled": "Przełączono Shadery na %s!", - "iris.shaders.debug.enabled": "Włączono debugowanie, dziennik zdarzeń będzie bardziej rozbudowany!", - "iris.shaders.debug.disabled": "Debugowanie zostało wyłączone.", - "iris.shaders.debug.failure": "Nie można włączyć debugowania, komputer nie obsługuje funkcji debugowania.", - "iris.shaders.debug.restart": "Nie masz kontekstu debugowania, uruchom ponownie komputer, aby włączyć debugowanie.", - "iris.keybind.reload": "Przeładuj Shadery", - "iris.keybind.shaderPackSelection": "Ekran wyboru z Shaderami", - "iris.keybind.toggleShaders": "Przełącz Shadery", - "iris.keybinds": "Iris", - "iris.shaders.reloaded.failure": "Nie udało się przeładować Shaderów! Powód: %s", - "iris.shaders.toggled.failure": "Nie udało się przełączyć Shaderów! Powód: %s", - "iris.sodium.failure.title": "Iris: Nie udało się załadować!", - "iris.sodium.failure.download": "Pobierz Sodium", - "iris.sodium.failure.reason.notFound": "Iris wymaga Sodium dla poprawnego działania, a Sodium nie jest zainstalowane. Pobierz właściwą wersję Sodium, umieść ją w folderze mods i ponownie uruchom grę.", - "iris.sodium.failure.reason.incompatible": "Iris wymaga Sodium dla poprawnego działania. Znaleziono niekompatybilną wersję Sodium. Pobierz właściwą wersję Sodium, umieść ją w folderze mods oraz usuń niekompatybilną wersję i ponownie uruchom grę.", - - "options.iris.apply": "Zastosuj", - "options.iris.refresh": "Odśwież", - "options.iris.openShaderPackFolder": "Otwórz folder z Shaderami...", - "options.iris.shaderPackSettings": "Ustawienia Shader Packa...", - "options.iris.shaderPackList": "Lista Shaderów...", - "options.iris.refreshShaderPacks": "Odśwież listę z Shaderami", - "options.iris.shaderPackSelection": "Shader Packi...", - "options.iris.shaderPackSelection.title": "Shader Packi", - "options.iris.shaderPackSelection.addedPack": "Dodano Shader Packa \"%s\"", - "options.iris.shaderPackSelection.addedPacks": "Dodano %s Shader Packi", - "options.iris.shaderPackSelection.failedAdd": "Pliki nie są poprawnymi Shader Packami", - "options.iris.shaderPackSelection.failedAddSingle": "\"%s\" nie jest poprawnym Shader Packiem", - "options.iris.shaderPackSelection.copyError": "Nie można dodać Shader Packa \"%s\"", - "options.iris.shaderPackSelection.copyErrorAlreadyExists": "\"%s\" jest już w folderze z Shaderami!", - "options.iris.shaderPackOptions.tooManyFiles": "Nie można zaimportować wielu plików z ustawieniami shaderów!", - "options.iris.shaderPackOptions.failedImport": "Nie udało się zaimportować pliku z ustawieniami shaderów \"%s\"", - "options.iris.shaderPackOptions.importedSettings": "Zaimportowano ustawienia shaderów z \"%s\"", - "options.iris.shaders.disabled": "Shadery: Wyłączone", - "options.iris.shaders.enabled": "Shadery: Włączone", - "options.iris.shaders.nonePresent": "Shadery: Brak dostępnych pakietów", - "options.iris.back": "Wstecz", - "options.iris.reset": "Reset", - "options.iris.reset.tooltip": "Zresetować WSZYSTKIE ustawienia i zastosować?", - "options.iris.reset.tooltip.holdShift": "Przytrzymaj SHIFT i kliknij, aby zresetować", - "options.iris.importSettings.tooltip": "Zaimportuj ustawienia z pliku", - "options.iris.exportSettings.tooltip": "Wyeksportuj zastosowane ustawienia do pliku", - "options.iris.mustDisableFullscreen": "Należy najpierw wyłączyć pełny ekran!", - "options.iris.setToDefault": "Przywrócić domyślną wartość?", - "options.iris.profile": "Profil", - "options.iris.profile.custom": "Własny", - "options.iris.shadowDistance": "Maksymalna odległość cieni", - "options.iris.shadowDistance.enabled": "Umożliwia zmianę maksymalnej odległości wyświetlania cieni. Teren i obiekty znajdujące się poza tą odległością nie będą rzucać cieni. Zmniejszenie odległości cieni może znacznie zwiększyć wydajność.", - "options.iris.shadowDistance.disabled": "Twój aktualny shader pack ma już ustawioną odległość renderowania cieni; nie możesz jej zmienić.", - - "pack.iris.select.title": "Wybierz", - "pack.iris.configure.title": "Konfiguracja", - "pack.iris.list.label": "+ Przeciągnij i upuść Shader Packi, aby dodać", - - "label.iris.true": "Włączone", - "label.iris.false": "Wyłączone" -} diff --git a/common/src/main/resources/assets/iris/lang/pr_pt.json b/common/src/main/resources/assets/iris/lang/pr_pt.json deleted file mode 100644 index 730358461..000000000 --- a/common/src/main/resources/assets/iris/lang/pr_pt.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "iris.shaders.reloaded": "Shaders Recarregados!", - "iris.keybind.reload": "Recarregar Shaders", - "iris.shaders.reloaded.failure": "Falha no Reload Shaders! Motivo: %s", - - "options.iris.apply": "Aplicar", - "options.iris.refresh": "Actualizar", - "options.iris.openShaderPackFolder": "Pasta de Shader Pack Aberto......", - "options.iris.refreshShaderPacks": "Actualizar Shader Packs", - "options.iris.shaderPackSelection": "Shader Packs...", - "options.iris.shaderPackSelection.title": "Shader Packs", - "options.iris.shaderPackSelection.addedPack": "Adicionado Pacote de Shader \"%s\"", - "options.iris.shaderPackSelection.addedPacks": "Adicionadas %s Shader Packs", - "options.iris.shaderPackSelection.failedAdd": "Os ficheiros não eram válidos Shader Packs", - "options.iris.shaderPackSelection.failedAddSingle": "\"%s\" não é um Pacote Shader válido", - "options.iris.shaderPackSelection.copyError": "Não foi possível acrescentar Shader Pack \"%s\"", - "options.iris.shaderPackSelection.copyErrorAlreadyExists": "\"%s\" já está na sua pasta Shader Packs!", - "options.iris.shaders.disabled": "Shaders: Deficientes", - "options.iris.shaders.enabled": "Shaders: Activados", - - "pack.iris.select.title": "Seleccionar", - "pack.iris.list.label": "+ Trascina e rilascia Shader Pack da aggiungere" -} diff --git a/common/src/main/resources/assets/iris/lang/pt_br.json b/common/src/main/resources/assets/iris/lang/pt_br.json deleted file mode 100644 index 8842495e0..000000000 --- a/common/src/main/resources/assets/iris/lang/pt_br.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "iris.shaders.reloaded": "Sombreadores recarregados!", - "iris.shaders.disabled": "Sombreadores desativados!", - "iris.shaders.toggled": "Sombreadores alternados para %s!", - "iris.shaders.debug.enabled": "A depuração foi ativada, seus registros serão mais detalhados!", - "iris.shaders.debug.disabled": "A depuração foi desativada.", - "iris.shaders.debug.failure": "Não foi possível ativar a depuração pois seu computador não suporta os recursos necessários.", - "iris.shaders.debug.restart": "Você não tem o contexto de depuração, reinicie o jogo para ativá-lo.", - "iris.keybind.reload": "Recarregar sombreadores", - "iris.keybind.shaderPackSelection": "Abrir/Fechar tela de pacotes de sombreadores", - "iris.keybind.toggleShaders": "Alternar sombreadores", - "iris.keybinds": "Iris", - "iris.shaders.reloaded.failure": "Falha ao recarregar sombreadores! Motivo: %s", - "iris.shaders.toggled.failure": "Falha ao alternar sombreadores! Motivo: %s", - "iris.sodium.failure.title": "Iris falhou!", - "iris.sodium.failure.download": "Baixar Sodium", - "iris.sodium.failure.reason.notFound": "O Iris requer o Sodium para um bom desempenho, mas o Sodium não está instalado. Instale-o, coloque-o na pasta de mods e inicie o jogo.", - "iris.sodium.failure.reason.incompatible": "O Iris requer o Sodium para um bom desempenho, mas uma versão incompatível dele foi encontrada. Instale a versão correta, coloque-a na pasta de mods, remova a versão incorreta e inicie o jogo.", - "iris.nec.failure.title": "[%s] Not Enough Crashes detectado!", - "iris.nec.failure.description": "O Not Enough Crashes pode quebrar gravemente como o jogo lida com os interrompimentos e não fornece resultados precisos.\nBoas alternativas são MixinTrace e Crafty Crashes, que pode identificar a causa de uma falha de forma mais confiável e não coloca o jogo em um estado inválido.", - "iris.unsupported.irisorpc": "Iris ou seu computador", - "iris.unsupported.iris": "Iris", - "iris.unsupported.pc": "seu computador", - "iris.unsupported.pack": "Sombreadores incompatíveis!", - "iris.unsupported.pack.description": "Este pacote de sombreadores possui recursos não suportados pelo %s, tente outro pacote. Lista: %s", - "options.iris.apply": "Aplicar", - "options.iris.refresh": "Recarregar", - "options.iris.openShaderPackFolder": "Abrir pasta de pacotes", - "options.iris.shaderPackSettings": "Configurações do pacote", - "options.iris.shaderPackList": "Pacotes de sombreadores", - "options.iris.refreshShaderPacks": "Recarregar pacotes de sombreadores", - "options.iris.shaderPackSelection": "Pacote de sombreadores...", - "options.iris.shaderPackSelection.title": "Pacote de sombreadores", - "options.iris.shaderPackSelection.addedPack": "Pacote de sombreadores \"%s\" adicionado", - "options.iris.shaderPackSelection.addedPacks": "%s pacotes de sombreadores adicionados", - "options.iris.shaderPackSelection.failedAdd": "Os arquivos não eram pacotes de sombreadores válidos", - "options.iris.shaderPackSelection.failedAddSingle": "\"%s\" não é um pacote de sombreadores válido", - "options.iris.shaderPackSelection.copyError": "Não foi possível adicionar o pacote de sombreadores \"%s\"", - "options.iris.shaderPackSelection.copyErrorAlreadyExists": "\"%s\" já está na sua pasta de pacotes de sombreadores!", - "options.iris.shaderPackOptions.tooManyFiles": "Não é possível importar várias configurações de sombreadores ao mesmo tempo!", - "options.iris.shaderPackOptions.failedImport": "Falha ao importar o arquivo de configurações do sombreadores \"%s\"", - "options.iris.shaderPackOptions.importedSettings": "As configurações do sombreadores foram importadas de \"%s\"", - "options.iris.shaders.disabled": "Sombreadores: Desativado", - "options.iris.shaders.enabled": "Sombreadores: Ativado", - "options.iris.shaders.nonePresent": "Sombreadores: Sem pacotes disponíveis", - "options.iris.back": "Voltar", - "options.iris.reset": "Redefinir", - "options.iris.reset.tooltip": "Deseja redefinir TODAS as opções e aplicá-las?", - "options.iris.reset.tooltip.holdShift": "Segure SHIFT e clique para redefinir", - "options.iris.importSettings.tooltip": "Importe configurações de um arquivo", - "options.iris.exportSettings.tooltip": "Exporte configurações aplicadas para um arquivo", - "options.iris.mustDisableFullscreen": "Saia da tela cheia primeiro!", - "options.iris.setToDefault": "Deseja definir a opção ao padrão?", - "options.iris.profile": "Perfil", - "options.iris.profile.custom": "Personalizado", - "options.iris.shadowDistance": "Distância das sombras", - "options.iris.shadowDistance.enabled": "Permite alterar a distância máxima das sombras. O terreno e as entidades além dessa distância não projetarão sombras. O desempenho do jogo pode ser melhorado significativamente ao reduzir este valor.", - "options.iris.shadowDistance.disabled": "Seu pacote de sombreadores já definiu um valor da distância das sombras e você não poderá alterá-lo.", - "options.iris.gui.hide": "Ocultar interface", - "options.iris.gui.show": "Exibir interface", - - "pack.iris.select.title": "Selecionar um pacote", - "pack.iris.configure.title": "Configurando um pacote", - "pack.iris.list.label": "Arraste os pacotes até esta janela para adicioná-los", - - "label.iris.true": "Sim", - "label.iris.false": "Não" -} \ No newline at end of file diff --git a/common/src/main/resources/assets/iris/lang/ru_ru.json b/common/src/main/resources/assets/iris/lang/ru_ru.json deleted file mode 100644 index cc5d0d034..000000000 --- a/common/src/main/resources/assets/iris/lang/ru_ru.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "iris.shaders.reloaded": "Шейдеры перезагружены.", - "iris.shaders.disabled": "Шейдеры выключены.", - "iris.shaders.toggled": "Включён набор шейдеров %s.", - "iris.shaders.debug.enabled": "Отладка включена, ведение журнала будет более подробным.", - "iris.shaders.debug.disabled": "Отладка отключена.", - "iris.shaders.debug.failure": "Невозможно включить отладку, ваш компьютер не поддерживает необходимые функции.", - "iris.shaders.debug.restart": "Отсутствует отладочный контекст. Перезапустите игру, чтобы включить отладку.", - "iris.keybind.reload": "Перезагрузить шейдеры", - "iris.keybind.shaderPackSelection": "Список наборов шейдеров", - "iris.keybind.toggleShaders": "Переключить шейдеры", - "iris.keybinds": "Iris", - "iris.shaders.reloaded.failure": "Не удалось перезагрузить шейдеры. Причина: %s", - "iris.shaders.toggled.failure": "Не удалось переключить шейдеры. Причина: %s", - "iris.sodium.failure.title": "Не удалось загрузить Iris.", - "iris.sodium.failure.download": "Загрузить Sodium", - "iris.sodium.failure.reason.notFound": "Iris требует Sodium для лучшей производительности, но Sodium не установлен. Пожалуйста, загрузите Sodium, добавьте его в папку с модами и перезапустите игру.", - "iris.sodium.failure.reason.incompatible": "Iris требует Sodium для лучшей производительности, но ваша версия Sodium несовместима. Пожалуйста, загрузите и добавьте в папку с модами подходящую версию Sodium, удалите старую версию и перезапустите игру.", - "iris.nec.failure.title": "[%s] обнаружен Not Enough Crashes!", - "iris.nec.failure.description": "Not Enough Crashes может серьёзно сломать игру при обработке сбоев, при этом не давая точных результатов.\nВ качестве альтернатив есть MixinTrace и Crafty Crashes, которые более надёжно определяют причину сбоя и не доводят игру до нестабильного состояния.", - "iris.unsupported.irisorpc": "не поддерживает Iris или ваше устройство", - "iris.unsupported.iris": "Iris не поддерживает", - "iris.unsupported.pc": "ваше устройство не поддерживает", - "iris.unsupported.pack": "Несовместимый набор шейдеров!", - "iris.unsupported.pack.description": "Этот набор шейдеров содержит функции, которые %s. Попробуйте другой набор. Несовместимо: %s", - "options.iris.apply": "Применить", - "options.iris.refresh": "Обновить", - "options.iris.openShaderPackFolder": "Папка с наборами", - "options.iris.shaderPackSettings": "Настройки набора шейдеров", - "options.iris.shaderPackList": "Список наборов шейдеров", - "options.iris.refreshShaderPacks": "Обновить список шейдеров", - "options.iris.shaderPackSelection": "Наборы шейдеров...", - "options.iris.shaderPackSelection.title": "Наборы шейдеров", - "options.iris.shaderPackSelection.addedPack": "Добавлен набор шейдеров \"%s\"", - "options.iris.shaderPackSelection.addedPacks": "Добавлено %s наборов шейдеров", - "options.iris.shaderPackSelection.failedAdd": "Файлы не являются допустимыми наборами шейдеров", - "options.iris.shaderPackSelection.failedAddSingle": "\"%s\" не является допустимым набором шейдеров", - "options.iris.shaderPackSelection.copyError": "Не удалось добавить набор шейдеров \"%s\"", - "options.iris.shaderPackSelection.copyErrorAlreadyExists": "\"%s\" уже находится в вашей папке с наборами шейдеров.", - "options.iris.shaderPackOptions.tooManyFiles": "Невозможно загрузить несколько файлов с настройками.", - "options.iris.shaderPackOptions.failedImport": "Не удалось загрузить настройки из \"%s\"", - "options.iris.shaderPackOptions.importedSettings": "Загружены настройки шейдеров из \"%s\"", - "options.iris.shaders.disabled": "Шейдеры: Выключены", - "options.iris.shaders.enabled": "Шейдеры: Включены", - "options.iris.shaders.nonePresent": "Шейдеры: наборов не обнаружено", - "options.iris.back": "Назад", - "options.iris.reset": "Сбросить", - "options.iris.reset.tooltip": "Сбросить ВСЕ настройки?", - "options.iris.reset.tooltip.holdShift": "Для сброса нажмите, удерживая Shift", - "options.iris.importSettings.tooltip": "Загрузить настройки из файла", - "options.iris.exportSettings.tooltip": "Сохранить настройки в файл", - "options.iris.mustDisableFullscreen": "Пожалуйста, сначала отключите полноэкранный режим.", - "options.iris.setToDefault": "Сбросить параметр?", - "options.iris.profile": "Профиль", - "options.iris.profile.custom": "Пользовательский", - "options.iris.shadowDistance": "Дальность теней", - "options.iris.shadowDistance.enabled": "Позволяет изменять максимальное расстояние видимости теней. Блоки и сущности за его пределами не будут иметь теней. Снижая этот параметр, вы можете значительно улучшить производительность.", - "options.iris.shadowDistance.disabled": "Ваш текущий набор шейдеров уже установил своё расстояние для теней; вы не сможете его изменить.", - "options.iris.shadowDistance.sodium_tooltip": "Дальность теней определяет, насколько далеко местность может обрабатываться на этапе просчёта теней. Меньшие значения соответствуют меньшей площади, что улучшает частоту кадров. Этот параметр нельзя изменить для наборов, в которых установлено своё расстояние рендеринга теней. Фактическое расстояние рендеринга ограничено дальностью прорисовки.", - "options.iris.gui.hide": "Скрыть", - "options.iris.gui.show": "Показать", - - "pack.iris.select.title": "Список", - "pack.iris.configure.title": "Настройки", - "pack.iris.list.label": "+ Перетащите наборы шейдеров для добавления", - - "label.iris.true": "Вкл", - "label.iris.false": "Выкл", - - "modmenu.summaryTranslation.iris":"Современный графический мод для загрузки существующих наборов шейдеров Optifine.", - "modmenu.descriptionTranslation.iris": "Современный графический мод для Minecraft, предназначенный для загрузки существующих наборов шейдеров формата Optifine." -} diff --git a/common/src/main/resources/assets/iris/lang/sk_sk.json b/common/src/main/resources/assets/iris/lang/sk_sk.json deleted file mode 100644 index d711f5375..000000000 --- a/common/src/main/resources/assets/iris/lang/sk_sk.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "iris.shaders.reloaded": "Tieňovače obnovené!", - "iris.shaders.toggled": "Zapnuté tieňovače %s!", - "iris.shaders.debug.enabled": "Ladenie bolo zapnuté, záznamy budú detailnejšie!", - "iris.shaders.debug.disabled": "Ladenie bolo vypnuté.", - "iris.shaders.debug.failure": "Nie je možné zapnúť ladenie, tvoj počítač to nepodporuje.", - "iris.shaders.debug.restart": "Nemáš kontext ladenia, prosím reštartujte pre zapnutie ladenia.", - "iris.keybind.reload": "Obnoviť tieňovače", - "iris.keybind.shaderPackSelection": "Výber tieňovačov", - "iris.keybind.toggleShaders": "Prepnúť tieňovače", - "iris.keybinds": "Iris", - "iris.shaders.reloaded.failure": "Nepodarilo sa obnoviť tieňovače! Dôvod: %s", - "iris.shaders.toggled.failure": "Nepodarilo sa prepnúť tieňovače! Dôvod: %s", - "iris.sodium.failure.title": "Iris sa nepodarilo načítať!", - "iris.sodium.failure.download": "Stiahnuť Sodium", - "iris.sodium.failure.reason.notFound": "Iris potrebuje Sodium pre dobrý výkon, ale Sodium nie je nainštalovaný. Prosím, stiahnite si Sodium, dajte ho do priečinka módov a reštartujte hru.", - "iris.sodium.failure.reason.incompatible": "Iris potrebuje Sodium pre dobrý výkon, ale máte zlú verziu Sodium. Prosím, stiahnite si správnu verziu Sodium, dajte ho do priečinka módov, odstráňte zlú verziu a reštartujte hru.", - - "options.iris.apply": "Aplikovať", - "options.iris.refresh": "Obnoviť", - "options.iris.openShaderPackFolder": "Otvoriť priečinok s tieňovačmi...", - "options.iris.shaderPackSettings": "Nastavenia tieňovačov...", - "options.iris.shaderPackList": "Zoznam tieňovačov...", - "options.iris.refreshShaderPacks": "Obnoviť tieňovače", - "options.iris.shaderPackSelection": "Tieňovače...", - "options.iris.shaderPackSelection.title": "Tieňovače", - "options.iris.shaderPackSelection.addedPack": "Tieňovač \"%s\" bol pridaný", - "options.iris.shaderPackSelection.addedPacks": "Pridané %s tieňovače", - "options.iris.shaderPackSelection.failedAdd": "Neplatný súbor tieňovačov", - "options.iris.shaderPackSelection.failedAddSingle": "\"%s\" nie je platný tieňovač", - "options.iris.shaderPackSelection.copyError": "Nepodarilo sa pridať tieňovač \"%s\"", - "options.iris.shaderPackSelection.copyErrorAlreadyExists": "\"%s\" už je v priečinku tieňovačov!", - "options.iris.shaderPackOptions.tooManyFiles": "Nie je možné importovať viaceré súbory nastavení naraz!", - "options.iris.shaderPackOptions.failedImport": "Nepodarilo sa importovať súbor nastavení \"%s\"", - "options.iris.shaderPackOptions.importedSettings": "Importovaný súbor nastavení \"%s\"", - "options.iris.shaders.disabled": "Tieňovače: Vypnuté", - "options.iris.shaders.enabled": "Tieňovače: Zapnuté", - "options.iris.shaders.nonePresent": "Tieňovače: Žiadne nie sú dostupné", - "options.iris.back": "Späť", - "options.iris.reset": "Reset", - "options.iris.reset.tooltip": "Resetovať VŠETKY nastavenia a uložiť?", - "options.iris.reset.tooltip.holdShift": "Drž Shift a klikni pre reset", - "options.iris.importSettings.tooltip": "Importovať nastavenia zo súboru", - "options.iris.exportSettings.tooltip": "Exportovať uložené nastavenia do súboru", - "options.iris.setToDefault": "Nastaviť na predvolenú hodnotu?", - "options.iris.profile": "Profil", - "options.iris.profile.custom": "Vlastný", - "options.iris.shadowDistance": "Dohľadnosť tieňov", - "options.iris.shadowDistance.enabled": "Mení maximálnu vzdialenosť vykreslenia tieňov. Terén a entity nebudú vrhať žiadne tiene. Toto nastavenie má veľký vplyv na výkon.", - "options.iris.shadowDistance.disabled": "Tento tieňovač už nastavil dohľadnosť tieňov, už to nemôžeš nastavovať.", - - "pack.iris.select.title": "Vybrať", - "pack.iris.configure.title": "Nastavovať", - "pack.iris.list.label": "+ Potiahni a pusti tieňovače pre pridanie", - - "label.iris.true": "ZAP", - "label.iris.false": "VYP" -} diff --git a/common/src/main/resources/assets/iris/lang/th_th.json b/common/src/main/resources/assets/iris/lang/th_th.json deleted file mode 100644 index ef754df1c..000000000 --- a/common/src/main/resources/assets/iris/lang/th_th.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "iris.shaders.reloaded": "โหลดแสงเงาใหม่เรียบร้อย", - "iris.shaders.toggled": "ปรับแสงเงาเป็น %s", - "iris.keybind.reload": "โหลดแสงเงาใหม่", - "iris.keybind.shaderPackSelection": "หน้าตัวเลือกแสงเงา", - "iris.keybind.toggleShaders": "เปิด/ปิดแสงเงา", - "iris.keybinds": "Iris", - "iris.shaders.reloaded.failure": "เกิดข้อผิดพลาดในการโหลดแสงเงาใหม่! สาเหตุ: %s", - "iris.shaders.toggled.failure": "เกิดข้อผิดพลาดในการเปิด/ปิดแสงเงา! สาเหตุ: %s", - "iris.sodium.failure.title": "Iris เกิดข้อผิดพลาดขณะที่กำลังโหลด!", - "iris.sodium.failure.download": "ดาวน์โหลด Sodium", - "iris.sodium.failure.reason.notFound": "Iris ต้องใช้ Sodium เพื่อประสิทธิภาพที่ดีขึ้น แต่ Sodium ยังไม่ได้รับการติดตั้ง โปรดดาวน์โหลด Sodium แล้ววางไว้ในโฟลเดอร์ mods เสร็จแล้วให้เปิดเกมใหม่อีกครั้ง", - "iris.sodium.failure.reason.incompatible": "Iris ต้องใช้ Sodium เพื่อประสิทธิภาพที่ดีขึ้น แต่พบเวอร์ชั่นของ Sodium ที่ไม่สามารถใช้ร่วมกับ Iris ได้ โปรดดาวน์โหลด Sodium เวอร์ชั่นที่สามารถใช้กับ Iris ได้ แล้ววางไว้ในโฟลเดอร์ mods ลบตัวเวอร์ชั่นที่ใช้ร่วมกันไม่ได้ออก เสร็จแล้วให้เปิดเกมใหม่อีกครั้ง", - - "options.iris.apply": "ปรับใช้", - "options.iris.refresh": "รีเฟรช", - "options.iris.openShaderPackFolder": "เปิดโฟลเดอร์แสงเงา...", - "options.iris.shaderPackSettings": "ตั้งค่าแสงเงา...", - "options.iris.shaderPackList": "รายการแสงเงา...", - "options.iris.refreshShaderPacks": "รีเฟรชแสงเงา", - "options.iris.shaderPackSelection": "แสงเงา...", - "options.iris.shaderPackSelection.title": "แสงเงา", - "options.iris.shaderPackSelection.addedPack": "เพิ่มแสงเงา \"%s\" แล้วเรียบร้อย", - "options.iris.shaderPackSelection.addedPacks": "เพิ่มแสงเงาไปแล้ว %s", - "options.iris.shaderPackSelection.failedAdd": "ไฟล์ดังกล่าวไม่ใช่ไฟล์แสงเงาที่ถูกต้อง", - "options.iris.shaderPackSelection.failedAddSingle": "ไฟล์ \"%s\" ไม่ใช่ไฟล์แสงเงาที่ถูกต้อง", - "options.iris.shaderPackSelection.copyError": "ไม่สามารถโหลดแสงเงา \"%s\" ได้", - "options.iris.shaderPackSelection.copyErrorAlreadyExists": "แสงเงา \"%s\" มีอยู่ในโฟลเดอร์แสงเงาอยู่แล้ว!", - "options.iris.shaderPackOptions.tooManyFiles": "ไม่สามารถนำเข้าไฟล์การตั้งค่าแสงเงาเข้ามาหลายไฟล์ได้", - "options.iris.shaderPackOptions.failedImport": "การนำเข้าไฟล์การตั้งค่าแสงเงาของ \"%s\" เกิดข้อผิดพลาด", - "options.iris.shaderPackOptions.importedSettings": "นำเข้าไฟล์การตั้งค่าแสงเงาจาก \"%s\" แล้วเรียบร้อย", - "options.iris.shaders.disabled": "แสงเงา: ปิด", - "options.iris.shaders.enabled": "แสงเงา: เปิด", - "options.iris.shaders.nonePresent": "แสงเงา: ไม่พบแสงเงา", - "options.iris.back": "กลับ", - "options.iris.reset": "รีเซ็ต", - "options.iris.reset.tooltip": "จะรีเซ็ตทุกตัวเลือกแล้วปรับใช้เลยหรือไม่?", - "options.iris.reset.tooltip.holdShift": "กดปุ่ม SHIFT ค้างไว้แล้วคลิกเพื่อรีเซ็ต", - "options.iris.importSettings.tooltip": "นำเข้าผลการตั้งค่าจากไฟล์", - "options.iris.exportSettings.tooltip": "ส่งออกการตั้งค่าที่ใช้อยู่เป็นไฟล์", - "options.iris.setToDefault": "จะตั้งค่ากลับเป็นค่าตั้งต้นหรือไม่?", - "options.iris.profile": "โปรไฟล์", - "options.iris.profile.custom": "ตั้งค่าเอง", - "options.iris.shadowDistance": "ระยะเงาสูงสุด", - "options.iris.shadowDistance.enabled": "อนุญาตให้คุณเปลี่ยนระยะสูงสุดของเงา ภูมิประเทศและเอนติตี้ต่อจากระยะนี้จะไม่เกิดเงา โดยการปรับระยะเงาให้ต่ำลงสามารถเพิ่ประสิทธิภาพได้ค่อนข้างมาก", - "options.iris.shadowDistance.disabled": "แสงเงาของคุณใช้อยู่ได้รับการตั้งค่าระยะการเรนเดอร์เงามาเรียบร้อยแล้ว คุณไม่สามารถเปลี่ยนได้", - "options.iris.shadowDistance.sodium_tooltip": "ระยะการเรนเดอร์เงา จะควบคุมว่าภูมิประเทศจะสามารถเรนเดอร์เป็นเงาได้ไกลมากน้อยแค่ไหน โดยค่าต่ำ ๆ หมายความว่าภูมิประเทศจะถูกเรนเดอร์ได้น้อย ช่วยเพิ่มอัตราเฟรมได้ ตัวเลือกนี้จะไม่สามารถเปลี่ยนบนแพ็คที่ได้กำหนดระยะการเรนเดอร์แสงเงามาแล้วอย่างชัดเจน ระยะการเรนเดอร์แสงเงาที่แท้จริงจะถูกจำกัดโดยตัวเลือกระยะการมองเห็น", - - "pack.iris.select.title": "โปรดเลือก", - "pack.iris.configure.title": "ปรับแต่งค่า", - "pack.iris.list.label": "+ ลากไฟล์แสงเงามาที่นี่เพื่อเพิ่มแสงเงา", - - "label.iris.true": "เปิด", - "label.iris.false": "ปิด" -} diff --git a/common/src/main/resources/assets/iris/lang/tr_tr.json b/common/src/main/resources/assets/iris/lang/tr_tr.json deleted file mode 100644 index 7f6d27b56..000000000 --- a/common/src/main/resources/assets/iris/lang/tr_tr.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "iris.shaders.reloaded": "Shaderlar Yeniden Yüklendi!", - "iris.shaders.toggled": "Shaderlar '%s' olarak ayarlandı!", - "iris.keybind.reload": "Shaderları Yenile", - "iris.keybind.shaderPackSelection": "Shader Paket Seçim Ekranı", - "iris.keybind.toggleShaders": "Shaderları Aç/Kapa", - "iris.keybinds": "Iris", - "iris.shaders.reloaded.failure": "Shaderları yenileme başarısız! Sebep: %s", - "iris.shaders.toggled.failure": "Shaderları açma/kapama başarısız! Sebep: %s", - "iris.sodium.failure.title": "Iris yüklenilemedi!", - "iris.sodium.failure.download": "Sodium'u İndir", - "iris.sodium.failure.reason.notFound": "İyi performans için Iris'e Sodium gerek, ancak kurulu değil. Lütfen Sodium'u indir ve modlar klasörüne yerleştirip oyunu yeniden başlat.", - "iris.sodium.failure.reason.incompatible": "İyi performans için Iris'e Sodium gerek, ancak uyumsuz bir sürüm bulundu. Lütfen Sodium'un uygun sürümünü indir, modlar klasörüne yerleştir, uyumsuz sürümü kaldır ve oyunu yeniden başlat.", - - "options.iris.apply": "Uygula", - "options.iris.refresh": "Yenile", - "options.iris.openShaderPackFolder": "Shader Paket Klasörünü Aç...", - "options.iris.shaderPackSettings": "Shader Paket Ayarları...", - "options.iris.shaderPackList": "Shader Paket Listesi...", - "options.iris.refreshShaderPacks": "Shader Paketlerini Yenile", - "options.iris.shaderPackSelection": "Shader Paketleri...", - "options.iris.shaderPackSelection.title": "Shader Paketleri", - "options.iris.shaderPackSelection.addedPack": "Shader Paketi Eklendi: \"%s\"", - "options.iris.shaderPackSelection.addedPacks": "%s Shader Paketi Eklendi", - "options.iris.shaderPackSelection.failedAdd": "Dosyalar geçerli Shader Paketi değildi", - "options.iris.shaderPackSelection.failedAddSingle": "\"%s\" geçerli bir Shader Paketi değil", - "options.iris.shaderPackSelection.copyError": "Shader Paketi \"%s\" eklenilemedi", - "options.iris.shaderPackSelection.copyErrorAlreadyExists": "\"%s\" zaten senin Shader Paket klasöründe!", - "options.iris.shaderPackOptions.tooManyFiles": "Birden fazla Shader Ayar dosyaları içeriye aktarılamaz!", - "options.iris.shaderPackOptions.failedImport": "\"%s\" Shader Ayar dosyasının içeriye aktarımı başarısız", - "options.iris.shaderPackOptions.importedSettings": "\"%s\"'den Shader Ayarları içeriye aktarıldı", - "options.iris.shaders.disabled": "Shaderlar: Devre Dışı", - "options.iris.shaders.enabled": "Shaderlar: Etkin", - "options.iris.shaders.nonePresent": "Shaderlar: Hiç Paket Yok", - "options.iris.back": "Geri", - "options.iris.reset": "Sıfırla", - "options.iris.reset.tooltip": "TÜM tercihleri sıfırla ve uygula?", - "options.iris.reset.tooltip.holdShift": "SHIFT'e basılı tut ve sıfırlamak için tıkla", - "options.iris.importSettings.tooltip": "Dosyadan ayarları içe aktar", - "options.iris.exportSettings.tooltip": "Dosyaya uygulanan ayarları dışa aktar", - "options.iris.setToDefault": "Tercihi varsayılan değere ayarla?", - "options.iris.profile": "Profil", - "options.iris.profile.custom": "Özel", - "options.iris.shadowDistance": "Mak. Gölge Uzaklığı", - "options.iris.shadowDistance.enabled": "Gölgeler için maksimum ucaklığı değiştirmeye yarar. Bu uzaklığın ötesindeki araziye ve varlıklara gölge uygulanmaz. Gölge uzaklığını azaltmak, performansı önemli ölçüde arttırabilir.", - "options.iris.shadowDistance.disabled": "Mevcut shader paketiniz, zaten gölgeler için ayarlı bir görüntüleme uzaklığına sahip; bunu değiştiremezsin.", - - "pack.iris.select.title": "Seç", - "pack.iris.configure.title": "Ayarla", - "pack.iris.list.label": "+ Eklemek için Shader Paketlerini Sürükle ve Bırak", - - "label.iris.true": "Açık", - "label.iris.false": "Kapalı" -} diff --git a/common/src/main/resources/assets/iris/lang/uk_ua.json b/common/src/main/resources/assets/iris/lang/uk_ua.json deleted file mode 100644 index 3878c1931..000000000 --- a/common/src/main/resources/assets/iris/lang/uk_ua.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "iris.shaders.reloaded": "Шейдери перезавантажено!", - "iris.shaders.disabled": "Шейдери вимкнено!", - "iris.shaders.toggled": "Шейдери перемкнуто на %s!", - "iris.shaders.debug.enabled": "Налагодження ввімкнено, журнал налагодження буде більш докладним!", - "iris.shaders.debug.disabled": "Налагодження вимкнено.", - "iris.shaders.debug.failure": "Не вдається ввімкнути налагодження, ваш комп'ютер не підтримує функції налагодження.", - "iris.shaders.debug.restart": "У вас немає контексту налагодження. Будь ласка, перезапустіть, щоб увімкнути налагодження.", - "iris.keybind.reload": "Перезавантажити шейдери", - "iris.keybind.shaderPackSelection": "Екран вибору пакету шейдерів", - "iris.keybind.toggleShaders": "Перемкнути шейдери", - "iris.keybinds": "Iris", - "iris.shaders.reloaded.failure": "Не вдалося перезавантажити шейдери! Причина: %s", - "iris.shaders.toggled.failure": "Не вдалося перемкнути шейдери! Причина: %s", - "iris.sodium.failure.title": "Iris не вдалося завантажити!", - "iris.sodium.failure.download": "Завантажити Sodium", - "iris.sodium.failure.reason.notFound": "Для гарної роботи Iris потрібен Sodium, але Sodium не встановлено. Будь ласка, завантажте Sodium, помістіть його в папку mods і повторно запустіть гру.", - "iris.sodium.failure.reason.incompatible": "Для гарної роботи Iris потрібен Sodium, але була знайдена несумісна версія. Будь ласка, завантажте правильну версію Sodium, помістіть її в папку mods, видаліть неправильну версію та перезапустіть гру.", - "iris.nec.failure.title": "[%s] Not Enough Crashes виявлено!", - "iris.nec.failure.description": "Not Enough Crashes може серйозно поламати гру під час обробки збоїв, та не дає точних результатів.\nХорошими альтернативами є MixinTrace і Crafty Crashes, які можуть надійніше визначити причину збою та не переводять гру в недійсний стан.", - "iris.unsupported.irisorpc": "Iris або твій ПК", - "iris.unsupported.iris": "Iris", - "iris.unsupported.pc": "твій ПК", - "iris.unsupported.pack": "Пакет шейдерів несумісний!", - "iris.unsupported.pack.description": "Пакет шейдерів, який ви намагаєтеся завантажити, містить функції, які не підтримує %s. Будь ласка, спробуйте інший пакет. Список %s", - "options.iris.apply": "Застосувати", - "options.iris.refresh": "Оновити", - "options.iris.openShaderPackFolder": "Відкрити папку пакетів шейдерів...", - "options.iris.shaderPackSettings": "Налаштування пакету шейдерів...", - "options.iris.shaderPackList": "Список пакетів шейдерів...", - "options.iris.refreshShaderPacks": "Оновити пакети шейдерів", - "options.iris.shaderPackSelection": "Пакети шейдерів...", - "options.iris.shaderPackSelection.title": "Пакети шейдерів", - "options.iris.shaderPackSelection.addedPack": "Додано пакет шейдерів \"%s\"", - "options.iris.shaderPackSelection.addedPacks": "Додано пакетів шейдерів: %s", - "options.iris.shaderPackSelection.failedAdd": "Файли не були дійсними пакетами шейдерів", - "options.iris.shaderPackSelection.failedAddSingle": "\"%s\" не є дійсним пакетом шейдерів", - "options.iris.shaderPackSelection.copyError": "Не вдалося додати пакет шейдерів \"%s\"", - "options.iris.shaderPackSelection.copyErrorAlreadyExists": "\"%s\" уже у вашій папці пакетів шейдерів!", - "options.iris.shaderPackOptions.tooManyFiles": "Не вдається імпортувати декілька файлів налаштувань шейдерів!", - "options.iris.shaderPackOptions.failedImport": "Не вдалося імпортувати файл налаштувань шейдера \"%s\"", - "options.iris.shaderPackOptions.importedSettings": "Імпортовано налаштування шейдерів із \"%s\"", - "options.iris.shaders.disabled": "Шейдери: Вимкнено", - "options.iris.shaders.enabled": "Шейдери: Увімкнено", - "options.iris.shaders.nonePresent": "Шейдери: Немає пакетів", - "options.iris.back": "Назад", - "options.iris.reset": "Скинути", - "options.iris.reset.tooltip": "Скинути ВСІ параметри та застосувати?", - "options.iris.reset.tooltip.holdShift": "Утримуйте SHIFT і клацніть, щоб скинути", - "options.iris.importSettings.tooltip": "Імпортувати налаштування з файлу", - "options.iris.exportSettings.tooltip": "Експортувати налаштування у файл", - "options.iris.mustDisableFullscreen": "Будь ласка, спершу вимкніть повноекранний режим!", - "options.iris.setToDefault": "Установити значення за замовчуванням?", - "options.iris.profile": "Профіль", - "options.iris.profile.custom": "Користувацький", - "options.iris.shadowDistance": "Макс. відстань тіней", - "options.iris.shadowDistance.enabled": "Дозволяє змінювати максимальну відстань для тіней. Місцевість та сутності за межами цієї відстані не відкидають тіні. Зменшення відстані тіней може значно підвищити продуктивність.", - "options.iris.shadowDistance.disabled": "Ваш поточний пакет шейдерів уже встановив відстань візуалізації для тіней; ви не можете змінити це.", - "options.iris.gui.hide": "Приховати інтерфейс", - "options.iris.gui.show": "Показати інтерфейс", - - "pack.iris.select.title": "Виберіть шейдери", - "pack.iris.configure.title": "Налаштувати", - "pack.iris.list.label": "+ Перетягніть пакети шейдерів, щоб додати", - - "label.iris.true": "Увімк", - "label.iris.false": "Вимк" -} diff --git a/common/src/main/resources/assets/iris/lang/zh_cn.json b/common/src/main/resources/assets/iris/lang/zh_cn.json deleted file mode 100644 index 29b986bdb..000000000 --- a/common/src/main/resources/assets/iris/lang/zh_cn.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "iris.shaders.reloaded": "已重新加载光影包!", - "iris.shaders.disabled": "光影包已禁用!", - "iris.shaders.toggled": "光影包已切换到 %s!", - "iris.shaders.debug.enabled": "调试已启用,日志将更加详细!", - "iris.shaders.debug.disabled": "调试已禁用。", - "iris.shaders.debug.failure": "无法启用调试,你的电脑不支持调试功能。", - "iris.shaders.debug.restart": "请重启以启用调试。", - "iris.keybind.reload": "重新加载光影包", - "iris.keybind.shaderPackSelection": "光影包选择界面", - "iris.keybind.toggleShaders": "启用/禁用光影", - "iris.keybinds": "Iris", - "iris.shaders.reloaded.failure": "重新加载光影包失败!原因:%s", - "iris.shaders.toggled.failure": "切换光影包失败!原因:%s", - "iris.sodium.failure.title": "Iris 加载失败!", - "iris.sodium.failure.download": "下载 Sodium", - "iris.sodium.failure.reason.notFound": "Iris 需要 Sodium 来提供更好的性能,但你并没有安装 Sodium。请下载 Sodium,把它放到 mods 文件夹中,并重新启动游戏。", - "iris.sodium.failure.reason.incompatible": "Iris 需要 Sodium 来提供更好的性能,但不兼容已安装的 Sodium 版本。请下载正确的 Sodium 版本,把它放到 mods 文件夹中,移除错误的 Sodium 版本,并重新启动游戏。", - "iris.nec.failure.title": "[%s] 检测到Not Enough Crashes!", - "iris.nec.failure.description": "在处理崩溃时,Not Enough Crashes会严重破坏游戏,而且无法提供准确的结果。\n好的替代品有 MixinTrace 和 Crafty Crashes,它们都可以更准确地识别崩溃原因并且不会使游戏处于无效状态。", - "iris.unsupported.irisorpc": "Iris或你的电脑", - "iris.unsupported.iris": "Iris", - "iris.unsupported.pc": "你的电脑", - "iris.unsupported.pack": "光影包不兼容!", - "iris.unsupported.pack.description": "你尝试加载的光影包含%s不支持的功能。请尝试其他光影。名单:%s", - "options.iris.apply": "应用", - "options.iris.refresh": "刷新", - "options.iris.openShaderPackFolder": "打开光影包文件夹...", - "options.iris.shaderPackSettings": "光影包设置...", - "options.iris.shaderPackList": "光影包列表...", - "options.iris.refreshShaderPacks": "刷新光影包", - "options.iris.shaderPackSelection": "光影包...", - "options.iris.shaderPackSelection.title": "光影包", - "options.iris.shaderPackSelection.addedPack": "已添加光影包 \"%s\"", - "options.iris.shaderPackSelection.addedPacks": "已添加 %s 个光影包", - "options.iris.shaderPackSelection.failedAdd": "文件不是有效的光影包", - "options.iris.shaderPackSelection.failedAddSingle": "\"%s\" 不是有效的光影包", - "options.iris.shaderPackSelection.copyError": "无法添加光影包 \"%s\"", - "options.iris.shaderPackSelection.copyErrorAlreadyExists": "\"%s\" 已存在于光影包文件夹中!", - "options.iris.shaderPackOptions.tooManyFiles": "无法导入多个光影设置文件!", - "options.iris.shaderPackOptions.failedImport": "导入光影设置文件 \"%s\" 失败", - "options.iris.shaderPackOptions.importedSettings": "已从 \"%s\" 导入光影设置", - "options.iris.shaders.disabled": "光影:已禁用", - "options.iris.shaders.enabled": "光影:已启用", - "options.iris.shaders.nonePresent": "光影:无光影包", - "options.iris.back": "返回", - "options.iris.reset": "重置", - "options.iris.reset.tooltip": "重置所有选项并应用?", - "options.iris.reset.tooltip.holdShift": "按住 SHIFT 点击以重置", - "options.iris.importSettings.tooltip": "从文件导入设置", - "options.iris.exportSettings.tooltip": "将应用的设置导出至文件", - "options.iris.mustDisableFullscreen": "请先禁用全屏!", - "options.iris.setToDefault": "把选项设为默认值?", - "options.iris.profile": "配置文件", - "options.iris.profile.custom": "自定义", - "options.iris.shadowDistance": "最大阴影距离", - "options.iris.shadowDistance.enabled": "允许更改阴影的最远距离。超出此距离的地形和实体不会投射阴影。降低阴影距离可以显著提高性能。", - "options.iris.shadowDistance.disabled": "你不能改变当前的光影包已经为阴影设置的渲染距离。", - "options.iris.gui.hide": "隐藏GUI", - "options.iris.gui.show": "显示GUI", - - "pack.iris.select.title": "选择", - "pack.iris.configure.title": "配置", - "pack.iris.list.label": "+ 拖放光影包至此以添加", - - "label.iris.true": "开", - "label.iris.false": "关" -} diff --git a/common/src/main/resources/assets/iris/lang/zh_tw.json b/common/src/main/resources/assets/iris/lang/zh_tw.json deleted file mode 100644 index 91e415ab2..000000000 --- a/common/src/main/resources/assets/iris/lang/zh_tw.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "iris.shaders.reloaded": "已重新載入光影!", - "iris.shaders.disabled": "已停用光影!", - "iris.shaders.toggled": "使用光影:%s!", - "iris.shaders.debug.enabled": "已啟用偵錯,將進行詳細記錄!", - "iris.shaders.debug.disabled": "已停用偵錯。", - "iris.shaders.debug.failure": "無法啟用偵錯,您的電腦不支援偵錯功能。", - "iris.shaders.debug.restart": "您沒有偵錯內容,請重新啟動後啟用偵錯。", - "iris.keybind.reload": "重新載入光影", - "iris.keybind.shaderPackSelection": "光影包選擇畫面", - "iris.keybind.toggleShaders": "光影開關", - "iris.keybinds": "Iris", - "iris.shaders.reloaded.failure": "無法重新載入光影!原因:%s", - "iris.shaders.toggled.failure": "無法使用光影!原因:%s", - "iris.sodium.failure.title": "無法載入 Iris!", - "iris.sodium.failure.download": "下載 Sodium", - "iris.sodium.failure.reason.notFound": "為了讓 Iris 有良好的效能表現,您需要安裝 Sodium。請先下載它、將它存放於模組資料夾後重新啟動遊戲。", - "iris.sodium.failure.reason.incompatible": "為了讓 Iris 有良好的效能表現,您需要安裝版本相容的 Sodium。請先下載正確的版本、將它存放於模組資料夾、移除不正確的版本後重新啟動遊戲。", - "iris.nec.failure.title": "%s:已偵測到「Not Enough Crashes」!", - "iris.nec.failure.description": "「Not Enough Crashes」可能會在處理崩潰問題時,對遊戲造成嚴重破壞,並且無法提供精確結果。\n建議使用「MixinTrace」和「Crafty Crashes」替代,他們在辨識崩潰原因上更可靠,並且不會讓遊戲處於無效狀態。", - "iris.unsupported.irisorpc": "Iris 或您的電腦", - "iris.unsupported.iris": "Iris", - "iris.unsupported.pc": "您的電腦", - "iris.unsupported.pack": "光影包不相容!", - "iris.unsupported.pack.description": "您嘗試載入的光影包包含 %s 不支援的功能。請嘗試載入其他光影包。列出 %s", - "options.iris.apply": "套用", - "options.iris.refresh": "重新整理", - "options.iris.openShaderPackFolder": "開啟光影包資料夾……", - "options.iris.shaderPackSettings": "光影包設定……", - "options.iris.shaderPackList": "光影包清單……", - "options.iris.refreshShaderPacks": "重新整理", - "options.iris.shaderPackSelection": "光影包……", - "options.iris.shaderPackSelection.title": "光影包", - "options.iris.shaderPackSelection.addedPack": "已新增 \"%s\" 光影包", - "options.iris.shaderPackSelection.addedPacks": "已新增 %s 個光影包", - "options.iris.shaderPackSelection.failedAdd": "檔案並非有效的光影包", - "options.iris.shaderPackSelection.failedAddSingle": "\"%s\" 不是有效的光影包", - "options.iris.shaderPackSelection.copyError": "無法新增 \"%s\" 光影包", - "options.iris.shaderPackSelection.copyErrorAlreadyExists": "\"%s\" 已存在於光影包資料夾中!", - "options.iris.shaderPackOptions.tooManyFiles": "無法一次匯入多個光影設定!", - "options.iris.shaderPackOptions.failedImport": "無法自檔案 \"%s\" 匯入光影設定", - "options.iris.shaderPackOptions.importedSettings": "已自檔案 \"%s\" 匯入光影設定", - "options.iris.shaders.disabled": "光影:已停用", - "options.iris.shaders.enabled": "光影:已啟用", - "options.iris.shaders.nonePresent": "光影:沒有光影包", - "options.iris.back": "返回", - "options.iris.reset": "重設", - "options.iris.reset.tooltip": "是否重設「全部」選項並套用?", - "options.iris.reset.tooltip.holdShift": "按住 SHIFT 後點擊以重設", - "options.iris.importSettings.tooltip": "從檔案匯入設定", - "options.iris.exportSettings.tooltip": "匯出設定至檔案", - "options.iris.mustDisableFullscreen": "請先結束全螢幕模式!", - "options.iris.setToDefault": "將選項設為預設?", - "options.iris.profile": "設定檔", - "options.iris.profile.custom": "自訂", - "options.iris.shadowDistance": "最大陰影距離", - "options.iris.shadowDistance.enabled": "能讓您變更陰影的最大距離。超出此距離的地形和實體將不會有陰影。調低陰影距離能顯著提升效能。", - "options.iris.shadowDistance.disabled": "您無法變更目前光影包所設定的陰影顯示距離。", - "options.iris.gui.hide": "隱藏 GUI", - "options.iris.gui.show": "顯示 GUI", - - "pack.iris.select.title": "選擇", - "pack.iris.configure.title": "設定", - "pack.iris.list.label": "+ 將欲新增的光影包拖曳至此", - - "label.iris.true": "開啟", - "label.iris.false": "關閉" -} diff --git a/common/src/main/resources/assets/iris/textures/gui/widgets.png b/common/src/main/resources/assets/iris/textures/gui/widgets.png deleted file mode 100644 index d4a74a0e00bbf824bcf12a9a98dee8589474123f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3587 zcmb_ec{H2r)_)W8oVJvrXs;^TYbteUqozhe4K;+4;#5&%OOqO7YE>0gN>xj!IgP0_ zJ!VnGQA1ioh=@399#4)Trf}n1>s#yl^M2>vcdh-t`&rL^_Wtehc@u4{%tQpG1pxpM zLBLII0RY5dK>$B5=Yt9^^WrSxeN0Sj5GE!H4}$M|`S^PRfN~l(4GM3!5s$aFE4Eb? zeFRx}`Ck7PL?S2yc`+`20C{h?ZMr!6d(jz0P>?uENc7+$@-!+3gLxpq-6jvw)jfY* zQia)4^!;q7P%0~E0-C^D<$8il!Fw?j^L<~ZAv!xEe{~RUI{Sn_lHWMv4ZgG{NiUQ# z0>#+UJ3?QFF!FTD#4UNZO{c<2WKJ@9nad@`4=2ux);=$S4c$GjpkoB@z3e%nP>gX@jhpX(I+~;uNRPg> zj&tp8@@7!8+3&J*={akBPjkcOn!L%p{p&bZ4(qC>>PLzdJY944^Y%v`1D6gdk7O?u ziI2>+Ww)NBH}d$YtH7otywW2tskzlMJy~)9*9~JJwDf(7 z{4SNk)3J7xtCkP|=?qyKJ)M3xc_E1>_Qj~TqY`E3%2a0NH)oIJ#E=6izp86en2nmX zFF$J%p@(PrfeR|qyJSrHMvJ;WvLT(-XXoj*OvzW@s=rSO>sWK0_|;=3aPdB<8jT&+ z-(P0ktf#Wr!=tBEo1d?V$*Hwm3mqMUM%af_2ZE@N6A}SKF4Nq`W#6iA7qARlF2m)k z)W@Y3ph&*O(l?tM-9PrO*?&|yjaU<&8$?}`VUL!l%YvEB&p4`VAJ%<4I%;(pH z#i9J@Df=LU$*=hAHC#l~|%_DyL>KJY4}8GKS6pv#q6h3D~fN-YPYC`h@9RR=uAA7jM$R zFRb;XBmF)j!N1QZIDa1$5gLD*_#qwKG< z*=+qs%T6Nic=IR5Wl58h`Q=3O(m}0G<*Xi`EqbgbjN*K~u)tomI5AORW<4w=Il0`w z2Q;oN2^>#+@(S27Dv9hvKnWJcFZQXe6%N;X80GVo-{zW5$h)gv7f?2Hf zCN~(jx3{Mk^}W+=^hmvSP#350eR{e`Fy6T19*DFk3GX08t7X}pO?#;c^Csgkxd*t2 z)gSZoWr{xj{=Fiby7wo_yW}EnB$^uI?alG_AB>{GF*AaSDtY7!Y4AEg0Wn9;8)35; zRqyi-U1Xv{tQwd&7;dKoW@e_Nt*wZtY$8%DrNK^DzzD%O!$ec&d(u5+29=5*R8PJ4 zbFgqX@3Z-sDq?Iq>tsMg@%5#VDo3fOY7YRX2ozbTv#h@UR`v}T#|3FAsqdw~NwoU; z_}sLxuwb@h2S}utrwIw0{a4ns3;FyI~ykr+g( zDj_ZH*pWI$3)Woem2Y66mmJ{qc>J+pt^9OiAXjBbpxq;P!vRUZFQSnx)EN;-_*AYN8LLbaZrl!o$O7oQ3jBP(U?BHT#BYt`#R=^Q2g= zRZyO?RMWV|f9um0L;5{!=vuFv7TlQjj~ zZOGRSo6@`QcG%`=!tnOrpa_2V0D+<@u#)uXn z<3S1KL{B}?&&?z0#Q;Bt`!0mwy{OvqU0^7oM?k7|YITh0*LI>%YjAK-FfRY%`N`$o z0)?01n;m*);B^jkgJeb8;9#LemRkMZU!l0xvVWA=s&M8D!A3dboLCB~Iea)pcJ{+s z#9D5;;^tcD9hJ?G!u&&tE#*oH-X@;`48@4{u74PU~&pEIxWOmX)K4w>$gH>ct@)93Jpxwp@ zl5vjv)(vcPK!sMqmSZyaha;Thp3pJo2%Ua=OYbe$v(>?N4NjA03@m(V{N_j#ZL-0x zoj)Ev%{JKlOk5nNm${J z5O;hiSuUDa;rQvKD45A!cX#*mGkbTIYK;^g-fIn~Ip2nqA?0JnE(ifP`EGxcHADvz zJuL9*;ZE}dvPX_e0tM8A)z#G+LdaL=rCFeW5Vn7KBBvSs+t98WZ){7nO5utmd7f>i z?fbtv#>G@76$uqsk8y9JOnHQ`YP6t&7D3(qq#6Uf`hlOcbobi2`U`b z_fet$?2WM?xf{ k;#aMI@89IVAe9d~5W~su@HulmxpAZpaox(a(%3!jU+08jAOHXW diff --git a/common/src/shaders/java/net/coderbot/iris/Iris.java b/common/src/shaders/java/net/coderbot/iris/Iris.java index fb098c2b7..6860b4d42 100644 --- a/common/src/shaders/java/net/coderbot/iris/Iris.java +++ b/common/src/shaders/java/net/coderbot/iris/Iris.java @@ -1,8 +1,6 @@ package net.coderbot.iris; import com.google.common.base.Throwables; -import com.mojang.blaze3d.platform.GlDebug; -import com.mojang.blaze3d.platform.InputConstants; import net.coderbot.iris.compat.sodium.SodiumVersionCheck; import net.coderbot.iris.config.IrisConfig; import net.coderbot.iris.gl.GLDebug; @@ -22,18 +20,20 @@ import net.coderbot.iris.shaderpack.option.values.MutableOptionValues; import net.coderbot.iris.shaderpack.option.values.OptionValues; import net.coderbot.iris.texture.pbr.PBRTextureManager; -import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper; import net.fabricmc.loader.api.FabricLoader; import net.fabricmc.loader.api.ModContainer; import net.fabricmc.loader.api.Version; -import net.minecraft.Formatting; -import net.minecraft.client.KeyMapping; -import net.minecraft.client.Minecraft; -import net.minecraft.client.multiplayer.ClientLevel; -import net.minecraft.network.chat.TranslatableText; -import net.minecraft.world.level.dimension.DimensionType; +import net.legacyfabric.fabric.api.client.keybinding.v1.KeyBindingHelper; +import net.minecraft.client.MinecraftClient; +import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.world.ClientWorld; +import net.minecraft.text.TranslatableText; +import net.minecraft.util.Formatting; +import net.minecraft.world.dimension.TheEndDimension; +import net.minecraft.world.dimension.TheNetherDimension; import org.jetbrains.annotations.NotNull; import org.lwjgl.glfw.GLFW; +import org.lwjgl.input.Keyboard; import java.io.IOException; import java.io.InputStream; @@ -54,14 +54,14 @@ import java.util.zip.ZipException; public class Iris { - public static final String MODID = "iris"; + public static final String MODID = "radium"; /** * The user-facing name of the mod. Moved into a constant to facilitate * easy branding changes (for forks). You'll still need to change this * separately in mixin plugin classes & the language files. */ - public static final String MODNAME = "Iris"; + public static final String MODNAME = "RadiumShaders"; public static final IrisLogging logger = new IrisLogging(MODNAME); @@ -78,9 +78,9 @@ public class Iris { private static PipelineManager pipelineManager; private static IrisConfig irisConfig; private static FileSystem zipFileSystem; - private static KeyMapping reloadKeybind; - private static KeyMapping toggleShadersKeybind; - private static KeyMapping shaderpackScreenKeybind; + private static KeyBinding reloadKeybind; + private static KeyBinding toggleShadersKeybind; + private static KeyBinding shaderpackScreenKeybind; private static final Map shaderPackOptionQueue = new HashMap<>(); // Flag variable used when reloading @@ -129,16 +129,16 @@ public void onEarlyInitialize() { this.updateChecker.checkForUpdates(irisConfig); - reloadKeybind = KeyBindingHelper.registerKeyBinding(new KeyMapping("iris.keybind.reload", InputConstants.Type.KEYSYM, GLFW.GLFW_KEY_R, "iris.keybinds")); - toggleShadersKeybind = KeyBindingHelper.registerKeyBinding(new KeyMapping("iris.keybind.toggleShaders", InputConstants.Type.KEYSYM, GLFW.GLFW_KEY_K, "iris.keybinds")); - shaderpackScreenKeybind = KeyBindingHelper.registerKeyBinding(new KeyMapping("iris.keybind.shaderPackSelection", InputConstants.Type.KEYSYM, GLFW.GLFW_KEY_O, "iris.keybinds")); + reloadKeybind = KeyBindingHelper.registerKeyBinding(new KeyBinding("iris.keybind.reload", Keyboard.KEY_R, "iris.keybinds")); + toggleShadersKeybind = KeyBindingHelper.registerKeyBinding(new KeyBinding("iris.keybind.toggleShaders", Keyboard.KEY_K, "iris.keybinds")); + shaderpackScreenKeybind = KeyBindingHelper.registerKeyBinding(new KeyBinding("iris.keybind.shaderPackSelection", Keyboard.KEY_O, "iris.keybinds")); - setupCommands(Minecraft.getInstance()); + setupCommands(MinecraftClient.getInstance()); initialized = true; } - private void setupCommands(Minecraft instance) { + private void setupCommands(MinecraftClient instance) { // TODO: Add back commands when Fabric Maven stops dying /*ClientCommandManager.DISPATCHER.register(ClientCommandManager.literal("iris").then(ClientCommandManager.literal("debug").then( ClientCommandManager.argument("enabled", BoolArgumentType.bool()).executes(context -> { @@ -207,46 +207,13 @@ public static void onLoadingComplete() { Iris.getPipelineManager().preparePipeline(DimensionId.OVERWORLD); } - public static void handleKeybinds(Minecraft minecraft) { - if (reloadKeybind.consumeClick()) { - try { - reload(); - - if (minecraft.player != null) { - minecraft.player.displayClientMessage(new TranslatableText("iris.shaders.reloaded"), false); - } - - } catch (Exception e) { - logger.error("Error while reloading Shaders for Iris!", e); - - if (minecraft.player != null) { - minecraft.player.displayClientMessage(new TranslatableText("iris.shaders.reloaded.failure", Throwables.getRootCause(e).getMessage()).withStyle(Formatting.RED), false); - } - } - } else if (toggleShadersKeybind.consumeClick()) { - try { - toggleShaders(minecraft, !irisConfig.areShadersEnabled()); - } catch (Exception e) { - logger.error("Error while toggling shaders!", e); - - if (minecraft.player != null) { - minecraft.player.displayClientMessage(new TranslatableText("iris.shaders.toggled.failure", Throwables.getRootCause(e).getMessage()).withStyle(Formatting.RED), false); - } - setShadersDisabled(); - fallback = true; - } - } else if (shaderpackScreenKeybind.consumeClick()) { - minecraft.setScreen(new ShaderPackScreen(null)); - } - } - - public static void toggleShaders(Minecraft minecraft, boolean enabled) throws IOException { + public static void toggleShaders(MinecraftClient minecraft, boolean enabled) throws IOException { irisConfig.setShadersEnabled(enabled); irisConfig.save(); reload(); if (minecraft.player != null) { - minecraft.player.displayClientMessage(enabled ? new TranslatableText("iris.shaders.toggled", currentPackName) : new TranslatableText("iris.shaders.disabled"), false); + minecraft.player.sendMessage(enabled ? new TranslatableText("iris.shaders.toggled", currentPackName) : new TranslatableText("iris.shaders.disabled")); } } @@ -420,17 +387,9 @@ private static void setDebug(boolean enable) { if (enable) { success = GLDebug.setupDebugMessageCallback(); } else { - GlDebug.enableDebugCallback(Minecraft.getInstance().options.glDebugVerbosity, false); success = 1; } - logger.info("Debug functionality is " + (enable ? "enabled, logging will be more verbose!" : "disabled.")); - if (Minecraft.getInstance().player != null) { - Minecraft.getInstance().player.displayClientMessage(new TranslatableText(success != 0 ? (enable ? "iris.shaders.debug.enabled" : "iris.shaders.debug.disabled") : "iris.shaders.debug.failure"), false); - if (success == 2) { - Minecraft.getInstance().player.displayClientMessage(new TranslatableText("iris.shaders.debug.restart"), false); - } - } try { irisConfig.setDebugEnabled(enable); @@ -576,7 +535,7 @@ public static void reload() throws IOException { // Very important - we need to re-create the pipeline straight away. // https://github.com/IrisShaders/Iris/issues/1330 - if (Minecraft.getInstance().level != null) { + if (MinecraftClient.getInstance().world != null) { Iris.getPipelineManager().preparePipeline(Iris.getCurrentDimension()); } } @@ -607,12 +566,12 @@ private static void destroyEverything() { public static DimensionId lastDimension = null; public static DimensionId getCurrentDimension() { - ClientLevel level = Minecraft.getInstance().level; + ClientWorld level = MinecraftClient.getInstance().world; if (level != null) { - if (level.dimensionType().effectsLocation().equals(DimensionType.END_EFFECTS) || level.dimension().equals(net.minecraft.world.level.Level.END)) { + if (level.dimension instanceof TheEndDimension) { return DimensionId.END; - } else if (level.dimensionType().effectsLocation().equals(DimensionType.NETHER_EFFECTS) || level.dimension().equals(net.minecraft.world.level.Level.NETHER)) { + } else if (level.dimension instanceof TheNetherDimension) { return DimensionId.NETHER; } else { return DimensionId.OVERWORLD; diff --git a/common/src/shaders/java/net/coderbot/iris/UpdateChecker.java b/common/src/shaders/java/net/coderbot/iris/UpdateChecker.java index 30e9c236e..2925d6c42 100644 --- a/common/src/shaders/java/net/coderbot/iris/UpdateChecker.java +++ b/common/src/shaders/java/net/coderbot/iris/UpdateChecker.java @@ -9,11 +9,6 @@ import net.fabricmc.loader.api.SemanticVersion; import net.fabricmc.loader.api.Version; import net.fabricmc.loader.api.VersionParsingException; -import net.minecraft.client.Minecraft; -import net.minecraft.network.chat.ClickEvent; -import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.MutableComponent; -import net.minecraft.network.chat.TextComponent; import org.apache.commons.io.FileUtils; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.time.DateUtils; @@ -129,30 +124,6 @@ public UpdateInfo getUpdateInfo() { return null; } - public Optional getUpdateMessage() { - if (shouldShowUpdateMessage) { - UpdateInfo info = getUpdateInfo(); - - if (info == null) { - return Optional.empty(); - } - - String languageCode = Minecraft.getInstance().options.languageCode.toLowerCase(Locale.ROOT); - String originalText = info.updateInfo.containsKey(languageCode) ? info.updateInfo.get(languageCode) : info.updateInfo.get("en_us"); - String[] textParts = originalText.split("\\{link}"); - if (textParts.length > 1) { - MutableComponent component1 = new TextComponent(textParts[0]); - MutableComponent component2 = new TextComponent(textParts[1]); - MutableComponent link = new TextComponent(usedIrisInstaller ? "the Iris Installer" : info.modHost).withStyle(arg -> arg.withClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, usedIrisInstaller ? info.installer : info.modDownload)).withUnderlined(true)); - return Optional.of(component1.append(link).append(component2)); - } else { - MutableComponent link = new TextComponent(usedIrisInstaller ? "the Iris Installer" : info.modHost).withStyle(arg -> arg.withClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, usedIrisInstaller ? info.installer : info.modDownload)).withUnderlined(true)); - return Optional.of(new TextComponent(textParts[0]).append(link)); - } - } else { - return Optional.empty(); - } - } public Optional getUpdateLink() { if (shouldShowUpdateMessage) { diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/IrisChunkShaderBindingPoints.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/IrisChunkShaderBindingPoints.java deleted file mode 100644 index 8adbc8dc8..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/IrisChunkShaderBindingPoints.java +++ /dev/null @@ -1,14 +0,0 @@ -package net.coderbot.iris.compat.sodium.impl; - -/** - * Defines Iris-specific chunk shader binding points. - * - * NB: Make sure this doesn't collide with anything in {@link me.jellysquid.mods.sodium.client.render.chunk.shader.ChunkShaderBindingPoints} - */ -public class IrisChunkShaderBindingPoints { - public static final ShaderBindingPoint NORMAL = new ShaderBindingPoint(5); - public static final ShaderBindingPoint TANGENT = new ShaderBindingPoint(6); - public static final ShaderBindingPoint MID_TEX_COORD = new ShaderBindingPoint(7); - public static final ShaderBindingPoint BLOCK_ID = new ShaderBindingPoint(8); - public static final ShaderBindingPoint MID_BLOCK = new ShaderBindingPoint(9); -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/block_context/BlockContextHolder.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/block_context/BlockContextHolder.java index 15b7ae1bd..5dd6d07d9 100644 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/block_context/BlockContextHolder.java +++ b/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/block_context/BlockContextHolder.java @@ -2,7 +2,7 @@ import it.unimi.dsi.fastutil.objects.Object2IntMap; import it.unimi.dsi.fastutil.objects.Object2IntMaps; -import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.block.BlockState; public class BlockContextHolder { private final Object2IntMap blockStateIds; diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/block_context/ChunkBuildBuffersExt.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/block_context/ChunkBuildBuffersExt.java index 19f5f578e..f17c8e471 100644 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/block_context/ChunkBuildBuffersExt.java +++ b/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/block_context/ChunkBuildBuffersExt.java @@ -1,6 +1,6 @@ package net.coderbot.iris.compat.sodium.impl.block_context; -import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.block.BlockState; public interface ChunkBuildBuffersExt { void iris$setLocalPos(int localPosX, int localPosY, int localPosZ); diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/options/IrisSodiumOptions.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/options/IrisSodiumOptions.java index 70086b45b..9d0f8d8b2 100644 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/options/IrisSodiumOptions.java +++ b/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/options/IrisSodiumOptions.java @@ -32,11 +32,9 @@ public static OptionImpl createMaxShadowDistanceSlider(Min }, options -> IrisVideoSettings.getOverriddenShadowDistance(IrisVideoSettings.shadowDistance)) .setImpact(OptionImpact.HIGH) - .setEnabled(() -> true) + .setEnabled(IrisVideoSettings::isShadowDistanceSliderEnabled) .build(); - ((OptionImplExtended) maxShadowDistanceSlider).iris$dynamicallyEnable(IrisVideoSettings::isShadowDistanceSliderEnabled); - return maxShadowDistanceSlider; } diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/options/OptionImplExtended.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/options/OptionImplExtended.java deleted file mode 100644 index 7685c4a11..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/options/OptionImplExtended.java +++ /dev/null @@ -1,7 +0,0 @@ -package net.coderbot.iris.compat.sodium.impl.options; - -import java.util.function.BooleanSupplier; - -public interface OptionImplExtended { - void iris$dynamicallyEnable(BooleanSupplier enabled); -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/shader_overrides/ChunkRenderBackendExt.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/shader_overrides/ChunkRenderBackendExt.java deleted file mode 100644 index 162f1e3ce..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/shader_overrides/ChunkRenderBackendExt.java +++ /dev/null @@ -1,8 +0,0 @@ -package net.coderbot.iris.compat.sodium.impl.shader_overrides; - -import com.mojang.blaze3d.vertex.PoseStack; -import me.jellysquid.mods.sodium.client.render.chunk.passes.BlockRenderPass; - -public interface ChunkRenderBackendExt { - void iris$begin(PoseStack poseStack, BlockRenderPass pass); -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/shader_overrides/IrisChunkProgram.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/shader_overrides/IrisChunkProgram.java deleted file mode 100644 index 5e303490c..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/shader_overrides/IrisChunkProgram.java +++ /dev/null @@ -1,100 +0,0 @@ -package net.coderbot.iris.compat.sodium.impl.shader_overrides; - -import java.nio.FloatBuffer; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.system.MemoryStack; - -import com.mojang.blaze3d.vertex.PoseStack; -import com.mojang.math.Matrix4f; - -import me.jellysquid.mods.sodium.client.gl.device.RenderDevice; -import me.jellysquid.mods.sodium.client.render.chunk.shader.ChunkProgram; -import me.jellysquid.mods.sodium.client.render.chunk.shader.ChunkShaderFogComponent; -import net.coderbot.iris.gl.IrisRenderSystem; -import net.coderbot.iris.gl.program.ProgramImages; -import net.coderbot.iris.gl.program.ProgramSamplers; -import net.coderbot.iris.gl.program.ProgramUniforms; -import net.minecraft.resources.ResourceLocation; - -public class IrisChunkProgram extends ChunkProgram { - // Uniform variable binding indexes - private final int uModelViewMatrix; - private final int uNormalMatrix; - - @Nullable - private final ProgramUniforms irisProgramUniforms; - - @Nullable - private final ProgramSamplers irisProgramSamplers; - - @Nullable - private final ProgramImages irisProgramImages; - - public IrisChunkProgram(RenderDevice owner, ResourceLocation name, int handle, - @Nullable ProgramUniforms irisProgramUniforms, @Nullable ProgramSamplers irisProgramSamplers, - @Nullable ProgramImages irisProgramImages) { - super(owner, name, handle, ChunkShaderFogComponent.None::new); - this.uModelViewMatrix = this.getUniformLocation("iris_ModelViewMatrix"); - this.uNormalMatrix = this.getUniformLocation("iris_NormalMatrix"); - this.irisProgramUniforms = irisProgramUniforms; - this.irisProgramSamplers = irisProgramSamplers; - this.irisProgramImages = irisProgramImages; - } - - public void setup(PoseStack poseStack, float modelScale, float textureScale) { - super.setup(poseStack, modelScale, textureScale); - - if (irisProgramUniforms != null) { - irisProgramUniforms.update(); - } - - if (irisProgramSamplers != null) { - irisProgramSamplers.update(); - } - - if (irisProgramImages != null) { - irisProgramImages.update(); - } - - Matrix4f modelViewMatrix = poseStack.last().pose(); - Matrix4f normalMatrix = poseStack.last().pose().copy(); - normalMatrix.invert(); - normalMatrix.transpose(); - - uniformMatrix(uModelViewMatrix, modelViewMatrix); - uniformMatrix(uNormalMatrix, normalMatrix); - } - - @Override - public int getUniformLocation(String name) { - // NB: We pass through calls involving u_ModelViewProjectionMatrix, u_ModelScale, and u_TextureScale, since - // currently patched Iris shader programs use those. - - if ("iris_BlockTex".equals(name) || "iris_LightTex".equals(name)) { - // Not relevant for Iris shader programs - return -1; - } - - try { - return super.getUniformLocation(name); - } catch (NullPointerException e) { - // Suppress getUniformLocation - return -1; - } - } - - private void uniformMatrix(int location, Matrix4f matrix) { - if (location == -1) { - return; - } - - try (MemoryStack memoryStack = MemoryStack.stackPush()) { - FloatBuffer buffer = memoryStack.mallocFloat(16); - - matrix.store(buffer); - - IrisRenderSystem.uniformMatrix4fv(location, false, buffer); - } - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/shader_overrides/IrisChunkProgramOverrides.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/shader_overrides/IrisChunkProgramOverrides.java deleted file mode 100644 index a33eef6e1..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/shader_overrides/IrisChunkProgramOverrides.java +++ /dev/null @@ -1,219 +0,0 @@ -package net.coderbot.iris.compat.sodium.impl.shader_overrides; - -import me.jellysquid.mods.sodium.client.gl.device.RenderDevice; -import me.jellysquid.mods.sodium.client.gl.shader.GlProgram; -import me.jellysquid.mods.sodium.client.gl.shader.GlShader; -import me.jellysquid.mods.sodium.client.gl.shader.ShaderConstants; -import me.jellysquid.mods.sodium.client.gl.shader.ShaderType; -import me.jellysquid.mods.sodium.client.render.chunk.passes.BlockRenderPass; -import me.jellysquid.mods.sodium.client.render.chunk.shader.ChunkProgram; -import me.jellysquid.mods.sodium.client.render.chunk.shader.ChunkShaderBindingPoints; -import net.coderbot.iris.Iris; -import net.coderbot.iris.compat.sodium.impl.IrisChunkShaderBindingPoints; -import net.coderbot.iris.gl.program.ProgramImages; -import net.coderbot.iris.gl.program.ProgramSamplers; -import net.coderbot.iris.gl.program.ProgramUniforms; -import net.coderbot.iris.pipeline.SodiumTerrainPipeline; -import net.coderbot.iris.pipeline.WorldRenderingPipeline; -import net.coderbot.iris.shadows.ShadowRenderingState; -import net.minecraft.resources.ResourceLocation; -import org.jetbrains.annotations.Nullable; - -import java.util.EnumMap; -import java.util.Locale; -import java.util.Optional; - -public class IrisChunkProgramOverrides { - private static final ShaderConstants EMPTY_CONSTANTS = ShaderConstants.builder().build(); - - private final EnumMap programs = new EnumMap<>(IrisTerrainPass.class); - - private int versionCounterForSodiumShaderReload = -1; - - private GlShader createVertexShader(RenderDevice device, IrisTerrainPass pass, SodiumTerrainPipeline pipeline) { - Optional irisVertexShader; - - if (pass == IrisTerrainPass.SHADOW) { - irisVertexShader = pipeline.getShadowVertexShaderSource(); - } else if (pass == IrisTerrainPass.GBUFFER_SOLID) { - irisVertexShader = pipeline.getTerrainVertexShaderSource(); - } else if (pass == IrisTerrainPass.GBUFFER_TRANSLUCENT) { - irisVertexShader = pipeline.getTranslucentVertexShaderSource(); - } else { - throw new IllegalArgumentException("Unknown pass type " + pass); - } - - String source = irisVertexShader.orElse(null); - - if (source == null) { - return null; - } - - return new GlShader(device, ShaderType.VERTEX, new ResourceLocation("iris", - "sodium-terrain-" + pass.toString().toLowerCase(Locale.ROOT) + ".vsh"), source, EMPTY_CONSTANTS); - } - - private GlShader createGeometryShader(RenderDevice device, IrisTerrainPass pass, SodiumTerrainPipeline pipeline) { - Optional irisGeometryShader; - - if (pass == IrisTerrainPass.SHADOW) { - irisGeometryShader = pipeline.getShadowGeometryShaderSource(); - } else if (pass == IrisTerrainPass.GBUFFER_SOLID) { - irisGeometryShader = pipeline.getTerrainGeometryShaderSource(); - } else if (pass == IrisTerrainPass.GBUFFER_TRANSLUCENT) { - irisGeometryShader = pipeline.getTranslucentGeometryShaderSource(); - } else { - throw new IllegalArgumentException("Unknown pass type " + pass); - } - - String source = irisGeometryShader.orElse(null); - - if (source == null) { - return null; - } - - return new GlShader(device, IrisShaderTypes.GEOMETRY, new ResourceLocation("iris", - "sodium-terrain-" + pass.toString().toLowerCase(Locale.ROOT) + ".gsh"), source, EMPTY_CONSTANTS); - } - - private GlShader createFragmentShader(RenderDevice device, IrisTerrainPass pass, SodiumTerrainPipeline pipeline) { - Optional irisFragmentShader; - - if (pass == IrisTerrainPass.SHADOW) { - irisFragmentShader = pipeline.getShadowFragmentShaderSource(); - } else if (pass == IrisTerrainPass.GBUFFER_SOLID) { - irisFragmentShader = pipeline.getTerrainFragmentShaderSource(); - } else if (pass == IrisTerrainPass.GBUFFER_TRANSLUCENT) { - irisFragmentShader = pipeline.getTranslucentFragmentShaderSource(); - } else { - throw new IllegalArgumentException("Unknown pass type " + pass); - } - - String source = irisFragmentShader.orElse(null); - - if (source == null) { - return null; - } - - return new GlShader(device, ShaderType.FRAGMENT, new ResourceLocation("iris", - "sodium-terrain-" + pass.toString().toLowerCase(Locale.ROOT) + ".fsh"), source, EMPTY_CONSTANTS); - } - - @Nullable - private ChunkProgram createShader(RenderDevice device, IrisTerrainPass pass, SodiumTerrainPipeline pipeline) { - GlShader vertShader = createVertexShader(device, pass, pipeline); - GlShader geomShader = createGeometryShader(device, pass, pipeline); - GlShader fragShader = createFragmentShader(device, pass, pipeline); - - if (vertShader == null || fragShader == null) { - if (vertShader != null) { - vertShader.delete(); - } - - if (geomShader != null) { - geomShader.delete(); - } - - if (fragShader != null) { - fragShader.delete(); - } - - // TODO: Partial shader programs? - return null; - } - - try { - GlProgram.Builder builder = GlProgram.builder(new ResourceLocation("sodium", "chunk_shader_for_" - + pass.getName())); - - if (geomShader != null) { - builder.attachShader(geomShader); - } - - return builder.attachShader(vertShader) - .attachShader(fragShader) - .bindAttribute("iris_Pos", ChunkShaderBindingPoints.POSITION) - .bindAttribute("iris_Color", ChunkShaderBindingPoints.COLOR) - .bindAttribute("iris_TexCoord", ChunkShaderBindingPoints.TEX_COORD) - .bindAttribute("iris_LightCoord", ChunkShaderBindingPoints.LIGHT_COORD) - .bindAttribute("iris_Normal", IrisChunkShaderBindingPoints.NORMAL) - .bindAttribute("at_tangent", IrisChunkShaderBindingPoints.TANGENT) - .bindAttribute("mc_midTexCoord", IrisChunkShaderBindingPoints.MID_TEX_COORD) - .bindAttribute("mc_Entity", IrisChunkShaderBindingPoints.BLOCK_ID) - .bindAttribute("at_midBlock", IrisChunkShaderBindingPoints.MID_BLOCK) - .bindAttribute("iris_ModelOffset", ChunkShaderBindingPoints.MODEL_OFFSET) - .build((program, name) -> { - ProgramUniforms uniforms = pipeline.initUniforms(name); - ProgramSamplers samplers; - ProgramImages images; - - if (pass == IrisTerrainPass.SHADOW) { - samplers = pipeline.initShadowSamplers(name); - images = pipeline.initShadowImages(name); - } else { - samplers = pipeline.initTerrainSamplers(name); - images = pipeline.initTerrainImages(name); - } - - return new IrisChunkProgram(device, program, name, uniforms, samplers, images); - }); - } finally { - vertShader.delete(); - if (geomShader != null) { - geomShader.delete(); - } - fragShader.delete(); - } - } - - public void createShaders(SodiumTerrainPipeline sodiumTerrainPipeline, RenderDevice device) { - if (sodiumTerrainPipeline != null) { - for (IrisTerrainPass pass : IrisTerrainPass.values()) { - if (pass == IrisTerrainPass.SHADOW && !sodiumTerrainPipeline.hasShadowPass()) { - this.programs.put(pass, null); - continue; - } - - this.programs.put(pass, createShader(device, pass, sodiumTerrainPipeline)); - } - } else { - this.programs.clear(); - } - } - - @Nullable - public ChunkProgram getProgramOverride(RenderDevice device, BlockRenderPass pass) { - WorldRenderingPipeline worldRenderingPipeline = Iris.getPipelineManager().getPipelineNullable(); - SodiumTerrainPipeline sodiumTerrainPipeline = null; - - if (worldRenderingPipeline != null) { - sodiumTerrainPipeline = worldRenderingPipeline.getSodiumTerrainPipeline(); - } - - if (versionCounterForSodiumShaderReload != Iris.getPipelineManager().getVersionCounterForSodiumShaderReload()) { - versionCounterForSodiumShaderReload = Iris.getPipelineManager().getVersionCounterForSodiumShaderReload(); - deleteShaders(); - createShaders(sodiumTerrainPipeline, device); - } - - if (ShadowRenderingState.areShadowsCurrentlyBeingRendered()) { - if (sodiumTerrainPipeline != null && !sodiumTerrainPipeline.hasShadowPass()) { - throw new IllegalStateException("Shadow program requested, but the pack does not have a shadow pass?"); - } - - return this.programs.get(IrisTerrainPass.SHADOW); - } else { - return this.programs.get(pass.isTranslucent() ? IrisTerrainPass.GBUFFER_TRANSLUCENT : IrisTerrainPass.GBUFFER_SOLID); - } - } - - public void deleteShaders() { - for (ChunkProgram program : this.programs.values()) { - if (program != null) { - program.delete(); - } - } - - this.programs.clear(); - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/shader_overrides/IrisShaderTypes.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/shader_overrides/IrisShaderTypes.java deleted file mode 100644 index ef30b9064..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/shader_overrides/IrisShaderTypes.java +++ /dev/null @@ -1,10 +0,0 @@ -package net.coderbot.iris.compat.sodium.impl.shader_overrides; - -import me.jellysquid.mods.sodium.client.gl.shader.ShaderType; - -/** - * Initialized by {@link net.coderbot.iris.compat.sodium.mixin.shader_overrides.MixinShaderType} - */ -public class IrisShaderTypes { - public static ShaderType GEOMETRY; -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/shader_overrides/IrisTerrainPass.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/shader_overrides/IrisTerrainPass.java deleted file mode 100644 index 6a790b3de..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/shader_overrides/IrisTerrainPass.java +++ /dev/null @@ -1,17 +0,0 @@ -package net.coderbot.iris.compat.sodium.impl.shader_overrides; - -public enum IrisTerrainPass { - SHADOW("shadow"), - GBUFFER_SOLID("gbuffers_terrain"), - GBUFFER_TRANSLUCENT("gbuffers_water"); - - private final String name; - - IrisTerrainPass(String name) { - this.name = name; - } - - public String getName() { - return name; - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/IrisChunkMeshAttributes.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/IrisChunkMeshAttributes.java deleted file mode 100644 index ef66ec472..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/IrisChunkMeshAttributes.java +++ /dev/null @@ -1,14 +0,0 @@ -package net.coderbot.iris.compat.sodium.impl.vertex_format; - -import me.jellysquid.mods.sodium.client.render.chunk.format.ChunkMeshAttribute; - -/** - * Initialized by {@link net.coderbot.iris.compat.sodium.mixin.vertex_format.MixinChunkMeshAttribute} - */ -public class IrisChunkMeshAttributes { - public static ChunkMeshAttribute NORMAL; - public static ChunkMeshAttribute TANGENT; - public static ChunkMeshAttribute MID_TEX_COORD; - public static ChunkMeshAttribute BLOCK_ID; - public static ChunkMeshAttribute MID_BLOCK; -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/IrisGlVertexAttributeFormat.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/IrisGlVertexAttributeFormat.java deleted file mode 100644 index cdb7028db..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/IrisGlVertexAttributeFormat.java +++ /dev/null @@ -1,11 +0,0 @@ -package net.coderbot.iris.compat.sodium.impl.vertex_format; - -import me.jellysquid.mods.sodium.client.gl.attribute.GlVertexAttributeFormat; -import net.coderbot.iris.compat.sodium.mixin.vertex_format.GlVertexAttributeFormatAccessor; -import org.lwjgl.opengl.GL20C; - -public class IrisGlVertexAttributeFormat { - public static final GlVertexAttributeFormat BYTE = - GlVertexAttributeFormatAccessor.createGlVertexAttributeFormat(GL20C.GL_BYTE, 1); - public static final GlVertexAttributeFormat SHORT = GlVertexAttributeFormatAccessor.createGlVertexAttributeFormat(GL20C.GL_SHORT, 2); -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/IrisModelVertexFormats.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/IrisModelVertexFormats.java deleted file mode 100644 index 82865452d..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/IrisModelVertexFormats.java +++ /dev/null @@ -1,7 +0,0 @@ -package net.coderbot.iris.compat.sodium.impl.vertex_format; - -import net.coderbot.iris.compat.sodium.impl.vertex_format.terrain_xhfp.XHFPModelVertexType; - -public class IrisModelVertexFormats { - public static final XHFPModelVertexType MODEL_VERTEX_XHFP = new XHFPModelVertexType(); -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/entity_xhfp/EntityVertexBufferWriterNio.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/entity_xhfp/EntityVertexBufferWriterNio.java deleted file mode 100644 index 7cdd6f09b..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/entity_xhfp/EntityVertexBufferWriterNio.java +++ /dev/null @@ -1,96 +0,0 @@ -package net.coderbot.iris.compat.sodium.impl.vertex_format.entity_xhfp; - -import me.jellysquid.mods.sodium.client.model.vertex.buffer.VertexBufferView; -import me.jellysquid.mods.sodium.client.model.vertex.buffer.VertexBufferWriterNio; -import me.jellysquid.mods.sodium.client.model.vertex.formats.glyph.GlyphVertexSink; -import me.jellysquid.mods.sodium.client.model.vertex.formats.quad.QuadVertexSink; -import me.jellysquid.mods.sodium.client.util.Norm3b; -import net.coderbot.iris.vendored.joml.Vector3f; -import net.coderbot.iris.vertices.IrisVertexFormats; -import net.coderbot.iris.vertices.NormalHelper; -import net.minecraft.client.renderer.texture.OverlayTexture; - -import java.nio.ByteBuffer; - -public class EntityVertexBufferWriterNio extends VertexBufferWriterNio implements QuadVertexSink, GlyphVertexSink { - private static final int STRIDE = IrisVertexFormats.ENTITY.getVertexSize(); - - private final QuadViewEntity.QuadViewEntityNio quad = new QuadViewEntity.QuadViewEntityNio(); - private final Vector3f saveNormal = new Vector3f(); - - private int vertexCount; - private float uSum; - private float vSum; - - public EntityVertexBufferWriterNio(VertexBufferView backingBuffer) { - super(backingBuffer, ExtendedQuadVertexType.INSTANCE); - } - - @Override - public void writeQuad(float x, float y, float z, int color, float u, float v, int light, int overlay, int normal) { - int i = this.writeOffset; - ByteBuffer buffer = this.byteBuffer; - - vertexCount++; - uSum += u; - vSum += v; - - buffer.putFloat(i, x); - buffer.putFloat(i + 4, y); - buffer.putFloat(i + 8, z); - buffer.putInt(i + 12, color); - buffer.putFloat(i + 16, u); - buffer.putFloat(i + 20, v); - buffer.putInt(i + 24, overlay); - buffer.putInt(i + 28, light); - - if (vertexCount == 4) { - this.endQuad(normal); - } - - this.advance(); - } - - @Override - public void writeGlyph(float x, float y, float z, int color, float u, float v, int light) { - writeQuad(x, y, z, color, u, v, light, OverlayTexture.NO_OVERLAY, 0); - } - - private void endQuad(int normal) { - this.vertexCount = 0; - - int i = this.writeOffset; - ByteBuffer buffer = this.byteBuffer; - - uSum *= 0.25; - vSum *= 0.25; - - quad.setup(buffer, i, STRIDE); - - float normalX, normalY, normalZ; - - if (normal == 0) { - NormalHelper.computeFaceNormal(saveNormal, quad); - normalX = saveNormal.x; - normalY = saveNormal.y; - normalZ = saveNormal.z; - normal = NormalHelper.packNormal(saveNormal, 0.0F); - } else { - normalX = Norm3b.unpackX(normal); - normalY = Norm3b.unpackY(normal); - normalZ = Norm3b.unpackZ(normal); - } - - int tangent = NormalHelper.computeTangent(normalX, normalY, normalZ, quad); - - for (int vertex = 0; vertex < 4; vertex++) { - buffer.putFloat(i + 36 - STRIDE * vertex, uSum); - buffer.putFloat(i + 40 - STRIDE * vertex, vSum); - buffer.putInt(i + 32 - STRIDE * vertex, normal); - buffer.putInt(i + 44 - STRIDE * vertex, tangent); - } - - uSum = 0; - vSum = 0; - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/entity_xhfp/EntityVertexBufferWriterUnsafe.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/entity_xhfp/EntityVertexBufferWriterUnsafe.java deleted file mode 100644 index 6e58e962f..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/entity_xhfp/EntityVertexBufferWriterUnsafe.java +++ /dev/null @@ -1,93 +0,0 @@ -package net.coderbot.iris.compat.sodium.impl.vertex_format.entity_xhfp; - -import me.jellysquid.mods.sodium.client.model.vertex.buffer.VertexBufferView; -import me.jellysquid.mods.sodium.client.model.vertex.buffer.VertexBufferWriterUnsafe; -import me.jellysquid.mods.sodium.client.model.vertex.formats.glyph.GlyphVertexSink; -import me.jellysquid.mods.sodium.client.model.vertex.formats.quad.QuadVertexSink; -import me.jellysquid.mods.sodium.client.util.Norm3b; -import net.coderbot.iris.vendored.joml.Vector3f; -import net.coderbot.iris.vertices.IrisVertexFormats; -import net.coderbot.iris.vertices.NormalHelper; -import net.minecraft.client.renderer.texture.OverlayTexture; -import org.lwjgl.system.MemoryUtil; - -public class EntityVertexBufferWriterUnsafe extends VertexBufferWriterUnsafe implements QuadVertexSink, GlyphVertexSink { - private static final int STRIDE = IrisVertexFormats.ENTITY.getVertexSize(); - - private final QuadViewEntity.QuadViewEntityUnsafe quad = new QuadViewEntity.QuadViewEntityUnsafe(); - private final Vector3f saveNormal = new Vector3f(); - - private int vertexCount; - private float uSum; - private float vSum; - - public EntityVertexBufferWriterUnsafe(VertexBufferView backingBuffer) { - super(backingBuffer, ExtendedQuadVertexType.INSTANCE); - } - - @Override - public void writeQuad(float x, float y, float z, int color, float u, float v, int light, int overlay, int normal) { - long i = this.writePointer; - - vertexCount++; - uSum += u; - vSum += v; - - MemoryUtil.memPutFloat(i, x); - MemoryUtil.memPutFloat(i + 4, y); - MemoryUtil.memPutFloat(i + 8, z); - MemoryUtil.memPutInt(i + 12, color); - MemoryUtil.memPutFloat(i + 16, u); - MemoryUtil.memPutFloat(i + 20, v); - MemoryUtil.memPutInt(i + 24, overlay); - MemoryUtil.memPutInt(i + 28, light); - - if (vertexCount == 4) { - this.endQuad(normal); - } - - this.advance(); - } - - @Override - public void writeGlyph(float x, float y, float z, int color, float u, float v, int light) { - writeQuad(x, y, z, color, u, v, light, OverlayTexture.NO_OVERLAY, 0); - } - - private void endQuad(int normal) { - this.vertexCount = 0; - - long i = this.writePointer; - - uSum *= 0.25; - vSum *= 0.25; - - quad.setup(writePointer, STRIDE); - - float normalX, normalY, normalZ; - - if (normal == 0) { - NormalHelper.computeFaceNormal(saveNormal, quad); - normalX = saveNormal.x; - normalY = saveNormal.y; - normalZ = saveNormal.z; - normal = NormalHelper.packNormal(saveNormal, 0.0F); - } else { - normalX = Norm3b.unpackX(normal); - normalY = Norm3b.unpackY(normal); - normalZ = Norm3b.unpackZ(normal); - } - - int tangent = NormalHelper.computeTangent(normalX, normalY, normalZ, quad); - - for (long vertex = 0; vertex < 4; vertex++) { - MemoryUtil.memPutFloat(i + 36 - STRIDE * vertex, uSum); - MemoryUtil.memPutFloat(i + 40 - STRIDE * vertex, vSum); - MemoryUtil.memPutInt(i + 32 - STRIDE * vertex, normal); - MemoryUtil.memPutInt(i + 44 - STRIDE * vertex, tangent); - } - - uSum = 0; - vSum = 0; - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/entity_xhfp/ExtendedGlyphVertexType.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/entity_xhfp/ExtendedGlyphVertexType.java deleted file mode 100644 index e5a24c6c8..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/entity_xhfp/ExtendedGlyphVertexType.java +++ /dev/null @@ -1,33 +0,0 @@ -package net.coderbot.iris.compat.sodium.impl.vertex_format.entity_xhfp; - -import com.mojang.blaze3d.vertex.VertexConsumer; -import com.mojang.blaze3d.vertex.VertexFormat; -import me.jellysquid.mods.sodium.client.model.vertex.buffer.VertexBufferView; -import me.jellysquid.mods.sodium.client.model.vertex.formats.glyph.GlyphVertexSink; -import me.jellysquid.mods.sodium.client.model.vertex.formats.glyph.writer.GlyphVertexWriterFallback; -import me.jellysquid.mods.sodium.client.model.vertex.type.BlittableVertexType; -import me.jellysquid.mods.sodium.client.model.vertex.type.VanillaVertexType; -import net.coderbot.iris.vertices.IrisVertexFormats; - -public class ExtendedGlyphVertexType implements VanillaVertexType, BlittableVertexType { - public static final ExtendedGlyphVertexType INSTANCE = new ExtendedGlyphVertexType(); - - @Override - public GlyphVertexSink createFallbackWriter(VertexConsumer vertexConsumer) { - return new GlyphVertexWriterFallback(vertexConsumer); - } - - @Override - public GlyphVertexSink createBufferWriter(VertexBufferView buffer, boolean direct) { - return direct ? new GlyphVertexBufferWriterUnsafe(buffer) : new GlyphVertexBufferWriterNio(buffer); - } - - @Override - public VertexFormat getVertexFormat() { - return IrisVertexFormats.TERRAIN; - } - - public BlittableVertexType asBlittable() { - return this; - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/entity_xhfp/ExtendedQuadVertexType.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/entity_xhfp/ExtendedQuadVertexType.java deleted file mode 100644 index d2db4a8db..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/entity_xhfp/ExtendedQuadVertexType.java +++ /dev/null @@ -1,33 +0,0 @@ -package net.coderbot.iris.compat.sodium.impl.vertex_format.entity_xhfp; - -import com.mojang.blaze3d.vertex.VertexConsumer; -import com.mojang.blaze3d.vertex.VertexFormat; -import me.jellysquid.mods.sodium.client.model.vertex.buffer.VertexBufferView; -import me.jellysquid.mods.sodium.client.model.vertex.formats.quad.QuadVertexSink; -import me.jellysquid.mods.sodium.client.model.vertex.formats.quad.writer.QuadVertexWriterFallback; -import me.jellysquid.mods.sodium.client.model.vertex.type.BlittableVertexType; -import me.jellysquid.mods.sodium.client.model.vertex.type.VanillaVertexType; -import net.coderbot.iris.vertices.IrisVertexFormats; - -public class ExtendedQuadVertexType implements VanillaVertexType, BlittableVertexType { - public static final ExtendedQuadVertexType INSTANCE = new ExtendedQuadVertexType(); - - @Override - public QuadVertexSink createFallbackWriter(VertexConsumer vertexConsumer) { - return new QuadVertexWriterFallback(vertexConsumer); - } - - @Override - public QuadVertexSink createBufferWriter(VertexBufferView buffer, boolean direct) { - return direct ? new EntityVertexBufferWriterUnsafe(buffer) : new EntityVertexBufferWriterNio(buffer); - } - - @Override - public VertexFormat getVertexFormat() { - return IrisVertexFormats.ENTITY; - } - - public BlittableVertexType asBlittable() { - return this; - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/entity_xhfp/GlyphVertexBufferWriterNio.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/entity_xhfp/GlyphVertexBufferWriterNio.java deleted file mode 100644 index 0d50e2658..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/entity_xhfp/GlyphVertexBufferWriterNio.java +++ /dev/null @@ -1,95 +0,0 @@ -package net.coderbot.iris.compat.sodium.impl.vertex_format.entity_xhfp; - -import me.jellysquid.mods.sodium.client.model.vertex.buffer.VertexBufferView; -import me.jellysquid.mods.sodium.client.model.vertex.buffer.VertexBufferWriterNio; -import me.jellysquid.mods.sodium.client.model.vertex.formats.glyph.GlyphVertexSink; -import me.jellysquid.mods.sodium.client.model.vertex.formats.quad.QuadVertexSink; -import me.jellysquid.mods.sodium.client.util.Norm3b; -import net.coderbot.iris.vendored.joml.Vector3f; -import net.coderbot.iris.vertices.IrisVertexFormats; -import net.coderbot.iris.vertices.NormalHelper; -import net.minecraft.client.renderer.texture.OverlayTexture; - -import java.nio.ByteBuffer; - -public class GlyphVertexBufferWriterNio extends VertexBufferWriterNio implements QuadVertexSink, GlyphVertexSink { - private static final int STRIDE = IrisVertexFormats.TERRAIN.getVertexSize(); - - private final QuadViewEntity.QuadViewEntityNio quad = new QuadViewEntity.QuadViewEntityNio(); - private final Vector3f saveNormal = new Vector3f(); - - private int vertexCount; - private float uSum; - private float vSum; - - public GlyphVertexBufferWriterNio(VertexBufferView backingBuffer) { - super(backingBuffer, ExtendedGlyphVertexType.INSTANCE); - } - - @Override - public void writeQuad(float x, float y, float z, int color, float u, float v, int light, int overlay, int normal) { - int i = this.writeOffset; - ByteBuffer buffer = this.byteBuffer; - - vertexCount++; - uSum += u; - vSum += v; - - buffer.putFloat(i, x); - buffer.putFloat(i + 4, y); - buffer.putFloat(i + 8, z); - buffer.putInt(i + 12, color); - buffer.putFloat(i + 16, u); - buffer.putFloat(i + 20, v); - buffer.putInt(i + 24, light); - - if (vertexCount == 4) { - this.endQuad(normal); - } - - this.advance(); - } - - @Override - public void writeGlyph(float x, float y, float z, int color, float u, float v, int light) { - writeQuad(x, y, z, color, u, v, light, OverlayTexture.NO_OVERLAY, 0); - } - - private void endQuad(int normal) { - this.vertexCount = 0; - - int i = this.writeOffset; - ByteBuffer buffer = this.byteBuffer; - - uSum *= 0.25; - vSum *= 0.25; - - quad.setup(byteBuffer, writeOffset, STRIDE); - - float normalX, normalY, normalZ; - - if (normal == 0) { - NormalHelper.computeFaceNormal(saveNormal, quad); - normalX = saveNormal.x; - normalY = saveNormal.y; - normalZ = saveNormal.z; - normal = NormalHelper.packNormal(saveNormal, 0.0F); - } else { - normalX = Norm3b.unpackX(normal); - normalY = Norm3b.unpackY(normal); - normalZ = Norm3b.unpackZ(normal); - } - - int tangent = NormalHelper.computeTangent(normalX, normalY, normalZ, quad); - - for (int vertex = 0; vertex < 4; vertex++) { - buffer.putFloat(i + 36 - STRIDE * vertex, uSum); - buffer.putFloat(i + 40 - STRIDE * vertex, vSum); - buffer.putInt(i + 28 - STRIDE * vertex, normal); - buffer.putInt(i + 44 - STRIDE * vertex, tangent); - } - - uSum = 0; - vSum = 0; - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/entity_xhfp/GlyphVertexBufferWriterUnsafe.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/entity_xhfp/GlyphVertexBufferWriterUnsafe.java deleted file mode 100644 index c412a9ef6..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/entity_xhfp/GlyphVertexBufferWriterUnsafe.java +++ /dev/null @@ -1,92 +0,0 @@ -package net.coderbot.iris.compat.sodium.impl.vertex_format.entity_xhfp; - -import me.jellysquid.mods.sodium.client.model.vertex.buffer.VertexBufferView; -import me.jellysquid.mods.sodium.client.model.vertex.buffer.VertexBufferWriterUnsafe; -import me.jellysquid.mods.sodium.client.model.vertex.formats.glyph.GlyphVertexSink; -import me.jellysquid.mods.sodium.client.model.vertex.formats.quad.QuadVertexSink; -import me.jellysquid.mods.sodium.client.util.Norm3b; -import net.coderbot.iris.vendored.joml.Vector3f; -import net.coderbot.iris.vertices.IrisVertexFormats; -import net.coderbot.iris.vertices.NormalHelper; -import net.minecraft.client.renderer.texture.OverlayTexture; -import org.lwjgl.system.MemoryUtil; - -public class GlyphVertexBufferWriterUnsafe extends VertexBufferWriterUnsafe implements QuadVertexSink, GlyphVertexSink { - private static final int STRIDE = IrisVertexFormats.TERRAIN.getVertexSize(); - - private final QuadViewEntity.QuadViewEntityUnsafe quad = new QuadViewEntity.QuadViewEntityUnsafe(); - private final Vector3f saveNormal = new Vector3f(); - - private int vertexCount; - private float uSum; - private float vSum; - - public GlyphVertexBufferWriterUnsafe(VertexBufferView backingBuffer) { - super(backingBuffer, ExtendedGlyphVertexType.INSTANCE); - } - - @Override - public void writeQuad(float x, float y, float z, int color, float u, float v, int light, int overlay, int normal) { - long i = this.writePointer; - - vertexCount++; - uSum += u; - vSum += v; - - MemoryUtil.memPutFloat(i, x); - MemoryUtil.memPutFloat(i + 4, y); - MemoryUtil.memPutFloat(i + 8, z); - MemoryUtil.memPutInt(i + 12, color); - MemoryUtil.memPutFloat(i + 16, u); - MemoryUtil.memPutFloat(i + 20, v); - MemoryUtil.memPutInt(i + 24, light); - - if (vertexCount == 4) { - this.endQuad(normal); - } - - this.advance(); - } - - @Override - public void writeGlyph(float x, float y, float z, int color, float u, float v, int light) { - writeQuad(x, y, z, color, u, v, light, OverlayTexture.NO_OVERLAY, 0); - } - - private void endQuad(int normal) { - this.vertexCount = 0; - - long i = this.writePointer; - - uSum *= 0.25; - vSum *= 0.25; - - quad.setup(writePointer, STRIDE); - - float normalX, normalY, normalZ; - - if (normal == 0) { - NormalHelper.computeFaceNormal(saveNormal, quad); - normalX = saveNormal.x; - normalY = saveNormal.y; - normalZ = saveNormal.z; - normal = NormalHelper.packNormal(saveNormal, 0.0F); - } else { - normalX = Norm3b.unpackX(normal); - normalY = Norm3b.unpackY(normal); - normalZ = Norm3b.unpackZ(normal); - } - - int tangent = NormalHelper.computeTangent(normalX, normalY, normalZ, quad); - - for (long vertex = 0; vertex < 4; vertex++) { - MemoryUtil.memPutFloat(i + 36 - STRIDE * vertex, uSum); - MemoryUtil.memPutFloat(i + 40 - STRIDE * vertex, vSum); - MemoryUtil.memPutInt(i + 28 - STRIDE * vertex, normal); - MemoryUtil.memPutInt(i + 44 - STRIDE * vertex, tangent); - } - - uSum = 0; - vSum = 0; - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/entity_xhfp/QuadViewEntity.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/entity_xhfp/QuadViewEntity.java deleted file mode 100644 index 4e516a636..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/entity_xhfp/QuadViewEntity.java +++ /dev/null @@ -1,65 +0,0 @@ -package net.coderbot.iris.compat.sodium.impl.vertex_format.entity_xhfp; - -import net.coderbot.iris.vertices.QuadView; -import org.lwjgl.system.MemoryUtil; - -import java.nio.ByteBuffer; - -public abstract class QuadViewEntity implements QuadView { - long writePointer; - int stride; - - @Override - public float x(int index) { - return getFloat(writePointer - stride * (3L - index)); - } - - @Override - public float y(int index) { - return getFloat(writePointer + 4 - stride * (3L - index)); - } - - @Override - public float z(int index) { - return getFloat(writePointer + 8 - stride * (3L - index)); - } - - @Override - public float u(int index) { - return getFloat(writePointer + 16 - stride * (3L - index)); - } - - @Override - public float v(int index) { - return getFloat(writePointer + 20 - stride * (3L - index)); - } - - abstract float getFloat(long writePointer); - - public static class QuadViewEntityUnsafe extends QuadViewEntity { - public void setup(long writePointer, int stride) { - this.writePointer = writePointer; - this.stride = stride; - } - - @Override - float getFloat(long writePointer) { - return MemoryUtil.memGetFloat(writePointer); - } - } - - public static class QuadViewEntityNio extends QuadViewEntity { - private ByteBuffer buffer; - - public void setup(ByteBuffer buffer, int writePointer, int stride) { - this.buffer = buffer; - this.writePointer = writePointer; - this.stride = stride; - } - - @Override - float getFloat(long writePointer) { - return buffer.getFloat((int) writePointer); - } - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/terrain_xhfp/QuadViewTerrain.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/terrain_xhfp/QuadViewTerrain.java deleted file mode 100644 index c6c4b3de4..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/terrain_xhfp/QuadViewTerrain.java +++ /dev/null @@ -1,73 +0,0 @@ -package net.coderbot.iris.compat.sodium.impl.vertex_format.terrain_xhfp; - -import net.coderbot.iris.vertices.QuadView; -import org.lwjgl.system.MemoryUtil; - -import java.nio.ByteBuffer; - -public abstract class QuadViewTerrain implements QuadView { - long writePointer; - int stride; - - @Override - public float x(int index) { - return normalizeVertexPositionShortAsFloat(getShort(writePointer - stride * (3L - index))); - } - - @Override - public float y(int index) { - return normalizeVertexPositionShortAsFloat(getShort(writePointer + 2 - stride * (3L - index))); - } - - @Override - public float z(int index) { - return normalizeVertexPositionShortAsFloat(getShort(writePointer + 4 - stride * (3L - index))); - } - - @Override - public float u(int index) { - return normalizeVertexTextureShortAsFloat(getShort(writePointer + 12 - stride * (3L - index))); - } - - @Override - public float v(int index) { - return normalizeVertexTextureShortAsFloat(getShort(writePointer + 14 - stride * (3L - index))); - } - - private static float normalizeVertexTextureShortAsFloat(short value) { - return (value & 0xFFFF) * (1.0f / 32768.0f); - } - - private static float normalizeVertexPositionShortAsFloat(short value) { - return (value & 0xFFFF) * (1.0f / 65535.0f); - } - - abstract short getShort(long writePointer); - - public static class QuadViewTerrainUnsafe extends QuadViewTerrain { - public void setup(long writePointer, int stride) { - this.writePointer = writePointer; - this.stride = stride; - } - - @Override - short getShort(long writePointer) { - return MemoryUtil.memGetShort(writePointer); - } - } - - public static class QuadViewTerrainNio extends QuadViewTerrain { - private ByteBuffer buffer; - - public void setup(ByteBuffer buffer, int writePointer, int stride) { - this.buffer = buffer; - this.writePointer = writePointer; - this.stride = stride; - } - - @Override - short getShort(long writePointer) { - return buffer.getShort((int) writePointer); - } - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/terrain_xhfp/XHFPModelVertexBufferWriterNio.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/terrain_xhfp/XHFPModelVertexBufferWriterNio.java deleted file mode 100644 index 9620052a3..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/terrain_xhfp/XHFPModelVertexBufferWriterNio.java +++ /dev/null @@ -1,150 +0,0 @@ -package net.coderbot.iris.compat.sodium.impl.vertex_format.terrain_xhfp; - -import me.jellysquid.mods.sodium.client.model.vertex.buffer.VertexBufferView; -import me.jellysquid.mods.sodium.client.model.vertex.buffer.VertexBufferWriterNio; -import me.jellysquid.mods.sodium.client.render.chunk.format.ModelVertexSink; -import me.jellysquid.mods.sodium.client.render.chunk.format.ModelVertexUtil; -import net.coderbot.iris.compat.sodium.impl.block_context.BlockContextHolder; -import net.coderbot.iris.compat.sodium.impl.block_context.ContextAwareVertexWriter; -import net.coderbot.iris.compat.sodium.impl.vertex_format.IrisModelVertexFormats; -import net.coderbot.iris.vendored.joml.Vector3f; -import net.coderbot.iris.vertices.ExtendedDataHelper; -import net.coderbot.iris.vertices.NormalHelper; -import org.lwjgl.system.MemoryUtil; - -import java.nio.ByteBuffer; - -import static net.coderbot.iris.compat.sodium.impl.vertex_format.terrain_xhfp.XHFPModelVertexType.STRIDE; - -public class XHFPModelVertexBufferWriterNio extends VertexBufferWriterNio implements ModelVertexSink, ContextAwareVertexWriter { - private final QuadViewTerrain.QuadViewTerrainNio quad = new QuadViewTerrain.QuadViewTerrainNio(); - private final Vector3f normal = new Vector3f(); - - private BlockContextHolder contextHolder; - - private int vertexCount; - private float uSum; - private float vSum; - - public XHFPModelVertexBufferWriterNio(VertexBufferView backingBuffer) { - super(backingBuffer, IrisModelVertexFormats.MODEL_VERTEX_XHFP); - } - - @Override - public void writeQuad(float x, float y, float z, int color, float u, float v, int light) { - uSum += u; - vSum += v; - - this.writeQuadInternal( - ModelVertexUtil.denormalizeVertexPositionFloatAsShort(x), - ModelVertexUtil.denormalizeVertexPositionFloatAsShort(y), - ModelVertexUtil.denormalizeVertexPositionFloatAsShort(z), - color, - ModelVertexUtil.denormalizeVertexTextureFloatAsShort(u), - ModelVertexUtil.denormalizeVertexTextureFloatAsShort(v), - light, - contextHolder.blockId, - contextHolder.renderType, - ExtendedDataHelper.computeMidBlock(x, y, z, contextHolder.localPosX, contextHolder.localPosY, contextHolder.localPosZ) - ); - } - - private void writeQuadInternal(short x, short y, short z, int color, short u, short v, int light, short materialId, - short renderType, int packedMidBlock) { - int i = this.writeOffset; - - vertexCount++; - // NB: uSum and vSum must already be incremented outside of this function. - - ByteBuffer buffer = this.byteBuffer; - buffer.putShort(i, x); - buffer.putShort(i + 2, y); - buffer.putShort(i + 4, z); - buffer.putInt(i + 8, color); - buffer.putShort(i + 12, u); - buffer.putShort(i + 14, v); - buffer.putShort(i + 16, (short) (light & 0xFFFF)); - buffer.putShort(i + 18, (short) (light >> 16 & 0xFFFF)); - // NB: We don't set midTexCoord, normal, and tangent here, they will be filled in later. - // block ID: We only set the first 2 values, any legacy shaders using z or w will get filled in based on the GLSL spec - // https://www.khronos.org/opengl/wiki/Vertex_Specification#Vertex_format - // TODO: can we pack this into one short? - buffer.putShort(i + 36, materialId); - buffer.putShort(i + 38, renderType); - buffer.putInt(i + 40, packedMidBlock); - - if (vertexCount == 4) { - vertexCount = 0; - - // FIXME - // The following logic is incorrect because OpenGL denormalizes shorts by dividing by 65535. The atlas is - // based on power-of-two values and so a normalization factor that is not a power of two causes the values - // used in the shader to be off by enough to cause visual errors. These are most noticeable on 1.18 with POM - // on block edges. - // - // The only reliable way that this can be fixed is to apply the same shader transformations to midTexCoord - // as Sodium does to the regular texture coordinates - dividing them by the correct power-of-two value inside - // of the shader instead of letting OpenGL value normalization do the division. However, this requires - // fragile patching that is not yet possible. - // - // As a temporary solution, the normalized shorts have been replaced with regular floats, but this takes up - // an extra 4 bytes per vertex. - - // NB: Be careful with the math here! A previous bug was caused by midU going negative as a short, which - // was sign-extended into midTexCoord, causing midV to have garbage (likely NaN data). If you're touching - // this code, be aware of that, and don't introduce those kinds of bugs! - // - // Also note that OpenGL takes shorts in the range of [0, 65535] and transforms them linearly to [0.0, 1.0], - // so multiply by 65535, not 65536. - // - // TODO: Does this introduce precision issues? Do we need to fall back to floats here? This might break - // with high resolution texture packs. -// int midU = (int)(65535.0F * Math.min(uSum * 0.25f, 1.0f)) & 0xFFFF; -// int midV = (int)(65535.0F * Math.min(vSum * 0.25f, 1.0f)) & 0xFFFF; -// int midTexCoord = (midV << 16) | midU; - - uSum *= 0.25f; - vSum *= 0.25f; - - buffer.putFloat(i + 20, uSum); - buffer.putFloat(i + 20 - STRIDE, uSum); - buffer.putFloat(i + 20 - STRIDE * 2, uSum); - buffer.putFloat(i + 20 - STRIDE * 3, uSum); - - buffer.putFloat(i + 24, vSum); - buffer.putFloat(i + 24 - STRIDE, vSum); - buffer.putFloat(i + 24 - STRIDE * 2, vSum); - buffer.putFloat(i + 24 - STRIDE * 3, vSum); - - uSum = 0; - vSum = 0; - - // normal computation - // Implementation based on the algorithm found here: - // https://github.com/IrisShaders/ShaderDoc/blob/master/vertex-format-extensions.md#surface-normal-vector - - quad.setup(buffer, i, STRIDE); - NormalHelper.computeFaceNormal(normal, quad); - int packedNormal = NormalHelper.packNormal(normal, 0.0f); - - buffer.putInt(i + 32, packedNormal); - buffer.putInt(i + 32 - STRIDE, packedNormal); - buffer.putInt(i + 32 - STRIDE * 2, packedNormal); - buffer.putInt(i + 32 - STRIDE * 3, packedNormal); - - int tangent = NormalHelper.computeTangent(normal.x, normal.y, normal.z, quad); - - buffer.putInt(i + 28, tangent); - buffer.putInt(i + 28 - STRIDE, tangent); - buffer.putInt(i + 28 - STRIDE * 2, tangent); - buffer.putInt(i + 28 - STRIDE * 3, tangent); - } - - this.advance(); - } - - @Override - public void iris$setContextHolder(BlockContextHolder holder) { - this.contextHolder = holder; - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/terrain_xhfp/XHFPModelVertexBufferWriterUnsafe.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/terrain_xhfp/XHFPModelVertexBufferWriterUnsafe.java deleted file mode 100644 index e07a6d967..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/terrain_xhfp/XHFPModelVertexBufferWriterUnsafe.java +++ /dev/null @@ -1,147 +0,0 @@ -package net.coderbot.iris.compat.sodium.impl.vertex_format.terrain_xhfp; - -import me.jellysquid.mods.sodium.client.model.vertex.buffer.VertexBufferView; -import me.jellysquid.mods.sodium.client.model.vertex.buffer.VertexBufferWriterUnsafe; -import me.jellysquid.mods.sodium.client.render.chunk.format.ModelVertexSink; -import me.jellysquid.mods.sodium.client.render.chunk.format.ModelVertexUtil; -import net.coderbot.iris.compat.sodium.impl.block_context.BlockContextHolder; -import net.coderbot.iris.compat.sodium.impl.block_context.ContextAwareVertexWriter; -import net.coderbot.iris.compat.sodium.impl.vertex_format.IrisModelVertexFormats; -import net.coderbot.iris.vendored.joml.Vector3f; -import net.coderbot.iris.vertices.ExtendedDataHelper; -import net.coderbot.iris.vertices.NormalHelper; -import org.lwjgl.system.MemoryUtil; - -import static net.coderbot.iris.compat.sodium.impl.vertex_format.terrain_xhfp.XHFPModelVertexType.STRIDE; - -public class XHFPModelVertexBufferWriterUnsafe extends VertexBufferWriterUnsafe implements ModelVertexSink, ContextAwareVertexWriter { - private final QuadViewTerrain.QuadViewTerrainUnsafe quad = new QuadViewTerrain.QuadViewTerrainUnsafe(); - private final Vector3f normal = new Vector3f(); - - private BlockContextHolder contextHolder; - - private int vertexCount; - private float uSum; - private float vSum; - - public XHFPModelVertexBufferWriterUnsafe(VertexBufferView backingBuffer) { - super(backingBuffer, IrisModelVertexFormats.MODEL_VERTEX_XHFP); - } - - @Override - public void writeQuad(float x, float y, float z, int color, float u, float v, int light) { - uSum += u; - vSum += v; - - this.writeQuadInternal( - ModelVertexUtil.denormalizeVertexPositionFloatAsShort(x), - ModelVertexUtil.denormalizeVertexPositionFloatAsShort(y), - ModelVertexUtil.denormalizeVertexPositionFloatAsShort(z), - color, - ModelVertexUtil.denormalizeVertexTextureFloatAsShort(u), - ModelVertexUtil.denormalizeVertexTextureFloatAsShort(v), - light, - contextHolder.blockId, - contextHolder.renderType, - ExtendedDataHelper.computeMidBlock(x, y, z, contextHolder.localPosX, contextHolder.localPosY, contextHolder.localPosZ) - ); - } - - private void writeQuadInternal(short x, short y, short z, int color, short u, short v, int light, short materialId, - short renderType, int packedMidBlock) { - long i = this.writePointer; - - vertexCount++; - // NB: uSum and vSum must already be incremented outside of this function. - - MemoryUtil.memPutShort(i, x); - MemoryUtil.memPutShort(i + 2, y); - MemoryUtil.memPutShort(i + 4, z); - MemoryUtil.memPutInt(i + 8, color); - MemoryUtil.memPutShort(i + 12, u); - MemoryUtil.memPutShort(i + 14, v); - MemoryUtil.memPutShort(i + 16, (short) (light & 0xFFFF)); - MemoryUtil.memPutShort(i + 18, (short) (light >> 16 & 0xFFFF)); - // NB: We don't set midTexCoord, normal, and tangent here, they will be filled in later. - // block ID: We only set the first 2 values, any legacy shaders using z or w will get filled in based on the GLSL spec - // https://www.khronos.org/opengl/wiki/Vertex_Specification#Vertex_format - // TODO: can we pack this into one short? - MemoryUtil.memPutShort(i + 36, materialId); - MemoryUtil.memPutShort(i + 38, renderType); - MemoryUtil.memPutInt(i + 40, packedMidBlock); - - if (vertexCount == 4) { - vertexCount = 0; - - // FIXME - // The following logic is incorrect because OpenGL denormalizes shorts by dividing by 65535. The atlas is - // based on power-of-two values and so a normalization factor that is not a power of two causes the values - // used in the shader to be off by enough to cause visual errors. These are most noticeable on 1.18 with POM - // on block edges. - // - // The only reliable way that this can be fixed is to apply the same shader transformations to midTexCoord - // as Sodium does to the regular texture coordinates - dividing them by the correct power-of-two value inside - // of the shader instead of letting OpenGL value normalization do the division. However, this requires - // fragile patching that is not yet possible. - // - // As a temporary solution, the normalized shorts have been replaced with regular floats, but this takes up - // an extra 4 bytes per vertex. - - // NB: Be careful with the math here! A previous bug was caused by midU going negative as a short, which - // was sign-extended into midTexCoord, causing midV to have garbage (likely NaN data). If you're touching - // this code, be aware of that, and don't introduce those kinds of bugs! - // - // Also note that OpenGL takes shorts in the range of [0, 65535] and transforms them linearly to [0.0, 1.0], - // so multiply by 65535, not 65536. - // - // TODO: Does this introduce precision issues? Do we need to fall back to floats here? This might break - // with high resolution texture packs. -// int midU = (int)(65535.0F * Math.min(uSum * 0.25f, 1.0f)) & 0xFFFF; -// int midV = (int)(65535.0F * Math.min(vSum * 0.25f, 1.0f)) & 0xFFFF; -// int midTexCoord = (midV << 16) | midU; - - uSum *= 0.25f; - vSum *= 0.25f; - - MemoryUtil.memPutFloat(i + 20, uSum); - MemoryUtil.memPutFloat(i + 20 - STRIDE, uSum); - MemoryUtil.memPutFloat(i + 20 - STRIDE * 2, uSum); - MemoryUtil.memPutFloat(i + 20 - STRIDE * 3, uSum); - - MemoryUtil.memPutFloat(i + 24, vSum); - MemoryUtil.memPutFloat(i + 24 - STRIDE, vSum); - MemoryUtil.memPutFloat(i + 24 - STRIDE * 2, vSum); - MemoryUtil.memPutFloat(i + 24 - STRIDE * 3, vSum); - - uSum = 0; - vSum = 0; - - // normal computation - // Implementation based on the algorithm found here: - // https://github.com/IrisShaders/ShaderDoc/blob/master/vertex-format-extensions.md#surface-normal-vector - - quad.setup(i, STRIDE); - NormalHelper.computeFaceNormal(normal, quad); - int packedNormal = NormalHelper.packNormal(normal, 0.0f); - - MemoryUtil.memPutInt(i + 32, packedNormal); - MemoryUtil.memPutInt(i + 32 - STRIDE, packedNormal); - MemoryUtil.memPutInt(i + 32 - STRIDE * 2, packedNormal); - MemoryUtil.memPutInt(i + 32 - STRIDE * 3, packedNormal); - - int tangent = NormalHelper.computeTangent(normal.x, normal.y, normal.z, quad); - - MemoryUtil.memPutInt(i + 28, tangent); - MemoryUtil.memPutInt(i + 28 - STRIDE, tangent); - MemoryUtil.memPutInt(i + 28 - STRIDE * 2, tangent); - MemoryUtil.memPutInt(i + 28 - STRIDE * 3, tangent); - } - - this.advance(); - } - - @Override - public void iris$setContextHolder(BlockContextHolder holder) { - this.contextHolder = holder; - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/terrain_xhfp/XHFPModelVertexType.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/terrain_xhfp/XHFPModelVertexType.java deleted file mode 100644 index f8de9dbcb..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/impl/vertex_format/terrain_xhfp/XHFPModelVertexType.java +++ /dev/null @@ -1,63 +0,0 @@ -package net.coderbot.iris.compat.sodium.impl.vertex_format.terrain_xhfp; - -import com.mojang.blaze3d.vertex.VertexConsumer; -import me.jellysquid.mods.sodium.client.gl.attribute.GlVertexAttributeFormat; -import me.jellysquid.mods.sodium.client.gl.attribute.GlVertexFormat; -import me.jellysquid.mods.sodium.client.model.vertex.buffer.VertexBufferView; -import me.jellysquid.mods.sodium.client.model.vertex.type.BlittableVertexType; -import me.jellysquid.mods.sodium.client.model.vertex.type.ChunkVertexType; -import me.jellysquid.mods.sodium.client.render.chunk.format.ChunkMeshAttribute; -import me.jellysquid.mods.sodium.client.render.chunk.format.ModelVertexSink; -import net.coderbot.iris.compat.sodium.impl.vertex_format.IrisChunkMeshAttributes; -import net.coderbot.iris.compat.sodium.impl.vertex_format.IrisGlVertexAttributeFormat; - -/** - * Like HFPModelVertexType, but extended to support Iris. The extensions aren't particularly efficient right now. - */ -public class XHFPModelVertexType implements ChunkVertexType { - public static final int STRIDE = 44; - public static final GlVertexFormat VERTEX_FORMAT = GlVertexFormat.builder(ChunkMeshAttribute.class, STRIDE) - .addElement(ChunkMeshAttribute.POSITION, 0, GlVertexAttributeFormat.UNSIGNED_SHORT, 3, false) - .addElement(ChunkMeshAttribute.COLOR, 8, GlVertexAttributeFormat.UNSIGNED_BYTE, 4, true) - .addElement(ChunkMeshAttribute.TEXTURE, 12, GlVertexAttributeFormat.UNSIGNED_SHORT, 2, false) - .addElement(ChunkMeshAttribute.LIGHT, 16, GlVertexAttributeFormat.UNSIGNED_SHORT, 2, false) - .addElement(IrisChunkMeshAttributes.MID_TEX_COORD, 20, GlVertexAttributeFormat.FLOAT, 2, false) - .addElement(IrisChunkMeshAttributes.TANGENT, 28, IrisGlVertexAttributeFormat.BYTE, 4, true) - .addElement(IrisChunkMeshAttributes.NORMAL, 32, IrisGlVertexAttributeFormat.BYTE, 3, true) - .addElement(IrisChunkMeshAttributes.BLOCK_ID, 36, IrisGlVertexAttributeFormat.SHORT, 2, false) - .addElement(IrisChunkMeshAttributes.MID_BLOCK, 40, IrisGlVertexAttributeFormat.BYTE, 3, false) - .build(); - - public static final float MODEL_SCALE = (32.0f / 65536.0f); - public static final float TEXTURE_SCALE = (1.0f / 32768.0f); - - @Override - public ModelVertexSink createFallbackWriter(VertexConsumer consumer) { - throw new UnsupportedOperationException(); - } - - @Override - public ModelVertexSink createBufferWriter(VertexBufferView buffer, boolean direct) { - return direct ? new XHFPModelVertexBufferWriterUnsafe(buffer) : new XHFPModelVertexBufferWriterNio(buffer); - } - - @Override - public BlittableVertexType asBlittable() { - return this; - } - - @Override - public GlVertexFormat getCustomVertexFormat() { - return VERTEX_FORMAT; - } - - @Override - public float getModelScale() { - return MODEL_SCALE; - } - - @Override - public float getTextureScale() { - return TEXTURE_SCALE; - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/IrisSodiumCompatMixinPlugin.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/IrisSodiumCompatMixinPlugin.java deleted file mode 100644 index 633548630..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/IrisSodiumCompatMixinPlugin.java +++ /dev/null @@ -1,63 +0,0 @@ -package net.coderbot.iris.compat.sodium.mixin; - -import net.coderbot.iris.compat.sodium.SodiumVersionCheck; -import net.fabricmc.loader.api.FabricLoader; -import org.objectweb.asm.tree.ClassNode; -import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin; -import org.spongepowered.asm.mixin.extensibility.IMixinInfo; - -import java.util.List; -import java.util.Set; - -/** - * Semi-critical mixin config plugin, disables mixins if Sodium isn't present, - * since on 1.18+ we have mixins into Iris classes that crash the game instead of just - * spamming the log if Sodium isn't present. - */ -public class IrisSodiumCompatMixinPlugin implements IMixinConfigPlugin { - private boolean validSodiumVersion = false; - - @Override - public void onLoad(String mixinPackage) { - validSodiumVersion = FabricLoader.getInstance().getModContainer("sodium").map(sodium -> { - String version = sodium.getMetadata().getVersion().getFriendlyString(); - - return SodiumVersionCheck.isAllowedVersion(version); - }).orElse(false); - - if (!validSodiumVersion) { - // We can't use Iris' logger here due to classloading issues. - System.err.println("[Iris] Invalid/missing version of Sodium detected, disabling compatibility mixins!"); - } - } - - @Override - public String getRefMapperConfig() { - return null; - } - - @Override - public boolean shouldApplyMixin(String targetClassName, String mixinClassName) { - return validSodiumVersion; - } - - @Override - public void acceptTargets(Set myTargets, Set otherTargets) { - - } - - @Override - public List getMixins() { - return null; - } - - @Override - public void preApply(String targetClassName, ClassNode targetClass, String mixinClassName, IMixinInfo mixinInfo) { - - } - - @Override - public void postApply(String targetClassName, ClassNode targetClass, String mixinClassName, IMixinInfo mixinInfo) { - - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/block_id/MixinChunkBuildBuffers.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/block_id/MixinChunkBuildBuffers.java deleted file mode 100644 index c034959a3..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/block_id/MixinChunkBuildBuffers.java +++ /dev/null @@ -1,71 +0,0 @@ -package net.coderbot.iris.compat.sodium.mixin.block_id; - -import it.unimi.dsi.fastutil.objects.Object2IntMap; -import me.jellysquid.mods.sodium.client.model.vertex.VertexSink; -import me.jellysquid.mods.sodium.client.model.vertex.buffer.VertexBufferView; -import me.jellysquid.mods.sodium.client.model.vertex.type.ChunkVertexType; -import me.jellysquid.mods.sodium.client.render.chunk.compile.ChunkBuildBuffers; -import me.jellysquid.mods.sodium.client.render.chunk.passes.BlockRenderPassManager; -import net.coderbot.iris.block_rendering.BlockRenderingSettings; -import net.coderbot.iris.compat.sodium.impl.block_context.BlockContextHolder; -import net.coderbot.iris.compat.sodium.impl.block_context.ChunkBuildBuffersExt; -import net.coderbot.iris.compat.sodium.impl.block_context.ContextAwareVertexWriter; -import net.minecraft.world.level.block.state.BlockState; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Unique; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.Redirect; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -/** - * Associates the block context holder with the chunk build buffers, allowing {@link MixinChunkRenderRebuildTask} to pass - * data to {@link ContextAwareVertexWriter}. - */ -@Mixin(ChunkBuildBuffers.class) -public class MixinChunkBuildBuffers implements ChunkBuildBuffersExt { - @Unique - private BlockContextHolder contextHolder; - - @Inject(method = "", at = @At("RETURN"), remap = false) - private void iris$onConstruct(ChunkVertexType vertexType, BlockRenderPassManager renderPassManager, CallbackInfo ci) { - Object2IntMap blockStateIds = BlockRenderingSettings.INSTANCE.getBlockStateIds(); - - if (blockStateIds != null) { - this.contextHolder = new BlockContextHolder(blockStateIds); - } else { - this.contextHolder = new BlockContextHolder(); - } - } - - @Redirect(method = "init", remap = false, at = @At(value = "INVOKE", - target = "me/jellysquid/mods/sodium/client/model/vertex/type/ChunkVertexType.createBufferWriter(" + - "Lme/jellysquid/mods/sodium/client/model/vertex/buffer/VertexBufferView;" + - "Z" + - ")Lme/jellysquid/mods/sodium/client/model/vertex/VertexSink;", remap = false)) - private VertexSink iris$redirectWriterCreation(ChunkVertexType vertexType, - VertexBufferView buffer, boolean direct) { - VertexSink sink = vertexType.createBufferWriter(buffer, direct); - - if (sink instanceof ContextAwareVertexWriter) { - ((ContextAwareVertexWriter) sink).iris$setContextHolder(contextHolder); - } - - return sink; - } - - @Override - public void iris$setLocalPos(int localPosX, int localPosY, int localPosZ) { - this.contextHolder.setLocalPos(localPosX, localPosY, localPosZ); - } - - @Override - public void iris$setMaterialId(BlockState state, short renderType) { - this.contextHolder.set(state, renderType); - } - - @Override - public void iris$resetBlockContext() { - this.contextHolder.reset(); - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/block_id/MixinChunkRenderRebuildTask.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/block_id/MixinChunkRenderRebuildTask.java deleted file mode 100644 index 9a2bf72d0..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/block_id/MixinChunkRenderRebuildTask.java +++ /dev/null @@ -1,80 +0,0 @@ -package net.coderbot.iris.compat.sodium.mixin.block_id; - -import me.jellysquid.mods.sodium.client.render.chunk.compile.ChunkBuildBuffers; -import me.jellysquid.mods.sodium.client.render.chunk.compile.ChunkBuildResult; -import me.jellysquid.mods.sodium.client.render.chunk.data.ChunkRenderBounds; -import me.jellysquid.mods.sodium.client.render.chunk.data.ChunkRenderData; -import me.jellysquid.mods.sodium.client.render.chunk.tasks.ChunkRenderRebuildTask; -import me.jellysquid.mods.sodium.client.render.pipeline.context.ChunkRenderCacheLocal; -import me.jellysquid.mods.sodium.client.util.task.CancellationSource; -import me.jellysquid.mods.sodium.client.world.WorldSlice; -import net.coderbot.iris.compat.sodium.impl.block_context.ChunkBuildBuffersExt; -import net.coderbot.iris.vertices.ExtendedDataHelper; -import net.minecraft.client.renderer.ItemBlockRenderTypes; -import net.minecraft.client.renderer.RenderType; -import net.minecraft.client.renderer.chunk.VisGraph; -import net.minecraft.core.BlockPos; -import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.material.FluidState; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.Redirect; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; -import org.spongepowered.asm.mixin.injection.callback.LocalCapture; - -/** - * Passes additional information indirectly to the vertex writer to support the mc_Entity and at_midBlock parts of the vertex format. - */ -@Mixin(ChunkRenderRebuildTask.class) -public class MixinChunkRenderRebuildTask { - @Inject(method = "performBuild", at = @At(value = "INVOKE", - target = "net/minecraft/world/level/block/state/BlockState.getRenderShape()" + - "Lnet/minecraft/world/level/block/RenderShape;"), - locals = LocalCapture.CAPTURE_FAILHARD) - private void iris$setLocalPos(ChunkRenderCacheLocal cache, ChunkBuildBuffers buffers, - CancellationSource cancellationSource, CallbackInfoReturnable> cir, - ChunkRenderData.Builder renderData, VisGraph occluder, ChunkRenderBounds.Builder bounds, - WorldSlice slice, int baseX, int baseY, int baseZ, - BlockPos.MutableBlockPos pos, BlockPos renderOffset, - int relY, int relZ, int relX) { - if (buffers instanceof ChunkBuildBuffersExt) { - ((ChunkBuildBuffersExt) buffers).iris$setLocalPos(relX, relY, relZ); - } - } - - @Redirect(method = "performBuild", at = @At(value = "INVOKE", - target = "net/minecraft/client/renderer/ItemBlockRenderTypes.getChunkRenderType(" + - "Lnet/minecraft/world/level/block/state/BlockState;" + - ")Lnet/minecraft/client/renderer/RenderType;")) - private RenderType iris$wrapGetBlockLayer(BlockState blockState, ChunkRenderCacheLocal cache, - ChunkBuildBuffers buffers, CancellationSource cancellationSource) { - if (buffers instanceof ChunkBuildBuffersExt) { - ((ChunkBuildBuffersExt) buffers).iris$setMaterialId(blockState, ExtendedDataHelper.BLOCK_RENDER_TYPE); - } - - return ItemBlockRenderTypes.getChunkRenderType(blockState); - } - - @Redirect(method = "performBuild", at = @At(value = "INVOKE", - target = "net/minecraft/client/renderer/ItemBlockRenderTypes.getRenderLayer(" + - "Lnet/minecraft/world/level/material/FluidState;" + - ")Lnet/minecraft/client/renderer/RenderType;")) - private RenderType iris$wrapGetFluidLayer(FluidState fluidState, ChunkRenderCacheLocal cache, - ChunkBuildBuffers buffers, CancellationSource cancellationSource) { - if (buffers instanceof ChunkBuildBuffersExt) { - ((ChunkBuildBuffersExt) buffers).iris$setMaterialId(fluidState.createLegacyBlock(), ExtendedDataHelper.FLUID_RENDER_TYPE); - } - - return ItemBlockRenderTypes.getRenderLayer(fluidState); - } - - @Inject(method = "performBuild", - at = @At(value = "INVOKE", target = "net/minecraft/world/level/block/Block.isEntityBlock()Z")) - private void iris$resetContext(ChunkRenderCacheLocal cache, ChunkBuildBuffers buffers, - CancellationSource cancellationSource, CallbackInfoReturnable> cir) { - if (buffers instanceof ChunkBuildBuffersExt) { - ((ChunkBuildBuffersExt) buffers).iris$resetBlockContext(); - } - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/directional_shading/MixinFlatLightPipeline.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/directional_shading/MixinFlatLightPipeline.java deleted file mode 100644 index 42c73a115..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/directional_shading/MixinFlatLightPipeline.java +++ /dev/null @@ -1,22 +0,0 @@ -package net.coderbot.iris.compat.sodium.mixin.directional_shading; - -import me.jellysquid.mods.sodium.client.model.light.flat.FlatLightPipeline; -import net.coderbot.iris.block_rendering.BlockRenderingSettings; -import net.minecraft.core.Direction; -import net.minecraft.world.level.BlockAndTintGetter; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Redirect; - -@Mixin(FlatLightPipeline.class) -public class MixinFlatLightPipeline { - @Redirect(method = "calculate", at = @At(value = "INVOKE", - target = "net/minecraft/world/level/BlockAndTintGetter.getShade (Lnet/minecraft/core/Direction;Z)F")) - private float iris$getBrightness(BlockAndTintGetter level, Direction direction, boolean shaded) { - if (BlockRenderingSettings.INSTANCE.shouldDisableDirectionalShading()) { - return 1.0F; - } else { - return level.getShade(direction, shaded); - } - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/directional_shading/MixinSmoothLightPipeline.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/directional_shading/MixinSmoothLightPipeline.java deleted file mode 100644 index 0d65071bf..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/directional_shading/MixinSmoothLightPipeline.java +++ /dev/null @@ -1,20 +0,0 @@ -package net.coderbot.iris.compat.sodium.mixin.directional_shading; - -import me.jellysquid.mods.sodium.client.model.light.data.QuadLightData; -import me.jellysquid.mods.sodium.client.model.light.smooth.SmoothLightPipeline; -import net.coderbot.iris.block_rendering.BlockRenderingSettings; -import net.minecraft.core.Direction; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -@Mixin(SmoothLightPipeline.class) -public class MixinSmoothLightPipeline { - @Inject(method = "applySidedBrightness", at = @At("HEAD"), cancellable = true) - private void iris$disableDirectionalShading(QuadLightData out, Direction face, boolean shade, CallbackInfo ci) { - if (BlockRenderingSettings.INSTANCE.shouldDisableDirectionalShading()) { - ci.cancel(); - } - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/options/MixinChunkRenderManager.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/options/MixinChunkRenderManager.java deleted file mode 100644 index 5b4879fc6..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/options/MixinChunkRenderManager.java +++ /dev/null @@ -1,26 +0,0 @@ -package net.coderbot.iris.compat.sodium.mixin.options; - -import me.jellysquid.mods.sodium.client.gui.SodiumGameOptions; -import me.jellysquid.mods.sodium.client.render.chunk.ChunkRenderManager; -import net.coderbot.iris.Iris; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Redirect; - -/** - * Disables fog occlusion when a shader pack is enabled, since shaders are not guaranteed to actually implement fog. - */ -@Mixin(ChunkRenderManager.class) -public class MixinChunkRenderManager { - @Redirect(method = "setup", remap = false, - at = @At(value = "FIELD", - target = "me/jellysquid/mods/sodium/client/gui/SodiumGameOptions$AdvancedSettings.useFogOcclusion : Z", - remap = false)) - private boolean iris$disableFogOcclusion(SodiumGameOptions.AdvancedSettings settings) { - if (Iris.getCurrentPack().isPresent()) { - return false; - } else { - return settings.useFogOcclusion; - } - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/options/MixinOptionImpl.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/options/MixinOptionImpl.java deleted file mode 100644 index bf881474b..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/options/MixinOptionImpl.java +++ /dev/null @@ -1,32 +0,0 @@ -package net.coderbot.iris.compat.sodium.mixin.options; - -import me.jellysquid.mods.sodium.client.gui.options.OptionImpl; -import net.coderbot.iris.compat.sodium.impl.options.OptionImplExtended; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Unique; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -import java.util.function.BooleanSupplier; - -/** - * Allows a slider to be dynamically enabled or disabled based on some external condition. - */ -@Mixin(OptionImpl.class) -public class MixinOptionImpl implements OptionImplExtended { - @Unique - private BooleanSupplier iris$dynamicallyEnabled; - - @Override - public void iris$dynamicallyEnable(BooleanSupplier enabled) { - this.iris$dynamicallyEnabled = enabled; - } - - @Inject(method = "isAvailable()Z", at = @At("HEAD"), cancellable = true, remap = false) - private void iris$dynamicallyEnable(CallbackInfoReturnable cir) { - if (iris$dynamicallyEnabled != null) { - cir.setReturnValue(iris$dynamicallyEnabled.getAsBoolean()); - } - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/options/MixinSodiumGameOptionPages.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/options/MixinSodiumGameOptionPages.java deleted file mode 100644 index 3eef20848..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/options/MixinSodiumGameOptionPages.java +++ /dev/null @@ -1,62 +0,0 @@ -package net.coderbot.iris.compat.sodium.mixin.options; - -import com.mojang.blaze3d.platform.GlStateManager; -import me.jellysquid.mods.sodium.client.gui.SodiumGameOptionPages; -import me.jellysquid.mods.sodium.client.gui.options.Option; -import me.jellysquid.mods.sodium.client.gui.options.OptionGroup; -import me.jellysquid.mods.sodium.client.gui.options.storage.MinecraftOptionsStorage; -import net.coderbot.iris.Iris; -import net.coderbot.iris.compat.sodium.impl.options.IrisSodiumOptions; -import org.spongepowered.asm.mixin.Final; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.ModifyArg; -import org.spongepowered.asm.mixin.injection.Redirect; -import org.spongepowered.asm.mixin.injection.Slice; - -/** - * Adds the Iris-specific options / option changes to the Sodium game options pages. - */ -@Mixin(SodiumGameOptionPages.class) -public class MixinSodiumGameOptionPages { - @Shadow(remap = false) - @Final - private static MinecraftOptionsStorage vanillaOpts; - - @Redirect(method = "general", remap = false, - slice = @Slice( - from = @At(value = "CONSTANT", args = "stringValue=View Distance"), - to = @At(value = "CONSTANT", args = "stringValue=Brightness") - ), - at = @At(value = "INVOKE", remap = false, - target = "me/jellysquid/mods/sodium/client/gui/options/OptionGroup$Builder.add (" + - "Lme/jellysquid/mods/sodium/client/gui/options/Option;" + - ")Lme/jellysquid/mods/sodium/client/gui/options/OptionGroup$Builder;"), - allow = 1) - private static OptionGroup.Builder iris$addMaxShadowDistanceOption(OptionGroup.Builder builder, - Option candidate) { - builder.add(candidate); - builder.add(IrisSodiumOptions.createMaxShadowDistanceSlider(vanillaOpts)); - - return builder; - } - - @ModifyArg(method = "quality", remap = false, - slice = @Slice( - from = @At(value = "CONSTANT", args = "stringValue=Graphics Quality"), - to = @At(value = "CONSTANT", args = "stringValue=Clouds Quality") - ), - at = @At(value = "INVOKE", remap = false, - target = "me/jellysquid/mods/sodium/client/gui/options/OptionGroup$Builder.add (" + - "Lme/jellysquid/mods/sodium/client/gui/options/Option;" + - ")Lme/jellysquid/mods/sodium/client/gui/options/OptionGroup$Builder;"), - allow = 1) - private static Option iris$replaceGraphicsQualityButton(Option candidate) { - if (!Iris.getIrisConfig().areShadersEnabled() && GlStateManager.supportsFramebufferBlit()) { - return candidate; - } else { - return IrisSodiumOptions.createLimitedVideoSettingsButton(vanillaOpts); - } - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/options/MixinSodiumGameOptions.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/options/MixinSodiumGameOptions.java deleted file mode 100644 index 75310208d..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/options/MixinSodiumGameOptions.java +++ /dev/null @@ -1,28 +0,0 @@ -package net.coderbot.iris.compat.sodium.mixin.options; - -import me.jellysquid.mods.sodium.client.gui.SodiumGameOptions; -import net.coderbot.iris.Iris; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -import java.io.IOException; - -/** - * Ensures that the Iris config file is written whenever Sodium options are changed, in case the user changed the - * Max Shadow Distance setting. - */ -@Mixin(SodiumGameOptions.class) -public class MixinSodiumGameOptions { - @Inject(method = "writeChanges()V", at = @At("RETURN"), remap = false) - public void iris$writeIrisConfig(CallbackInfo ci) { - try { - if (Iris.getIrisConfig() != null) { - Iris.getIrisConfig().save(); - } - } catch (IOException e) { - e.printStackTrace(); - } - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/options/MixinSodiumOptionsGUI.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/options/MixinSodiumOptionsGUI.java deleted file mode 100644 index 46164e5af..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/options/MixinSodiumOptionsGUI.java +++ /dev/null @@ -1,51 +0,0 @@ -package net.coderbot.iris.compat.sodium.mixin.options; - -import com.google.common.collect.ImmutableList; -import me.jellysquid.mods.sodium.client.gui.SodiumOptionsGUI; -import me.jellysquid.mods.sodium.client.gui.options.OptionPage; -import net.coderbot.iris.gui.screen.ShaderPackScreen; -import net.minecraft.client.gui.screen.Screen; -import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TranslatableText; -import org.spongepowered.asm.mixin.Final; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.Unique; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -import java.util.List; - -/** - * Adds our Shader Packs button to the Sodium options GUI. - */ -@Mixin(SodiumOptionsGUI.class) -public class MixinSodiumOptionsGUI extends Screen { - @Shadow(remap = false) - @Final - private List pages; - - @Unique - private OptionPage shaderPacks; - - // make compiler happy - protected MixinSodiumOptionsGUI(Component title) { - super(title); - } - - @Inject(method = "", at = @At("RETURN")) - private void iris$onInit(Screen prevScreen, CallbackInfo ci) { - String shaderPacksTranslated = new TranslatableText("options.iris.shaderPackSelection").getString(); - shaderPacks = new OptionPage(shaderPacksTranslated, ImmutableList.of()); - pages.add(shaderPacks); - } - - @Inject(method = "setPage", at = @At("HEAD"), remap = false, cancellable = true) - private void iris$onSetPage(OptionPage page, CallbackInfo ci) { - if (page == shaderPacks) { - minecraft.setScreen(new ShaderPackScreen(this)); - ci.cancel(); - } - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/pbr_animation/MixinTextureAtlasSprite.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/pbr_animation/MixinTextureAtlasSprite.java deleted file mode 100644 index 56423ca26..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/pbr_animation/MixinTextureAtlasSprite.java +++ /dev/null @@ -1,28 +0,0 @@ -package net.coderbot.iris.compat.sodium.mixin.pbr_animation; - -import net.caffeinemc.mods.sodium.client.render.texture.SpriteUtil; -import net.coderbot.iris.texture.pbr.PBRSpriteHolder; -import net.coderbot.iris.texture.pbr.TextureAtlasSpriteExtension; -import net.minecraft.client.renderer.texture.TextureAtlasSprite; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -@Mixin(TextureAtlasSprite.class) -public class MixinTextureAtlasSprite { - @Inject(method = "markActive()V", at = @At("TAIL"), remap = false) - private void iris$onTailMarkActive(CallbackInfo ci) { - PBRSpriteHolder pbrHolder = ((TextureAtlasSpriteExtension) this).getPBRHolder(); - if (pbrHolder != null) { - TextureAtlasSprite normalSprite = pbrHolder.getNormalSprite(); - TextureAtlasSprite specularSprite = pbrHolder.getSpecularSprite(); - if (normalSprite != null) { - SpriteUtil.markSpriteActive(normalSprite); - } - if (specularSprite != null) { - SpriteUtil.markSpriteActive(specularSprite); - } - } - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/separate_ao/MixinBlockRenderer.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/separate_ao/MixinBlockRenderer.java deleted file mode 100644 index 9d03a22cc..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/separate_ao/MixinBlockRenderer.java +++ /dev/null @@ -1,47 +0,0 @@ -package net.coderbot.iris.compat.sodium.mixin.separate_ao; - -import me.jellysquid.mods.sodium.client.render.chunk.compile.buffers.ChunkModelBuffers; -import me.jellysquid.mods.sodium.client.render.pipeline.BlockRenderer; -import me.jellysquid.mods.sodium.client.util.color.ColorABGR; -import net.coderbot.iris.block_rendering.BlockRenderingSettings; -import net.minecraft.client.resources.model.BakedModel; -import net.minecraft.core.BlockPos; -import net.minecraft.world.level.BlockAndTintGetter; -import net.minecraft.world.level.block.state.BlockState; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Unique; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.Redirect; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -/** - * Allows vertex AO to be optionally passed in the alpha channel of the vertex color instead of being multiplied - * through into the RGB values. - */ -@Mixin(BlockRenderer.class) -public class MixinBlockRenderer { - @Unique - private boolean useSeparateAo; - - @Inject(method = "renderModel", remap = false, at = @At("HEAD")) - private void renderModel(BlockAndTintGetter level, BlockState state, BlockPos pos, BakedModel model, - ChunkModelBuffers buffers, boolean cull, long seed, CallbackInfoReturnable cir) { - this.useSeparateAo = BlockRenderingSettings.INSTANCE.shouldUseSeparateAo(); - } - - @Redirect(method = "renderQuad", remap = false, - at = @At(value = "INVOKE", - target = "me/jellysquid/mods/sodium/client/util/color/ColorABGR.mul (IF)I", - remap = false)) - private int iris$applySeparateAo(int color, float ao) { - if (useSeparateAo) { - color &= 0x00FFFFFF; - color |= ((int) (ao * 255.0f)) << 24; - } else { - color = ColorABGR.mul(color, ao); - } - - return color; - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/separate_ao/MixinFluidRenderer.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/separate_ao/MixinFluidRenderer.java deleted file mode 100644 index 6d4f320c2..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/separate_ao/MixinFluidRenderer.java +++ /dev/null @@ -1,43 +0,0 @@ -package net.coderbot.iris.compat.sodium.mixin.separate_ao; - -import me.jellysquid.mods.sodium.client.render.chunk.compile.buffers.ChunkModelBuffers; -import me.jellysquid.mods.sodium.client.render.pipeline.FluidRenderer; -import me.jellysquid.mods.sodium.client.util.color.ColorABGR; -import net.coderbot.iris.block_rendering.BlockRenderingSettings; -import net.minecraft.core.BlockPos; -import net.minecraft.world.level.BlockAndTintGetter; -import net.minecraft.world.level.material.FluidState; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Unique; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.Redirect; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -/** - * Basically the same as {@link MixinBlockRenderer}, but for fluid rendering. - */ -@Mixin(FluidRenderer.class) -public class MixinFluidRenderer { - @Unique - private boolean useSeparateAo; - - @Inject(method = "render", remap = false, at = @At("HEAD")) - private void iris$cacheSeparateAoSetting(BlockAndTintGetter level, FluidState fluidState, BlockPos pos, - ChunkModelBuffers buffers, CallbackInfoReturnable cir) { - this.useSeparateAo = BlockRenderingSettings.INSTANCE.shouldUseSeparateAo(); - } - - @Redirect(method = "calculateQuadColors", remap = false, - at = @At(value = "INVOKE", target = "me/jellysquid/mods/sodium/client/util/color/ColorABGR.mul (IF)I", remap = false)) - private int iris$applySeparateAo(int color, float ao) { - if (useSeparateAo) { - color &= 0x00FFFFFF; - color |= ((int) (ao * 255.0f)) << 24; - } else { - color = ColorABGR.mul(color, ao); - } - - return color; - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/shader_overrides/MixinChunkProgram.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/shader_overrides/MixinChunkProgram.java deleted file mode 100644 index 3137af3a5..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/shader_overrides/MixinChunkProgram.java +++ /dev/null @@ -1,57 +0,0 @@ -package net.coderbot.iris.compat.sodium.mixin.shader_overrides; - -import me.jellysquid.mods.sodium.client.render.chunk.shader.ChunkProgram; -import net.coderbot.iris.gl.IrisRenderSystem; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Redirect; - -import java.nio.FloatBuffer; - -/** - * Modifies {@link ChunkProgram} to handle cases where uniforms might not be present in the target program. - */ -@Mixin(ChunkProgram.class) -public class MixinChunkProgram { - @Redirect(method = "setup", remap = false, - at = @At(value = "INVOKE", target = "org/lwjgl/opengl/GL20C.glUniform1i (II)V", remap = false)) - private void iris$redirectUniform1i(int location, int value) { - if (location == -1) { - return; - } - - IrisRenderSystem.uniform1i(location, value); - } - - @Redirect(method = "setup", remap = false, - at = @At(value = "INVOKE", target = "org/lwjgl/opengl/GL20C.glUniform3f (IFFF)V", remap = false)) - private void iris$redirectUniform3f(int location, float v1, float v2, float v3) { - if (location == -1) { - return; - } - - IrisRenderSystem.uniform3f(location, v1, v2, v3); - } - - @Redirect(method = "setup", remap = false, - at = @At(value = "INVOKE", target = "org/lwjgl/opengl/GL20C.glUniform2f (IFF)V", remap = false)) - private void iris$redirectUniform2f(int location, float v1, float v2) { - if (location == -1) { - return; - } - - IrisRenderSystem.uniform2f(location, v1, v2); - } - - @Redirect(method = "setup", remap = false, - at = @At(value = "INVOKE", - target = "org/lwjgl/opengl/GL20C.glUniformMatrix4fv (IZLjava/nio/FloatBuffer;)V", - remap = false)) - private void iris$redirectUniformMatrix4fv(int location, boolean transpose, FloatBuffer buffer) { - if (location == -1) { - return; - } - - IrisRenderSystem.uniformMatrix4fv(location, transpose, buffer); - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/shader_overrides/MixinChunkRenderManager.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/shader_overrides/MixinChunkRenderManager.java deleted file mode 100644 index 8a6483bf6..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/shader_overrides/MixinChunkRenderManager.java +++ /dev/null @@ -1,27 +0,0 @@ -package net.coderbot.iris.compat.sodium.mixin.shader_overrides; - -import com.mojang.blaze3d.vertex.PoseStack; -import me.jellysquid.mods.sodium.client.render.chunk.ChunkRenderBackend; -import me.jellysquid.mods.sodium.client.render.chunk.ChunkRenderManager; -import me.jellysquid.mods.sodium.client.render.chunk.passes.BlockRenderPass; -import net.coderbot.iris.compat.sodium.impl.shader_overrides.ChunkRenderBackendExt; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Redirect; - -@Mixin(ChunkRenderManager.class) -public class MixinChunkRenderManager { - @Redirect(method = "renderLayer", - at = @At(value = "INVOKE", - target = "me/jellysquid/mods/sodium/client/render/chunk/ChunkRenderBackend.begin (" + - "Lcom/mojang/blaze3d/vertex/PoseStack;" + - ")V")) - private void iris$backendBeginExt(ChunkRenderBackend backend, PoseStack poseStack, - PoseStack poseStackArg, BlockRenderPass pass, double x, double y, double z) { - if (backend instanceof ChunkRenderBackendExt) { - ((ChunkRenderBackendExt) backend).iris$begin(poseStack, pass); - } else { - backend.begin(poseStack); - } - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/shader_overrides/MixinChunkRenderShaderBackend.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/shader_overrides/MixinChunkRenderShaderBackend.java deleted file mode 100644 index 769618cc8..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/shader_overrides/MixinChunkRenderShaderBackend.java +++ /dev/null @@ -1,180 +0,0 @@ -package net.coderbot.iris.compat.sodium.mixin.shader_overrides; - -import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.PoseStack; -import me.jellysquid.mods.sodium.client.gl.device.RenderDevice; -import me.jellysquid.mods.sodium.client.gl.shader.GlShader; -import me.jellysquid.mods.sodium.client.gl.shader.ShaderConstants; -import me.jellysquid.mods.sodium.client.gl.shader.ShaderLoader; -import me.jellysquid.mods.sodium.client.gl.shader.ShaderType; -import me.jellysquid.mods.sodium.client.model.vertex.type.ChunkVertexType; -import me.jellysquid.mods.sodium.client.render.chunk.passes.BlockRenderPass; -import me.jellysquid.mods.sodium.client.render.chunk.shader.ChunkProgram; -import me.jellysquid.mods.sodium.client.render.chunk.shader.ChunkRenderShaderBackend; -import net.coderbot.iris.Iris; -import net.coderbot.iris.compat.sodium.impl.shader_overrides.ChunkRenderBackendExt; -import net.coderbot.iris.compat.sodium.impl.shader_overrides.IrisChunkProgramOverrides; -import net.coderbot.iris.compat.sodium.impl.vertex_format.IrisModelVertexFormats; -import net.coderbot.iris.gl.program.ProgramSamplers; -import net.coderbot.iris.gl.program.ProgramUniforms; -import net.coderbot.iris.pipeline.SodiumTerrainPipeline; -import net.coderbot.iris.pipeline.WorldRenderingPipeline; -import net.coderbot.iris.shaderpack.transform.StringTransformations; -import net.coderbot.iris.shaderpack.transform.Transformations; -import net.coderbot.iris.shadows.ShadowRenderingState; -import net.minecraft.resources.ResourceLocation; -import org.apache.commons.io.IOUtils; -import org.spongepowered.asm.mixin.Final; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.Unique; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.Redirect; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -import java.io.IOException; -import java.io.InputStream; -import java.nio.charset.StandardCharsets; -import java.util.List; - -/** - * Applies the Iris shader program overrides to Sodium's chunk rendering pipeline. - */ -@Mixin(ChunkRenderShaderBackend.class) -public class MixinChunkRenderShaderBackend implements ChunkRenderBackendExt { - @Unique - private IrisChunkProgramOverrides irisChunkProgramOverrides; - - @Unique - private RenderDevice device; - - @Unique - private ChunkProgram override; - - @Shadow(remap = false) - protected ChunkProgram activeProgram; - - @Shadow - public void begin(PoseStack poseStack) { - throw new AssertionError(); - } - - @Shadow - @Final - protected ChunkVertexType vertexType; - - @Inject(method = "", at = @At("RETURN"), remap = false) - private void iris$onInit(ChunkVertexType vertexType, CallbackInfo ci) { - irisChunkProgramOverrides = new IrisChunkProgramOverrides(); - } - - @Redirect(method = "createShader", at = @At(value = "INVOKE", target = "Lme/jellysquid/mods/sodium/client/gl/shader/ShaderLoader;loadShader(Lme/jellysquid/mods/sodium/client/gl/device/RenderDevice;Lme/jellysquid/mods/sodium/client/gl/shader/ShaderType;Lnet/minecraft/resources/ResourceLocation;Ljava/util/List;)Lme/jellysquid/mods/sodium/client/gl/shader/GlShader;", ordinal = 0)) - private GlShader iris$redirectOriginalShader(RenderDevice device, ShaderType type, ResourceLocation name, List constants) { - if (this.vertexType == IrisModelVertexFormats.MODEL_VERTEX_XHFP) { - String shader = getShaderSource(getShaderPath(name)); - shader = shader.replace("v_LightCoord = a_LightCoord", "v_LightCoord = (iris_LightmapTextureMatrix * vec4(a_LightCoord, 0, 1)).xy"); - - StringTransformations transformations = new StringTransformations(shader); - - transformations.injectLine(Transformations.InjectionPoint.BEFORE_CODE, "mat4 iris_LightmapTextureMatrix = mat4(vec4(0.00390625, 0.0, 0.0, 0.0), vec4(0.0, 0.00390625, 0.0, 0.0), vec4(0.0, 0.0, 0.00390625, 0.0), vec4(0.03125, 0.03125, 0.03125, 1.0));"); - - return new GlShader(device, type, name, transformations.toString(), ShaderConstants.fromStringList(constants)); - } else { - return ShaderLoader.loadShader(device, type, name, constants); - } - } - - private static String getShaderPath(ResourceLocation name) { - return String.format("/assets/%s/shaders/%s", name.getNamespace(), name.getPath()); - } - - private static String getShaderSource(String path) { - try { - InputStream in = ShaderLoader.class.getResourceAsStream(path); - Throwable var2 = null; - - String var3; - try { - if (in == null) { - throw new RuntimeException("Shader not found: " + path); - } - - var3 = IOUtils.toString(in, StandardCharsets.UTF_8); - } catch (Throwable var13) { - var2 = var13; - throw var13; - } finally { - if (in != null) { - if (var2 != null) { - try { - in.close(); - } catch (Throwable var12) { - var2.addSuppressed(var12); - } - } else { - in.close(); - } - } - - } - - return var3; - } catch (IOException var15) { - throw new RuntimeException("Could not read shader sources", var15); - } - } - - - @Inject(method = "createShaders", at = @At("HEAD"), remap = false) - private void iris$onCreateShaders(RenderDevice device, CallbackInfo ci) { - this.device = device; - WorldRenderingPipeline worldRenderingPipeline = Iris.getPipelineManager().getPipelineNullable(); - SodiumTerrainPipeline sodiumTerrainPipeline = null; - - if (worldRenderingPipeline != null) { - sodiumTerrainPipeline = worldRenderingPipeline.getSodiumTerrainPipeline(); - } - - irisChunkProgramOverrides.createShaders(sodiumTerrainPipeline, device); - } - - @Override - public void iris$begin(PoseStack poseStack, BlockRenderPass pass) { - if (ShadowRenderingState.areShadowsCurrentlyBeingRendered()) { - // No back face culling during the shadow pass - // TODO: Hopefully this won't be necessary in the future... - RenderSystem.disableCull(); - } - - this.override = irisChunkProgramOverrides.getProgramOverride(device, pass); - - Iris.getPipelineManager().getPipeline().ifPresent(WorldRenderingPipeline::beginSodiumTerrainRendering); - begin(poseStack); - } - - @Inject(method = "begin", - at = @At(value = "FIELD", - target = "me/jellysquid/mods/sodium/client/render/chunk/shader/ChunkRenderShaderBackend.activeProgram" + - ": Lme/jellysquid/mods/sodium/client/render/chunk/shader/ChunkProgram;", - args = "opcode=PUTFIELD", - remap = false, - shift = At.Shift.AFTER)) - private void iris$applyOverride(PoseStack poseStack, CallbackInfo ci) { - if (override != null) { - this.activeProgram = override; - } - } - - @Inject(method = "end", at = @At("RETURN")) - private void iris$onEnd(PoseStack poseStack, CallbackInfo ci) { - ProgramUniforms.clearActiveUniforms(); - ProgramSamplers.clearActiveSamplers(); - Iris.getPipelineManager().getPipeline().ifPresent(WorldRenderingPipeline::endSodiumTerrainRendering); - } - - @Inject(method = "delete", at = @At("HEAD"), remap = false) - private void iris$onDelete(CallbackInfo ci) { - irisChunkProgramOverrides.deleteShaders(); - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/shader_overrides/MixinShaderType.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/shader_overrides/MixinShaderType.java deleted file mode 100644 index 56af4d60d..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/shader_overrides/MixinShaderType.java +++ /dev/null @@ -1,28 +0,0 @@ -package net.coderbot.iris.compat.sodium.mixin.shader_overrides; - -import me.jellysquid.mods.sodium.client.gl.shader.ShaderType; -import net.coderbot.iris.compat.sodium.impl.shader_overrides.IrisShaderTypes; -import org.apache.commons.lang3.ArrayUtils; -import org.lwjgl.opengl.GL32C; -import org.spongepowered.asm.mixin.Final; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Mutable; -import org.spongepowered.asm.mixin.Shadow; - -@Mixin(ShaderType.class) -public class MixinShaderType { - @SuppressWarnings("target") - @Shadow(remap = false) - @Final - @Mutable - private static ShaderType[] $VALUES; - - static { - int baseOrdinal = $VALUES.length; - - IrisShaderTypes.GEOMETRY - = ShaderTypeAccessor.createShaderType("GEOMETRY", baseOrdinal, GL32C.GL_GEOMETRY_SHADER); - - $VALUES = ArrayUtils.addAll($VALUES, IrisShaderTypes.GEOMETRY); - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/shader_overrides/ShaderTypeAccessor.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/shader_overrides/ShaderTypeAccessor.java deleted file mode 100644 index 771bc76ab..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/shader_overrides/ShaderTypeAccessor.java +++ /dev/null @@ -1,13 +0,0 @@ -package net.coderbot.iris.compat.sodium.mixin.shader_overrides; - -import me.jellysquid.mods.sodium.client.gl.shader.ShaderType; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.gen.Invoker; - -@Mixin(ShaderType.class) -public interface ShaderTypeAccessor { - @Invoker(value = "") - static ShaderType createShaderType(String name, int ordinal, int glId) { - throw new AssertionError(); - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/shadow_map/MixinChunkRenderManager.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/shadow_map/MixinChunkRenderManager.java deleted file mode 100644 index f761c1769..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/shadow_map/MixinChunkRenderManager.java +++ /dev/null @@ -1,173 +0,0 @@ -package net.coderbot.iris.compat.sodium.mixin.shadow_map; - -import it.unimi.dsi.fastutil.objects.ObjectArrayFIFOQueue; -import it.unimi.dsi.fastutil.objects.ObjectArrayList; -import it.unimi.dsi.fastutil.objects.ObjectList; -import me.jellysquid.mods.sodium.client.render.SodiumWorldRenderer; -import me.jellysquid.mods.sodium.client.render.chunk.ChunkRenderBackend; -import me.jellysquid.mods.sodium.client.render.chunk.ChunkRenderContainer; -import me.jellysquid.mods.sodium.client.render.chunk.ChunkRenderManager; -import me.jellysquid.mods.sodium.client.render.chunk.cull.ChunkFaceFlags; -import me.jellysquid.mods.sodium.client.render.chunk.lists.ChunkRenderList; -import me.jellysquid.mods.sodium.client.render.chunk.passes.BlockRenderPass; -import me.jellysquid.mods.sodium.client.render.chunk.passes.BlockRenderPassManager; -import net.coderbot.iris.compat.sodium.impl.shadow_map.SwappableChunkRenderManager; -import net.coderbot.iris.shadows.ShadowRenderingState; -import net.minecraft.client.multiplayer.ClientLevel; -import net.minecraft.world.level.block.entity.BlockEntity; -import org.spongepowered.asm.mixin.Final; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Mutable; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.Unique; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.Redirect; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -/** - * Modifies {@link ChunkRenderManager} to support maintaining a separate visibility list for the shadow camera, as well - * as disabling chunk rebuilds when computing visibility for the shadow camera. - */ -@Mixin(ChunkRenderManager.class) -public class MixinChunkRenderManager implements SwappableChunkRenderManager { - @Shadow(remap = false) - @Final - private ObjectArrayFIFOQueue> importantRebuildQueue; - - @Shadow(remap = false) - @Final - private ObjectArrayFIFOQueue> rebuildQueue; - - @Shadow(remap = false) - @Final - @Mutable - private ChunkRenderList[] chunkRenderLists; - - @Shadow(remap = false) - @Final - @Mutable - private ObjectList> tickableChunks; - - @Shadow(remap = false) - @Final - @Mutable - private ObjectList visibleBlockEntities; - - @Shadow(remap = false) - private boolean dirty; - - @Shadow(remap = false) - private int visibleChunkCount; - - @Unique - private ChunkRenderList[] chunkRenderListsSwap; - - @Unique - private ObjectList> tickableChunksSwap; - - @Unique - private ObjectList visibleBlockEntitiesSwap; - - @Unique - private int visibleChunkCountSwap; - - @Unique - private boolean dirtySwap; - - @Unique - private static final ObjectArrayFIFOQueue EMPTY_QUEUE = new ObjectArrayFIFOQueue<>(); - - @Inject(method = "", at = @At("RETURN")) - private void iris$onInit(SodiumWorldRenderer renderer, ChunkRenderBackend backend, - BlockRenderPassManager renderPassManager, ClientLevel level, int renderDistance, - CallbackInfo ci) { - this.chunkRenderListsSwap = new ChunkRenderList[BlockRenderPass.COUNT]; - this.tickableChunksSwap = new ObjectArrayList<>(); - this.visibleBlockEntitiesSwap = new ObjectArrayList<>(); - - for (int i = 0; i < this.chunkRenderListsSwap.length; i++) { - this.chunkRenderListsSwap[i] = new ChunkRenderList<>(); - } - - this.dirtySwap = true; - } - - @Override - public void iris$swapVisibilityState() { - ChunkRenderList[] chunkRenderListsTmp = chunkRenderLists; - chunkRenderLists = chunkRenderListsSwap; - chunkRenderListsSwap = chunkRenderListsTmp; - - ObjectList> tickableChunksTmp = tickableChunks; - tickableChunks = tickableChunksSwap; - tickableChunksSwap = tickableChunksTmp; - - ObjectList visibleBlockEntitiesTmp = visibleBlockEntities; - visibleBlockEntities = visibleBlockEntitiesSwap; - visibleBlockEntitiesSwap = visibleBlockEntitiesTmp; - - int visibleChunkCountTmp = visibleChunkCount; - visibleChunkCount = visibleChunkCountSwap; - visibleChunkCountSwap = visibleChunkCountTmp; - - boolean dirtyTmp = dirty; - dirty = dirtySwap; - dirtySwap = dirtyTmp; - } - - @Redirect(method = "addChunk", remap = false, - at = @At(value = "INVOKE", - target = "me/jellysquid/mods/sodium/client/render/chunk/ChunkRenderContainer.canRebuild ()Z", - remap = false)) - private boolean iris$noRebuildEnqueueingInShadowPass(ChunkRenderContainer render) { - if (ShadowRenderingState.areShadowsCurrentlyBeingRendered()) { - return false; - } - - return render.canRebuild(); - } - - @Inject(method = "computeVisibleFaces", at = @At("HEAD"), cancellable = true, remap = false) - private void iris$disableBlockFaceCullingInShadowPass(ChunkRenderContainer render, - CallbackInfoReturnable cir) { - // TODO: Enable chunk face culling during the shadow pass - if (ShadowRenderingState.areShadowsCurrentlyBeingRendered()) { - cir.setReturnValue(ChunkFaceFlags.ALL); - } - } - - @Redirect(method = "reset()V", remap = false, - at = @At(value = "FIELD", - target = "me/jellysquid/mods/sodium/client/render/chunk/ChunkRenderManager.rebuildQueue :" + - "Lit/unimi/dsi/fastutil/objects/ObjectArrayFIFOQueue;", - remap = false)) - private ObjectArrayFIFOQueue iris$noQueueClearingInShadowPass$rebuildQueue(ChunkRenderManager manager) { - if (ShadowRenderingState.areShadowsCurrentlyBeingRendered()) { - return EMPTY_QUEUE; - } else { - return rebuildQueue; - } - } - - @Redirect(method = "reset()V", remap = false, - at = @At(value = "FIELD", - target = "me/jellysquid/mods/sodium/client/render/chunk/ChunkRenderManager.importantRebuildQueue :" + - "Lit/unimi/dsi/fastutil/objects/ObjectArrayFIFOQueue;", - remap = false)) - private ObjectArrayFIFOQueue iris$noQueueClearingInShadowPass$importantRebuildQueue(ChunkRenderManager manager) { - if (ShadowRenderingState.areShadowsCurrentlyBeingRendered()) { - return EMPTY_QUEUE; - } else { - return importantRebuildQueue; - } - } - - @Inject(method = "updateChunks()V", at = @At("HEAD"), cancellable = true, remap = false) - private void iris$preventChunkRebuildsInShadowPass(CallbackInfo ci) { - if (ShadowRenderingState.areShadowsCurrentlyBeingRendered()) { - ci.cancel(); - } - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/shadow_map/MixinGameRendererContext.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/shadow_map/MixinGameRendererContext.java deleted file mode 100644 index 2fc784c37..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/shadow_map/MixinGameRendererContext.java +++ /dev/null @@ -1,26 +0,0 @@ -package net.coderbot.iris.compat.sodium.mixin.shadow_map; - -import com.mojang.math.Matrix4f; -import me.jellysquid.mods.sodium.client.render.GameRendererContext; -import net.coderbot.iris.shadows.ShadowRenderingState; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Redirect; - -/** - * Allows the Iris shadow map projection matrix to be used during shadow rendering instead of the player view's - * projection matrix. - */ -@Mixin(GameRendererContext.class) -public class MixinGameRendererContext { - @Redirect(method = "getModelViewProjectionMatrix", - at = @At(value = "INVOKE", - target = "com/mojang/math/Matrix4f.copy ()Lcom/mojang/math/Matrix4f;")) - private static Matrix4f iris$useShadowProjectionMatrix(Matrix4f matrix) { - if (ShadowRenderingState.areShadowsCurrentlyBeingRendered()) { - return ShadowRenderingState.getShadowOrthoMatrix(); - } else { - return matrix.copy(); - } - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/shadow_map/MixinSodiumWorldRenderer.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/shadow_map/MixinSodiumWorldRenderer.java deleted file mode 100644 index 899670e58..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/shadow_map/MixinSodiumWorldRenderer.java +++ /dev/null @@ -1,136 +0,0 @@ -package net.coderbot.iris.compat.sodium.mixin.shadow_map; - -import com.mojang.blaze3d.vertex.PoseStack; -import me.jellysquid.mods.sodium.client.render.SodiumWorldRenderer; -import me.jellysquid.mods.sodium.client.render.chunk.ChunkRenderManager; -import net.coderbot.iris.compat.sodium.impl.shadow_map.SwappableChunkRenderManager; -import net.coderbot.iris.pipeline.ShadowRenderer; -import net.coderbot.iris.shadows.ShadowRenderingState; -import net.minecraft.client.Camera; -import net.minecraft.client.renderer.RenderType; -import net.minecraft.client.renderer.culling.Frustum; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.Unique; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.Redirect; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -/** - * Ensures that the state of the chunk render visibility graph gets properly swapped when in the shadow map pass, - * because we must maintain one visibility graph for the shadow camera and one visibility graph for the player camera. - * - * Also ensures that the visibility graph is always rebuilt in the shadow pass, since the shadow camera is generally - * always moving. - */ -@Mixin(SodiumWorldRenderer.class) -public class MixinSodiumWorldRenderer { - @Shadow(remap = false) - private ChunkRenderManager chunkRenderManager; - - @Unique - private boolean wasRenderingShadows = false; - - @Shadow(remap = false) - private double lastCameraX, lastCameraY, lastCameraZ, lastCameraPitch, lastCameraYaw; - - @Unique - private double iris$swapLastCameraX, iris$swapLastCameraY, iris$swapLastCameraZ, - iris$swapLastCameraPitch, iris$swapLastCameraYaw; - - @Unique - private void swapCachedCameraPositions() { - double tmp; - - tmp = lastCameraX; - lastCameraX = iris$swapLastCameraX; - iris$swapLastCameraX = tmp; - - tmp = lastCameraY; - lastCameraY = iris$swapLastCameraY; - iris$swapLastCameraY = tmp; - - tmp = lastCameraZ; - lastCameraZ = iris$swapLastCameraZ; - iris$swapLastCameraZ = tmp; - - tmp = lastCameraPitch; - lastCameraPitch = iris$swapLastCameraPitch; - iris$swapLastCameraPitch = tmp; - - tmp = lastCameraYaw; - lastCameraYaw = iris$swapLastCameraYaw; - iris$swapLastCameraYaw = tmp; - } - - @Unique - private void iris$ensureStateSwapped() { - if (!wasRenderingShadows && ShadowRenderingState.areShadowsCurrentlyBeingRendered()) { - if (this.chunkRenderManager instanceof SwappableChunkRenderManager) { - ((SwappableChunkRenderManager) this.chunkRenderManager).iris$swapVisibilityState(); - swapCachedCameraPositions(); - } - - wasRenderingShadows = true; - } else if (wasRenderingShadows && !ShadowRenderingState.areShadowsCurrentlyBeingRendered()) { - if (this.chunkRenderManager instanceof SwappableChunkRenderManager) { - ((SwappableChunkRenderManager) this.chunkRenderManager).iris$swapVisibilityState(); - swapCachedCameraPositions(); - } - - wasRenderingShadows = false; - } - } - - @Inject(method = "updateChunks", at = @At("RETURN")) - private void iris$captureVisibleBlockEntities(Camera camera, Frustum frustum, boolean hasForcedFrustum, int frame, boolean spectator, CallbackInfo ci) { - if (ShadowRenderingState.areShadowsCurrentlyBeingRendered()) { - ShadowRenderer.visibleBlockEntities.addAll(this.chunkRenderManager.getVisibleBlockEntities()); - } - } - - @Inject(method = "scheduleTerrainUpdate()V", remap = false, - at = @At(value = "INVOKE", - target = "me/jellysquid/mods/sodium/client/render/chunk/ChunkRenderManager.markDirty ()V", - remap = false)) - private void iris$ensureStateSwappedBeforeMarkDirty(CallbackInfo ci) { - iris$ensureStateSwapped(); - } - - // note: inject after the reload() check, but before the markDirty() call. This injection point was chosen just - // because it's relatively solid and is in between those two calls. - @Inject(method = "updateChunks", remap = false, - at = @At(value = "FIELD", - target = "me/jellysquid/mods/sodium/client/render/SodiumWorldRenderer.lastCameraX : D", - ordinal = 0, - remap = false)) - private void iris$ensureStateSwappedInUpdateChunks(Camera camera, Frustum frustum, boolean hasForcedFrustum, - int frame, boolean spectator, CallbackInfo ci) { - iris$ensureStateSwapped(); - } - - @Redirect(method = "updateChunks", remap = false, - at = @At(value = "FIELD", - target = "me/jellysquid/mods/sodium/client/render/SodiumWorldRenderer.lastCameraX : D", - ordinal = 0, - remap = false)) - private double iris$forceChunkGraphRebuildInShadowPass(SodiumWorldRenderer worldRenderer) { - if (ShadowRenderingState.areShadowsCurrentlyBeingRendered()) { - // Returning NaN forces the comparison with the current camera to return false, making SodiumWorldRenderer - // think that the chunk graph always needs to be rebuilt. This is generally true in the shadow map pass, - // unless time is frozen. - // - // TODO: Detect when the sun/moon isn't moving - return Double.NaN; - } else { - return lastCameraX; - } - } - - @Inject(method = "drawChunkLayer", remap = false, at = @At("HEAD")) - private void iris$beforeDrawChunkLayer(RenderType renderType, PoseStack poseStack, double x, double y, - double z, CallbackInfo ci) { - iris$ensureStateSwapped(); - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/ChunkMeshAttributeAccessor.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/ChunkMeshAttributeAccessor.java deleted file mode 100644 index ba5ade0ba..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/ChunkMeshAttributeAccessor.java +++ /dev/null @@ -1,13 +0,0 @@ -package net.coderbot.iris.compat.sodium.mixin.vertex_format; - -import me.jellysquid.mods.sodium.client.render.chunk.format.ChunkMeshAttribute; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.gen.Invoker; - -@Mixin(ChunkMeshAttribute.class) -public interface ChunkMeshAttributeAccessor { - @Invoker(value = "") - static ChunkMeshAttribute createChunkMeshAttribute(String name, int ordinal) { - throw new AssertionError(); - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/GlVertexAttributeFormatAccessor.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/GlVertexAttributeFormatAccessor.java deleted file mode 100644 index 143ad04b6..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/GlVertexAttributeFormatAccessor.java +++ /dev/null @@ -1,13 +0,0 @@ -package net.coderbot.iris.compat.sodium.mixin.vertex_format; - -import me.jellysquid.mods.sodium.client.gl.attribute.GlVertexAttributeFormat; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.gen.Invoker; - -@Mixin(GlVertexAttributeFormat.class) -public interface GlVertexAttributeFormatAccessor { - @Invoker(value = "") - static GlVertexAttributeFormat createGlVertexAttributeFormat(int glId, int size) { - throw new AssertionError("accessor failure"); - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/MixinChunkMeshAttribute.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/MixinChunkMeshAttribute.java deleted file mode 100644 index 50a54ea54..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/MixinChunkMeshAttribute.java +++ /dev/null @@ -1,46 +0,0 @@ -package net.coderbot.iris.compat.sodium.mixin.vertex_format; - -import me.jellysquid.mods.sodium.client.render.chunk.format.ChunkMeshAttribute; -import net.coderbot.iris.compat.sodium.impl.vertex_format.IrisChunkMeshAttributes; -import org.apache.commons.lang3.ArrayUtils; -import org.spongepowered.asm.mixin.Final; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Mutable; -import org.spongepowered.asm.mixin.Shadow; - -/** - * Uses some rather hacky shenanigans to add a few new enum values to {@link ChunkMeshAttribute} corresponding to our - * extended vertex attributes. - * - * Credit goes to Nuclearfarts for the trick. - */ -@Mixin(ChunkMeshAttribute.class) -public class MixinChunkMeshAttribute { - @SuppressWarnings("target") - @Shadow(remap = false) - @Final - @Mutable - private static ChunkMeshAttribute[] $VALUES; - - static { - int baseOrdinal = $VALUES.length; - - IrisChunkMeshAttributes.NORMAL - = ChunkMeshAttributeAccessor.createChunkMeshAttribute("NORMAL", baseOrdinal); - IrisChunkMeshAttributes.TANGENT - = ChunkMeshAttributeAccessor.createChunkMeshAttribute("TANGENT", baseOrdinal + 1); - IrisChunkMeshAttributes.MID_TEX_COORD - = ChunkMeshAttributeAccessor.createChunkMeshAttribute("MID_TEX_COORD", baseOrdinal + 2); - IrisChunkMeshAttributes.BLOCK_ID - = ChunkMeshAttributeAccessor.createChunkMeshAttribute("BLOCK_ID", baseOrdinal + 3); - IrisChunkMeshAttributes.MID_BLOCK - = ChunkMeshAttributeAccessor.createChunkMeshAttribute("MID_BLOCK", baseOrdinal + 4); - - $VALUES = ArrayUtils.addAll($VALUES, - IrisChunkMeshAttributes.NORMAL, - IrisChunkMeshAttributes.TANGENT, - IrisChunkMeshAttributes.MID_TEX_COORD, - IrisChunkMeshAttributes.BLOCK_ID, - IrisChunkMeshAttributes.MID_BLOCK); - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/MixinChunkOneshotGraphicsState.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/MixinChunkOneshotGraphicsState.java deleted file mode 100644 index df054aee5..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/MixinChunkOneshotGraphicsState.java +++ /dev/null @@ -1,57 +0,0 @@ -package net.coderbot.iris.compat.sodium.mixin.vertex_format; - -import me.jellysquid.mods.sodium.client.gl.attribute.GlVertexAttributeBinding; -import me.jellysquid.mods.sodium.client.gl.attribute.GlVertexFormat; -import me.jellysquid.mods.sodium.client.gl.buffer.VertexData; -import me.jellysquid.mods.sodium.client.render.chunk.backends.oneshot.ChunkOneshotGraphicsState; -import me.jellysquid.mods.sodium.client.render.chunk.format.ChunkMeshAttribute; -import net.coderbot.iris.block_rendering.BlockRenderingSettings; -import net.coderbot.iris.compat.sodium.impl.IrisChunkShaderBindingPoints; -import net.coderbot.iris.compat.sodium.impl.vertex_format.IrisChunkMeshAttributes; -import org.apache.commons.lang3.ArrayUtils; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Unique; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.ModifyArg; - -@Mixin(ChunkOneshotGraphicsState.class) -public abstract class MixinChunkOneshotGraphicsState { - @Unique - private GlVertexFormat vertexFormat; - - @ModifyArg(method = "upload", remap = false, - at = @At(value = "INVOKE", - target = "me/jellysquid/mods/sodium/client/gl/device/CommandList.uploadData (" + - "Lme/jellysquid/mods/sodium/client/gl/buffer/GlMutableBuffer;" + - "Lme/jellysquid/mods/sodium/client/gl/buffer/VertexData;" + - ")V", - remap = false)) - @SuppressWarnings("unchecked") - private VertexData iris$captureVertexFormat(VertexData vertexData) { - vertexFormat = (GlVertexFormat) vertexData.format; - - return vertexData; - } - - @ModifyArg(method = "upload", remap = false, - at = @At(value = "INVOKE", - target = "me/jellysquid/mods/sodium/client/gl/tessellation/TessellationBinding. (" + - "Lme/jellysquid/mods/sodium/client/gl/buffer/GlBuffer;" + - "[Lme/jellysquid/mods/sodium/client/gl/attribute/GlVertexAttributeBinding;" + - "Z" + - ")V", - remap = false, - ordinal = 0)) - private GlVertexAttributeBinding[] iris$addAdditionalBindings(GlVertexAttributeBinding[] base) { - return BlockRenderingSettings.INSTANCE.shouldUseExtendedVertexFormat() ? ArrayUtils.addAll(base, - new GlVertexAttributeBinding(IrisChunkShaderBindingPoints.BLOCK_ID, - vertexFormat.getAttribute(IrisChunkMeshAttributes.BLOCK_ID)), - new GlVertexAttributeBinding(IrisChunkShaderBindingPoints.MID_TEX_COORD, - vertexFormat.getAttribute(IrisChunkMeshAttributes.MID_TEX_COORD)), - new GlVertexAttributeBinding(IrisChunkShaderBindingPoints.TANGENT, - vertexFormat.getAttribute(IrisChunkMeshAttributes.TANGENT)), - new GlVertexAttributeBinding(IrisChunkShaderBindingPoints.NORMAL, - vertexFormat.getAttribute(IrisChunkMeshAttributes.NORMAL)) - ) : base; - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/MixinGlVertexFormatBuilder.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/MixinGlVertexFormatBuilder.java deleted file mode 100644 index 9f9110db2..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/MixinGlVertexFormatBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -package net.coderbot.iris.compat.sodium.mixin.vertex_format; - -import me.jellysquid.mods.sodium.client.gl.attribute.GlVertexAttribute; -import me.jellysquid.mods.sodium.client.gl.attribute.GlVertexAttributeFormat; -import me.jellysquid.mods.sodium.client.gl.attribute.GlVertexFormat; -import net.coderbot.iris.compat.sodium.impl.vertex_format.IrisChunkMeshAttributes; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Redirect; - -import java.util.EnumMap; - -@Mixin(GlVertexFormat.Builder.class) -public class MixinGlVertexFormatBuilder { - private static final GlVertexAttribute EMPTY - = new GlVertexAttribute(GlVertexAttributeFormat.FLOAT, 0, false, 0, 0); - - @Redirect(method = "build", - at = @At(value = "INVOKE", - target = "java/util/EnumMap.get (Ljava/lang/Object;)Ljava/lang/Object;"), - remap = false) - private Object iris$suppressMissingAttributes(EnumMap map, Object key) { - Object value = map.get(key); - - if (value == null) { - if (key == IrisChunkMeshAttributes.NORMAL || key == IrisChunkMeshAttributes.TANGENT - || key == IrisChunkMeshAttributes.MID_TEX_COORD || key == IrisChunkMeshAttributes.BLOCK_ID - || key == IrisChunkMeshAttributes.MID_BLOCK) { - // Missing these attributes is acceptable and will be handled properly. - return EMPTY; - } - } - - return value; - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/MixinModelVertexUtil.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/MixinModelVertexUtil.java deleted file mode 100644 index f094a8e13..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/MixinModelVertexUtil.java +++ /dev/null @@ -1,58 +0,0 @@ -package net.coderbot.iris.compat.sodium.mixin.vertex_format; - -import me.jellysquid.mods.sodium.client.render.chunk.format.ModelVertexUtil; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.ModifyVariable; - -/** - * A ridiculous solution to an impossible problem - * - *

It is possible for a texture coordinate to equal 1.0 or be very close to 1.0 when - * a sprite is located on the very edge of the texture atlas. However, when presented - * with a value very close to 1.0, Sodium's code for encoding texture coordinates - * returns a value of 0.0 instead of 1.0 due to integer overflow. This code ensures - * that the incoming texture coordinate is clamped such that it will not get close - * enough to 1.0 to trigger the overflow.

- * - *

This flaw was extremely difficult to come across, because it requires a very - * specific set of circumstances to occur. The only two ways this bug can occur - * is either a fluid sprite being placed on the bottom or right of a texture atlas, - * which is a rare occurrence, or a small sprite being placed on to the edge - * of a relatively large atlas, and then that sprite actually showing up in terrain - * rendering. Both of these cases require specific combinations of resource packs or - * mods, often leading to situations where removing a given innocent mod appears to - * fix the issue.

- * - *

The release of Iris 1.2.5 introduced atlas stitching optimizations by - * PepperCode1, but also resulted in a peculiar error: some blocks in the Modfest - * modpack would display stripes/corruption on the side. As it turned out, the - * optimized stitching meant that textures were packed far tighter into the atlas, - * substantially increasing the likelihood of textures ending up on the problematic - * edges of the atlas.

- * - *

Initially, the blame was placed on the Indium mod, since the issue was only observed - * through some mods using the Fabric Rendering API. However, after investigation - * into Indium's code, nothing came up. The issue sat for months, until a report - * of the issue occurring in an environment containing only Iris and Sodium came in. - * This required a specific combination of resource packs to reproduce. Then, the - * blame fell on the stitching optimizations. This seemed like the clear culprit, - * but we were unable to find a correctness issue in the stitching code.

- * - *

Finally, after reaching out to the reporter of that issue, - * it turned out that they had already isolated a single resource pack that would - * trigger the bug. After a few hours in the debugger, the actual issue was uncovered. - *

- * - *

So, what's the end goal of all this rambling? Basically, resist the urge to place - * blame on to a mod. Instead, focus on getting a stable set of reproduction steps, - * which might take a while. Then, once those steps are available, use the debugger - * to its fullest extent.

- */ -@Mixin(ModelVertexUtil.class) -public class MixinModelVertexUtil { - @ModifyVariable(method = "denormalizeVertexTextureFloatAsShort", at = @At("HEAD"), remap = false) - private static float iris$clampUV(float uv) { - return Math.min(0.99999997F, uv); - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/MixinMultidrawChunkRenderBackend.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/MixinMultidrawChunkRenderBackend.java deleted file mode 100644 index 69b020563..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/MixinMultidrawChunkRenderBackend.java +++ /dev/null @@ -1,46 +0,0 @@ -package net.coderbot.iris.compat.sodium.mixin.vertex_format; - -import me.jellysquid.mods.sodium.client.gl.attribute.GlVertexAttributeBinding; -import me.jellysquid.mods.sodium.client.model.vertex.type.ChunkVertexType; -import me.jellysquid.mods.sodium.client.render.chunk.backends.multidraw.MultidrawChunkRenderBackend; -import me.jellysquid.mods.sodium.client.render.chunk.backends.multidraw.MultidrawGraphicsState; -import me.jellysquid.mods.sodium.client.render.chunk.shader.ChunkRenderShaderBackend; -import net.coderbot.iris.block_rendering.BlockRenderingSettings; -import net.coderbot.iris.compat.sodium.impl.IrisChunkShaderBindingPoints; -import net.coderbot.iris.compat.sodium.impl.vertex_format.IrisChunkMeshAttributes; -import org.apache.commons.lang3.ArrayUtils; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.ModifyArg; - -@Mixin(MultidrawChunkRenderBackend.class) -public abstract class MixinMultidrawChunkRenderBackend extends ChunkRenderShaderBackend { - public MixinMultidrawChunkRenderBackend(ChunkVertexType vertexType) { - // make compiler happy - super(vertexType); - } - - @ModifyArg(method = "createRegionTessellation", remap = false, - at = @At(value = "INVOKE", - target = "me/jellysquid/mods/sodium/client/gl/tessellation/TessellationBinding. (" + - "Lme/jellysquid/mods/sodium/client/gl/buffer/GlBuffer;" + - "[Lme/jellysquid/mods/sodium/client/gl/attribute/GlVertexAttributeBinding;" + - "Z" + - ")V", - remap = false, - ordinal = 0)) - private GlVertexAttributeBinding[] iris$addAdditionalBindings(GlVertexAttributeBinding[] base) { - return BlockRenderingSettings.INSTANCE.shouldUseExtendedVertexFormat() ? ArrayUtils.addAll(base, - new GlVertexAttributeBinding(IrisChunkShaderBindingPoints.NORMAL, - vertexFormat.getAttribute(IrisChunkMeshAttributes.NORMAL)), - new GlVertexAttributeBinding(IrisChunkShaderBindingPoints.TANGENT, - vertexFormat.getAttribute(IrisChunkMeshAttributes.TANGENT)), - new GlVertexAttributeBinding(IrisChunkShaderBindingPoints.MID_TEX_COORD, - vertexFormat.getAttribute(IrisChunkMeshAttributes.MID_TEX_COORD)), - new GlVertexAttributeBinding(IrisChunkShaderBindingPoints.BLOCK_ID, - vertexFormat.getAttribute(IrisChunkMeshAttributes.BLOCK_ID)), - new GlVertexAttributeBinding(IrisChunkShaderBindingPoints.MID_BLOCK, - vertexFormat.getAttribute(IrisChunkMeshAttributes.MID_BLOCK)) - ) : base; - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/MixinSodiumWorldRenderer.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/MixinSodiumWorldRenderer.java deleted file mode 100644 index 1b8bbebb4..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/MixinSodiumWorldRenderer.java +++ /dev/null @@ -1,27 +0,0 @@ -package net.coderbot.iris.compat.sodium.mixin.vertex_format; - -import me.jellysquid.mods.sodium.client.model.vertex.type.ChunkVertexType; -import me.jellysquid.mods.sodium.client.render.SodiumWorldRenderer; -import net.coderbot.iris.block_rendering.BlockRenderingSettings; -import net.coderbot.iris.compat.sodium.impl.vertex_format.IrisModelVertexFormats; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.ModifyArg; - -/** - * Enables usage of the extended vertex format needed by Iris. - */ -@Mixin(SodiumWorldRenderer.class) -public class MixinSodiumWorldRenderer { - @ModifyArg(method = "initRenderer()V", remap = false, - at = @At(value = "INVOKE", remap = false, - target = "me/jellysquid/mods/sodium/client/render/SodiumWorldRenderer.createChunkRenderBackend (" + - "Lme/jellysquid/mods/sodium/client/gl/device/RenderDevice;" + - "Lme/jellysquid/mods/sodium/client/gui/SodiumGameOptions;" + - "Lme/jellysquid/mods/sodium/client/model/vertex/type/ChunkVertexType;" + - ")Lme/jellysquid/mods/sodium/client/render/chunk/ChunkRenderBackend;")) - private ChunkVertexType iris$overrideVertexType(ChunkVertexType vertexType) { - return BlockRenderingSettings.INSTANCE.shouldUseExtendedVertexFormat() - ? IrisModelVertexFormats.MODEL_VERTEX_XHFP : vertexType; - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/entity/MixinBufferBuilder_ExtendedVertexFormatCompat.java b/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/entity/MixinBufferBuilder_ExtendedVertexFormatCompat.java deleted file mode 100644 index d6e9ebef8..000000000 --- a/common/src/shaders/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/entity/MixinBufferBuilder_ExtendedVertexFormatCompat.java +++ /dev/null @@ -1,41 +0,0 @@ -package net.coderbot.iris.compat.sodium.mixin.vertex_format.entity; - -import com.mojang.blaze3d.vertex.BufferBuilder; -import com.mojang.blaze3d.vertex.VertexFormat; -import me.jellysquid.mods.sodium.client.model.vertex.VanillaVertexTypes; -import me.jellysquid.mods.sodium.client.model.vertex.type.VertexType; -import net.coderbot.iris.compat.sodium.impl.vertex_format.entity_xhfp.ExtendedGlyphVertexType; -import net.coderbot.iris.compat.sodium.impl.vertex_format.entity_xhfp.ExtendedQuadVertexType; -import net.coderbot.iris.vertices.IrisVertexFormats; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.ModifyVariable; - -/** - * Apply after Sodium's mixins so that we can mix in to the added method. We do this so that we have the option to - * use the non-extended vertex format in some cases even if shaders are enabled, without assumptions in the sodium - * compatibility code getting in the way. - */ -@Mixin(value = BufferBuilder.class, priority = 1010) -public class MixinBufferBuilder_ExtendedVertexFormatCompat { - @Shadow - private VertexFormat format; - - @SuppressWarnings("target") - @ModifyVariable(method = "createSink(Lme/jellysquid/mods/sodium/client/model/vertex/type/VertexType;)Lme/jellysquid/mods/sodium/client/model/vertex/VertexSink;", - at = @At("HEAD"), remap = false) - private VertexType iris$createSink(VertexType type) { - if (format == IrisVertexFormats.ENTITY) { - if (type == VanillaVertexTypes.QUADS) { - return ExtendedQuadVertexType.INSTANCE; - } - } else if (format == IrisVertexFormats.TERRAIN) { - if (type == VanillaVertexTypes.GLYPHS) { - return ExtendedGlyphVertexType.INSTANCE; - } - } - - return type; - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/gl/texture/DepthCopyStrategy.java b/common/src/shaders/java/net/coderbot/iris/gl/texture/DepthCopyStrategy.java index 65877be4c..a267215b9 100644 --- a/common/src/shaders/java/net/coderbot/iris/gl/texture/DepthCopyStrategy.java +++ b/common/src/shaders/java/net/coderbot/iris/gl/texture/DepthCopyStrategy.java @@ -102,15 +102,15 @@ static DepthCopyStrategy fastest(boolean combinedStencilRequired) { // // Perhaps calling GL43.isAvailable would be a different option, but we only need one // function, so we just check for that function. - if (GL.getCapabilities().glCopyImageSubData != MemoryUtil.NULL) { - return new Gl43CopyImage(); - } + //if (GL.getCapabilities().glCopyImageSubData != MemoryUtil.NULL) { + // return new Gl43CopyImage(); + //} - if (combinedStencilRequired) { - return new Gl30BlitFbCombinedDepthStencil(); - } else { + //if (combinedStencilRequired) { + // return new Gl30BlitFbCombinedDepthStencil(); + //} else { return new Gl20CopyTexture(); - } + //} } boolean needsDestFramebuffer(); diff --git a/common/src/shaders/java/net/coderbot/iris/gui/element/ShaderPackSelectionList.java b/common/src/shaders/java/net/coderbot/iris/gui/element/ShaderPackSelectionList.java index 9426df2f2..24bb36f58 100644 --- a/common/src/shaders/java/net/coderbot/iris/gui/element/ShaderPackSelectionList.java +++ b/common/src/shaders/java/net/coderbot/iris/gui/element/ShaderPackSelectionList.java @@ -7,8 +7,10 @@ import net.minecraft.client.MinecraftClient; import net.minecraft.client.font.TextRenderer; import net.minecraft.client.gui.DrawableHelper; +import net.minecraft.client.util.Window; import net.minecraft.text.*; import net.minecraft.util.Formatting; +import org.lwjgl.opengl.Display; import java.util.ArrayList; import java.util.Collection; @@ -144,6 +146,13 @@ public Entry getEntry(int index) { return null; } + @Override + public void render(int mouseX, int mouseY, float tickDelta) { + super.render(mouseX, mouseY, tickDelta); + Window w = new Window(client); + renderList(w.getWidth() / 2, w.getWidth() / 2, mouseX, mouseY); + } + public static abstract class BaseEntry extends DrawableHelper implements Entry { protected BaseEntry() {} } @@ -177,7 +186,7 @@ public void updatePosition(int index, int x, int y) { } @Override - public void render(int index, int y, int x, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean hovered) { + public void render(int index, int x, int y, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean hovered) { TextRenderer font = MinecraftClient.getInstance().textRenderer; int color = 0xFFFFFF; String name = packName; diff --git a/common/src/shaders/java/net/coderbot/iris/gui/screen/ShaderPackScreen.java b/common/src/shaders/java/net/coderbot/iris/gui/screen/ShaderPackScreen.java index fa5b75197..255797bd6 100644 --- a/common/src/shaders/java/net/coderbot/iris/gui/screen/ShaderPackScreen.java +++ b/common/src/shaders/java/net/coderbot/iris/gui/screen/ShaderPackScreen.java @@ -87,11 +87,6 @@ public ShaderPackScreen(Screen parent) { this.irisTextComponent = new LiteralText(irisName).setStyle(new Style().setFormatting(Formatting.GRAY)); - if (Iris.getUpdateChecker().getUpdateMessage().isPresent()) { - this.updateComponent = new LiteralText("New update available!").setStyle(new Style().setFormatting(Formatting.GREEN).setUnderline(true)); - irisTextComponent.append(new LiteralText(" (outdated)").setStyle(new Style().setFormatting(Formatting.RED))); - } - refreshForChangedPack(); } @@ -107,6 +102,7 @@ public void render(int mouseX, int mouseY, float delta) { if (optionMenuOpen && this.shaderOptionList != null) { this.shaderOptionList.render(mouseX, mouseY, delta); } else { + System.out.println("ShaderPackListRender"); this.shaderPackList.render(mouseX, mouseY, delta); } } @@ -118,7 +114,7 @@ public void render(int mouseX, int mouseY, float delta) { } if (!this.guiHidden) { - drawCenteredString(this.textRenderer, "Iris Options", (int) (this.width * 0.5), 8, 0xFFFFFF); + drawCenteredString(this.textRenderer, "RadiumShaders", (int) (this.width * 0.5), 8, 0xFFFFFF); if (notificationDialog != null && notificationDialogTimer > 0) { drawCenteredString(this.textRenderer, notificationDialog.asFormattedString(), (int) (this.width * 0.5), 21, 0xFFFFFF); @@ -566,4 +562,13 @@ public boolean isDisplayingComment() { this.hoveredElementCommentTitle.isPresent() && !this.hoveredElementCommentBody.isEmpty(); } + + @Override + protected void buttonClicked(ButtonWidget button) { + if (button instanceof IrisButtonWidget ibw) { + ibw.click(); + return; + } + super.buttonClicked(button); + } } diff --git a/common/src/shaders/java/net/coderbot/iris/mixin/MixinGameRenderer.java b/common/src/shaders/java/net/coderbot/iris/mixin/MixinGameRenderer.java index 94923205d..988f746da 100644 --- a/common/src/shaders/java/net/coderbot/iris/mixin/MixinGameRenderer.java +++ b/common/src/shaders/java/net/coderbot/iris/mixin/MixinGameRenderer.java @@ -19,7 +19,7 @@ import net.minecraft.client.renderer.RenderType; import net.minecraft.entity.Entity; import net.minecraft.resource.ResourceManager; -import org.joml.Matrix4f; +import net.coderbot.iris.vendored.joml.Matrix4f; import org.lwjgl.opengl.GL11; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Unique; @@ -82,7 +82,7 @@ private void disableVanillaHandRendering(HeldItemRenderer instance, float tickDe // avoid breaking other mods such as Light Overlay: https://github.com/IrisShaders/Iris/issues/1356 @Inject(method = "renderWorld(IFJ)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/WorldRenderer;setupTerrain(Lnet/minecraft/entity/Entity;DLnet/minecraft/client/render/CameraView;IZ)V")) private void iris$renderTerrainShadows(int anaglyphFilter, float tickDelta, long limitTime, CallbackInfo ci) { - pipeline.renderShadows((LevelRendererAccessor) this); + pipeline.renderShadows((LevelRendererAccessor) MinecraftClient.getInstance().worldRenderer); } @Inject(method = "renderWorld(IFJ)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/WorldRenderer;renderSky(FI)V", shift = At.Shift.BEFORE)) diff --git a/common/src/shaders/java/net/coderbot/iris/mixin/MixinGlStateManager.java b/common/src/shaders/java/net/coderbot/iris/mixin/MixinGlStateManager.java index e57176483..9aecf0ea3 100644 --- a/common/src/shaders/java/net/coderbot/iris/mixin/MixinGlStateManager.java +++ b/common/src/shaders/java/net/coderbot/iris/mixin/MixinGlStateManager.java @@ -8,4 +8,8 @@ @Mixin(GlStateManager.class) public class MixinGlStateManager { -} + @ModifyConstant(method = "", constant = @Constant(intValue = 8), require = 1) + private static int iris$increaseMaximumAllowedTextureUnits(int existingValue) { + return SamplerLimits.get().getMaxTextureUnits(); + } +} \ No newline at end of file diff --git a/common/src/shaders/java/net/coderbot/iris/mixin/MixinLevelRenderer.java b/common/src/shaders/java/net/coderbot/iris/mixin/MixinLevelRenderer.java index c77630373..c75972660 100644 --- a/common/src/shaders/java/net/coderbot/iris/mixin/MixinLevelRenderer.java +++ b/common/src/shaders/java/net/coderbot/iris/mixin/MixinLevelRenderer.java @@ -1,28 +1,15 @@ package net.coderbot.iris.mixin; import com.mojang.blaze3d.platform.GlStateManager; -import com.mojang.blaze3d.vertex.PoseStack; import net.coderbot.iris.Iris; -import net.coderbot.iris.gl.program.Program; -import net.coderbot.iris.pipeline.HandRenderer; import net.coderbot.iris.pipeline.WorldRenderingPhase; import net.coderbot.iris.pipeline.WorldRenderingPipeline; -import net.coderbot.iris.uniforms.CapturedRenderingState; -import net.coderbot.iris.uniforms.SystemTimeUniforms; -import net.minecraft.client.MinecraftClient; -import net.minecraft.client.option.GameOptions; import net.minecraft.client.render.BufferBuilder; -import net.minecraft.client.render.Camera; -import net.minecraft.client.render.GameRenderer; import net.minecraft.client.render.WorldRenderer; -import net.minecraft.client.renderer.RenderType; -import org.joml.Matrix4f; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Unique; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.ModifyArg; -import org.spongepowered.asm.mixin.injection.Redirect; import org.spongepowered.asm.mixin.injection.Slice; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @@ -41,37 +28,37 @@ public class MixinLevelRenderer { private void iris$renderSky$beginNormalSky(float tickDelta, int anaglyphFilter, CallbackInfo ci) { // None of the vanilla sky is rendered until after this call, so if anything is rendered before, it's // CUSTOM_SKY. - pipeline.setPhase(WorldRenderingPhase.SKY); + if (pipeline != null) pipeline.setPhase(WorldRenderingPhase.SKY); } @Inject(method = "renderSky", at = @At(value = "FIELD", target = "Lnet/minecraft/client/render/WorldRenderer;SUN:Lnet/minecraft/util/Identifier;")) private void iris$setSunRenderStage(float tickDelta, int anaglyphFilter, CallbackInfo ci) { - pipeline.setPhase(WorldRenderingPhase.SUN); + if (pipeline != null) pipeline.setPhase(WorldRenderingPhase.SUN); } @Inject(method = "renderSky", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/dimension/Dimension;getBackgroundColor(FF)[F")) private void iris$setSunsetRenderStage(float tickDelta, int anaglyphFilter, CallbackInfo ci) { - pipeline.setPhase(WorldRenderingPhase.SUNSET); + if (pipeline != null) pipeline.setPhase(WorldRenderingPhase.SUNSET); } @Inject(method = "renderSky", at = @At(value = "FIELD", target = "Lnet/minecraft/client/render/WorldRenderer;MOON_PHASES:Lnet/minecraft/util/Identifier;")) private void iris$setMoonRenderStage(float tickDelta, int anaglyphFilter, CallbackInfo ci) { - pipeline.setPhase(WorldRenderingPhase.MOON); + if (pipeline != null) pipeline.setPhase(WorldRenderingPhase.MOON); } @Inject(method = "renderStars(Lnet/minecraft/client/render/BufferBuilder;)V", at = @At(value = "HEAD")) private void iris$setStarRenderStage(BufferBuilder buffer, CallbackInfo ci) { - pipeline.setPhase(WorldRenderingPhase.STARS); + if (pipeline != null) pipeline.setPhase(WorldRenderingPhase.STARS); } @Inject(method = "renderDarkSky", at = @At(value = "HEAD")) private void iris$setVoidRenderStage(CallbackInfo ci) { - pipeline.setPhase(WorldRenderingPhase.VOID); + if (pipeline != null) pipeline.setPhase(WorldRenderingPhase.VOID); } @Inject(method = "renderSky", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/world/ClientWorld;getSkyAngle(F)F"), slice = @Slice(from = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/platform/GlStateManager;rotate(FFFF)V"))) private void iris$renderSky$tiltSun(float tickDelta, int anaglyphFilter, CallbackInfo ci) { - GlStateManager.rotate(pipeline.getSunPathRotation(), 1.0F, 0.0F, 0.0F); + if (pipeline != null) GlStateManager.rotate(pipeline.getSunPathRotation(), 1.0F, 0.0F, 0.0F); } } diff --git a/common/src/shaders/java/net/coderbot/iris/mixin/shadows/ChunkInfoAccessor.java b/common/src/shaders/java/net/coderbot/iris/mixin/shadows/ChunkInfoAccessor.java deleted file mode 100644 index ec3933cc7..000000000 --- a/common/src/shaders/java/net/coderbot/iris/mixin/shadows/ChunkInfoAccessor.java +++ /dev/null @@ -1,12 +0,0 @@ -package net.coderbot.iris.mixin.shadows; - -import net.minecraft.client.renderer.LevelRenderer; -import net.minecraft.client.renderer.chunk.ChunkRenderDispatcher; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.gen.Accessor; - -@Mixin(LevelRenderer.RenderChunkInfo.class) -public interface ChunkInfoAccessor { - @Accessor("chunk") - ChunkRenderDispatcher.RenderChunk getChunk(); -} diff --git a/common/src/shaders/java/net/coderbot/iris/mixin/shadows/MixinBeaconRenderer.java b/common/src/shaders/java/net/coderbot/iris/mixin/shadows/MixinBeaconRenderer.java deleted file mode 100644 index f15b1397e..000000000 --- a/common/src/shaders/java/net/coderbot/iris/mixin/shadows/MixinBeaconRenderer.java +++ /dev/null @@ -1,25 +0,0 @@ -package net.coderbot.iris.mixin.shadows; - -import com.mojang.blaze3d.vertex.PoseStack; -import net.coderbot.iris.shadows.ShadowRenderingState; -import net.minecraft.client.renderer.blockentity.BeaconRenderer; -import net.minecraft.resources.ResourceLocation; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -@Mixin(BeaconRenderer.class) -public class MixinBeaconRenderer { - @Inject(method = "renderBeaconBeam(Lcom/mojang/blaze3d/vertex/PoseStack;Lnet/minecraft/client/renderer/MultiBufferSource;Lnet/minecraft/resources/ResourceLocation;FFJII[FFF)V", - at = @At("HEAD"), cancellable = true) - private static void iris$noLightBeamInShadowPass(PoseStack poseStack, MultiBufferSource multiBufferSource, - ResourceLocation resourceLocation, float f, float g, long l, int i, int j, - float[] fs, float h, float k, CallbackInfo ci) { - if (ShadowRenderingState.areShadowsCurrentlyBeingRendered()) { - // TODO: Don't do this if we're doing the "Unified Entity Rendering" optimization - // TODO: This isn't necessary on most shaderpacks if we support blockEntityId - ci.cancel(); - } - } -} diff --git a/common/src/shaders/java/net/coderbot/iris/mixin/texture/TextureAtlasSpriteAccessor.java b/common/src/shaders/java/net/coderbot/iris/mixin/texture/TextureAtlasSpriteAccessor.java index a49dd0f01..73e396042 100644 --- a/common/src/shaders/java/net/coderbot/iris/mixin/texture/TextureAtlasSpriteAccessor.java +++ b/common/src/shaders/java/net/coderbot/iris/mixin/texture/TextureAtlasSpriteAccessor.java @@ -37,7 +37,4 @@ public interface TextureAtlasSpriteAccessor { @Accessor("frameTicks") void setSubFrame(int subFrame); - - @Invoker("method_10321") - void callUpload(int frameIndex); } diff --git a/common/src/shaders/java/net/coderbot/iris/pipeline/HandRenderer.java b/common/src/shaders/java/net/coderbot/iris/pipeline/HandRenderer.java index 174f067ed..05b3451f9 100644 --- a/common/src/shaders/java/net/coderbot/iris/pipeline/HandRenderer.java +++ b/common/src/shaders/java/net/coderbot/iris/pipeline/HandRenderer.java @@ -7,6 +7,7 @@ import net.minecraft.client.render.RenderLayer; import net.minecraft.item.BlockItem; import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; import org.lwjgl.opengl.GL11; public class HandRenderer { @@ -41,7 +42,11 @@ private boolean canRender(GameRenderer gameRenderer) { } public boolean isHandTranslucent() { - Item item = MinecraftClient.getInstance().player.getMainHandStack().getItem(); + ItemStack stack = MinecraftClient.getInstance().player.getMainHandStack(); + + if (stack == null) return false; + + Item item = stack.getItem(); if (item instanceof BlockItem blockItem) { return blockItem.getBlock().getRenderLayerType() == RenderLayer.TRANSLUCENT; diff --git a/common/src/shaders/java/net/coderbot/iris/pipeline/HorizonRenderer.java b/common/src/shaders/java/net/coderbot/iris/pipeline/HorizonRenderer.java index 9d5c5bdd7..b7c96f550 100644 --- a/common/src/shaders/java/net/coderbot/iris/pipeline/HorizonRenderer.java +++ b/common/src/shaders/java/net/coderbot/iris/pipeline/HorizonRenderer.java @@ -159,8 +159,8 @@ public void renderHorizon() { BufferBuilder buffer = Tessellator.getInstance().getBuffer(); buffer.begin(GL11.GL_QUADS, VertexFormats.POSITION); + buildHorizon(currentRenderDistance * 16, buffer); - buffer.end(); Tessellator.getInstance().draw(); } diff --git a/common/src/shaders/java/net/coderbot/iris/pipeline/ShadowRenderer.java b/common/src/shaders/java/net/coderbot/iris/pipeline/ShadowRenderer.java index 4945e0d04..3a2262506 100644 --- a/common/src/shaders/java/net/coderbot/iris/pipeline/ShadowRenderer.java +++ b/common/src/shaders/java/net/coderbot/iris/pipeline/ShadowRenderer.java @@ -14,7 +14,6 @@ import net.coderbot.iris.shaderpack.ProgramSource; import net.coderbot.iris.shadow.ShadowMatrices; import net.coderbot.iris.shadows.CullingDataCache; -import net.coderbot.iris.shadows.Matrix4fAccess; import net.coderbot.iris.shadows.ShadowRenderTargets; import net.coderbot.iris.shadows.frustum.BoxCuller; import net.coderbot.iris.shadows.frustum.CullEverythingFrustum; @@ -298,8 +297,8 @@ private FrustumHolder createShadowFrustum(float renderMultiplier, FrustumHolder shadowLightVectorFromOrigin.normalize(); - return holder.setInfo(new AdvancedShadowCullingFrustum(((Matrix4fAccess) (Object) CapturedRenderingState.INSTANCE.getGbufferModelView()).convertToJOML(), - ((Matrix4fAccess) (Object) CapturedRenderingState.INSTANCE.getGbufferProjection()).convertToJOML(), shadowLightVectorFromOrigin, boxCuller), distanceInfo, cullingInfo); + return holder.setInfo(new AdvancedShadowCullingFrustum(CapturedRenderingState.INSTANCE.getGbufferModelView(), + CapturedRenderingState.INSTANCE.getGbufferProjection(), shadowLightVectorFromOrigin, boxCuller), distanceInfo, cullingInfo); } @@ -459,7 +458,6 @@ public void renderShadows(LevelRendererAccessor levelRenderer) { } PROJECTION = new Matrix4f(); - ((Matrix4fAccess) (Object) PROJECTION).copyFromArray(projMatrix); profiler.push("terrain_setup"); diff --git a/common/src/shaders/java/net/coderbot/iris/postprocess/CenterDepthSampler.java b/common/src/shaders/java/net/coderbot/iris/postprocess/CenterDepthSampler.java index e1f2cf660..a8ce4f6c8 100644 --- a/common/src/shaders/java/net/coderbot/iris/postprocess/CenterDepthSampler.java +++ b/common/src/shaders/java/net/coderbot/iris/postprocess/CenterDepthSampler.java @@ -92,7 +92,7 @@ public void sampleCenterDepth() { ProgramSamplers.clearActiveSamplers(); // The API contract of DepthCopyStrategy claims it can only copy depth, however the 2 non-stencil methods used are entirely capable of copying color as of now. - DepthCopyStrategy.fastest(false).copy(this.framebuffer, texture, null, altTexture, 1, 1); + //DepthCopyStrategy.fastest(false).copy(this.framebuffer, texture, null, altTexture, 1, 1); //Reset viewport MinecraftClient.getInstance().getFramebuffer().bind(true); diff --git a/common/src/shaders/java/net/coderbot/iris/shadow/ShadowMatrices.java b/common/src/shaders/java/net/coderbot/iris/shadow/ShadowMatrices.java index 1c2fc2c0a..627cb066f 100644 --- a/common/src/shaders/java/net/coderbot/iris/shadow/ShadowMatrices.java +++ b/common/src/shaders/java/net/coderbot/iris/shadow/ShadowMatrices.java @@ -1,8 +1,8 @@ package net.coderbot.iris.shadow; import com.mojang.blaze3d.vertex.PoseStack; -import org.joml.Matrix4f; -import org.joml.Quaternionf; +import net.coderbot.iris.vendored.joml.Matrix4f; +import net.coderbot.iris.vendored.joml.Quaternionf; import java.nio.FloatBuffer; diff --git a/common/src/shaders/java/net/coderbot/iris/shadows/Matrix4fAccess.java b/common/src/shaders/java/net/coderbot/iris/shadows/Matrix4fAccess.java deleted file mode 100644 index 65ddf4d73..000000000 --- a/common/src/shaders/java/net/coderbot/iris/shadows/Matrix4fAccess.java +++ /dev/null @@ -1,23 +0,0 @@ -package net.coderbot.iris.shadows; - -public interface Matrix4fAccess { - /** - * Sets the values of this matrix from an array. The values in the array must be specified in column-major order, - * just like with OpenGL. Keep this in mind, since the natural way of laying out a matrix in array form is row-major - * order! - */ - void copyFromArray(float[] m); - - /** - * Gets the values of this matrix into an array. The values in the array will be laid out in column-major order, - * just like with OpenGL. Keep this in mind, since the natural way of laying out a matrix in array form is row-major - * order! - */ - float[] copyIntoArray(); - - /** - * Converts the matrix into a JOML matrix. This matrix is inherently column-major, and compatible with OpenGL. - * @return JOML matrix - */ - net.coderbot.iris.vendored.joml.Matrix4f convertToJOML(); -} diff --git a/common/src/shaders/java/net/coderbot/iris/uniforms/CapturedRenderingState.java b/common/src/shaders/java/net/coderbot/iris/uniforms/CapturedRenderingState.java index 974be3594..40a4c9f00 100644 --- a/common/src/shaders/java/net/coderbot/iris/uniforms/CapturedRenderingState.java +++ b/common/src/shaders/java/net/coderbot/iris/uniforms/CapturedRenderingState.java @@ -3,7 +3,7 @@ import net.coderbot.iris.gl.state.ValueUpdateNotifier; import net.coderbot.iris.vendored.joml.Vector3d; import net.minecraft.client.MinecraftClient; -import org.joml.Matrix4f; +import net.coderbot.iris.vendored.joml.Matrix4f; public class CapturedRenderingState { public static final CapturedRenderingState INSTANCE = new CapturedRenderingState(); diff --git a/common/src/shaders/java/net/coderbot/iris/uniforms/CelestialUniforms.java b/common/src/shaders/java/net/coderbot/iris/uniforms/CelestialUniforms.java index 1751fbdb8..50df7bda7 100644 --- a/common/src/shaders/java/net/coderbot/iris/uniforms/CelestialUniforms.java +++ b/common/src/shaders/java/net/coderbot/iris/uniforms/CelestialUniforms.java @@ -2,11 +2,9 @@ import net.coderbot.iris.JomlConversions; import net.coderbot.iris.gl.uniform.UniformHolder; +import net.coderbot.iris.vendored.joml.*; import net.minecraft.client.MinecraftClient; import net.minecraft.client.world.ClientWorld; -import org.lwjgl.util.vector.Matrix4f; -import org.lwjgl.util.vector.Vector3f; -import org.lwjgl.util.vector.Vector4f; import java.util.Objects; @@ -73,17 +71,17 @@ private net.coderbot.iris.vendored.joml.Vector4f getCelestialPositionInWorldSpac // TODO: Deduplicate / remove this function. Matrix4f celestial = new Matrix4f(); - celestial.setIdentity(); + celestial.identity(); // This is the same transformation applied by renderSky, however, it's been moved to here. // This is because we need the result of it before it's actually performed in vanilla. - celestial.rotate(sunPathRotation, new Vector3f(0.0F, 0.0F, 1.0F)); - celestial.rotate(-90f, new Vector3f(0.0F, 1.0F, 0.0F)); - celestial.rotate(getSkyAngle() * 360.0F, new Vector3f(1.0F, 0.0F, 0.0F)); + celestial.rotateZ(sunPathRotation); + celestial.rotateY(-90f); + celestial.rotateX(getSkyAngle() * 360.0F); - Matrix4f.transform(celestial, position, position); + position.mul(celestial); - return JomlConversions.toJoml(position); + return position; } private net.coderbot.iris.vendored.joml.Vector4f getCelestialPosition(float y) { @@ -93,7 +91,7 @@ private net.coderbot.iris.vendored.joml.Vector4f getCelestialPosition(float y) { // This is the same transformation applied by renderSky, however, it's been moved to here. // This is because we need the result of it before it's actually performed in vanilla. - celestial.setIdentity(); + celestial.identity(); // This is the same transformation applied by renderSky, however, it's been moved to here. // This is because we need the result of it before it's actually performed in vanilla. @@ -101,9 +99,9 @@ private net.coderbot.iris.vendored.joml.Vector4f getCelestialPosition(float y) { celestial.rotate(-90f, new Vector3f(0.0F, 1.0F, 0.0F)); celestial.rotate(getSkyAngle() * 360.0F, new Vector3f(1.0F, 0.0F, 0.0F)); - Matrix4f.transform(celestial, position, position); + position.mul(celestial); - return JomlConversions.toJoml(position); + return position; } private static net.coderbot.iris.vendored.joml.Vector4f getUpPosition() { @@ -116,10 +114,7 @@ private static net.coderbot.iris.vendored.joml.Vector4f getUpPosition() { // But, notably, skip the rotation by the skyAngle. preCelestial.rotate(-90F, new Vector3f(0.0F, 1.0F, 0.0F)); - // Use this matrix to transform the vector. - Matrix4f.transform(preCelestial, upVector, upVector); - - return JomlConversions.toJoml(upVector); + return upVector.mul(preCelestial); } public static boolean isDay() { diff --git a/common/src/shaders/java/net/coderbot/iris/uniforms/IdMapUniforms.java b/common/src/shaders/java/net/coderbot/iris/uniforms/IdMapUniforms.java index 7f25473ec..ba859b868 100644 --- a/common/src/shaders/java/net/coderbot/iris/uniforms/IdMapUniforms.java +++ b/common/src/shaders/java/net/coderbot/iris/uniforms/IdMapUniforms.java @@ -5,7 +5,6 @@ import net.coderbot.iris.gl.uniform.UniformUpdateFrequency; import net.coderbot.iris.shaderpack.IdMap; import net.coderbot.iris.shaderpack.materialmap.NamespacedId; -import net.irisshaders.iris.api.v0.item.IrisItemLightProvider; import net.minecraft.client.MinecraftClient; import net.minecraft.entity.player.ClientPlayerEntity; import net.minecraft.item.Item; @@ -13,6 +12,7 @@ import net.minecraft.util.Identifier; import org.jetbrains.annotations.NotNull; import org.lwjgl.util.vector.Vector3f; +import org.lwjgl.util.vector.Vector4f; import static net.coderbot.iris.gl.uniform.UniformUpdateFrequency.PER_FRAME; @@ -58,7 +58,7 @@ private static class HeldItemSupplier { private void invalidate() { intID = -1; lightValue = 0; - lightColor = IrisItemLightProvider.DEFAULT_LIGHT_COLOR; + lightColor = new Vector3f(1f, 1f, 1f); } public void update() { @@ -85,12 +85,6 @@ public void update() { } intID = Item.getRawId(heldItem); - - IrisItemLightProvider lightProvider = (IrisItemLightProvider) heldItem; - lightValue = lightProvider.getLightEmission(MinecraftClient.getInstance().player, heldStack); - - - lightColor = lightProvider.getLightColor(MinecraftClient.getInstance().player, heldStack); } public int getIntID() { diff --git a/common/src/shaders/java/net/coderbot/iris/uniforms/MatrixUniforms.java b/common/src/shaders/java/net/coderbot/iris/uniforms/MatrixUniforms.java index 904527ce4..b22ff3655 100644 --- a/common/src/shaders/java/net/coderbot/iris/uniforms/MatrixUniforms.java +++ b/common/src/shaders/java/net/coderbot/iris/uniforms/MatrixUniforms.java @@ -4,7 +4,7 @@ import net.coderbot.iris.pipeline.ShadowRenderer; import net.coderbot.iris.shaderpack.PackDirectives; import net.coderbot.iris.shadow.ShadowMatrices; -import org.lwjgl.util.vector.Matrix4f; +import net.coderbot.iris.vendored.joml.Matrix4f; import java.nio.FloatBuffer; import java.util.function.Supplier; @@ -21,20 +21,20 @@ public static void addMatrixUniforms(UniformHolder uniforms, PackDirectives dire // We need to audit Mojang's linear algebra. addMatrix(uniforms, "Projection", CapturedRenderingState.INSTANCE::getGbufferProjection); addShadowMatrix(uniforms, "ModelView", () -> - ShadowRenderer.createShadowModelView(directives.getSunPathRotation(), directives.getShadowDirectives().getIntervalSize()).last().pose().copy()); + new Matrix4f(ShadowRenderer.createShadowModelView(directives.getSunPathRotation(), directives.getShadowDirectives().getIntervalSize()).last().pose())); addShadowArrayMatrix(uniforms, "Projection", () -> ShadowMatrices.createOrthoMatrix(directives.getShadowDirectives().getDistance())); } private static void addMatrix(UniformHolder uniforms, String name, Supplier supplier) { uniforms - .uniformMatrix(PER_FRAME, "gbuffer" + name, supplier) + .uniformJomlMatrix(PER_FRAME, "gbuffer" + name, supplier) .uniformJomlMatrix(PER_FRAME, "gbuffer" + name + "Inverse", new Inverted(supplier)) - .uniformMatrix(PER_FRAME, "gbufferPrevious" + name, new Previous(supplier)); + .uniformJomlMatrix(PER_FRAME, "gbufferPrevious" + name, new Previous(supplier)); } private static void addShadowMatrix(UniformHolder uniforms, String name, Supplier supplier) { uniforms - .uniformMatrix(PER_FRAME, "shadow" + name, supplier) + .uniformJomlMatrix(PER_FRAME, "shadow" + name, supplier) .uniformJomlMatrix(PER_FRAME, "shadow" + name + "Inverse", new Inverted(supplier)); } @@ -57,7 +57,7 @@ public net.coderbot.iris.vendored.joml.Matrix4f get() { Matrix4f copy = new Matrix4f(parent.get()); FloatBuffer buffer = FloatBuffer.allocate(16); - copy.store(buffer); + copy.get(buffer); buffer.rewind(); net.coderbot.iris.vendored.joml.Matrix4f matrix4f = new net.coderbot.iris.vendored.joml.Matrix4f(buffer); diff --git a/common/src/main/resources/assets/iris/iris-logo.png b/common/src/shaders/resources/assets/iris/iris-logo.png similarity index 100% rename from common/src/main/resources/assets/iris/iris-logo.png rename to common/src/shaders/resources/assets/iris/iris-logo.png diff --git a/common/src/shaders/resources/assets/iris/lang/cs_cz.json b/common/src/shaders/resources/assets/iris/lang/cs_cz.json index a0a2febfa..b47bd963c 100644 --- a/common/src/shaders/resources/assets/iris/lang/cs_cz.json +++ b/common/src/shaders/resources/assets/iris/lang/cs_cz.json @@ -11,6 +11,7 @@ "iris.sodium.failure.download": "Stáhnout Sodium", "iris.sodium.failure.reason.notFound": "Pro dobrý výkon vyžaduje Iris modifikaci Sodium, která ale není nainstalovaná. Stáhněte si prosím Sodium, vložte jej do vaší složky mods a restartujte hru.", "iris.sodium.failure.reason.incompatible": "Pro dobrý výkon vyžaduje Iris modifikaci Sodium, ale byla nalezena její nekompatibilní verze. Stáhněte si prosím správnou verzi Sodia, vložte jej do vaší složky mods, odeberte nesprávnou verzi a restartujte hru.", + "options.iris.apply": "Použít", "options.iris.refresh": "Obnovit", "options.iris.openShaderPackFolder": "Otevřít složku se shadery...", @@ -43,9 +44,11 @@ "options.iris.shadowDistance": "Maximální vzdálenost stínů", "options.iris.shadowDistance.enabled": "Umožňuje vám změnit maximální vykreslovací vzdálenost pro stíny. Terén a entity za touto vzdáleností nebudou vrhat stíny. Snížení vzdálenosti stínů může výrazně zvýšit výkon.", "options.iris.shadowDistance.disabled": "Váš aktuální balíček shaderů již má nastavenou vykreslovací vzdálenost pro stíny; nemůžete ji změnit.", + "pack.iris.select.title": "Vybrat", "pack.iris.configure.title": "Nastavit", "pack.iris.list.label": "+ Přetáhněte sem shadery pro jejich přidání", + "label.iris.true": "Zap", "label.iris.false": "Vyp" } diff --git a/common/src/shaders/resources/assets/iris/lang/de_ch.json b/common/src/shaders/resources/assets/iris/lang/de_ch.json index 127008d6f..a000cbbc6 100644 --- a/common/src/shaders/resources/assets/iris/lang/de_ch.json +++ b/common/src/shaders/resources/assets/iris/lang/de_ch.json @@ -7,6 +7,7 @@ "iris.keybinds": "Iris", "iris.shaders.reloaded.failure": "Shader neu lade hed ned funktioniert! Grund: %s", "iris.shaders.toggled.failure": "Shader i/uschalte hed ned funktioniert! Grund: %s", + "options.iris.apply": "Awende", "options.iris.refresh": "Neu lade", "options.iris.openShaderPackFolder": "Shader Pack Ordner öffne...", @@ -21,6 +22,7 @@ "options.iris.shaderPackSelection.copyErrorAlreadyExists": "\"%s\" isch bereits i dim Shader Pack Ordner", "options.iris.shaders.disabled": "Shaders: Usgschalte", "options.iris.shaders.enabled": "Shaders: Igschalte", + "pack.iris.select.title": "Uswähle", "pack.iris.list.label": "+ zum hinzuefüege Shader Packs hie ine zieh" } diff --git a/common/src/shaders/resources/assets/iris/lang/de_de.json b/common/src/shaders/resources/assets/iris/lang/de_de.json index 67428ff49..e40ce02c3 100644 --- a/common/src/shaders/resources/assets/iris/lang/de_de.json +++ b/common/src/shaders/resources/assets/iris/lang/de_de.json @@ -2,33 +2,41 @@ "iris.shaders.reloaded": "Shader neu geladen!", "iris.shaders.disabled": "Shader deaktiviert!", "iris.shaders.toggled": "Shader umgeschaltet auf: %s!", + "iris.shaders.debug.enabled": "Debugging wurde aktiviert, die Debug-Protokollierung wird ausführlicher sein!", "iris.shaders.debug.disabled": "Debugging wurde deaktiviert.", "iris.shaders.debug.failure": "Debugging kann nicht aktiviert werden, da dieser Computer keine Debug-Funktionen unterstützt.", "iris.shaders.debug.restart": "Es liegt kein Debug-Kontext vor, starte bitte neu, um Debugging zu aktivieren.", + "iris.keybind.reload": "Shader neu laden", "iris.keybind.shaderPackSelection": "Shader-Auswahlbildschirm", "iris.keybind.toggleShaders": "Shader umschalten", "iris.keybinds": "Iris", + "iris.shaders.reloaded.failure": "Shader konnte nicht neu geladen werden! Grund: %s", "iris.shaders.toggled.failure": "Shader konnte nicht umgeschaltet werden! Grund: %s", + "iris.sodium.failure.title": "Iris konnte nicht geladen werden!", "iris.sodium.failure.download": "Sodium herunterladen", "iris.sodium.failure.reason.notFound": "Iris erfordert Sodium für optimale Leistung, aber Sodium ist nicht installiert. Bitte lade Sodium herunter, füge es deinem Mods-Ordner hinzu und starte das Spiel neu.", "iris.sodium.failure.reason.incompatible": "Iris erfordert Sodium für optimale Leistung, aber es wurde eine inkompatible Version gefunden. Bitte lade die passende Version von Sodium herunter, füge sie deinem Mods-Ordner hinzu, entferne die falsche Version und starte das Spiel neu.", + "iris.nec.failure.title": "[%s] Not Enough Crashes erkannt!", - "iris.nec.failure.description": "Not Enough Crashes kann das Spiel bei der Behandlung von Abstürzen stark beeinträchtigen und liefert keine genauen Ergebnisse.\nEine gute Alternative ist die Mod MixinTrace, welche die Ursache eines Absturzes zuverlässiger identifizieren kann und das Spiel nicht in einen fehlerhaften Zustand versetzt.", + "iris.nec.failure.description": "Not Enough Crashes kann das Spiel bei der Behandlung von Abstürzen stark beeinträchtigen und liefert keine genauen Ergebnisse.\nGute Alternativen sind MixinTrace und Crafty Crashes, die die Ursache eines Absturzes zuverlässiger identifizieren können und das Spiel nicht in einen fehlerhaften Zustand versetzen.", + "iris.unsupported.irisorpc": "Iris oder diesem Computer", "iris.unsupported.iris": "Iris", "iris.unsupported.pc": "diesem Computer", "iris.unsupported.pack": "Shaderpaket inkompatibel!", "iris.unsupported.pack.description": "Dieses Shaderpaket enthält Funktionen, die von %s nicht unterstützt werden%s Bitte versuche ein anderes Paket.", + "options.iris.apply": "Anwenden", "options.iris.refresh": "Aktualisieren", "options.iris.openShaderPackFolder": "Shader-Ordner öffnen ...", "options.iris.shaderPackSettings": "Shader-Einstellungen ...", "options.iris.shaderPackList": "Shader-Liste ...", "options.iris.refreshShaderPacks": "Shader/Liste aktualisieren", + "options.iris.shaderPackSelection": "Shaderpakete ...", "options.iris.shaderPackSelection.title": "Shaderpakete", "options.iris.shaderPackSelection.addedPack": "Shaderpaket \"%s\" hinzugefügt", @@ -37,31 +45,40 @@ "options.iris.shaderPackSelection.failedAddSingle": "\"%s\" ist kein zulässiges Shaderpaket", "options.iris.shaderPackSelection.copyError": "Konnte Shaderpaket \"%s\" nicht hinzufügen", "options.iris.shaderPackSelection.copyErrorAlreadyExists": "\"%s\" befindet sich bereits im Shader-Ordner!", + "options.iris.shaderPackOptions.tooManyFiles": "Es können nicht mehrere Shader-Einstellungsdateien importiert werden!", "options.iris.shaderPackOptions.failedImport": "Shader-Einstellungsdatei \"%s\" konnte nicht importiert werden", "options.iris.shaderPackOptions.importedSettings": "Shader-Einstellungen aus \"%s\" importiert", + "options.iris.shaders.disabled": "Shader: Deaktiviert", "options.iris.shaders.enabled": "Shader: Aktiviert", "options.iris.shaders.nonePresent": "Shader: Keine vorhanden", + "options.iris.back": "Zurück", "options.iris.reset": "Zurücksetzen", "options.iris.reset.tooltip": "ALLE Einstellungen zurücksetzen und anwenden?", "options.iris.reset.tooltip.holdShift": "Zum Zurücksetzen UMSCHALTEN/SHIFT gedrückt halten und klicken", + "options.iris.importSettings.tooltip": "Einstellungen aus Datei importieren", "options.iris.exportSettings.tooltip": "Angewandte Einstellungen in eine Datei exportieren", "options.iris.mustDisableFullscreen": "Bitte deaktiviere zuerst den Vollbildmodus!", "options.iris.setToDefault": "Diese Einstellung auf den Standardwert zurücksetzen?", + "options.iris.profile": "Profil", "options.iris.profile.custom": "Benutzerdefiniert", + "options.iris.shadowDistance": "Max. Schattendistanz", "options.iris.shadowDistance.enabled": "Erlaubt es dir, die maximale Distanz für Schatten zu ändern. Gelände und Objekte, die weiter entfernt sind als die eingestellte Distanz, werden keine Schatten werfen. Das Senken der Distanz kann die Leistung erheblich verbessern.", "options.iris.shadowDistance.disabled": "Dein aktuelles Shaderpaket hat bereits eine Distanz für Schatten gesetzt; du kannst sie nicht ändern.", "options.iris.shadowDistance.sodium_tooltip": "Die Distanz für Schatten bestimmt, wie weit das Gelände entfernt sein darf, um keinen Schatten mehr zu werfen. Bei geringeren Distanzen werden weniger Schatten berechnet, was die Bildrate verbessert. Diese Option kann nicht geändert werden bei Paketen, die explizit eine Distanz für Schatten vorgeben. Die tatsächliche Distanz für Schatten wird von der Einstellung \"Sichtweite\" begrenzt.", + "options.iris.gui.hide": "GUI ausblenden", "options.iris.gui.show": "GUI anzeigen", + "pack.iris.select.title": "Auswählen", "pack.iris.configure.title": "Konfigurieren", "pack.iris.list.label": "+ Um Shader hinzuzufügen, ziehe sie in dieses Fenster hinein", + "label.iris.true": "An", "label.iris.false": "Aus" } diff --git a/common/src/shaders/resources/assets/iris/lang/en_pt.json b/common/src/shaders/resources/assets/iris/lang/en_pt.json index 225923e33..754106cfb 100644 --- a/common/src/shaders/resources/assets/iris/lang/en_pt.json +++ b/common/src/shaders/resources/assets/iris/lang/en_pt.json @@ -9,6 +9,7 @@ "iris.shaders.toggled.failure": "Failed to place ye Glass eyes back in! Reason: %s", "iris.sodium.failure.title": "Iris failed to load!", "iris.sodium.failure.reason": "Yee 'ave Sodium in yer mods folder, however Iris includes it. Please close the game 'n remove Sodium from yer mods Coffer.", + "options.iris.apply": "Apply", "options.iris.refresh": "Refresh", "options.iris.openShaderPackFolder": "Open yer Coffer o' Glass Eyes", @@ -26,6 +27,7 @@ "options.iris.shadowDistance": "Height o' t'shadow mast", "options.iris.shadowDistance.enabled": "Allows you to change height o' t'mast fer yer shadows. Terrain and entities beyond t'mast will not cast shadows. Lowering t'shadow mast can significantly increase performance.", "options.iris.shadowDistance.disabled": "Yer current Glass eye has already set a height for t'shadow mast; yee cannot change it.", + "pack.iris.select.title": "Select", "pack.iris.list.label": "+ Drop yer Glass eye files in this ole window t' add yer Glass eyes", "iris.sodium.failure.download": "Download Sodium", diff --git a/common/src/shaders/resources/assets/iris/lang/en_ud.json b/common/src/shaders/resources/assets/iris/lang/en_ud.json index bccc51e3d..7b0ee0df8 100644 --- a/common/src/shaders/resources/assets/iris/lang/en_ud.json +++ b/common/src/shaders/resources/assets/iris/lang/en_ud.json @@ -16,6 +16,7 @@ "iris.sodium.failure.download": "Download Sodium", "iris.sodium.failure.reason.notFound": "˙ǝɯɐƃ ǝɥʇ ɥɔunɐן-ǝɹ puɐ ´ɹǝpןoɟ spoɯ ɹnoʎ uᴉ ʇᴉ ǝɔɐןd ´ɯnᴉpoS pɐoןuʍop ǝsɐǝןԀ ˙pǝןןɐʇsuᴉ ʇou sᴉ ɯnᴉpoS ʇnq ´ǝɔuɐɯɹoɟɹǝd pooƃ ɹoɟ ɯnᴉpoS sǝɹᴉnbǝɹ sᴉɹI", "iris.sodium.failure.reason.incompatible": "˙ǝɯɐƃ ǝɥʇ ɥɔunɐן-ǝɹ puɐ ´uoᴉsɹǝʌ ʇɔǝɹɹoɔuᴉ ǝɥʇ ǝʌoɯǝɹ ´ɹǝpןoɟ spoɯ ɹnoʎ uᴉ ʇᴉ ǝɔɐןd ´ɯnᴉpoS ɟo uoᴉsɹǝʌ ʇɔǝɹɹoɔ ǝɥʇ pɐoןuʍop ǝsɐǝןԀ ˙punoɟ sɐʍ uoᴉsɹǝʌ ǝןqᴉʇɐdɯoɔuᴉ uɐ ʇnq ´ǝɔuɐɯɹoɟɹǝd pooƃ ɹoɟ ɯnᴉpoS sǝɹᴉnbǝɹ sᴉɹI", + "options.iris.apply": "ʎןdd∀", "options.iris.refresh": "ɥsǝɹɟǝᴚ", "options.iris.openShaderPackFolder": "˙˙˙ɹǝpןoℲ ʞɔɐԀ ɹǝpɐɥS uǝdO", @@ -48,9 +49,11 @@ "options.iris.shadowDistance": "ǝɔuɐʇsᴉᗡ ʍopɐɥS xɐW", "options.iris.shadowDistance.enabled": "˙ǝɔuɐɯɹoɟɹǝd ǝsɐǝɹɔuᴉ ʎןʇuɐɔᴉɟᴉuƃᴉs uɐɔ ǝɔuɐʇsᴉp ʍopɐɥs ǝɥʇ ƃuᴉɹǝʍoꞀ ˙sʍopɐɥs ʇsɐɔ ʇou ןןᴉʍ ǝɔuɐʇsᴉp sᴉɥʇ puoʎǝq sǝᴉʇᴉʇuǝ puɐ uᴉɐɹɹǝ⊥ ˙sʍopɐɥs ɹoɟ ǝɔuɐʇsᴉp ɯnɯᴉxɐɯ ǝɥʇ ǝƃuɐɥɔ oʇ noʎ sʍoןן∀", "options.iris.shadowDistance.disabled": "˙ʇᴉ ǝƃuɐɥɔ ʇouuɐɔ noʎ ؛sʍopɐɥs ɹoɟ ǝɔuɐʇsᴉp ɹǝpuǝɹ ɐ ʇǝs ʎpɐǝɹןɐ sɐɥ ʞɔɐd ɹǝpɐɥs ʇuǝɹɹnɔ ɹno⅄", + "pack.iris.select.title": "ʇɔǝןǝS", "pack.iris.configure.title": "ǝɹnƃᴉɟuoϽ", "pack.iris.list.label": "ppɐ oʇ sʞɔɐԀ ɹǝpɐɥS doɹᗡ puɐ ƃɐɹᗡ +", + "label.iris.true": "uO", "label.iris.false": "ɟɟO" } diff --git a/common/src/shaders/resources/assets/iris/lang/en_us.json b/common/src/shaders/resources/assets/iris/lang/en_us.json index b211b1733..085da7bd4 100644 --- a/common/src/shaders/resources/assets/iris/lang/en_us.json +++ b/common/src/shaders/resources/assets/iris/lang/en_us.json @@ -4,15 +4,10 @@ "iris.shaders.toggled": "Toggled shaders to %s!", "iris.shaders.debug.enabled": "Debugging has been enabled, debug logging will be more verbose!", "iris.shaders.debug.disabled": "Debugging has been disabled.", - "iris.shaders.debug.failure": "Cannot enable client debugging, your computer does not support debug features. Shader debugging has been enabled.", - "iris.shaders.debug.restart": "You do not have a debug context, please restart to enable OpenGL client debugging.", - "iris.shaders.debug.restartNoDebug": "Shader debugging has been enabled; OpenGL debugging is unsupported on NeoForge.", - "iris.load.failure.shader": "The shaderpack failed to load! Please report the error to the shader developer. ", - "iris.load.failure.generic": "Iris encountered an issue trying to load the shader; please report this to Iris developers. ", - "iris.shaders.ssbofailure": "The shader requested a specific feature (SSBO) that is not supported by your GPU, it may not work correctly.", + "iris.shaders.debug.failure": "Cannot enable debugging, your computer does not support debug features.", + "iris.shaders.debug.restart": "You do not have a debug context, please restart to enable debugging.", "iris.keybind.reload": "Reload Shaders", "iris.keybind.shaderPackSelection": "Shaderpack Selection Screen", - "iris.keybind.wireframe": "Wireframe (SP only)", "iris.keybind.toggleShaders": "Toggle Shaders", "iris.keybinds": "Iris", "iris.shaders.reloaded.failure": "Failed to reload shaders! Reason: %s", @@ -22,13 +17,12 @@ "iris.sodium.failure.reason.notFound": "Iris requires Sodium for good performance, but Sodium is not installed. Please download Sodium, place it in your mods folder, and re-launch the game.", "iris.sodium.failure.reason.incompatible": "Iris requires Sodium for good performance, but an incompatible version was found. Please download the correct version of Sodium, place it in your mods folder, remove the incorrect version, and re-launch the game.", "iris.nec.failure.title": "[%s] Not Enough Crashes detected!", - "iris.nec.failure.description": "Not Enough Crashes can severely break the game while handling crashes, and does not provide accurate results.\nA good alternative is MixinTrace, which can identify the cause of a crash more reliably and does not put the game in an invalid state.", + "iris.nec.failure.description": "Not Enough Crashes can severely break the game while handling crashes, and does not provide accurate results.\nGood alternatives are MixinTrace and Crafty Crashes, which can identify the cause of a crash more reliably and does not put the game in an invalid state.", "iris.unsupported.irisorpc": "Iris or your PC", "iris.unsupported.iris": "Iris", "iris.unsupported.pc": "your PC", "iris.unsupported.pack": "Shaderpack incompatible!", "iris.unsupported.pack.description": "The shaderpack you are trying to load contains features unsupported by %s. Please try another pack. List %s", - "iris.unsupported.pack.macos": "\nmacOS is known to have issues with many shader packs.", "options.iris.apply": "Apply", "options.iris.refresh": "Refresh", "options.iris.openShaderPackFolder": "Open Shader Pack Folder...", @@ -62,14 +56,13 @@ "options.iris.shadowDistance": "Max Shadow Distance", "options.iris.shadowDistance.enabled": "Allows you to change the maximum distance for shadows. Terrain and entities beyond this distance will not cast shadows. Lowering the shadow distance can significantly increase performance.", "options.iris.shadowDistance.disabled": "Your current shader pack has already set a render distance for shadows; you cannot change it.", - "options.iris.shadowDistance.sodium_tooltip": "The shadow render distance controls how far away terrain can potentially be rendered in the shadow pass. Lower distances mean that less terrain will be rendered, improving frame rates. This option cannot be changed on packs which explicitly specify a shadow render distance. The actual shadow render distance is capped by the View Distance setting.", - "options.iris.colorSpace": "Color Space", - "options.iris.colorSpace.sodium_tooltip": "The color space to transform the screen to. Works on top of shader packs. Use SRGB if unsure.", "options.iris.gui.hide": "Hide GUI", "options.iris.gui.show": "Show GUI", + "pack.iris.select.title": "Select", "pack.iris.configure.title": "Configure", "pack.iris.list.label": "+ Drag and Drop Shader Packs to add", + "label.iris.true": "On", "label.iris.false": "Off" } diff --git a/common/src/shaders/resources/assets/iris/lang/es_ar.json b/common/src/shaders/resources/assets/iris/lang/es_ar.json index fbff75f64..ec3012e45 100644 --- a/common/src/shaders/resources/assets/iris/lang/es_ar.json +++ b/common/src/shaders/resources/assets/iris/lang/es_ar.json @@ -58,9 +58,11 @@ "options.iris.shadowDistance.disabled": "Tu paquete de shaders actual ya estableció una distancia de renderizado para las sombras; no podés cambiarla.", "options.iris.gui.hide": "Esconder GUI", "options.iris.gui.show": "Mostrar GUI", + "pack.iris.select.title": "Seleccionar", "pack.iris.configure.title": "Configurar", "pack.iris.list.label": "+ Arrastrá y soltá Shader Packs para agregar", + "label.iris.true": "Activado", "label.iris.false": "Desactivado" } diff --git a/common/src/shaders/resources/assets/iris/lang/es_es.json b/common/src/shaders/resources/assets/iris/lang/es_es.json index 49db40ac8..45c529e0a 100644 --- a/common/src/shaders/resources/assets/iris/lang/es_es.json +++ b/common/src/shaders/resources/assets/iris/lang/es_es.json @@ -9,7 +9,9 @@ "iris.keybind.reload": "Recargar Shaders", "iris.keybind.shaderPackSelection": "Pantalla de Selección de Shaders", "iris.keybind.toggleShaders": "Alternar Shaders", + "iris.shaders.reloaded.failure": "¡Error al recargar los Shaders! Razón: %s", + "iris.shaders.toggled.failure": "¡Error al activar shaders! Razón: %s", "iris.sodium.failure.title": "¡Iris no pudo iniciarse!", "iris.sodium.failure.download": "Descarga Sodium", @@ -20,6 +22,7 @@ "iris.unsupported.pc": "tu PC", "iris.unsupported.pack": "¡Shader incompatible!", "iris.unsupported.pack.description": "El Shader Pack que estás intentando cargar contiene características no soportadas por %s. Por favor, prueba otro pack. Lista %s", + "options.iris.apply": "Aplicar", "options.iris.refresh": "Recargar", "options.iris.openShaderPackFolder": "Abrir carpeta de Shader Packs...", @@ -55,6 +58,7 @@ "options.iris.shadowDistance.disabled": "Tu shader pack ya ha establecido una distáncia de renderizado para las sombreas; no puedes cambiarla.", "options.iris.gui.hide": "Ocultar GUI", "options.iris.gui.show": "Mostrar GUI", + "pack.iris.select.title": "Seleccionar", "pack.iris.configure.title": "Configurar", "pack.iris.list.label": "+ Arrastra Shader Packs aquí para añadirlos", diff --git a/common/src/shaders/resources/assets/iris/lang/et_ee.json b/common/src/shaders/resources/assets/iris/lang/et_ee.json index c3cb964fa..fb8415f00 100644 --- a/common/src/shaders/resources/assets/iris/lang/et_ee.json +++ b/common/src/shaders/resources/assets/iris/lang/et_ee.json @@ -6,13 +6,8 @@ "iris.shaders.debug.disabled": "Silumine on nüüd keelatud.", "iris.shaders.debug.failure": "Silumist ei saa lubada, sinu arvuti ei toeta silumisfunktsioone.", "iris.shaders.debug.restart": "Sul puudub silumiskontekst, silumiseks palun taaskäivita.", - "iris.shaders.debug.restartNoDebug": "Varjutajate silumine on lubatud; OpenGL silumine ei ole NeoForges toetatud.", - "iris.load.failure.shader": "Varjutajapaki laadimine ebaõnnestus! Palun teata sellest veast varjutajapaki arendajale. ", - "iris.load.failure.generic": "Irisel tekkis varjutaja laadimisel viga, palun teata sellest Irise arendajatele. ", - "iris.shaders.ssbofailure": "Varjutaja taotles konkreetset funktsiooni (SSBO), mis ei ole sinu videokaardi poolt toetatud, see ei pruugi korrektselt töötada.", "iris.keybind.reload": "Laadi varjutajad uuesti", "iris.keybind.shaderPackSelection": "Varjutajapaki valikukuva", - "iris.keybind.wireframe": "Traatraam (ainult üksikmäng)", "iris.keybind.toggleShaders": "Lülita varjutajad sisse/välja", "iris.keybinds": "Iris", "iris.shaders.reloaded.failure": "Varjutajate taaslaadimine ebaõnnestus! Põhjus: %s", @@ -20,15 +15,8 @@ "iris.sodium.failure.title": "Irise laadimine ebaõnnestus!", "iris.sodium.failure.download": "Laadi Sodium alla", "iris.sodium.failure.reason.notFound": "Iris vajab hea jõudluse saavutamiseks Sodiumi, ent Sodium ei ole paigaldatud. Palun laadi Sodium alla, aseta see oma mods kausta ning taaskäivita mäng.", - "iris.sodium.failure.reason.incompatible": "Iris vajab hea jõudluse saavutamiseks Sodiumi, ent leiti ühildumatu versioon. Palun laadi sobiv Sodiumi versioon alla, aseta see oma mods kausta, kustuta sobimatu versioon ning taaskäivita mäng.", - "iris.nec.failure.title": "[%s] Tuvastati Not Enough Crashes!", - "iris.nec.failure.description": "Not Enough Crashes võib krahhide käsitlemisel mängu tõsiselt lõhkuda ning ei anna täpseid tulemusi.\nHead alternatiivid on MixinTrace, mis suudavad krahhi põhjuse usaldusväärsemalt tuvastada ja ei aseta mängu vigasesse olekusse.", - "iris.unsupported.irisorpc": "Iris või sinu arvuti", - "iris.unsupported.iris": "Iris", - "iris.unsupported.pc": "sinu arvuti", - "iris.unsupported.pack": "Varjutajapakk ühildumatu!", - "iris.unsupported.pack.description": "Varjutajapakk, mida proovid laadida, sisaldab funktsioone, mida %s ei toeta. Palun proovi teist pakki. Loetelu %s", - "iris.unsupported.pack.macos": "\nmacOSil on teadaolevalt paljude varjutajapakkidega probleeme.", + "iris.sodium.failure.reason.incompatible": "Iris vajab hea jõudluse saavutamiseks Sodiumi, ent leiti ühildumatu Sodiumi versioon. Palun laadi sobiv Sodiumi versioon alla, aseta see oma mods kausta, kustuta sobimatu versioon ning taaskäivita mäng.", + "options.iris.apply": "Rakenda", "options.iris.refresh": "Värskenda", "options.iris.openShaderPackFolder": "Ava varjutajapakkide kaust...", @@ -55,21 +43,17 @@ "options.iris.reset.tooltip.holdShift": "Lähtestamiseks hoia Shifti ja klõpsa", "options.iris.importSettings.tooltip": "Impordi seadistused failist", "options.iris.exportSettings.tooltip": "Ekspordi rakendatud seadistused faili", - "options.iris.mustDisableFullscreen": "Palun keela enne täisekraanirežiim!", "options.iris.setToDefault": "Seadistad valiku vaikeväärtusele?", "options.iris.profile": "Profiil", "options.iris.profile.custom": "Kohandatud", "options.iris.shadowDistance": "Maks. varjukaugus", "options.iris.shadowDistance.enabled": "Võimaldab muuta varjude maksimaalset kaugust. Sellest kaugem maastik ning olemid ei heida varjusid. Varjukauguse vähendamine võib jõudlust märkimisväärselt suurendada.", "options.iris.shadowDistance.disabled": "Sinu praegune varjutajapakk on varjude nähtavuskauguse juba seadnud, sa ei saa seda muuta.", - "options.iris.shadowDistance.sodium_tooltip": "Varjude nähtavuskaugus määrab, kui kaugel olevat maastikku saab varjutuskäigul renderdada. Väiksemad kaugused tähendavad vähema maastiku renderdamist, mis parandab kaadrisagedust. Seda valikut ei saa muuta pakkide puhul, mis määravad varjude nähtavuskauguse ise. Tegelik varjude nähtavuskaugus on piiratud nähtavuskauguse valikuga.", - "options.iris.colorSpace": "Värviruum", - "options.iris.colorSpace.sodium_tooltip": "Värviruum, millesse kuva teisendada. Töötab varjutajapakkide peal. Kui ei tea millist valida, kasuta SRGB.", - "options.iris.gui.hide": "Peida liides", - "options.iris.gui.show": "Kuva liides", + "pack.iris.select.title": "Vali", "pack.iris.configure.title": "Seadista", "pack.iris.list.label": "+ Varjutajapakkide lisamiseks sikuta need siia", + "label.iris.true": "Sees", "label.iris.false": "Väljas" } diff --git a/common/src/shaders/resources/assets/iris/lang/fa_ir.json b/common/src/shaders/resources/assets/iris/lang/fa_ir.json index e0ccfd08a..b7856d49c 100644 --- a/common/src/shaders/resources/assets/iris/lang/fa_ir.json +++ b/common/src/shaders/resources/assets/iris/lang/fa_ir.json @@ -5,9 +5,11 @@ "iris.shaders.reloaded.failure": "خطا در بارگیری مجدد shader ها ، علت : %s", "iris.sodium.failure.title": "Iris اشکال در بارگذاری", "iris.sodium.failure.reason": "شما Sodium پرونده اجرایی را در پوشه mods بازی خود دارید، اما Iris پرونده اجرایی Sodium را به همراه دارد،‌ لطفا بازی را ببندید و پرونده اجرایی Sodium را از پوشه mods بازی حذف کنید.", - "options.iris.shadowDistance": "حداکثر فاصله سایه ها", + "options.iris.shadowDistance": "حداکثر فاصله سایه ها", "options.iris.shadowDistance.enabled": "به شما قابلیت تغییر میزان حداکثر فاصله سایه ها را می‌دهد. موجودات خارج از این فاصله هیچ سایه ای نمی‌اندازند. کم کردن این گزینه می‌تواند تاثیر زیادی در عملکرد بهتر بازی داشته باشد.", "options.iris.shadowDistance.disabled": "Shaderpack انتخابی شما میزان حداکثر فاصله سایه ها را تایین کرده است و شما نمی توانید آن را تغییر دهد.", + + "options.iris.apply": "اعمال", "options.iris.refresh": "تازه سازی", "options.iris.openShaderPackFolder": "باز کردن پوشه shader pack ها...", @@ -22,6 +24,7 @@ "options.iris.shaderPackSelection.copyErrorAlreadyExists": "\"%s\" در حال حاضر در پوشه shader pack های شما وجود دارد!", "options.iris.shaders.disabled": "Shaders: غیرفعال", "options.iris.shaders.enabled": "Shaders: فعال", + "pack.iris.select.title": "انتخاب", "pack.iris.list.label": "+ فایل shader موردنظر را بکشید و در اینجا بندازید." } diff --git a/common/src/shaders/resources/assets/iris/lang/fi_fi.json b/common/src/shaders/resources/assets/iris/lang/fi_fi.json index f15b4cd0b..1d00ca431 100644 --- a/common/src/shaders/resources/assets/iris/lang/fi_fi.json +++ b/common/src/shaders/resources/assets/iris/lang/fi_fi.json @@ -16,6 +16,7 @@ "iris.sodium.failure.download": "Lataa Sodium", "iris.sodium.failure.reason.notFound": "Iris vaatii Sodiumin hyvän suorituskyvyn takaamiseksi, mutta Sodiumia ei ole asennettu. Lataa Sodium, laita se modit-kansioosi, ja käynnistä pelisi uudelleen.", "iris.sodium.failure.reason.incompatible": "Iris vaatii Sodiumin hyvän suorituskyvyn takaamiseksi, mutta Sodium versiosi on yhteensopimaton. Lataa yhteensopiva Sodium versio, laita se modit-kansioosi ja poista yhteensopimaton versio, käynnistä sitten pelisi uudelleen.", + "options.iris.apply": "Ota käyttöön", "options.iris.refresh": "Lataa uudelleen", "options.iris.openShaderPackFolder": "Avaa shader-pakettikansio...", @@ -47,10 +48,12 @@ "options.iris.profile.custom": "Mukautettu", "options.iris.shadowDistance": "Varjojen enimmäisetäisyys", "options.iris.shadowDistance.enabled": "Sallii varjojen enimmäisetäisyydeen määrittämisen. Maasto ja kohteet asetetun etäisyyden jälkeen eivät enää tuota varjoja. Varjoetäisyyden alentaminen saattaa nostaa pelin kuvataajuutta huomattavasti.", - "options.iris.shadowDistance.disabled": "Käyttöön ottamasi shader-paketti määrittää varjoetäisyyden jo; et voi muuttaa sitä.", + "options.iris.shadowDistance.disabled": "Käyttöön ottamasi shader-paketti määrittää varjoetäisyyden jo; et voi muuttaa sitä.", + "pack.iris.select.title": "Valitse", "pack.iris.configure.title": "Mukauta", "pack.iris.list.label": "+ Raahaa ja pudota shader-paketti lisätäksesi sen", + "label.iris.true": "Päällä", "label.iris.false": "Pois" } diff --git a/common/src/shaders/resources/assets/iris/lang/fr_fr.json b/common/src/shaders/resources/assets/iris/lang/fr_fr.json index cd7a2a499..dfed66616 100644 --- a/common/src/shaders/resources/assets/iris/lang/fr_fr.json +++ b/common/src/shaders/resources/assets/iris/lang/fr_fr.json @@ -7,6 +7,7 @@ "iris.keybinds": "Iris", "iris.shaders.reloaded.failure": "Échec lors du rechargement des shaders ! Raison : %s", "iris.shaders.toggled.failure": "Échec lors de l'activation des shaders ! Raison : %s", + "options.iris.apply": "Appliquer", "options.iris.refresh": "Rafraichir", "options.iris.openShaderPackFolder": "Ouvrir le dossier des packs de shaders...", @@ -21,6 +22,7 @@ "options.iris.shaderPackSelection.copyErrorAlreadyExists": "\"%s\" est déjà dans votre dossier de packs de shaders !", "options.iris.shaders.disabled": "Shaders : Désactivés", "options.iris.shaders.enabled": "Shaders : Activés", + "pack.iris.select.title": "Sélectionner", "pack.iris.list.label": "+ Glissez-déposez vos packs de shaders ici pour les ajouter" } diff --git a/common/src/shaders/resources/assets/iris/lang/hu_hu.json b/common/src/shaders/resources/assets/iris/lang/hu_hu.json index 09a391b3d..a0cda564d 100644 --- a/common/src/shaders/resources/assets/iris/lang/hu_hu.json +++ b/common/src/shaders/resources/assets/iris/lang/hu_hu.json @@ -17,7 +17,7 @@ "iris.sodium.failure.reason.notFound": "Az Iris-nak szüksége van a Sodium modra a megfelelő teljesítményhez, de a Sodium mod nincs telepítve.\nKérlek töltsd le a Sodium modot, helyezd a mods mappába, és indítsd újra a játékot.", "iris.sodium.failure.reason.incompatible": "Az Iris-nak szüksége van a Sodium modra a megfelelő teljesítményhez, de a Sodium modnak nem a megfelelő verziója van feltelepítve.\nKérlek töltsd le a helyes verziót, majd helyezd a mods mappába és törölj minden más verziót, végük indítsd újra a játékot.", "iris.nec.failure.title": "[%s] Not Enough Crashes észlelve!", - "iris.nec.failure.description": "A Not Enough Crashes súlyosan rongálhatja a játékot, ezentúé nem ad pontos részleteket a hibákról.\nJó alternatívák a MixinTrace, ezek megbízhatóan tudják elemezni a hiba forrását.", + "iris.nec.failure.description": "A Not Enough Crashes súlyosan rongálhatja a játékot, ezentúé nem ad pontos részleteket a hibákról.\nJó alternatívák a MixinTrace és a Crafty Crashes, ezek megbízhatóan tudják elemezni a hiba forrását.", "iris.unsupported.irisorpc": "Iris vagy a PC-d", "iris.unsupported.iris": "Iris", "iris.unsupported.pc": "a PC-d", @@ -58,9 +58,11 @@ "options.iris.shadowDistance.disabled": "A jelenlegi Shader Pack már állított be távolságot az árnyékokhoz; nem változtathatsz rajta.", "options.iris.gui.hide": "Grafikus kezelőfelület (GUI) elrejtése", "options.iris.gui.show": "Grafikus kezelőfelület (GUI) megjelenítése", + "pack.iris.select.title": "Kiválasztás", "pack.iris.configure.title": "Konfigurálás", "pack.iris.list.label": "+ Húzz és Dobj Shader Pack-okat ide hogy hozzáadj a listához", + "label.iris.true": "Be-", "label.iris.false": "Ki-" } diff --git a/common/src/shaders/resources/assets/iris/lang/it_it.json b/common/src/shaders/resources/assets/iris/lang/it_it.json index 39f11aaae..37f0556c3 100644 --- a/common/src/shaders/resources/assets/iris/lang/it_it.json +++ b/common/src/shaders/resources/assets/iris/lang/it_it.json @@ -17,7 +17,7 @@ "iris.sodium.failure.reason.notFound": "Iris ha bisogno di Sodium per una buona performance, ma Sodium non è installato. Per favore scarica Sodium, mettilo nella cartella delle mod e riavvia il gioco.", "iris.sodium.failure.reason.incompatible": "Iris ha bisogno di Sodium per una buona performance, ma una versione incompatibile è stata trovata. Per favore scarica la corretta verisone di Sodium, mettilo nella cartella delle mod, elimina la vecchia versione e riavvia il gioco.", "iris.nec.failure.title": "[%s] Not Enough Crashes Trovato!", - "iris.nec.failure.description": "Not Enough Crashes può rompere il gioco durante i crash e non dà risultati accurati. Buone alternative sono MixinTrace, che possono identificare la causa di un crash meglio e non mettono il gioco in uno stato invalido.", + "iris.nec.failure.description": "Not Enough Crashes può rompere il gioco durante i crash e non dà risultati accurati. Buone alternative sono MixinTrace e Crafty Crashes, che possono identificare la causa di un crash meglio e non mettono il gioco in uno stato invalido.", "iris.unsupported.irisorpc": "Iris o il tuo PC", "iris.unsupported.iris": "Iris", "iris.unsupported.pc": "il tuo PC", @@ -43,7 +43,7 @@ "options.iris.shaders.disabled": "Shaders: Disabilitate", "options.iris.shaders.enabled": "Shaders: Abilitate", "options.iris.shaders.nonePresent": "Shaders: Nessuna Shader presente", - "options.iris.back": "Indietro", + "options.iris.back": "Indietor", "options.iris.reset": "Resetta", "options.iris.reset.tooltip": "Resetta TUTTE le opzioni e applica?", "options.iris.reset.tooltip.holdShift": "Tieni premuto SHIFT e click per resettare", diff --git a/common/src/shaders/resources/assets/iris/lang/ja_jp.json b/common/src/shaders/resources/assets/iris/lang/ja_jp.json index f4aa09c63..2462e1328 100644 --- a/common/src/shaders/resources/assets/iris/lang/ja_jp.json +++ b/common/src/shaders/resources/assets/iris/lang/ja_jp.json @@ -56,9 +56,11 @@ "options.iris.shadowDistance.disabled": "お使いのシェーダーパックでは既に最大描画距離が設定されているため、ここでは変更できません。", "options.iris.gui.hide": "GUIを非表示", "options.iris.gui.show": "GUIを表示", + "pack.iris.select.title": "シェーダー選択", "pack.iris.configure.title": "シェーダー設定", "pack.iris.list.label": "+ ドラッグアンドドロップでシェーダーを追加", + "label.iris.true": "ON", "label.iris.false": "OFF" } diff --git a/common/src/shaders/resources/assets/iris/lang/ko_kr.json b/common/src/shaders/resources/assets/iris/lang/ko_kr.json index 063479f9f..3bb52bb92 100644 --- a/common/src/shaders/resources/assets/iris/lang/ko_kr.json +++ b/common/src/shaders/resources/assets/iris/lang/ko_kr.json @@ -6,7 +6,6 @@ "iris.shaders.debug.disabled": "디버그 모드가 비활성화되었습니다.", "iris.shaders.debug.failure": "이 컴퓨터는 디버그 기능을 지원하지 않습니다.", "iris.shaders.debug.restart": "디버그 콘텍스트가 없습니다. 다시 시작하여 디버그 모드를 활성화하십시오.", - "iris.shaders.ssbofailure": "이 GPU는 셰이더가 요구하는 기능(SSBO)을 지원하지 않습니다. 셰이더가 정상적으로 동작하지 않을 것입니다.", "iris.keybind.reload": "셰이더 새로고침", "iris.keybind.shaderPackSelection": "셰이더 팩 선택 창", "iris.keybind.toggleShaders": "셰이더 전환", @@ -18,13 +17,12 @@ "iris.sodium.failure.reason.notFound": "Iris를 최상의 성능으로 쓰기 위한 Sodium이 설치되어 있지 않습니다. Sodium을 내려받아 mods 폴더에 넣어 게임을 다시 실행하십시오.", "iris.sodium.failure.reason.incompatible": "Iris를 최상의 성능으로 쓰기 위한 Sodium의 버전이 호환되지 않습니다. Iris와 맞는 버전의 Sodium을 내려받아 mods 폴더에 넣고, 호환되지 않는 버전의 Sodium을 제거한 뒤 게임을 다시 실행하십시오.", "iris.nec.failure.title": "[%s] Not Enough Crashes 모드가 감지되었습니다.", - "iris.nec.failure.description": "Not Enough Crashes는 충돌이 처리될 때 게임을 예기치 못하게 중단할 수 있으며 정확한 충돌 결과를 표시하지 않습니다.\n이에 대한 좋은 대체재로서, MixinTrace는 충돌 원인을 보다 안정적으로 식별하며 게임을 중단하지 않습니다.", + "iris.nec.failure.description": "Not Enough Crashes는 충돌이 처리될 때 게임을 예기치 못하게 중단시킬 수 있으며 정확한 충돌 결과를 표시하지 않습니다.\n이에 대한 좋은 대체재로서, MixinTrace와 Crafty Crashes는 충돌 원인을 보다 안정적으로 식별하며 게임을 중단하지 않습니다.", "iris.unsupported.irisorpc": "Iris 또는 사용자의 PC", "iris.unsupported.iris": "Iris", "iris.unsupported.pc": "사용자의 PC", "iris.unsupported.pack": "셰이더 팩이 호환되지 않습니다.", "iris.unsupported.pack.description": "불러오려는 셰이더 팩이 %s에 의해 지원되지 않는 기능을 포함하고 있습니다. 다른 팩으로 다시 시도하십시오. 목록 %s", - "iris.unsupported.pack.macos": "\nmacOS는 대부분의 셰이더 팩과 문제를 일으킵니다.", "options.iris.apply": "적용", "options.iris.refresh": "새로고침", "options.iris.openShaderPackFolder": "셰이더 팩 폴더 열기", @@ -49,21 +47,22 @@ "options.iris.reset": "초기화", "options.iris.reset.tooltip": "모든 옵션이 초기화됩니다. 계속하시겠습니까?", "options.iris.reset.tooltip.holdShift": "[Shift] 키를 누르고 클릭하여 초기화", - "options.iris.importSettings.tooltip": "설정을 파일에서 가져오기", + "options.iris.importSettings.tooltip": "파일에서 설정 가져오기", "options.iris.exportSettings.tooltip": "설정을 파일로 내보내기", "options.iris.mustDisableFullscreen": "전체 화면 모드를 해제하십시오.", "options.iris.setToDefault": "옵션을 기본값으로 되돌리시겠습니까?", "options.iris.profile": "프로필", "options.iris.profile.custom": "사용자 지정", - "options.iris.shadowDistance": "그림자 렌더링 거리", - "options.iris.shadowDistance.enabled": "그림자가 표시되는 최대 거리를 조정할 수 있습니다. 이 거리보다 멀리 있는 개체와 지형은 그림자를 표시하지 않습니다. 그림자 거리를 줄이면 성능을 향상시킬 수 있습니다.", - "options.iris.shadowDistance.disabled": "현재 사용하고 있는 셰이더 팩은 이미 그림자 렌더링 거리가 설정되어 있어 바꿀 수 없습니다.", - "options.iris.shadowDistance.sodium_tooltip": "그림자 렌더링 거리는 잠재적으로 섀도 패스에서 지형을 렌더링할 수 있는 거리를 제어합니다. 이를 낮게 설정하면 지형이 덜 렌더링되지만 프레임레이트를 향상시킬 수 있습니다. 그림자 렌더링 거리를 명시적으로 지정하는 셰이더 팩을 사용하면 이 설정을 바꿀 수 없습니다. 실제로 그림자가 표시되는 범위는 렌더링 거리 설정으로 제한됩니다.", + "options.iris.shadowDistance": "최대 그림자 범위", + "options.iris.shadowDistance.enabled": "최대 그림자 표시 범위를 조정할 수 있습니다. 이 거리보다 멀리 있는 개체와 지형은 그림자를 표시하지 않습니다. 그림자 거리를 줄이면 성능 향상에 도움이 될 수 있습니다.", + "options.iris.shadowDistance.disabled": "현재 사용하고 있는 셰이더 팩은 이미 그림자 표시 범위가 설정되어 있어 바꿀 수 없습니다.", "options.iris.gui.hide": "GUI 숨기기", "options.iris.gui.show": "GUI 보이기", + "pack.iris.select.title": "선택", "pack.iris.configure.title": "설정", "pack.iris.list.label": "+ 추가할 셰이더 팩을 끌어다 놓으십시오.", + "label.iris.true": "켜짐", "label.iris.false": "꺼짐" } diff --git a/common/src/shaders/resources/assets/iris/lang/lol_us.json b/common/src/shaders/resources/assets/iris/lang/lol_us.json index b4997f217..08a0ec983 100644 --- a/common/src/shaders/resources/assets/iris/lang/lol_us.json +++ b/common/src/shaders/resources/assets/iris/lang/lol_us.json @@ -1,31 +1,33 @@ { - "iris.shaders.reloaded": "fancehness turned off and on", - "iris.shaders.toggled": "turned fancehness to %s!", - "iris.keybind.reload": "reloedid!", - "iris.keybind.shaderPackSelection": "oooo so fanceh!", + "iris.shaders.reloaded": "Shadews wewoaded!", + "iris.shaders.toggled": "Toggwed shadews to %s!", + "iris.keybind.reload": "Wewoad shadews", + "iris.keybind.shaderPackSelection": "Shadewpack sewection scween", "iris.keybind.toggleShaders": "Toggwe Shadews", - "iris.keybinds": "iyriss", - "iris.shaders.reloaded.failure": "cant turn off and on fanceh! Reason: %s", - "iris.shaders.toggled.failure": "cant toggle fanceh! Reason: %s", + "iris.keybinds": "Iwis", + "iris.shaders.reloaded.failure": "Faiwed to wewoad shadews! Reason: %s", + "iris.shaders.toggled.failure": "Faiwed to toggwe shadews! Reason: %s", "iris.sodium.failure.title": "Iwis faiwed to woad!", "iris.sodium.failure.reason": "You have Sodium in youw mods fowdew, howevew Iwis incwudes it. Pwease cwose da game, and wemove Sodium from youw mods fowdew.", - "options.iris.apply": "yis", - "options.iris.refresh": "redog", - "options.iris.openShaderPackFolder": "take me to fanceh box...", + + "options.iris.apply": "Appwy", + "options.iris.refresh": "Refwesh", + "options.iris.openShaderPackFolder": "Open Shadew Pack Fowdew...", "options.iris.refreshShaderPacks": "Refwesh Shadew Packs", - "options.iris.shaderPackSelection": "fanceh lights...", - "options.iris.shaderPackSelection.title": "fanceh lights box", - "options.iris.shaderPackSelection.addedPack": "added fanceh lightbulb \"%s\"", - "options.iris.shaderPackSelection.addedPacks": "Added %s fanceh lightbulbs", + "options.iris.shaderPackSelection": "Shadew Packs...", + "options.iris.shaderPackSelection.title": "Shadew Packs", + "options.iris.shaderPackSelection.addedPack": "Added Shadew Pack \"%s\"", + "options.iris.shaderPackSelection.addedPacks": "Added %s Shadew Packs", "options.iris.shaderPackSelection.failedAdd": "Fiwes wewe not vawid Shadew Packs", "options.iris.shaderPackSelection.failedAddSingle": "\"%s\" ish not a vawid Shadew Pack", - "options.iris.shaderPackSelection.copyError": "cant add fanceh light \"%s\"", + "options.iris.shaderPackSelection.copyError": "Couwd not add Shadew Pack \"%s\"", "options.iris.shaderPackSelection.copyErrorAlreadyExists": "\"%s\" ish awwready in youw Shadew Packs fowdew!", - "options.iris.shaders.disabled": "fanceh: naw", - "options.iris.shaders.enabled": "fanceh: yiss", + "options.iris.shaders.disabled": "Shadews: Disabwed", + "options.iris.shaders.enabled": "Shadews: Enabwed", "options.iris.shadowDistance": "Mwax Swadow Dwistance", "options.iris.shadowDistance.enabled": "Awwows you to change da mwaximum dwistance fow swadows. Tewwain and entities beyond dis dwistance wiww not cast swadows. Lowering da shadow distance can sigwificantlwy incwease pewfowmance.", "options.iris.shadowDistance.disabled": "Youw cuwwent shadew pack has awweady set a wendew dwistance fow swadows; you cawwot chwange wit.", + "pack.iris.select.title": "Sewect", "pack.iris.list.label": "+ Dwag and Dwop Shadew Packs to add" } diff --git a/common/src/shaders/resources/assets/iris/lang/lzh.json b/common/src/shaders/resources/assets/iris/lang/lzh.json index 25f3db8b8..30a389040 100644 --- a/common/src/shaders/resources/assets/iris/lang/lzh.json +++ b/common/src/shaders/resources/assets/iris/lang/lzh.json @@ -7,6 +7,7 @@ "iris.keybinds": "Iris", "iris.shaders.reloaded.failure": "以%s故,弗能重載影!", "iris.shaders.toggled.failure": "以%s故,弗能用影!", + "options.iris.apply": "然", "options.iris.refresh": "重整", "options.iris.openShaderPackFolder": "啟影囊之資料夾……", @@ -21,6 +22,7 @@ "options.iris.shaderPackSelection.copyErrorAlreadyExists": "\"%s\" 旣存於影囊資料夾中!", "options.iris.shaders.disabled": "影:關", "options.iris.shaders.enabled": "影:開", + "pack.iris.select.title": "擇", "pack.iris.list.label": "曳影囊於此" } diff --git a/common/src/shaders/resources/assets/iris/lang/nl_nl.json b/common/src/shaders/resources/assets/iris/lang/nl_nl.json index 6960d08b2..d0116de09 100644 --- a/common/src/shaders/resources/assets/iris/lang/nl_nl.json +++ b/common/src/shaders/resources/assets/iris/lang/nl_nl.json @@ -1,37 +1,11 @@ { "iris.shaders.reloaded": "Shaders herladen!", - "iris.shaders.disabled": "Shaders uitgeschakeld!", - "iris.shaders.toggled": "Shaders naar %s geschakeld!", - "iris.shaders.debug.enabled": "Foutopsporing is ingeschakeld, de foutopsporings log zal uitgebreider zijn!", - "iris.shaders.debug.disabled": "Foutopsporing is uitgeschakeld.", - "iris.shaders.debug.failure": "Foutopsporing kon niet worden ingeschakeld, uw computer ondersteunt geen foutopsporingsfuncties.", - "iris.shaders.debug.restart": "Uw heeft geen foutopsporings-context, start opnieuw op om OpenGL foutopsporing in te schakelen.", - "iris.load.failure.shader": "Het shader-pack kon niet worden geladen! Rapporteer de fout aan de shader-ontwikkelaar.", - "iris.load.failure.generic": "Iris heeft een probleem ondervonden bij het laden van de shaders; meld dit alstublieft aan de Iris-ontwikkelaars.", - "iris.shaders.ssbofailure": "De shader heeft om een specifieke functie (SSBO) gevraagd die niet door uw GPU wordt ondersteund, deze werkt mogelijk niet.", "iris.keybind.reload": "Herlaad Shaders", - "iris.keybind.shaderPackSelection": "Shader-pack Selectie Scherm", - "iris.keybind.toggleShaders": "Shaders In- Of Uitschakelen", - "iris.keybinds": "Iris", "iris.shaders.reloaded.failure": "Shaders herladen is mislukt! Reden: %s", - "iris.shaders.toggled.failure": "Het is niet gelukt om shaders in of uit te schakelen! Reden: %s", - "iris.sodium.failure.title": "Iris kon niet laden!", - "iris.sodium.failure.download": "Sodium Downloaden", - "iris.sodium.failure.reason.notFound": "Iris heeft Sodium nodig voor goede prestaties, maar Sodium is niet geïnstalleerd. Download Sodium, plaats het in je mods-map, en herstart het spel.", - "iris.sodium.failure.reason.incompatible": "Iris heeft Sodium nodig voor goede prestaties, maar er is een incompatibele versie gevonden. Download de juiste versie van Sodium, plaats het in je mods-map, verwijder de incorrecte versie, en herstart het spel.", - "iris.nec.failure.title": "[%s] Not Enough Crashes is gedetecteerd!", - "iris.nec.failure.description": "Not Enough Crashes kan het spel ernstig beschadigen tijdens het verwerken van crashes, en levert geen nauwkeurige resultaten op.\nEen goed alternatief is MixinTrace, wat de oorzaak van een crash betrouwbaarder kan identificeren en het spel niet in een ongeldige staat brengt.", - "iris.unsupported.irisorpc": "Iris of uw computer", - "iris.unsupported.iris": "Iris", - "iris.unsupported.pc": "uw computer", - "iris.unsupported.pack": "Shader-pack is incompatibel!", - "iris.unsupported.pack.description": "Het shader-pack dat je probeert te laden bevat functies die niet ondersteund worden door %s. Probeer een ander pack. Lijst %s", - "iris.unsupported.pack.macos": "\nHet is bekend dat macOS problemen heeft met veel shader-pakketten.", + "options.iris.apply": "Toepassen", "options.iris.refresh": "Verversen", "options.iris.openShaderPackFolder": "Open de Shader Pack map...", - "options.iris.shaderPackSettings": "Shader Pack Instellingen...", - "options.iris.shaderPackList": "Shader Pack Lijst...", "options.iris.refreshShaderPacks": "Ververs Shader Pack", "options.iris.shaderPackSelection": "Shader Packs...", "options.iris.shaderPackSelection.title": "Shader Packs", @@ -41,33 +15,9 @@ "options.iris.shaderPackSelection.failedAddSingle": "\"%s\" is geen geldige Shader Pack", "options.iris.shaderPackSelection.copyError": "Kon Shader Pack \"%s\" niet toevoegen", "options.iris.shaderPackSelection.copyErrorAlreadyExists": "\"%s\" staat al in uw Shader Packs map!", - "options.iris.shaderPackOptions.tooManyFiles": "Kan niet meerdere Shader-instellingenbestanden importeren!", - "options.iris.shaderPackOptions.failedImport": "Importeren van Shader-instellingenbestand \"%s\" mislukt", - "options.iris.shaderPackOptions.importedSettings": "Shader-instellingen geïmporteerd van \"%s\"", "options.iris.shaders.disabled": "Shaders: Uitgeschakeld", "options.iris.shaders.enabled": "Shaders: Ingeschakeld", - "options.iris.shaders.nonePresent": "Shaders: Geen Pakketten Aanwezig", - "options.iris.back": "Terug", - "options.iris.reset": "Reset", - "options.iris.reset.tooltip": "Reset ALLE opties en pas toe?", - "options.iris.reset.tooltip.holdShift": "Houd SHIFT ingedrukt en klik om te resetten", - "options.iris.importSettings.tooltip": "Importeer instellingen van een bestand", - "options.iris.exportSettings.tooltip": "Exporteer instellingen naar een bestand", - "options.iris.mustDisableFullscreen": "Schakel eerst volledig-scherm uit!", - "options.iris.setToDefault": "Optie instellen op standaardwaarde?", - "options.iris.profile": "Profiel", - "options.iris.profile.custom": "Aangepast", - "options.iris.shadowDistance": "Maximale Schaduwafstand", - "options.iris.shadowDistance.enabled": "Hiermee kunt u de maximale afstand voor schaduwen wijzigen. Terrein en entiteiten buiten deze afstand zullen geen schaduwen werpen. Het verkleinen van de Schaduwafstand kan de prestaties aanzienlijk verbeteren.", - "options.iris.shadowDistance.disabled": "Uw huidig shader-pack heeft al een weergaveafstand voor schaduwen ingesteld; je kunt het niet veranderen.", - "options.iris.shadowDistance.sodium_tooltip": "De schaduwweergaveafstand bepaalt hoe ver terrein mogelijk kan worden weergeven in de schaduw fase. Kleinere afstanden betekent dat minder terrein wordt weergeven, waardoor de framesnelheden verbeteren. Deze optie kan niet worden gewijzigd op pakketten die expliciet een schaduwweergaveafstand specificeren. De werkelijke schaduwweergaveafstand wordt beperkt door de weergaveafstand.", - "options.iris.colorSpace": "Kleur Ruimte", - "options.iris.colorSpace.sodium_tooltip": "De kleurruimte waarnaar het scherm moet worden getransformeerd. Werkt bovenop shader-packs. Gebruik SRGB als u het niet zeker weet.", - "options.iris.gui.hide": "Verberg GUI", - "options.iris.gui.show": "Toon GUI", + "pack.iris.select.title": "Selecteren", - "pack.iris.configure.title": "Configureer", - "pack.iris.list.label": "+ Voeg Shader Packs toe door te slepen en neer te zetten", - "label.iris.true": "Aan", - "label.iris.false": "Uit" + "pack.iris.list.label": "+ Voeg Shader Packs toe door te slepen en neer te zetten" } diff --git a/common/src/shaders/resources/assets/iris/lang/pl_pl.json b/common/src/shaders/resources/assets/iris/lang/pl_pl.json index 7585ac8df..adcb5037e 100644 --- a/common/src/shaders/resources/assets/iris/lang/pl_pl.json +++ b/common/src/shaders/resources/assets/iris/lang/pl_pl.json @@ -16,26 +16,20 @@ "iris.sodium.failure.download": "Pobierz Sodium", "iris.sodium.failure.reason.notFound": "Iris wymaga Sodium dla poprawnego działania, a Sodium nie jest zainstalowane. Pobierz właściwą wersję Sodium, umieść ją w folderze mods i ponownie uruchom grę.", "iris.sodium.failure.reason.incompatible": "Iris wymaga Sodium dla poprawnego działania. Znaleziono niekompatybilną wersję Sodium. Pobierz właściwą wersję Sodium, umieść ją w folderze mods oraz usuń niekompatybilną wersję i ponownie uruchom grę.", - "iris.nec.failure.title": "[%s] Wykryto Not Enough Crashes!", - "iris.nec.failure.description": "Not Enough Crashes może poważnie uszkodzić grę podczas obsługi awarii i nie zapewnia dokładnych wyników.\nDobrymi alternatywami są MixinTrace, które są w stanie bardziej niezawodnie określić przyczynę awarii i nie wprowadzają gry w błędny stan.", - "iris.unsupported.irisorpc": "Iris lub Twój PC", - "iris.unsupported.iris": "Iris", - "iris.unsupported.pc": "Twój PC", - "iris.unsupported.pack": "Niekompatybilny pakiet Shaderów!", - "iris.unsupported.pack.description": "Pakiet Shaderów, który próbujesz załadować zawiera funkcje nieobsługiwane przez %s. Proszę spróbować z innym Shaderem. Lista %s", + "options.iris.apply": "Zastosuj", "options.iris.refresh": "Odśwież", - "options.iris.openShaderPackFolder": "Otwórz folder z pakietem Shaderów...", - "options.iris.shaderPackSettings": "Ustawienia pakietu Shader...", + "options.iris.openShaderPackFolder": "Otwórz folder z Shaderami...", + "options.iris.shaderPackSettings": "Ustawienia Shader Packa...", "options.iris.shaderPackList": "Lista Shaderów...", "options.iris.refreshShaderPacks": "Odśwież listę z Shaderami", - "options.iris.shaderPackSelection": "Pakiety Shaderów...", - "options.iris.shaderPackSelection.title": "Pakiety Shaderów", - "options.iris.shaderPackSelection.addedPack": "Dodano pakiet Shaderów \"%s\"", - "options.iris.shaderPackSelection.addedPacks": "Dodano %s pakietów Shaderów", - "options.iris.shaderPackSelection.failedAdd": "Pliki nie są poprawnymi pakietami Shaderów", - "options.iris.shaderPackSelection.failedAddSingle": "\"%s\" nie jest poprawnym pakietem Shaderów", - "options.iris.shaderPackSelection.copyError": "Nie można dodać pakietu Shader \"%s\"", + "options.iris.shaderPackSelection": "Shader Packi...", + "options.iris.shaderPackSelection.title": "Shader Packi", + "options.iris.shaderPackSelection.addedPack": "Dodano Shader Packa \"%s\"", + "options.iris.shaderPackSelection.addedPacks": "Dodano %s Shader Packi", + "options.iris.shaderPackSelection.failedAdd": "Pliki nie są poprawnymi Shader Packami", + "options.iris.shaderPackSelection.failedAddSingle": "\"%s\" nie jest poprawnym Shader Packiem", + "options.iris.shaderPackSelection.copyError": "Nie można dodać Shader Packa \"%s\"", "options.iris.shaderPackSelection.copyErrorAlreadyExists": "\"%s\" jest już w folderze z Shaderami!", "options.iris.shaderPackOptions.tooManyFiles": "Nie można zaimportować wielu plików z ustawieniami shaderów!", "options.iris.shaderPackOptions.failedImport": "Nie udało się zaimportować pliku z ustawieniami shaderów \"%s\"", @@ -55,13 +49,12 @@ "options.iris.profile.custom": "Własny", "options.iris.shadowDistance": "Maksymalna odległość cieni", "options.iris.shadowDistance.enabled": "Umożliwia zmianę maksymalnej odległości wyświetlania cieni. Teren i obiekty znajdujące się poza tą odległością nie będą rzucać cieni. Zmniejszenie odległości cieni może znacznie zwiększyć wydajność.", - "options.iris.shadowDistance.disabled": "Twój aktualny pakiet Shaderów ma już ustawioną odległość renderowania cieni; nie możesz jej zmienić.", - "options.iris.shadowDistance.sodium_tooltip": "Odległość renderowania cieni określa, jak daleko mogą być potencjalnie renderowane cienie. Mniejsza odległość oznacza, że mniejsza liczba cieni będzie renderowane, co poprawia liczbę klatek na sekundę. Opcja ta nie może być zmieniona w Shaderach, które jawnie określają odległość renderowania cieni. Rzeczywista odległość renderowania cieni jest ograniczona przez ustawienie Odległość widzenia.", - "options.iris.gui.hide": "Ukryj GUI", - "options.iris.gui.show": "Pokaż GUI", + "options.iris.shadowDistance.disabled": "Twój aktualny shader pack ma już ustawioną odległość renderowania cieni; nie możesz jej zmienić.", + "pack.iris.select.title": "Wybierz", "pack.iris.configure.title": "Konfiguracja", - "pack.iris.list.label": "+ Przeciągnij i upuść pakiety Shaderów, aby dodać", + "pack.iris.list.label": "+ Przeciągnij i upuść Shader Packi, aby dodać", + "label.iris.true": "Włączone", "label.iris.false": "Wyłączone" } diff --git a/common/src/shaders/resources/assets/iris/lang/pr_pt.json b/common/src/shaders/resources/assets/iris/lang/pr_pt.json index e840d37d2..730358461 100644 --- a/common/src/shaders/resources/assets/iris/lang/pr_pt.json +++ b/common/src/shaders/resources/assets/iris/lang/pr_pt.json @@ -2,6 +2,7 @@ "iris.shaders.reloaded": "Shaders Recarregados!", "iris.keybind.reload": "Recarregar Shaders", "iris.shaders.reloaded.failure": "Falha no Reload Shaders! Motivo: %s", + "options.iris.apply": "Aplicar", "options.iris.refresh": "Actualizar", "options.iris.openShaderPackFolder": "Pasta de Shader Pack Aberto......", @@ -16,6 +17,7 @@ "options.iris.shaderPackSelection.copyErrorAlreadyExists": "\"%s\" já está na sua pasta Shader Packs!", "options.iris.shaders.disabled": "Shaders: Deficientes", "options.iris.shaders.enabled": "Shaders: Activados", + "pack.iris.select.title": "Seleccionar", "pack.iris.list.label": "+ Trascina e rilascia Shader Pack da aggiungere" } diff --git a/common/src/shaders/resources/assets/iris/lang/pt_br.json b/common/src/shaders/resources/assets/iris/lang/pt_br.json index 763cab34d..8842495e0 100644 --- a/common/src/shaders/resources/assets/iris/lang/pt_br.json +++ b/common/src/shaders/resources/assets/iris/lang/pt_br.json @@ -6,7 +6,6 @@ "iris.shaders.debug.disabled": "A depuração foi desativada.", "iris.shaders.debug.failure": "Não foi possível ativar a depuração pois seu computador não suporta os recursos necessários.", "iris.shaders.debug.restart": "Você não tem o contexto de depuração, reinicie o jogo para ativá-lo.", - "iris.shaders.ssbofailure": "O recurso requisitado pelo sombreador (SSBO) não é suportado pelo seu GPU e pode não funcionar corretamente.", "iris.keybind.reload": "Recarregar sombreadores", "iris.keybind.shaderPackSelection": "Abrir/Fechar tela de pacotes de sombreadores", "iris.keybind.toggleShaders": "Alternar sombreadores", @@ -18,13 +17,12 @@ "iris.sodium.failure.reason.notFound": "O Iris requer o Sodium para um bom desempenho, mas o Sodium não está instalado. Instale-o, coloque-o na pasta de mods e inicie o jogo.", "iris.sodium.failure.reason.incompatible": "O Iris requer o Sodium para um bom desempenho, mas uma versão incompatível dele foi encontrada. Instale a versão correta, coloque-a na pasta de mods, remova a versão incorreta e inicie o jogo.", "iris.nec.failure.title": "[%s] Not Enough Crashes detectado!", - "iris.nec.failure.description": "O Not Enough Crashes pode quebrar gravemente como o jogo lida com os interrompimentos e não fornece resultados precisos.\nBoas alternativas são MixinTrace, que pode identificar a causa de uma falha de forma mais confiável e não coloca o jogo em um estado inválido.", + "iris.nec.failure.description": "O Not Enough Crashes pode quebrar gravemente como o jogo lida com os interrompimentos e não fornece resultados precisos.\nBoas alternativas são MixinTrace e Crafty Crashes, que pode identificar a causa de uma falha de forma mais confiável e não coloca o jogo em um estado inválido.", "iris.unsupported.irisorpc": "Iris ou seu computador", "iris.unsupported.iris": "Iris", "iris.unsupported.pc": "seu computador", "iris.unsupported.pack": "Sombreadores incompatíveis!", "iris.unsupported.pack.description": "Este pacote de sombreadores possui recursos não suportados pelo %s, tente outro pacote. Lista: %s", - "iris.unsupported.pack.macos": "\nO macOS é conhecido por apresentar problemas com vários sombreadores.", "options.iris.apply": "Aplicar", "options.iris.refresh": "Recarregar", "options.iris.openShaderPackFolder": "Abrir pasta de pacotes", @@ -58,12 +56,13 @@ "options.iris.shadowDistance": "Distância das sombras", "options.iris.shadowDistance.enabled": "Permite alterar a distância máxima das sombras. O terreno e as entidades além dessa distância não projetarão sombras. O desempenho do jogo pode ser melhorado significativamente ao reduzir este valor.", "options.iris.shadowDistance.disabled": "Seu pacote de sombreadores já definiu um valor da distância das sombras e você não poderá alterá-lo.", - "options.iris.shadowDistance.sodium_tooltip": "A distância das sombras permite controlar o quão longe o terreno será carregado com sombras. Distâncias menores significam menos terrenos sendo carregados, o que melhora o desempenho do jogo. Esta opção não pode ser alterada por pacotes que definem uma distância das sombras e ela é limitada pelo alcance visual.", "options.iris.gui.hide": "Ocultar interface", "options.iris.gui.show": "Exibir interface", + "pack.iris.select.title": "Selecionar um pacote", "pack.iris.configure.title": "Configurando um pacote", "pack.iris.list.label": "Arraste os pacotes até esta janela para adicioná-los", + "label.iris.true": "Sim", "label.iris.false": "Não" -} +} \ No newline at end of file diff --git a/common/src/shaders/resources/assets/iris/lang/ru_ru.json b/common/src/shaders/resources/assets/iris/lang/ru_ru.json index 248db447a..cc5d0d034 100644 --- a/common/src/shaders/resources/assets/iris/lang/ru_ru.json +++ b/common/src/shaders/resources/assets/iris/lang/ru_ru.json @@ -1,12 +1,11 @@ { "iris.shaders.reloaded": "Шейдеры перезагружены.", "iris.shaders.disabled": "Шейдеры выключены.", - "iris.shaders.toggled": "Включён набор шейдеров «%s».", + "iris.shaders.toggled": "Включён набор шейдеров %s.", "iris.shaders.debug.enabled": "Отладка включена, ведение журнала будет более подробным.", "iris.shaders.debug.disabled": "Отладка отключена.", "iris.shaders.debug.failure": "Невозможно включить отладку, ваш компьютер не поддерживает необходимые функции.", "iris.shaders.debug.restart": "Отсутствует отладочный контекст. Перезапустите игру, чтобы включить отладку.", - "iris.shaders.ssbofailure": "Запрашиваемая шейдером функция (SSBO) не поддерживается вашим ГП, шейдер может работать неправильно.", "iris.keybind.reload": "Перезагрузить шейдеры", "iris.keybind.shaderPackSelection": "Список наборов шейдеров", "iris.keybind.toggleShaders": "Переключить шейдеры", @@ -18,13 +17,12 @@ "iris.sodium.failure.reason.notFound": "Iris требует Sodium для лучшей производительности, но Sodium не установлен. Пожалуйста, загрузите Sodium, добавьте его в папку с модами и перезапустите игру.", "iris.sodium.failure.reason.incompatible": "Iris требует Sodium для лучшей производительности, но ваша версия Sodium несовместима. Пожалуйста, загрузите и добавьте в папку с модами подходящую версию Sodium, удалите старую версию и перезапустите игру.", "iris.nec.failure.title": "[%s] обнаружен Not Enough Crashes!", - "iris.nec.failure.description": "Not Enough Crashes может серьёзно сломать игру при обработке сбоев, при этом не давая точных результатов.\nВ качестве альтернатив есть MixinTrace, которые более надёжно определяют причину сбоя и не доводят игру до нестабильного состояния.", + "iris.nec.failure.description": "Not Enough Crashes может серьёзно сломать игру при обработке сбоев, при этом не давая точных результатов.\nВ качестве альтернатив есть MixinTrace и Crafty Crashes, которые более надёжно определяют причину сбоя и не доводят игру до нестабильного состояния.", "iris.unsupported.irisorpc": "не поддерживает Iris или ваше устройство", "iris.unsupported.iris": "Iris не поддерживает", "iris.unsupported.pc": "ваше устройство не поддерживает", "iris.unsupported.pack": "Несовместимый набор шейдеров!", "iris.unsupported.pack.description": "Этот набор шейдеров содержит функции, которые %s. Попробуйте другой набор. Несовместимо: %s", - "iris.unsupported.pack.macos": "\nmacOS известен своими проблемами со многими наборами шейдеров.", "options.iris.apply": "Применить", "options.iris.refresh": "Обновить", "options.iris.openShaderPackFolder": "Папка с наборами", @@ -33,15 +31,15 @@ "options.iris.refreshShaderPacks": "Обновить список шейдеров", "options.iris.shaderPackSelection": "Наборы шейдеров...", "options.iris.shaderPackSelection.title": "Наборы шейдеров", - "options.iris.shaderPackSelection.addedPack": "Добавлен набор шейдеров «%s»", + "options.iris.shaderPackSelection.addedPack": "Добавлен набор шейдеров \"%s\"", "options.iris.shaderPackSelection.addedPacks": "Добавлено %s наборов шейдеров", "options.iris.shaderPackSelection.failedAdd": "Файлы не являются допустимыми наборами шейдеров", - "options.iris.shaderPackSelection.failedAddSingle": "«%s» не является допустимым набором шейдеров", - "options.iris.shaderPackSelection.copyError": "Не удалось добавить набор шейдеров «%s»", - "options.iris.shaderPackSelection.copyErrorAlreadyExists": "«%s» уже находится в вашей папке с наборами шейдеров.", + "options.iris.shaderPackSelection.failedAddSingle": "\"%s\" не является допустимым набором шейдеров", + "options.iris.shaderPackSelection.copyError": "Не удалось добавить набор шейдеров \"%s\"", + "options.iris.shaderPackSelection.copyErrorAlreadyExists": "\"%s\" уже находится в вашей папке с наборами шейдеров.", "options.iris.shaderPackOptions.tooManyFiles": "Невозможно загрузить несколько файлов с настройками.", - "options.iris.shaderPackOptions.failedImport": "Не удалось загрузить настройки из «%s»", - "options.iris.shaderPackOptions.importedSettings": "Загружены настройки шейдеров из «%s»", + "options.iris.shaderPackOptions.failedImport": "Не удалось загрузить настройки из \"%s\"", + "options.iris.shaderPackOptions.importedSettings": "Загружены настройки шейдеров из \"%s\"", "options.iris.shaders.disabled": "Шейдеры: Выключены", "options.iris.shaders.enabled": "Шейдеры: Включены", "options.iris.shaders.nonePresent": "Шейдеры: наборов не обнаружено", @@ -61,11 +59,14 @@ "options.iris.shadowDistance.sodium_tooltip": "Дальность теней определяет, насколько далеко местность может обрабатываться на этапе просчёта теней. Меньшие значения соответствуют меньшей площади, что улучшает частоту кадров. Этот параметр нельзя изменить для наборов, в которых установлено своё расстояние рендеринга теней. Фактическое расстояние рендеринга ограничено дальностью прорисовки.", "options.iris.gui.hide": "Скрыть", "options.iris.gui.show": "Показать", + "pack.iris.select.title": "Список", "pack.iris.configure.title": "Настройки", "pack.iris.list.label": "+ Перетащите наборы шейдеров для добавления", + "label.iris.true": "Вкл", "label.iris.false": "Выкл", - "modmenu.summaryTranslation.iris": "Современный графический мод для загрузки существующих наборов шейдеров Optifine.", + + "modmenu.summaryTranslation.iris":"Современный графический мод для загрузки существующих наборов шейдеров Optifine.", "modmenu.descriptionTranslation.iris": "Современный графический мод для Minecraft, предназначенный для загрузки существующих наборов шейдеров формата Optifine." } diff --git a/common/src/shaders/resources/assets/iris/lang/sk_sk.json b/common/src/shaders/resources/assets/iris/lang/sk_sk.json index 9f2c719eb..d711f5375 100644 --- a/common/src/shaders/resources/assets/iris/lang/sk_sk.json +++ b/common/src/shaders/resources/assets/iris/lang/sk_sk.json @@ -15,6 +15,7 @@ "iris.sodium.failure.download": "Stiahnuť Sodium", "iris.sodium.failure.reason.notFound": "Iris potrebuje Sodium pre dobrý výkon, ale Sodium nie je nainštalovaný. Prosím, stiahnite si Sodium, dajte ho do priečinka módov a reštartujte hru.", "iris.sodium.failure.reason.incompatible": "Iris potrebuje Sodium pre dobrý výkon, ale máte zlú verziu Sodium. Prosím, stiahnite si správnu verziu Sodium, dajte ho do priečinka módov, odstráňte zlú verziu a reštartujte hru.", + "options.iris.apply": "Aplikovať", "options.iris.refresh": "Obnoviť", "options.iris.openShaderPackFolder": "Otvoriť priečinok s tieňovačmi...", @@ -47,9 +48,11 @@ "options.iris.shadowDistance": "Dohľadnosť tieňov", "options.iris.shadowDistance.enabled": "Mení maximálnu vzdialenosť vykreslenia tieňov. Terén a entity nebudú vrhať žiadne tiene. Toto nastavenie má veľký vplyv na výkon.", "options.iris.shadowDistance.disabled": "Tento tieňovač už nastavil dohľadnosť tieňov, už to nemôžeš nastavovať.", + "pack.iris.select.title": "Vybrať", "pack.iris.configure.title": "Nastavovať", "pack.iris.list.label": "+ Potiahni a pusti tieňovače pre pridanie", + "label.iris.true": "ZAP", "label.iris.false": "VYP" } diff --git a/common/src/shaders/resources/assets/iris/lang/th_th.json b/common/src/shaders/resources/assets/iris/lang/th_th.json index f98b470d4..ef754df1c 100644 --- a/common/src/shaders/resources/assets/iris/lang/th_th.json +++ b/common/src/shaders/resources/assets/iris/lang/th_th.json @@ -11,6 +11,7 @@ "iris.sodium.failure.download": "ดาวน์โหลด Sodium", "iris.sodium.failure.reason.notFound": "Iris ต้องใช้ Sodium เพื่อประสิทธิภาพที่ดีขึ้น แต่ Sodium ยังไม่ได้รับการติดตั้ง โปรดดาวน์โหลด Sodium แล้ววางไว้ในโฟลเดอร์ mods เสร็จแล้วให้เปิดเกมใหม่อีกครั้ง", "iris.sodium.failure.reason.incompatible": "Iris ต้องใช้ Sodium เพื่อประสิทธิภาพที่ดีขึ้น แต่พบเวอร์ชั่นของ Sodium ที่ไม่สามารถใช้ร่วมกับ Iris ได้ โปรดดาวน์โหลด Sodium เวอร์ชั่นที่สามารถใช้กับ Iris ได้ แล้ววางไว้ในโฟลเดอร์ mods ลบตัวเวอร์ชั่นที่ใช้ร่วมกันไม่ได้ออก เสร็จแล้วให้เปิดเกมใหม่อีกครั้ง", + "options.iris.apply": "ปรับใช้", "options.iris.refresh": "รีเฟรช", "options.iris.openShaderPackFolder": "เปิดโฟลเดอร์แสงเงา...", @@ -44,9 +45,11 @@ "options.iris.shadowDistance.enabled": "อนุญาตให้คุณเปลี่ยนระยะสูงสุดของเงา ภูมิประเทศและเอนติตี้ต่อจากระยะนี้จะไม่เกิดเงา โดยการปรับระยะเงาให้ต่ำลงสามารถเพิ่ประสิทธิภาพได้ค่อนข้างมาก", "options.iris.shadowDistance.disabled": "แสงเงาของคุณใช้อยู่ได้รับการตั้งค่าระยะการเรนเดอร์เงามาเรียบร้อยแล้ว คุณไม่สามารถเปลี่ยนได้", "options.iris.shadowDistance.sodium_tooltip": "ระยะการเรนเดอร์เงา จะควบคุมว่าภูมิประเทศจะสามารถเรนเดอร์เป็นเงาได้ไกลมากน้อยแค่ไหน โดยค่าต่ำ ๆ หมายความว่าภูมิประเทศจะถูกเรนเดอร์ได้น้อย ช่วยเพิ่มอัตราเฟรมได้ ตัวเลือกนี้จะไม่สามารถเปลี่ยนบนแพ็คที่ได้กำหนดระยะการเรนเดอร์แสงเงามาแล้วอย่างชัดเจน ระยะการเรนเดอร์แสงเงาที่แท้จริงจะถูกจำกัดโดยตัวเลือกระยะการมองเห็น", - "pack.iris.select.title": "โปรดเลือก", + + "pack.iris.select.title": "โปรดเลือก", "pack.iris.configure.title": "ปรับแต่งค่า", "pack.iris.list.label": "+ ลากไฟล์แสงเงามาที่นี่เพื่อเพิ่มแสงเงา", + "label.iris.true": "เปิด", "label.iris.false": "ปิด" } diff --git a/common/src/shaders/resources/assets/iris/lang/tr_tr.json b/common/src/shaders/resources/assets/iris/lang/tr_tr.json index 4d6debf91..7f6d27b56 100644 --- a/common/src/shaders/resources/assets/iris/lang/tr_tr.json +++ b/common/src/shaders/resources/assets/iris/lang/tr_tr.json @@ -11,6 +11,7 @@ "iris.sodium.failure.download": "Sodium'u İndir", "iris.sodium.failure.reason.notFound": "İyi performans için Iris'e Sodium gerek, ancak kurulu değil. Lütfen Sodium'u indir ve modlar klasörüne yerleştirip oyunu yeniden başlat.", "iris.sodium.failure.reason.incompatible": "İyi performans için Iris'e Sodium gerek, ancak uyumsuz bir sürüm bulundu. Lütfen Sodium'un uygun sürümünü indir, modlar klasörüne yerleştir, uyumsuz sürümü kaldır ve oyunu yeniden başlat.", + "options.iris.apply": "Uygula", "options.iris.refresh": "Yenile", "options.iris.openShaderPackFolder": "Shader Paket Klasörünü Aç...", @@ -43,9 +44,11 @@ "options.iris.shadowDistance": "Mak. Gölge Uzaklığı", "options.iris.shadowDistance.enabled": "Gölgeler için maksimum ucaklığı değiştirmeye yarar. Bu uzaklığın ötesindeki araziye ve varlıklara gölge uygulanmaz. Gölge uzaklığını azaltmak, performansı önemli ölçüde arttırabilir.", "options.iris.shadowDistance.disabled": "Mevcut shader paketiniz, zaten gölgeler için ayarlı bir görüntüleme uzaklığına sahip; bunu değiştiremezsin.", + "pack.iris.select.title": "Seç", "pack.iris.configure.title": "Ayarla", "pack.iris.list.label": "+ Eklemek için Shader Paketlerini Sürükle ve Bırak", + "label.iris.true": "Açık", "label.iris.false": "Kapalı" } diff --git a/common/src/shaders/resources/assets/iris/lang/uk_ua.json b/common/src/shaders/resources/assets/iris/lang/uk_ua.json index f2f088a59..3878c1931 100644 --- a/common/src/shaders/resources/assets/iris/lang/uk_ua.json +++ b/common/src/shaders/resources/assets/iris/lang/uk_ua.json @@ -5,7 +5,7 @@ "iris.shaders.debug.enabled": "Налагодження ввімкнено, журнал налагодження буде більш докладним!", "iris.shaders.debug.disabled": "Налагодження вимкнено.", "iris.shaders.debug.failure": "Не вдається ввімкнути налагодження, ваш комп'ютер не підтримує функції налагодження.", - "iris.shaders.debug.restart": "У вас немає контексту налагодження. Будь ласка, перезапустіть, щоб увімкнути клієнтське налагодження OpenGL.", + "iris.shaders.debug.restart": "У вас немає контексту налагодження. Будь ласка, перезапустіть, щоб увімкнути налагодження.", "iris.keybind.reload": "Перезавантажити шейдери", "iris.keybind.shaderPackSelection": "Екран вибору пакету шейдерів", "iris.keybind.toggleShaders": "Перемкнути шейдери", @@ -17,7 +17,7 @@ "iris.sodium.failure.reason.notFound": "Для гарної роботи Iris потрібен Sodium, але Sodium не встановлено. Будь ласка, завантажте Sodium, помістіть його в папку mods і повторно запустіть гру.", "iris.sodium.failure.reason.incompatible": "Для гарної роботи Iris потрібен Sodium, але була знайдена несумісна версія. Будь ласка, завантажте правильну версію Sodium, помістіть її в папку mods, видаліть неправильну версію та перезапустіть гру.", "iris.nec.failure.title": "[%s] Not Enough Crashes виявлено!", - "iris.nec.failure.description": "Not Enough Crashes може серйозно поламати гру під час обробки збоїв, та не дає точних результатів.\nХорошими альтернативами є MixinTrace, які можуть надійніше визначити причину збою та не переводять гру в недійсний стан.", + "iris.nec.failure.description": "Not Enough Crashes може серйозно поламати гру під час обробки збоїв, та не дає точних результатів.\nХорошими альтернативами є MixinTrace і Crafty Crashes, які можуть надійніше визначити причину збою та не переводять гру в недійсний стан.", "iris.unsupported.irisorpc": "Iris або твій ПК", "iris.unsupported.iris": "Iris", "iris.unsupported.pc": "твій ПК", @@ -56,12 +56,13 @@ "options.iris.shadowDistance": "Макс. відстань тіней", "options.iris.shadowDistance.enabled": "Дозволяє змінювати максимальну відстань для тіней. Місцевість та сутності за межами цієї відстані не відкидають тіні. Зменшення відстані тіней може значно підвищити продуктивність.", "options.iris.shadowDistance.disabled": "Ваш поточний пакет шейдерів уже встановив відстань візуалізації для тіней; ви не можете змінити це.", - "options.iris.shadowDistance.sodium_tooltip": "Відстань візуалізації тіней визначає, наскільки далеко місцевість може бути візуалізована під час проходу тіней. Менші значення відповідають меншій ділянці, що буде візуалізована, у такий спосіб покращуючи частоту кадрів. Цей параметр не можна змінити для шейдерів, в яких указана власна відстань візуалізації тіней. Фактична відстань візуалізації тіней обмежена відстанню промальовування.", "options.iris.gui.hide": "Приховати інтерфейс", "options.iris.gui.show": "Показати інтерфейс", + "pack.iris.select.title": "Виберіть шейдери", "pack.iris.configure.title": "Налаштувати", "pack.iris.list.label": "+ Перетягніть пакети шейдерів, щоб додати", + "label.iris.true": "Увімк", "label.iris.false": "Вимк" } diff --git a/common/src/shaders/resources/assets/iris/lang/zh_cn.json b/common/src/shaders/resources/assets/iris/lang/zh_cn.json index ffa3f2166..29b986bdb 100644 --- a/common/src/shaders/resources/assets/iris/lang/zh_cn.json +++ b/common/src/shaders/resources/assets/iris/lang/zh_cn.json @@ -5,8 +5,7 @@ "iris.shaders.debug.enabled": "调试已启用,日志将更加详细!", "iris.shaders.debug.disabled": "调试已禁用。", "iris.shaders.debug.failure": "无法启用调试,你的电脑不支持调试功能。", - "iris.shaders.debug.restart": "没有调试环境,请重启以启用调试。", - "iris.shaders.ssbofailure": "光影请求了你的 GPU 所不支持的特定功能(SSBO),可能无法正常工作。", + "iris.shaders.debug.restart": "请重启以启用调试。", "iris.keybind.reload": "重新加载光影包", "iris.keybind.shaderPackSelection": "光影包选择界面", "iris.keybind.toggleShaders": "启用/禁用光影", @@ -17,31 +16,30 @@ "iris.sodium.failure.download": "下载 Sodium", "iris.sodium.failure.reason.notFound": "Iris 需要 Sodium 来提供更好的性能,但你并没有安装 Sodium。请下载 Sodium,把它放到 mods 文件夹中,并重新启动游戏。", "iris.sodium.failure.reason.incompatible": "Iris 需要 Sodium 来提供更好的性能,但不兼容已安装的 Sodium 版本。请下载正确的 Sodium 版本,把它放到 mods 文件夹中,移除错误的 Sodium 版本,并重新启动游戏。", - "iris.nec.failure.title": "[%s] 检测到 Not Enough Crashes!", - "iris.nec.failure.description": "在处理崩溃时,Not Enough Crashes 会严重破坏游戏,而且无法提供准确的结果。\n好的替代品有 MixinTrace,它们都可以更准确地识别崩溃原因并且不会使游戏处于无效状态。", + "iris.nec.failure.title": "[%s] 检测到Not Enough Crashes!", + "iris.nec.failure.description": "在处理崩溃时,Not Enough Crashes会严重破坏游戏,而且无法提供准确的结果。\n好的替代品有 MixinTrace 和 Crafty Crashes,它们都可以更准确地识别崩溃原因并且不会使游戏处于无效状态。", "iris.unsupported.irisorpc": "Iris或你的电脑", "iris.unsupported.iris": "Iris", "iris.unsupported.pc": "你的电脑", "iris.unsupported.pack": "光影包不兼容!", "iris.unsupported.pack.description": "你尝试加载的光影包含%s不支持的功能。请尝试其他光影。名单:%s", - "iris.unsupported.pack.macos": "\nmacOS 已知与很多光影包都有兼容性问题。", "options.iris.apply": "应用", "options.iris.refresh": "刷新", - "options.iris.openShaderPackFolder": "打开光影包文件夹…", - "options.iris.shaderPackSettings": "光影包设置…", - "options.iris.shaderPackList": "光影包列表…", + "options.iris.openShaderPackFolder": "打开光影包文件夹...", + "options.iris.shaderPackSettings": "光影包设置...", + "options.iris.shaderPackList": "光影包列表...", "options.iris.refreshShaderPacks": "刷新光影包", - "options.iris.shaderPackSelection": "光影包…", + "options.iris.shaderPackSelection": "光影包...", "options.iris.shaderPackSelection.title": "光影包", - "options.iris.shaderPackSelection.addedPack": "已添加光影包“%s”", + "options.iris.shaderPackSelection.addedPack": "已添加光影包 \"%s\"", "options.iris.shaderPackSelection.addedPacks": "已添加 %s 个光影包", "options.iris.shaderPackSelection.failedAdd": "文件不是有效的光影包", - "options.iris.shaderPackSelection.failedAddSingle": "“%s”不是有效的光影包", - "options.iris.shaderPackSelection.copyError": "无法添加光影包“%s”", - "options.iris.shaderPackSelection.copyErrorAlreadyExists": "“%s”已存在于光影包文件夹中!", + "options.iris.shaderPackSelection.failedAddSingle": "\"%s\" 不是有效的光影包", + "options.iris.shaderPackSelection.copyError": "无法添加光影包 \"%s\"", + "options.iris.shaderPackSelection.copyErrorAlreadyExists": "\"%s\" 已存在于光影包文件夹中!", "options.iris.shaderPackOptions.tooManyFiles": "无法导入多个光影设置文件!", - "options.iris.shaderPackOptions.failedImport": "导入光影设置文件“%s”失败", - "options.iris.shaderPackOptions.importedSettings": "已从“%s”导入光影设置", + "options.iris.shaderPackOptions.failedImport": "导入光影设置文件 \"%s\" 失败", + "options.iris.shaderPackOptions.importedSettings": "已从 \"%s\" 导入光影设置", "options.iris.shaders.disabled": "光影:已禁用", "options.iris.shaders.enabled": "光影:已启用", "options.iris.shaders.nonePresent": "光影:无光影包", @@ -58,12 +56,13 @@ "options.iris.shadowDistance": "最大阴影距离", "options.iris.shadowDistance.enabled": "允许更改阴影的最远距离。超出此距离的地形和实体不会投射阴影。降低阴影距离可以显著提高性能。", "options.iris.shadowDistance.disabled": "你不能改变当前的光影包已经为阴影设置的渲染距离。", - "options.iris.shadowDistance.sodium_tooltip": "阴影渲染距离控制在阴影通道中可以渲染到多远的地形。更短的距离意味着将渲染更少的地形,从而提高帧率。在明确指定了阴影渲染距离的光影包上无法更改此选项。实际阴影渲染的距离受“渲染距离”设置的限制。", - "options.iris.gui.hide": "隐藏 GUI", - "options.iris.gui.show": "显示 GUI", + "options.iris.gui.hide": "隐藏GUI", + "options.iris.gui.show": "显示GUI", + "pack.iris.select.title": "选择", "pack.iris.configure.title": "配置", "pack.iris.list.label": "+ 拖放光影包至此以添加", + "label.iris.true": "开", "label.iris.false": "关" } diff --git a/common/src/shaders/resources/assets/iris/lang/zh_tw.json b/common/src/shaders/resources/assets/iris/lang/zh_tw.json index 7fee50621..91e415ab2 100644 --- a/common/src/shaders/resources/assets/iris/lang/zh_tw.json +++ b/common/src/shaders/resources/assets/iris/lang/zh_tw.json @@ -2,14 +2,13 @@ "iris.shaders.reloaded": "已重新載入光影!", "iris.shaders.disabled": "已停用光影!", "iris.shaders.toggled": "使用光影:%s!", - "iris.shaders.debug.enabled": "已啟用除錯,將進行詳細記錄!", - "iris.shaders.debug.disabled": "已停用除錯。", - "iris.shaders.debug.failure": "無法啟用除錯,您的電腦不支援除錯功能。", - "iris.shaders.debug.restart": "您沒有除錯內容,請重新啟動後啟用除錯。", - "iris.shaders.ssbofailure": "光影要求特定功能(SSBO),但您的 GPU 不支援,因此它可能無法正常運作。", + "iris.shaders.debug.enabled": "已啟用偵錯,將進行詳細記錄!", + "iris.shaders.debug.disabled": "已停用偵錯。", + "iris.shaders.debug.failure": "無法啟用偵錯,您的電腦不支援偵錯功能。", + "iris.shaders.debug.restart": "您沒有偵錯內容,請重新啟動後啟用偵錯。", "iris.keybind.reload": "重新載入光影", "iris.keybind.shaderPackSelection": "光影包選擇畫面", - "iris.keybind.toggleShaders": "開關光影", + "iris.keybind.toggleShaders": "光影開關", "iris.keybinds": "Iris", "iris.shaders.reloaded.failure": "無法重新載入光影!原因:%s", "iris.shaders.toggled.failure": "無法使用光影!原因:%s", @@ -17,31 +16,30 @@ "iris.sodium.failure.download": "下載 Sodium", "iris.sodium.failure.reason.notFound": "為了讓 Iris 有良好的效能表現,您需要安裝 Sodium。請先下載它、將它存放於模組資料夾後重新啟動遊戲。", "iris.sodium.failure.reason.incompatible": "為了讓 Iris 有良好的效能表現,您需要安裝版本相容的 Sodium。請先下載正確的版本、將它存放於模組資料夾、移除不正確的版本後重新啟動遊戲。", - "iris.nec.failure.title": "%s:已偵測到「Not Enough Crashes」!", - "iris.nec.failure.description": "「Not Enough Crashes」可能會在處理崩潰問題時,對遊戲造成嚴重破壞,並且無法提供精確結果。\n建議使用「MixinTrace」代替,它在辨識崩潰原因上更可靠,並且不會讓遊戲處於無效狀態。", + "iris.nec.failure.title": "%s:已偵測到「Not Enough Crashes」!", + "iris.nec.failure.description": "「Not Enough Crashes」可能會在處理崩潰問題時,對遊戲造成嚴重破壞,並且無法提供精確結果。\n建議使用「MixinTrace」和「Crafty Crashes」替代,他們在辨識崩潰原因上更可靠,並且不會讓遊戲處於無效狀態。", "iris.unsupported.irisorpc": "Iris 或您的電腦", "iris.unsupported.iris": "Iris", "iris.unsupported.pc": "您的電腦", "iris.unsupported.pack": "光影包不相容!", "iris.unsupported.pack.description": "您嘗試載入的光影包包含 %s 不支援的功能。請嘗試載入其他光影包。列出 %s", - "iris.unsupported.pack.macos": "\nmacOS 存在許多光影包問題。", "options.iris.apply": "套用", "options.iris.refresh": "重新整理", - "options.iris.openShaderPackFolder": "開啟光影包資料夾...", - "options.iris.shaderPackSettings": "光影包設定...", - "options.iris.shaderPackList": "光影包清單...", + "options.iris.openShaderPackFolder": "開啟光影包資料夾……", + "options.iris.shaderPackSettings": "光影包設定……", + "options.iris.shaderPackList": "光影包清單……", "options.iris.refreshShaderPacks": "重新整理", - "options.iris.shaderPackSelection": "光影包...", + "options.iris.shaderPackSelection": "光影包……", "options.iris.shaderPackSelection.title": "光影包", - "options.iris.shaderPackSelection.addedPack": "已新增「%s」光影包", + "options.iris.shaderPackSelection.addedPack": "已新增 \"%s\" 光影包", "options.iris.shaderPackSelection.addedPacks": "已新增 %s 個光影包", "options.iris.shaderPackSelection.failedAdd": "檔案並非有效的光影包", - "options.iris.shaderPackSelection.failedAddSingle": "「%s」不是有效的光影包", - "options.iris.shaderPackSelection.copyError": "無法新增「%s」光影包", - "options.iris.shaderPackSelection.copyErrorAlreadyExists": "「%s」已存在於光影包資料夾中!", + "options.iris.shaderPackSelection.failedAddSingle": "\"%s\" 不是有效的光影包", + "options.iris.shaderPackSelection.copyError": "無法新增 \"%s\" 光影包", + "options.iris.shaderPackSelection.copyErrorAlreadyExists": "\"%s\" 已存在於光影包資料夾中!", "options.iris.shaderPackOptions.tooManyFiles": "無法一次匯入多個光影設定!", - "options.iris.shaderPackOptions.failedImport": "無法從檔案「%s」匯入光影設定", - "options.iris.shaderPackOptions.importedSettings": "已從檔案「%s」匯入光影設定", + "options.iris.shaderPackOptions.failedImport": "無法自檔案 \"%s\" 匯入光影設定", + "options.iris.shaderPackOptions.importedSettings": "已自檔案 \"%s\" 匯入光影設定", "options.iris.shaders.disabled": "光影:已停用", "options.iris.shaders.enabled": "光影:已啟用", "options.iris.shaders.nonePresent": "光影:沒有光影包", @@ -50,20 +48,21 @@ "options.iris.reset.tooltip": "是否重設「全部」選項並套用?", "options.iris.reset.tooltip.holdShift": "按住 SHIFT 後點擊以重設", "options.iris.importSettings.tooltip": "從檔案匯入設定", - "options.iris.exportSettings.tooltip": "將設定匯出至檔案", + "options.iris.exportSettings.tooltip": "匯出設定至檔案", "options.iris.mustDisableFullscreen": "請先結束全螢幕模式!", "options.iris.setToDefault": "將選項設為預設?", "options.iris.profile": "設定檔", "options.iris.profile.custom": "自訂", "options.iris.shadowDistance": "最大陰影距離", - "options.iris.shadowDistance.enabled": "能讓您變更陰影的最大距離。超出此距離的地形和實體將不會有陰影。降低陰影距離能顯著提升效能。", + "options.iris.shadowDistance.enabled": "能讓您變更陰影的最大距離。超出此距離的地形和實體將不會有陰影。調低陰影距離能顯著提升效能。", "options.iris.shadowDistance.disabled": "您無法變更目前光影包所設定的陰影顯示距離。", - "options.iris.shadowDistance.sodium_tooltip": "陰影繪製距離控制著在陰影通道中可以繪製多遠的地形。較低的距離意味著繪製的地形較少,從而提高 FPS。在明確指定了陰影繪製距離的光影包中,此選項無法更改。實際的陰影繪製距離受顯示距離設定的限制。", - "options.iris.gui.hide": "隱藏介面", - "options.iris.gui.show": "顯示介面", + "options.iris.gui.hide": "隱藏 GUI", + "options.iris.gui.show": "顯示 GUI", + "pack.iris.select.title": "選擇", "pack.iris.configure.title": "設定", - "pack.iris.list.label": "+ 將要新增的光影包拖曳至此", + "pack.iris.list.label": "+ 將欲新增的光影包拖曳至此", + "label.iris.true": "開啟", "label.iris.false": "關閉" } diff --git a/common/src/shaders/resources/assets/iris/textures/gui/widgets.png b/common/src/shaders/resources/assets/iris/textures/gui/widgets.png index f1cb7e85e07b81579b2b66405be55e16d7b60ed3..d4a74a0e00bbf824bcf12a9a98dee8589474123f 100644 GIT binary patch literal 3587 zcmb_ec{H2r)_)W8oVJvrXs;^TYbteUqozhe4K;+4;#5&%OOqO7YE>0gN>xj!IgP0_ zJ!VnGQA1ioh=@399#4)Trf}n1>s#yl^M2>vcdh-t`&rL^_Wtehc@u4{%tQpG1pxpM zLBLII0RY5dK>$B5=Yt9^^WrSxeN0Sj5GE!H4}$M|`S^PRfN~l(4GM3!5s$aFE4Eb? zeFRx}`Ck7PL?S2yc`+`20C{h?ZMr!6d(jz0P>?uENc7+$@-!+3gLxpq-6jvw)jfY* zQia)4^!;q7P%0~E0-C^D<$8il!Fw?j^L<~ZAv!xEe{~RUI{Sn_lHWMv4ZgG{NiUQ# z0>#+UJ3?QFF!FTD#4UNZO{c<2WKJ@9nad@`4=2ux);=$S4c$GjpkoB@z3e%nP>gX@jhpX(I+~;uNRPg> zj&tp8@@7!8+3&J*={akBPjkcOn!L%p{p&bZ4(qC>>PLzdJY944^Y%v`1D6gdk7O?u ziI2>+Ww)NBH}d$YtH7otywW2tskzlMJy~)9*9~JJwDf(7 z{4SNk)3J7xtCkP|=?qyKJ)M3xc_E1>_Qj~TqY`E3%2a0NH)oIJ#E=6izp86en2nmX zFF$J%p@(PrfeR|qyJSrHMvJ;WvLT(-XXoj*OvzW@s=rSO>sWK0_|;=3aPdB<8jT&+ z-(P0ktf#Wr!=tBEo1d?V$*Hwm3mqMUM%af_2ZE@N6A}SKF4Nq`W#6iA7qARlF2m)k z)W@Y3ph&*O(l?tM-9PrO*?&|yjaU<&8$?}`VUL!l%YvEB&p4`VAJ%<4I%;(pH z#i9J@Df=LU$*=hAHC#l~|%_DyL>KJY4}8GKS6pv#q6h3D~fN-YPYC`h@9RR=uAA7jM$R zFRb;XBmF)j!N1QZIDa1$5gLD*_#qwKG< z*=+qs%T6Nic=IR5Wl58h`Q=3O(m}0G<*Xi`EqbgbjN*K~u)tomI5AORW<4w=Il0`w z2Q;oN2^>#+@(S27Dv9hvKnWJcFZQXe6%N;X80GVo-{zW5$h)gv7f?2Hf zCN~(jx3{Mk^}W+=^hmvSP#350eR{e`Fy6T19*DFk3GX08t7X}pO?#;c^Csgkxd*t2 z)gSZoWr{xj{=Fiby7wo_yW}EnB$^uI?alG_AB>{GF*AaSDtY7!Y4AEg0Wn9;8)35; zRqyi-U1Xv{tQwd&7;dKoW@e_Nt*wZtY$8%DrNK^DzzD%O!$ec&d(u5+29=5*R8PJ4 zbFgqX@3Z-sDq?Iq>tsMg@%5#VDo3fOY7YRX2ozbTv#h@UR`v}T#|3FAsqdw~NwoU; z_}sLxuwb@h2S}utrwIw0{a4ns3;FyI~ykr+g( zDj_ZH*pWI$3)Woem2Y66mmJ{qc>J+pt^9OiAXjBbpxq;P!vRUZFQSnx)EN;-_*AYN8LLbaZrl!o$O7oQ3jBP(U?BHT#BYt`#R=^Q2g= zRZyO?RMWV|f9um0L;5{!=vuFv7TlQjj~ zZOGRSo6@`QcG%`=!tnOrpa_2V0D+<@u#)uXn z<3S1KL{B}?&&?z0#Q;Bt`!0mwy{OvqU0^7oM?k7|YITh0*LI>%YjAK-FfRY%`N`$o z0)?01n;m*);B^jkgJeb8;9#LemRkMZU!l0xvVWA=s&M8D!A3dboLCB~Iea)pcJ{+s z#9D5;;^tcD9hJ?G!u&&tE#*oH-X@;`48@4{u74PU~&pEIxWOmX)K4w>$gH>ct@)93Jpxwp@ zl5vjv)(vcPK!sMqmSZyaha;Thp3pJo2%Ua=OYbe$v(>?N4NjA03@m(V{N_j#ZL-0x zoj)Ev%{JKlOk5nNm${J z5O;hiSuUDa;rQvKD45A!cX#*mGkbTIYK;^g-fIn~Ip2nqA?0JnE(ifP`EGxcHADvz zJuL9*;ZE}dvPX_e0tM8A)z#G+LdaL=rCFeW5Vn7KBBvSs+t98WZ){7nO5utmd7f>i z?fbtv#>G@76$uqsk8y9JOnHQ`YP6t&7D3(qq#6Uf`hlOcbobi2`U`b z_fet$?2WM?xf{ k;#aMI@89IVAe9d~5W~su@HulmxpAZpaox(a(%3!jU+08jAOHXW literal 6880 zcmeHMc~nzLv+t0Ah_ZnD6)$Rvc67mn|a?m@0)Yp_x|$c+;rXQ>R(m=s=7&E zcDgv(tE%Xz002}O4z{iUAfSi<%1W^D7M}En%>(WRhChR`6ez<7Xo*0{jbvYlZ)61o z5+I>PBD`lnc@hW!9fYD>PKJ8jPx3)1FaBhs0A&I~0jR<@6W&B9&xCD0ym?8JzOF!7 zb}7q04p5Sze{Ss=OcylKn1DAnF@@vtL=p{8q!FoT0)=K`N;5Hm)`;w{5y_CuR%nqR z%66WOjSIuZ1}zZs{dvJ$03?|)`{)kWU1laYug%5Gnqq#EVtdkQ%Nos_o(UK?<+7Cp zYKw4VKQ2;b?Ao2v;wk70IP<3EMPb2@1!(1QDaD+!OJA?e$)75!>o5_GmezX>uUTXphG3YPEH= z^t9C}k_<}zW?I`ckG<|SUYTW%DP=vke6(vim)-HsBX2XDeFilZGqcWRm7=L%Y3DB+ z93DkpyJ^)myimC0<1eH4n>5}l zJL2A9uTH%@b?Zd`w2KHewfKGv_w>l6iab&1#D~)MK_uNqxG!i;*g;$|+K(H+3#DUvD=IN)9*2%uPiEqo0vm21&ml_4 zT^r@(#*PYNQ#lwbOBD+V4FZI4#VoWWBsf$=lh848TpE;RY8(bFHxUQXF&khV+3Nby81sbzI0BVQ#o>uK zA`uHMu%gINF-w9C6&c7NCNXTeBDRnx5cBwpaTH z{ss3h)}QAtH-=VBCe4=54wr?;u%%;U{%IUOo5!KaMJ|U*^21ZOSdytf9!tWL2v`=C zz{285CT3g`%Y=UfR0(s3k{ci z?Qr9TaMy}iGBycjcq-8pPo|m>@f19j@YQG?S15v&D8rQRo$?-8T4-=GkXV+iP9cC? z59dO&5pr2#zR-=&52jmM=jkBq-p z*LS-95d;6o_EYV~n=&{FdI!QK{3$UfPZ^A14GRDpws z2!Lr?vKs+1GPR*{ikQK)oAMfoP%vB&(KIa>z8i>P*sgGsG<8374%X_JcccH+yuC-3 z&+5?Ji8jTwfrB>i0GgLoJ|oFm{h6Ldp|E8`s)}lf*8}}^Z(P@*Yd7VqoGM7PNh{^f zvR{c^<7`*B|M=zQ4ELF(+bGLkC!`dNo~85EZ%x+<=%V-jSggRy+=mTU#9tbnd*@Ehn^Zdfo4}pObvym6bZb)oe3+b@`=Z zy6n|%t$V!(?LFu|!#vB>=VG9HXS>daGi_X(`li8A4Q0A|`Bd^an>(WWYyFlHRr;F) zfBL){Yfmburv_9mLP=BHnu~Bg<)f0{eafGnOv>*PF0SiKT6sU|_NH^CJ+1TYijXBM z5|8Ude`Lp1Y;OJdw#nK}waPQ7JI$vuD)vKH!OdfBz?6czZPjgHnU=K42wWTSP?6$} zHxzlRW!I9WI}#v@Ug^%PUD!V7CPUz=6Q75fX_oc6kx%RV$_=Eztp4tW1hvqk0JJ~$SEnKe=JN`QLmcC@k#|iy;QTOyw(sr#Y+KZ$6 zQ_JedKj2Q+kB#=8u21+0*@!`)(>6}&%Nu_k&b@;mrB}o+(6H#qJa8j+{+ZA{S_;8C zfux(S2 zqySh0fCfNA_HqcI0D!NP{)JlF-s*TO{UgfS7U)?>QgeXeg()Qwz0Fpl#nLo=tJu*; zwkWA#ck|`LCTh#K4!`4JnvLwN(N~rKO%L~s)78;S2Ca~br%4U(Ml1M|*+pe~O4%!s zgd4#h^{d`@HaLs&cRlPVZEtUPTRxjiCRf*@Ug&^5t-lXg%u-2k z*X5q|V7S8beaR6+tg*2YeY@vY6_BwUSlmBQwr)==DkVxHp)>~i`K{bv%K!6{w?EW8Jou=t?jZC%JUo2RF}JR%$#EXo5u|SI8M9!o z)pW@pTQ^*&UBfUBAL?@^jemS~^&E)pWwBT*L?V$M6J3l*y~S}`JQKPUUdW8vy45Fq z#74E*C+kid$=rNdLwK4~-dqI`rY22DP@JWrc%isp;MM)k;rE^UQko;4UsEhAEe#9{ z+n1yK8yysuIp(_F<`9K?_H%HXrW^P5UvGKacIVgn{0+-*4_Ms0fB%lQK|^?1HUF?u zc_@%%<^A;2>{+|*(i|5;X!t#s4dbXeVxH%=wCqiRB|G_Hhgh(1fmBh{NsF53RBfUI|?pbhf<*h%1?%sTr?1KDbWvT90e|8Mv5W7^(tqtAxmp&Y9jvR z7{waBxOKot{inf*U-T=VzI^%e=S)oYRkGAmSCU)1jgWX65r2M)b(xa>xW^Lo?TsPJ zVj|0me#@ggxN9R7*c{EwjCSc(JaXhnZ{oQ>&IUMFKfj)Ps7})g)jaX$u;YmNjGi|Q zK|{dz2%<$-TRXM%-Q%pzi&tB!^`Z)ADYQSDmS3lp-H+70@9^vRIZ#Gw-~43A=10e8l1hC6Z;|_2 zv$)7W>u}9Lv3eE1G3YTkzFC1xdXbwY{RM&-xofqQ0$n}u+&R2bsb%ljLd7y^-&+AQ zJEL#B&~Tt5fgGd&GR`ZN=&u>^Dp&-3wG^^1{m>hCbAHbPTWkT*c1PDkpA3)usnfTF z*LiD!2Q46wqnhpQ#+2%Sl3O;?`1tr)4Pg7tvEoi8tDt#Hw+Df?Yh*+s(t71)u!bC; z`y3c4HZERPj6CU{8-%F8sOF1pYnUpS2TG>WA(QI+F?B6tORl|%nS!pimbrIj7uQ!^ z7@M=BGI4dAxrxaDIcfF|hALXA(m=XuI^vCmQQ(-Dm5pll8M5@rIsVb&n>9{Z7Lf&- zBS?)L9k``i7nv15-F!JL!8t7ZP!eF}IUUJw@*No&aZWnd(c62v@!3(U!CO2l)Y6UZ z6m3sT3s3}6Xn>^M{3lrlWK>hzSmM@L?Y zi$+@cstQau%DxgRDL0w>4NOL`Nnmu9kqPsZpXL}wfR&;!&xhE*c-V)9U}S7 z0PlOYt#A5sRLJx#DadKh0MhgZa6C%kc?KW@*$;&GSz09z#|t}&a2=HDSi3nxJDY(_ zE#J-tu=Fv?lka`OjtLrn)35SB_8h6Z`$;_f_l@<8xldk-wuRxq|JPOJKV%h~JI6pX Scw|WClVRs%TfEYD+kXN7R3={l diff --git a/common/src/shaders/resources/centerDepth.fsh b/common/src/shaders/resources/centerDepth.fsh index 33427a501..fd055c13d 100644 --- a/common/src/shaders/resources/centerDepth.fsh +++ b/common/src/shaders/resources/centerDepth.fsh @@ -1,20 +1,32 @@ -#version 150 core +#version VERSIONPLACEHOLDER + +// This will be removed by Iris if the system does not support GL3. +#define IS_GL3 uniform sampler2D depth; uniform sampler2D altDepth; uniform float lastFrameTime; uniform float decay; -out float iris_fragColor; +#ifdef IS_GL3 +out float outputColor; +#endif void main() { - float currentDepth = texture(depth, vec2(0.5)).r; + float currentDepth = texture2D(depth, vec2(0.5)).r; float decay2 = 1.0 - exp(-decay * lastFrameTime); - float oldDepth = texture(altDepth, vec2(0.5)).r; + float oldDepth = texture2D(altDepth, vec2(0.5)).r; + #ifdef IS_GL3 if (isnan(oldDepth)) { oldDepth = currentDepth; } - iris_fragColor = mix(oldDepth, currentDepth, decay2); + outputColor = mix(oldDepth, currentDepth, decay2); + #else + if (oldDepth != oldDepth) { // cheap isNaN + oldDepth = currentDepth; + } + gl_FragColor = vec4(mix(, currentDepth, decay2), 0, 0, 0); + #endif } diff --git a/common/src/shaders/resources/centerDepth.vsh b/common/src/shaders/resources/centerDepth.vsh index d8939081b..ce81abb06 100644 --- a/common/src/shaders/resources/centerDepth.vsh +++ b/common/src/shaders/resources/centerDepth.vsh @@ -1,8 +1,2 @@ -#version 150 core - -in vec3 iris_Position; -uniform mat4 projection; - -void main() { - gl_Position = projection * vec4(iris_Position, 1.0); -} +#version 120 +void main() { gl_Position = ftransform(); } diff --git a/common/src/shaders/resources/colorSpace.csh b/common/src/shaders/resources/colorSpace.csh deleted file mode 100644 index 8ea81890b..000000000 --- a/common/src/shaders/resources/colorSpace.csh +++ /dev/null @@ -1,145 +0,0 @@ -#ifdef COMPUTE -#version 430 core -layout(local_size_x = 8, local_size_y = 8) in; -#else -#version 330 core -#endif - -#ifdef COMPUTE -layout(rgba8) uniform image2D readImage; -#else -uniform sampler2D readImage; -in vec2 uv; -out vec4 outColor; -#endif - -// https://en.wikipedia.org/wiki/Rec._709#Transfer_characteristics -vec3 EOTF_Curve(vec3 LinearCV, const float LinearFactor, const float Exponent, const float Alpha, const float Beta) { - return mix(LinearCV * LinearFactor, clamp(Alpha * pow(LinearCV, vec3(Exponent)) - (Alpha - 1.0), 0.0, 1.0), step(Beta, LinearCV)); -} - -// https://en.wikipedia.org/wiki/SRGB#Transfer_function_(%22gamma%22) -vec3 EOTF_IEC61966(vec3 LinearCV) { - return EOTF_Curve(LinearCV, 12.92, 1.0 / 2.4, 1.055, 0.0031308);; - //return mix(LinearCV * 12.92, clamp(pow(LinearCV, vec3(1.0/2.4)) * 1.055 - 0.055, 0.0, 1.0), step(0.0031308, LinearCV)); -} -vec3 InverseEOTF_IEC61966(vec3 DisplayCV){ - return max(mix(DisplayCV / 12.92, pow(0.947867 * DisplayCV + 0.0521327, vec3(2.4)), step(0.04045, DisplayCV)), 0.0); -} - -// https://en.wikipedia.org/wiki/Rec._709#Transfer_characteristics -vec3 EOTF_BT709(vec3 LinearCV) { - return EOTF_Curve(LinearCV, 4.5, 0.45, 1.099, 0.018); - //return mix(LinearCV * 4.5, clamp(pow(LinearCV, vec3(0.45)) * 1.099 - 0.099, 0.0, 1.0), step(0.018, LinearCV)); -} - -// https://en.wikipedia.org/wiki/Rec._2020#Transfer_characteristics -vec3 EOTF_BT2020_12Bit(vec3 LinearCV) { - return EOTF_Curve(LinearCV, 4.5, 0.45, 1.0993, 0.0181); -} - -// https://en.wikipedia.org/wiki/DCI-P3 -vec3 EOTF_P3DCI(vec3 LinearCV) { - return pow(LinearCV, vec3(1.0 / 2.6)); -} -// https://en.wikipedia.org/wiki/Adobe_RGB_color_space -vec3 EOTF_Adobe(vec3 LinearCV) { - return pow(LinearCV, vec3(1.0 / 2.2)); -} - -// Using calculations from https://github.com/ampas/aces-dev as reference -const mat3 sRGB_XYZ = mat3( - 0.4124564, 0.3575761, 0.1804375, - 0.2126729, 0.7151522, 0.0721750, - 0.0193339, 0.1191920, 0.9503041 -); -/* -// This Matrix from the acesdev repo is incorrect and produces a strong red-shift -const mat3 XYZ_P3DCI = mat3( - 2.7253940305, -1.0180030062, -0.4401631952, - -0.7951680258, 1.6897320548, 0.0226471906, - 0.0412418914, -0.0876390192, 1.1009293786 -); -*/ -const mat3 XYZ_P3D65 = mat3( - 2.4933963, -0.9313459, -0.4026945, - -0.8294868, 1.7626597, 0.0236246, - 0.0358507, -0.0761827, 0.9570140 -); -const mat3 XYZ_REC2020 = mat3( - 1.7166511880, -0.3556707838, -0.2533662814, - -0.6666843518, 1.6164812366, 0.0157685458, - 0.0176398574, -0.0427706133, 0.9421031212 -); -// https://en.wikipedia.org/wiki/Adobe_RGB_color_space -const mat3 XYZ_AdobeRGB = mat3( - 2.04158790381075, -0.56500697427886, -0.34473135077833, - -0.96924363628088, 1.87596750150772, 0.0415550574071756, - 0.0134442806320311, -0.118362392231018, 1.01517499439121 -); - -// Bradford chromatic adaptation from standard D65 to DCI Cinema White -const mat3 D65_DCI = mat3( - 1.02449672775258, 0.0151635410224164, 0.0196885223342068, - 0.0256121933371582, 0.972586305624413, 0.00471635229242733, - 0.00638423065008769, -0.0122680827367302, 1.14794244517368 -); - -// Bradford chromatic adaptation between D60 and D65 -const mat3 D65_D60 = mat3( - 1.01303, 0.00610531, -0.014971, - 0.00769823, 0.998165, -0.00503203, - -0.00284131, 0.00468516, 0.924507 -); -const mat3 D60_D65 = mat3( - 0.987224, -0.00611327, 0.0159533, - -0.00759836, 1.00186, 0.00533002, - 0.00307257, -0.00509595, 1.08168 -); - -const mat3 sRGB_to_P3DCI = ((sRGB_XYZ) * XYZ_P3D65) * D65_DCI; -//const mat3 sRGB_to_P3DCI = (sRGB_XYZ) * (XYZ_P3DCI); -const mat3 sRGB_to_P3D65 = sRGB_XYZ * XYZ_P3D65; -const mat3 sRGB_to_REC2020 = sRGB_XYZ * XYZ_REC2020; -const mat3 sRGB_to_AdobeRGB = sRGB_XYZ * XYZ_AdobeRGB; - -void main() { - #if CURRENT_COLOR_SPACE != SRGB - #ifdef COMPUTE - ivec2 PixelIndex = ivec2(gl_GlobalInvocationID.xy); - vec4 SourceColor = imageLoad(readImage, PixelIndex); - #else - vec4 SourceColor = texture(readImage, uv); - #endif - SourceColor.rgb = InverseEOTF_IEC61966(SourceColor.rgb); - - vec3 TargetColor = SourceColor.rgb; - - #if CURRENT_COLOR_SPACE == DCI_P3 - // https://en.wikipedia.org/wiki/DCI-P3 - TargetColor = TargetColor * sRGB_to_P3DCI; - TargetColor = EOTF_P3DCI(TargetColor); - - #elif CURRENT_COLOR_SPACE == DISPLAY_P3 - // https://en.wikipedia.org/wiki/DCI-P3#Display_technology - TargetColor = TargetColor * sRGB_to_P3D65; - TargetColor = EOTF_IEC61966(TargetColor); - - #elif CURRENT_COLOR_SPACE == REC2020 - // https://en.wikipedia.org/wiki/Rec._2020 - TargetColor = TargetColor * sRGB_to_REC2020; - TargetColor = EOTF_BT709(TargetColor); - - #elif CURRENT_COLOR_SPACE == ADOBE_RGB - // https://en.wikipedia.org/wiki/Adobe_RGB_color_space - TargetColor = TargetColor * sRGB_to_AdobeRGB; - TargetColor = EOTF_Adobe(TargetColor); - - #endif - #ifdef COMPUTE - imageStore(readImage, PixelIndex, vec4(TargetColor, SourceColor.a)); - #else - outColor = vec4(TargetColor, SourceColor.a); - #endif - #endif -} diff --git a/common/src/shaders/resources/colorSpace.vsh b/common/src/shaders/resources/colorSpace.vsh deleted file mode 100644 index 1094e957f..000000000 --- a/common/src/shaders/resources/colorSpace.vsh +++ /dev/null @@ -1,11 +0,0 @@ -#version 330 core - -in vec3 iris_Position; -in vec2 iris_UV0; -uniform mat4 projection; -out vec2 uv; - -void main() { - gl_Position = projection * vec4(iris_Position, 1.0); - uv = iris_UV0; -} diff --git a/common/src/shaders/resources/iris-batched-entity-rendering.mixins.json b/common/src/shaders/resources/iris-batched-entity-rendering.mixins.json deleted file mode 100644 index 7c0e2e771..000000000 --- a/common/src/shaders/resources/iris-batched-entity-rendering.mixins.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "required": true, - "minVersion": "0.8", - "package": "net.irisshaders.batchedentityrendering.mixin", - "refmap": "iris.refmap.json", - "compatibilityLevel": "JAVA_8", - "client": [ - "BufferSourceAccessor", - "CompositeStateAccessor", - "MixinBannerRenderer", - "MixinBufferBuilder_SegmentRendering", - "MixinBufferSource", - "MixinByteBufferBuilder", - "MixinCompositeRenderType", - "MixinDebugScreenOverlay", - "MixinFishingHookRenderer", - "MixinLevelRenderer", - "MixinLevelRenderer_EntityListSorting", - "MixinRenderBuffers", - "MixinRenderType", - "MixinSheets", - "OutlineBufferSourceAccessor", - "RenderStateShardAccessor", - "RenderTypeAccessor", - "SectionBufferBuilderPackAccessor" - ], - "injectors": { - "defaultRequire": 1 - } -} diff --git a/common/src/shaders/resources/mixins.iris.optimized-stitching.json b/common/src/shaders/resources/iris-fantastic.mixins.json similarity index 64% rename from common/src/shaders/resources/mixins.iris.optimized-stitching.json rename to common/src/shaders/resources/iris-fantastic.mixins.json index 1e3a6bc33..103b62475 100644 --- a/common/src/shaders/resources/mixins.iris.optimized-stitching.json +++ b/common/src/shaders/resources/iris-fantastic.mixins.json @@ -1,10 +1,10 @@ { "required": true, "minVersion": "0.8", - "package": "net.coderbot.iris.mixin.optimized_stitching", + "package": "net.coderbot.iris.mixin.fantastic", "compatibilityLevel": "JAVA_8", "client": [ - "MixinStitcher" + "MixinBarrierParticle" ], "injectors": { "defaultRequire": 1 diff --git a/common/src/shaders/resources/iris-vertexformat.mixins.json b/common/src/shaders/resources/iris-vertexformat.mixins.json new file mode 100644 index 000000000..d33ad3f2a --- /dev/null +++ b/common/src/shaders/resources/iris-vertexformat.mixins.json @@ -0,0 +1,17 @@ +{ + "required": true, + "minVersion": "0.8", + "package": "net.coderbot.iris.mixin.vertices", + "compatibilityLevel": "JAVA_8", + "client": [ + "MixinBufferBuilder", + "MixinVertexFormatElement", + "MixinGlStateManager", + "MixinVertexBuffer", + "MixinVertexFormat", + "immediate.MixinLevelRenderer" + ], + "injectors": { + "defaultRequire": 1 + } +} diff --git a/common/src/shaders/resources/iris.mixins.json b/common/src/shaders/resources/iris.mixins.json new file mode 100644 index 000000000..5bc6732b1 --- /dev/null +++ b/common/src/shaders/resources/iris.mixins.json @@ -0,0 +1,50 @@ +{ + "required": true, + "minVersion": "0.8", + "package": "net.coderbot.iris.mixin", + "compatibilityLevel": "JAVA_8", + "client": [ + "GameRendererAccessor", + "GlStateManagerAccessor", + "LevelRendererAccessor", + "LightTextureAccessor", + "MixinDebugScreenOverlay", + "MixinEntityRenderDispatcher", + "MixinGameRenderer", + "MixinGameRenderer_NightVisionCompat", + "MixinGlStateManager", + "MixinGlStateManager_AmdCrashFix", + "MixinGlStateManager_AlphaTestOverride", + "MixinGlStateManager_BlendOverride", + "MixinGlStateManager_DepthColorOverride", + "MixinGlStateManager_FramebufferBinding", + "MixinItemInHandRenderer", + "MixinLevelRenderer", + "MixinMinecraft_Images", + "MixinMinecraft_PipelineManagement", + "MixinOptions_Entrypoint", + "MixinParticleEngine", + "MixinRenderSystem", + "MixinRenderTarget", + "MixinCrashReport", + "shadows.MixinLevelRenderer", + "statelisteners.BooleanStateAccessor", + "statelisteners.MixinGlStateManager", + "texture.AnimationMetadataSectionAccessor", + "texture.MixinAbstractTexture", + "texture.MixinGlStateManager", + "texture.MixinTextureAtlasSprite", + "texture.MixinTextureManager", + "texture.SimpleTextureAccessor", + "texture.TextureAtlasAccessor", + "texture.TextureAtlasSpriteAccessor", + "texture.pbr.MixinTextureAtlas", + "texture.pbr.MixinTextureAtlasSprite", + "state_tracking.MixinGlStateManager", + "state_tracking.MixinRenderTarget" + ], + "injectors": { + "defaultRequire": 1, + "maxShiftBy": 2 + } +} diff --git a/common/src/shaders/resources/mixins.iris.bettermipmaps.json b/common/src/shaders/resources/mixins.iris.bettermipmaps.json deleted file mode 100644 index 1beae6b65..000000000 --- a/common/src/shaders/resources/mixins.iris.bettermipmaps.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "required": true, - "minVersion": "0.8", - "package": "net.irisshaders.iris.mixin.bettermipmaps", - "refmap": "iris.refmap.json", - "plugin": "net.irisshaders.iris.mixin.IrisMixinPlugin", - "compatibilityLevel": "JAVA_8", - "client": [ - ], - "injectors": { - "defaultRequire": 1 - } -} diff --git a/common/src/shaders/resources/mixins.iris.compat.dh.json b/common/src/shaders/resources/mixins.iris.compat.dh.json deleted file mode 100644 index 010f896d8..000000000 --- a/common/src/shaders/resources/mixins.iris.compat.dh.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "required": true, - "minVersion": "0.8", - "plugin": "net.irisshaders.iris.compat.dh.DHMixinConfigPlugin", - "package": "net.irisshaders.iris.compat.dh.mixin", - "compatibilityLevel": "JAVA_8", - "client": [ - "MixinAdvancedShadowCullingFrustum", - "MixinBoxCullingFrustum", - "MixinCullEverythingFrustum", - "MixinNonCullingFrustum" - ], - "injectors": { - "defaultRequire": 1 - } -} diff --git a/common/src/shaders/resources/mixins.iris.compat.indigo.json b/common/src/shaders/resources/mixins.iris.compat.indigo.json deleted file mode 100644 index b21b620e5..000000000 --- a/common/src/shaders/resources/mixins.iris.compat.indigo.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "required": true, - "minVersion": "0.8", - "plugin": "net.coderbot.iris.compat.indigo.mixin.IrisIndigoCompatMixinPlugin", - "package": "net.coderbot.iris.compat.indigo.mixin", - "compatibilityLevel": "JAVA_8", - "client": [ - "MixinAbstractQuadRenderer" - ], - "injectors": { - "defaultRequire": 1 - } -} diff --git a/common/src/shaders/resources/mixins.iris.compat.indium.json b/common/src/shaders/resources/mixins.iris.compat.indium.json deleted file mode 100644 index 8f9de91e7..000000000 --- a/common/src/shaders/resources/mixins.iris.compat.indium.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "required": true, - "minVersion": "0.8", - "plugin": "net.coderbot.iris.compat.indium.mixin.IrisIndiumCompatMixinPlugin", - "package": "net.coderbot.iris.compat.indium.mixin", - "compatibilityLevel": "JAVA_8", - "client": [ - "MixinAbstractQuadRenderer" - ], - "injectors": { - "defaultRequire": 1 - } -} diff --git a/common/src/shaders/resources/mixins.iris.compat.lightoverlay.json b/common/src/shaders/resources/mixins.iris.compat.lightoverlay.json deleted file mode 100644 index 8f81247fb..000000000 --- a/common/src/shaders/resources/mixins.iris.compat.lightoverlay.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "required": true, - "minVersion": "0.8", - "plugin": "net.coderbot.iris.compat.lightoverlay.mixin.IrisLightOverlayCompatMixinPlugin", - "package": "net.coderbot.iris.compat.lightoverlay.mixin", - "compatibilityLevel": "JAVA_8", - "client": [ - "MixinChunkData", - "MixinLightOverlay" - ], - "injectors": { - "defaultRequire": 1 - } -} diff --git a/common/src/shaders/resources/mixins.iris.compat.sodium.json b/common/src/shaders/resources/mixins.iris.compat.sodium.json deleted file mode 100644 index d6c1f4f0d..000000000 --- a/common/src/shaders/resources/mixins.iris.compat.sodium.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "required": true, - "minVersion": "0.8", - "package": "net.irisshaders.iris.compat.sodium.mixin", - "refmap": "iris.refmap.json", - "plugin": "net.irisshaders.iris.mixin.IrisMixinPlugin", - "compatibilityLevel": "JAVA_8", - "client": [ - "BlockRendererAccessor", - "CloudRendererAccessor", - "MixinAbstractBlockRenderContext", - "MixinBlockRenderer", - "MixinBakedChunkModelBuilder", - "MixinChunkBuildBuffers", - "MixinChunkVertexConsumer", - "MixinChunkMeshBufferBuilder", - "MixinChunkMeshBuildTask", - "MixinCloudRenderer", - "MixinDefaultChunkRenderer", - "MixinGlRenderDevice", - "MixinRenderRegionArenas", - "MixinRenderSectionManager", - "MixinRenderSectionManagerShadow", - "MixinShaderChunkRenderer", - "MixinSodiumGameOptionPages", - "MixinSodiumGameOptions", - "MixinSodiumOptionsGUI", - "MixinSodiumWorldRenderer" - ], - "injectors": { - "defaultRequire": 1 - } -} diff --git a/common/src/shaders/resources/mixins.iris.devenvironment.json b/common/src/shaders/resources/mixins.iris.devenvironment.json deleted file mode 100644 index cf42c676d..000000000 --- a/common/src/shaders/resources/mixins.iris.devenvironment.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "required": true, - "minVersion": "0.8", - "package": "net.irisshaders.iris.mixin.devenvironment", - "plugin": "net.irisshaders.iris.mixin.devenvironment.DevEnvPlugin", - "compatibilityLevel": "JAVA_8", - "client": [ - "MixinMinecraft_NoAuthInDev", - "MixinSodiumSpriteCache" - ], - "injectors": { - "defaultRequire": 1 - } -} diff --git a/common/src/shaders/resources/mixins.iris.fantastic.json b/common/src/shaders/resources/mixins.iris.fantastic.json deleted file mode 100644 index 00beb5a76..000000000 --- a/common/src/shaders/resources/mixins.iris.fantastic.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "required": true, - "minVersion": "0.8", - "package": "net.irisshaders.iris.mixin.fantastic", - "refmap": "iris.refmap.json", - "plugin": "net.irisshaders.iris.mixin.IrisMixinPlugin", - "compatibilityLevel": "JAVA_8", - "client": [ - "MixinFireworkSparkParticle", - "MixinStationaryItemParticle", - "MixinTerrainParticle" - ], - "injectors": { - "defaultRequire": 1 - } -} diff --git a/common/src/shaders/resources/mixins.iris.fixes.maxfpscrash.json b/common/src/shaders/resources/mixins.iris.fixes.maxfpscrash.json deleted file mode 100644 index dd70f2362..000000000 --- a/common/src/shaders/resources/mixins.iris.fixes.maxfpscrash.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "required": true, - "minVersion": "0.8", - "package": "net.irisshaders.iris.mixin", - "compatibilityLevel": "JAVA_8", - "refmap": "iris.refmap.json", - "client": [ - "MixinMaxFpsCrashFix" - ], - "injectors": { - "defaultRequire": 1 - } -} diff --git a/common/src/shaders/resources/mixins.iris.integrationtest.json b/common/src/shaders/resources/mixins.iris.integrationtest.json deleted file mode 100644 index 6d0fca412..000000000 --- a/common/src/shaders/resources/mixins.iris.integrationtest.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "required": true, - "minVersion": "0.8", - "package": "net.irisshaders.iris.mixin.integrationtest", - "compatibilityLevel": "JAVA_8", - "client": [ - "MixinRenderTarget_StencilBufferTest" - ], - "injectors": { - "defaultRequire": 1 - } -} diff --git a/common/src/shaders/resources/mixins.iris.json b/common/src/shaders/resources/mixins.iris.json deleted file mode 100644 index 8e2b74309..000000000 --- a/common/src/shaders/resources/mixins.iris.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "required": true, - "minVersion": "0.8", - "package": "net.irisshaders.iris.mixin", - "refmap": "iris.refmap.json", - "plugin": "net.irisshaders.iris.mixin.IrisMixinPlugin", - "compatibilityLevel": "JAVA_8", - "client": [ - "DimensionTypeAccessor", - "GameRendererAccessor", - "GlStateManagerAccessor", - "LevelRendererAccessor", - "LightTextureAccessor", - "MixinBiome", - "MixinBiomeAmbientSoundsHandler", - "MixinBiomes", - "MixinBlockStateBehavior", - "MixinBooleanState", - "MixinByteBufferBuilder", - "MixinChainedJsonException", - "MixinChunkBorderRenderer", - "MixinClientLanguage", - "MixinClientPacketListener", - "MixinDebugScreenOverlay", - "MixinEntityRenderDispatcher", - "MixinFogRenderer", - "MixinGameRenderer", - "MixinGameRenderer_NightVisionCompat", - "MixinGlStateManager", - "MixinGlStateManager_BlendOverride", - "MixinGlStateManager_DepthColorOverride", - "MixinGlStateManager_FramebufferBinding", - "MixinItem", - "MixinItemBlockRenderTypes", - "MixinItemInHandRenderer", - "MixinLevelRenderer", - "MixinLevelRenderer_SkipRendering", - "MixinLevelRenderer_Sky", - "MixinLightningBoltRenderer", - "MixinLightTexture", - "MixinLocalPlayer", - "MixinMinecraft_Images", - "MixinMinecraft_Keybinds", - "MixinMinecraft_PipelineManagement", - "MixinModelViewBobbing", - "MixinOptions_Entrypoint", - "MixinParticleEngine", - "MixinProgram", - "MixinProgramManager", - "MixinProgramType", - "MixinQuickPlayDev", - "MixinRenderSystem", - "MixinRenderTarget", - "MixinScreenEffectRenderer", - "MixinShaderInstance", - "MixinSystemReport", - "MixinTheEndPortalRenderer", - "MixinTitleScreen", - "MixinUniform", - "MixinVertexBuffer", - "MixinWindow", - "ProgramTypeAccessor", - "entity_render_context.MixinBlockEntityRenderDispatcher", - "entity_render_context.MixinCapeLayer", - "entity_render_context.MixinElytraLayer", - "entity_render_context.MixinEnderDragonRenderer", - "entity_render_context.MixinEntityRenderDispatcher", - "entity_render_context.MixinEntityRenderer", - "entity_render_context.MixinHorseArmorLayer", - "entity_render_context.MixinHumanoidArmorLayer", - "entity_render_context.MixinItemRenderer", - "fabulous.MixinDisableFabulousGraphics", - "gui.MixinGui", - "gui.MixinVideoSettingsScreen", - "rendertype.RenderStateShardAccessor", - "rendertype.RenderTypeAccessor", - "shadows.MixinBeaconRenderer", - "shadows.MixinLevelRenderer", - "shadows.MixinPreventRebuildNearInShadowPass", - "sky.MixinClientLevelData_DisableVoidPlane", - "sky.MixinDimensionSpecialEffects", - "sky.MixinLevelRenderer_SunMoonToggle", - "sky.MixinOptions_CloudsOverride", - "state_tracking.MixinPostChain", - "state_tracking.MixinRenderTarget", - "statelisteners.BooleanStateAccessor", - "statelisteners.MixinGlStateManager", - "statelisteners.MixinRenderSystem", - "texture.AnimationMetadataSectionAccessor", - "texture.MixinAbstractTexture", - "texture.MixinGlStateManager", - "texture.MixinResourceLocation", - "texture.MixinSpriteContents", - "texture.MixinTextureManager", - "texture.SimpleTextureAccessor", - "texture.SpriteContentsAccessor", - "texture.SpriteContentsAnimatedTextureAccessor", - "texture.SpriteContentsFrameInfoAccessor", - "texture.SpriteContentsTickerAccessor", - "texture.TextureAtlasAccessor", - "texture.pbr.MixinDirectoryLister", - "texture.pbr.MixinSpriteContents", - "texture.pbr.MixinTextureAtlas" - ], - "injectors": { - "defaultRequire": 1, - "maxShiftBy": 2 - } -} diff --git a/common/src/shaders/resources/mixins.iris.vertexformat.json b/common/src/shaders/resources/mixins.iris.vertexformat.json deleted file mode 100644 index bbef7d991..000000000 --- a/common/src/shaders/resources/mixins.iris.vertexformat.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "required": true, - "minVersion": "0.8", - "package": "net.irisshaders.iris.mixin.vertices", - "compatibilityLevel": "JAVA_8", - "plugin": "net.irisshaders.iris.mixin.IrisMixinPlugin", - "refmap": "iris.refmap.json", - "client": [ - "MixinBufferBuilder", - "MixinVertexFormat", - "MixinVertexFormatElement", - "block_rendering.MixinBufferBuilder_SeparateAo", - "block_rendering.MixinChunkRebuildTask", - "block_rendering.MixinClientLevel", - "immediate.MixinBufferSource", - "immediate.MixinLevelRenderer" - ], - "injectors": { - "defaultRequire": 1 - } -} diff --git a/common/src/vendored/java/kroppeb/stareval/Util.java b/common/src/vendored/java/kroppeb/stareval/Util.java deleted file mode 100644 index a8368be1b..000000000 --- a/common/src/vendored/java/kroppeb/stareval/Util.java +++ /dev/null @@ -1,13 +0,0 @@ -package kroppeb.stareval; - -import java.util.function.Consumer; - -public class Util { - public static T make(T item, Consumer init) { - init.accept(item); - return item; - } - -} - - diff --git a/common/src/vendored/java/kroppeb/stareval/element/tree/AccessExpressionElement.java b/common/src/vendored/java/kroppeb/stareval/element/tree/AccessExpressionElement.java index 6d59a3147..033303a2a 100644 --- a/common/src/vendored/java/kroppeb/stareval/element/tree/AccessExpressionElement.java +++ b/common/src/vendored/java/kroppeb/stareval/element/tree/AccessExpressionElement.java @@ -2,9 +2,22 @@ import kroppeb.stareval.element.AccessibleExpressionElement; -public record AccessExpressionElement(AccessibleExpressionElement base, - String index) implements AccessibleExpressionElement { +public class AccessExpressionElement implements AccessibleExpressionElement { + private final AccessibleExpressionElement base; + private final String index; + public AccessExpressionElement(AccessibleExpressionElement base, String index) { + this.base = base; + this.index = index; + } + + public AccessibleExpressionElement getBase() { + return this.base; + } + + public String getIndex() { + return this.index; + } @Override public String toString() { diff --git a/common/src/vendored/java/kroppeb/stareval/element/tree/BinaryExpressionElement.java b/common/src/vendored/java/kroppeb/stareval/element/tree/BinaryExpressionElement.java index 4235af792..ded159e6f 100644 --- a/common/src/vendored/java/kroppeb/stareval/element/tree/BinaryExpressionElement.java +++ b/common/src/vendored/java/kroppeb/stareval/element/tree/BinaryExpressionElement.java @@ -3,9 +3,28 @@ import kroppeb.stareval.element.ExpressionElement; import kroppeb.stareval.parser.BinaryOp; -public record BinaryExpressionElement(BinaryOp op, ExpressionElement left, - ExpressionElement right) implements ExpressionElement { +public class BinaryExpressionElement implements ExpressionElement { + private final BinaryOp op; + private final ExpressionElement left; + private final ExpressionElement right; + public BinaryExpressionElement(BinaryOp op, ExpressionElement left, ExpressionElement right) { + this.op = op; + this.left = left; + this.right = right; + } + + public BinaryOp getOp() { + return this.op; + } + + public ExpressionElement getLeft() { + return this.left; + } + + public ExpressionElement getRight() { + return this.right; + } @Override public String toString() { diff --git a/common/src/vendored/java/kroppeb/stareval/element/tree/FunctionCall.java b/common/src/vendored/java/kroppeb/stareval/element/tree/FunctionCall.java index a015556ba..12bb8ab07 100644 --- a/common/src/vendored/java/kroppeb/stareval/element/tree/FunctionCall.java +++ b/common/src/vendored/java/kroppeb/stareval/element/tree/FunctionCall.java @@ -4,8 +4,22 @@ import java.util.List; -public record FunctionCall(String id, List args) implements ExpressionElement { +public class FunctionCall implements ExpressionElement { + private final String id; + private final List args; + public FunctionCall(String id, List args) { + this.id = id; + this.args = args; + } + + public String getId() { + return this.id; + } + + public List getArgs() { + return this.args; + } @Override public String toString() { diff --git a/common/src/vendored/java/kroppeb/stareval/element/tree/UnaryExpressionElement.java b/common/src/vendored/java/kroppeb/stareval/element/tree/UnaryExpressionElement.java index b70565d45..4126b549a 100644 --- a/common/src/vendored/java/kroppeb/stareval/element/tree/UnaryExpressionElement.java +++ b/common/src/vendored/java/kroppeb/stareval/element/tree/UnaryExpressionElement.java @@ -3,8 +3,22 @@ import kroppeb.stareval.element.ExpressionElement; import kroppeb.stareval.parser.UnaryOp; -public record UnaryExpressionElement(UnaryOp op, ExpressionElement inner) implements ExpressionElement { +public class UnaryExpressionElement implements ExpressionElement { + private final UnaryOp op; + private final ExpressionElement inner; + public UnaryExpressionElement(UnaryOp op, ExpressionElement inner) { + this.op = op; + this.inner = inner; + } + + public UnaryOp getOp() { + return op; + } + + public ExpressionElement getInner() { + return inner; + } @Override public String toString() { diff --git a/common/src/vendored/java/kroppeb/stareval/element/tree/partial/PartialBinaryExpression.java b/common/src/vendored/java/kroppeb/stareval/element/tree/partial/PartialBinaryExpression.java index fdc156c2e..ae6041c37 100644 --- a/common/src/vendored/java/kroppeb/stareval/element/tree/partial/PartialBinaryExpression.java +++ b/common/src/vendored/java/kroppeb/stareval/element/tree/partial/PartialBinaryExpression.java @@ -21,7 +21,7 @@ public String toString() { @Override public int getPriority() { - return this.op.priority(); + return this.op.getPriority(); } @Override diff --git a/common/src/vendored/java/kroppeb/stareval/exception/ParseException.java b/common/src/vendored/java/kroppeb/stareval/exception/ParseException.java index 5dd9d6b14..3a4f56106 100644 --- a/common/src/vendored/java/kroppeb/stareval/exception/ParseException.java +++ b/common/src/vendored/java/kroppeb/stareval/exception/ParseException.java @@ -1,6 +1,6 @@ package kroppeb.stareval.exception; -public abstract class ParseException extends Exception { +public abstract class ParseException extends Exception{ public ParseException() { } diff --git a/common/src/vendored/java/kroppeb/stareval/expression/BasicVariableExpression.java b/common/src/vendored/java/kroppeb/stareval/expression/BasicVariableExpression.java deleted file mode 100644 index c05056534..000000000 --- a/common/src/vendored/java/kroppeb/stareval/expression/BasicVariableExpression.java +++ /dev/null @@ -1,31 +0,0 @@ -package kroppeb.stareval.expression; - -import kroppeb.stareval.function.FunctionContext; -import kroppeb.stareval.function.FunctionReturn; -import kroppeb.stareval.function.Type; - -public class BasicVariableExpression implements VariableExpression { - final private String name; - final private Type type; - - public BasicVariableExpression(String name, Type type) { - this.name = name; - this.type = type; - } - - @Override - public void evaluateTo(FunctionContext c, FunctionReturn r) { - c.getVariable(name).evaluateTo(c, r); - } - - @Override - public Expression partialEval(FunctionContext context, FunctionReturn functionReturn) { - if (context.hasVariable(this.name)) { - context.getVariable(this.name).evaluateTo(context, functionReturn); - return type.createConstant(functionReturn); - } else { - return this; - } - } - -} diff --git a/common/src/vendored/java/kroppeb/stareval/expression/CallExpression.java b/common/src/vendored/java/kroppeb/stareval/expression/CallExpression.java deleted file mode 100644 index 311653a5d..000000000 --- a/common/src/vendored/java/kroppeb/stareval/expression/CallExpression.java +++ /dev/null @@ -1,84 +0,0 @@ -package kroppeb.stareval.expression; - -import kroppeb.stareval.function.FunctionContext; -import kroppeb.stareval.function.FunctionReturn; -import kroppeb.stareval.function.TypedFunction; - -import java.util.Collection; - -public class CallExpression implements Expression { - private final TypedFunction function; - private final Expression[] arguments; - - public CallExpression(TypedFunction function, Expression[] arguments) { - this.function = function; - this.arguments = arguments; - } - - @Override - public void evaluateTo(FunctionContext context, FunctionReturn functionReturn) { - this.function.evaluateTo(this.arguments, context, functionReturn); - } - - @Override - public void listVariables(Collection variables) { - for (Expression argument : this.arguments) { - argument.listVariables(variables); - } - } - - private boolean isConstant() { - for (Expression i : arguments) { - if (!(i instanceof ConstantExpression)) { - return false; - } - } - return true; - } - - @Override - public Expression partialEval(FunctionContext context, FunctionReturn functionReturn) { - // the dirty way would be this - /* - try{ - this.evaluateTo(context, functionReturn); - return this.function.getReturnType().createConstant(functionReturn); - }catch(Exception e){ - return this; - } - */ - - if (this.function.isPure() && isConstant()) { - this.evaluateTo(context, functionReturn); - return function.getReturnType().createConstant(functionReturn); - } - - Expression[] partialEvaluatedParams = new Expression[this.arguments.length]; - boolean allFullySimplified = true; - boolean noneSimplified = true; - for (int i = 0; i < this.arguments.length; i++) { - Expression simplified = this.arguments[i].partialEval(context, functionReturn); - if (simplified instanceof ConstantExpression) { - noneSimplified = false; - } else { - allFullySimplified = false; - if (simplified != this.arguments[i]) { - noneSimplified = false; - } - } - partialEvaluatedParams[i] = simplified; - } - - if (this.function.isPure() && allFullySimplified) { - this.function.evaluateTo(partialEvaluatedParams, context, functionReturn); - return this.function.getReturnType().createConstant(functionReturn); - } - - if (noneSimplified) { - return this; - } - - return new CallExpression(this.function, partialEvaluatedParams); - - } -} diff --git a/common/src/vendored/java/kroppeb/stareval/expression/ConstantExpression.java b/common/src/vendored/java/kroppeb/stareval/expression/ConstantExpression.java deleted file mode 100644 index 100d74588..000000000 --- a/common/src/vendored/java/kroppeb/stareval/expression/ConstantExpression.java +++ /dev/null @@ -1,21 +0,0 @@ -package kroppeb.stareval.expression; - -import kroppeb.stareval.function.Type; - -import java.util.Collection; - -public abstract class ConstantExpression implements Expression { - private final Type type; - - protected ConstantExpression(Type type) { - this.type = type; - } - - public Type getType() { - return this.type; - } - - @Override - public void listVariables(Collection variables) { - } -} diff --git a/common/src/vendored/java/kroppeb/stareval/expression/Expression.java b/common/src/vendored/java/kroppeb/stareval/expression/Expression.java deleted file mode 100644 index 66c2a2e41..000000000 --- a/common/src/vendored/java/kroppeb/stareval/expression/Expression.java +++ /dev/null @@ -1,16 +0,0 @@ -package kroppeb.stareval.expression; - -import kroppeb.stareval.function.FunctionContext; -import kroppeb.stareval.function.FunctionReturn; - -import java.util.Collection; - -public interface Expression { - void evaluateTo(FunctionContext context, FunctionReturn functionReturn); - - default Expression partialEval(FunctionContext context, FunctionReturn functionReturn) { - return this; - } - - void listVariables(Collection variables); -} diff --git a/common/src/vendored/java/kroppeb/stareval/expression/VariableExpression.java b/common/src/vendored/java/kroppeb/stareval/expression/VariableExpression.java deleted file mode 100644 index 620ab583e..000000000 --- a/common/src/vendored/java/kroppeb/stareval/expression/VariableExpression.java +++ /dev/null @@ -1,10 +0,0 @@ -package kroppeb.stareval.expression; - -import java.util.Collection; - -public interface VariableExpression extends Expression { - @Override - default void listVariables(Collection variables) { - variables.add(this); - } -} diff --git a/common/src/vendored/java/kroppeb/stareval/function/AbstractTypedFunction.java b/common/src/vendored/java/kroppeb/stareval/function/AbstractTypedFunction.java deleted file mode 100644 index 516fe8166..000000000 --- a/common/src/vendored/java/kroppeb/stareval/function/AbstractTypedFunction.java +++ /dev/null @@ -1,67 +0,0 @@ -package kroppeb.stareval.function; - -import java.util.Arrays; -import java.util.Objects; - -public abstract class AbstractTypedFunction implements TypedFunction { - private final Type returnType; - private final Parameter[] parameters; - private final int priority; - private final boolean isPure; - - public AbstractTypedFunction(Type returnType, Parameter[] parameters, int priority, boolean isPure) { - this.returnType = returnType; - this.parameters = parameters; - this.priority = priority; - this.isPure = isPure; - } - - public AbstractTypedFunction(Type returnType, Type[] parameterType) { - this.returnType = returnType; - this.parameters = Arrays.stream(parameterType).map(Parameter::new).toArray(Parameter[]::new); - this.priority = 0; - this.isPure = true; - } - - @Override - public Type getReturnType() { - return this.returnType; - } - - @Override - public Parameter[] getParameters() { - return this.parameters; - } - - @Override - public boolean isPure() { - return this.isPure; - } - - @Override - public int priority() { - return this.priority; - } - - @Override - public boolean equals(Object obj) { - if (obj instanceof AbstractTypedFunction func) { - return Objects.equals(returnType, func.returnType) && - Arrays.equals(parameters, func.parameters) && - priority == func.priority && - isPure == func.isPure; - } - - return false; - } - - @Override - public int hashCode() { - return Objects.hash(returnType, Arrays.hashCode(parameters), priority, isPure); - } - - @Override - public String toString() { - return TypedFunction.format(this, "unknown"); - } -} diff --git a/common/src/vendored/java/kroppeb/stareval/function/B2BFunction.java b/common/src/vendored/java/kroppeb/stareval/function/B2BFunction.java deleted file mode 100644 index e1a829611..000000000 --- a/common/src/vendored/java/kroppeb/stareval/function/B2BFunction.java +++ /dev/null @@ -1,26 +0,0 @@ -package kroppeb.stareval.function; - -import kroppeb.stareval.expression.Expression; - -@FunctionalInterface -public interface B2BFunction extends TypedFunction { - boolean eval(boolean a); - - @Override - default void evaluateTo(Expression[] params, FunctionContext context, FunctionReturn functionReturn) { - params[0].evaluateTo(context, functionReturn); - boolean a = functionReturn.booleanReturn; - - functionReturn.booleanReturn = this.eval(a); - } - - @Override - default Type getReturnType() { - return Type.Boolean; - } - - @Override - default Parameter[] getParameters() { - return new Parameter[]{Type.BooleanParameter}; - } -} diff --git a/common/src/vendored/java/kroppeb/stareval/function/BB2BFunction.java b/common/src/vendored/java/kroppeb/stareval/function/BB2BFunction.java deleted file mode 100644 index 5a0159c4c..000000000 --- a/common/src/vendored/java/kroppeb/stareval/function/BB2BFunction.java +++ /dev/null @@ -1,29 +0,0 @@ -package kroppeb.stareval.function; - -import kroppeb.stareval.expression.Expression; - -@FunctionalInterface -public interface BB2BFunction extends TypedFunction { - boolean eval(boolean a, boolean b); - - @Override - default void evaluateTo(Expression[] params, FunctionContext context, FunctionReturn functionReturn) { - params[0].evaluateTo(context, functionReturn); - boolean a = functionReturn.booleanReturn; - - params[1].evaluateTo(context, functionReturn); - boolean b = functionReturn.booleanReturn; - - functionReturn.booleanReturn = this.eval(a, b); - } - - @Override - default Type getReturnType() { - return Type.Boolean; - } - - @Override - default Parameter[] getParameters() { - return new Parameter[]{Type.BooleanParameter, Type.BooleanParameter}; - } -} diff --git a/common/src/vendored/java/kroppeb/stareval/function/BasicFunctionContext.java b/common/src/vendored/java/kroppeb/stareval/function/BasicFunctionContext.java deleted file mode 100644 index 1e9d7f5b8..000000000 --- a/common/src/vendored/java/kroppeb/stareval/function/BasicFunctionContext.java +++ /dev/null @@ -1,36 +0,0 @@ -package kroppeb.stareval.function; - -import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; -import kroppeb.stareval.expression.Expression; -import kroppeb.stareval.expression.VariableExpression; - -import java.util.Map; - -public class BasicFunctionContext implements FunctionContext { - final private Map variables = new Object2ObjectOpenHashMap<>(); - - public void setVariable(String name, Expression value) { - variables.put(name, value); - } - - public void setIntVariable(String name, int value) { - setVariable(name, (VariableExpression) (c, r) -> r.intReturn = value); - } - - public void setFloatVariable(String name, float value) { - setVariable(name, (VariableExpression) (c, r) -> r.floatReturn = value); - } - - @Override - public Expression getVariable(String name) { - Expression expression = variables.get(name); - if (expression == null) - throw new RuntimeException("Variable hasn't been set: " + name); - return expression; - } - - @Override - public boolean hasVariable(String name) { - return variables.containsKey(name); - } -} diff --git a/common/src/vendored/java/kroppeb/stareval/function/F2FFunction.java b/common/src/vendored/java/kroppeb/stareval/function/F2FFunction.java deleted file mode 100644 index 307f72152..000000000 --- a/common/src/vendored/java/kroppeb/stareval/function/F2FFunction.java +++ /dev/null @@ -1,24 +0,0 @@ -package kroppeb.stareval.function; - -import kroppeb.stareval.expression.Expression; - -@FunctionalInterface -public interface F2FFunction extends TypedFunction { - float eval(float a); - - @Override - default void evaluateTo(Expression[] params, FunctionContext context, FunctionReturn functionReturn) { - params[0].evaluateTo(context, functionReturn); - functionReturn.floatReturn = this.eval(functionReturn.floatReturn); - } - - @Override - default Type getReturnType() { - return Type.Float; - } - - @Override - default Parameter[] getParameters() { - return new Parameter[]{Type.FloatParameter}; - } -} diff --git a/common/src/vendored/java/kroppeb/stareval/function/F2IFunction.java b/common/src/vendored/java/kroppeb/stareval/function/F2IFunction.java deleted file mode 100644 index 89c3e4cf2..000000000 --- a/common/src/vendored/java/kroppeb/stareval/function/F2IFunction.java +++ /dev/null @@ -1,24 +0,0 @@ -package kroppeb.stareval.function; - -import kroppeb.stareval.expression.Expression; - -@FunctionalInterface -public interface F2IFunction extends TypedFunction { - int eval(float a); - - @Override - default void evaluateTo(Expression[] params, FunctionContext context, FunctionReturn functionReturn) { - params[0].evaluateTo(context, functionReturn); - functionReturn.intReturn = this.eval(functionReturn.floatReturn); - } - - @Override - default Type getReturnType() { - return Type.Int; - } - - @Override - default Parameter[] getParameters() { - return new Parameter[]{Type.FloatParameter}; - } -} diff --git a/common/src/vendored/java/kroppeb/stareval/function/FF2BFunction.java b/common/src/vendored/java/kroppeb/stareval/function/FF2BFunction.java deleted file mode 100644 index b8f01d3e3..000000000 --- a/common/src/vendored/java/kroppeb/stareval/function/FF2BFunction.java +++ /dev/null @@ -1,29 +0,0 @@ -package kroppeb.stareval.function; - -import kroppeb.stareval.expression.Expression; - -@FunctionalInterface -public interface FF2BFunction extends TypedFunction { - boolean eval(float a, float b); - - @Override - default void evaluateTo(Expression[] params, FunctionContext context, FunctionReturn functionReturn) { - params[0].evaluateTo(context, functionReturn); - float a = functionReturn.floatReturn; - - params[1].evaluateTo(context, functionReturn); - float b = functionReturn.floatReturn; - - functionReturn.booleanReturn = this.eval(a, b); - } - - @Override - default Type getReturnType() { - return Type.Boolean; - } - - @Override - default Parameter[] getParameters() { - return new Parameter[]{Type.FloatParameter, Type.FloatParameter}; - } -} diff --git a/common/src/vendored/java/kroppeb/stareval/function/FF2FFunction.java b/common/src/vendored/java/kroppeb/stareval/function/FF2FFunction.java deleted file mode 100644 index e40a2ea39..000000000 --- a/common/src/vendored/java/kroppeb/stareval/function/FF2FFunction.java +++ /dev/null @@ -1,29 +0,0 @@ -package kroppeb.stareval.function; - -import kroppeb.stareval.expression.Expression; - -@FunctionalInterface -public interface FF2FFunction extends TypedFunction { - float eval(float a, float b); - - @Override - default void evaluateTo(Expression[] params, FunctionContext context, FunctionReturn functionReturn) { - params[0].evaluateTo(context, functionReturn); - float a = functionReturn.floatReturn; - - params[1].evaluateTo(context, functionReturn); - float b = functionReturn.floatReturn; - - functionReturn.floatReturn = this.eval(a, b); - } - - @Override - default Type getReturnType() { - return Type.Float; - } - - @Override - default Parameter[] getParameters() { - return new Parameter[]{Type.FloatParameter, Type.FloatParameter}; - } -} diff --git a/common/src/vendored/java/kroppeb/stareval/function/FFF2BFunction.java b/common/src/vendored/java/kroppeb/stareval/function/FFF2BFunction.java deleted file mode 100644 index 0c6091322..000000000 --- a/common/src/vendored/java/kroppeb/stareval/function/FFF2BFunction.java +++ /dev/null @@ -1,32 +0,0 @@ -package kroppeb.stareval.function; - -import kroppeb.stareval.expression.Expression; - -@FunctionalInterface -public interface FFF2BFunction extends TypedFunction { - boolean eval(float a, float b, float c); - - @Override - default void evaluateTo(Expression[] params, FunctionContext context, FunctionReturn functionReturn) { - params[0].evaluateTo(context, functionReturn); - float a = functionReturn.floatReturn; - - params[1].evaluateTo(context, functionReturn); - float b = functionReturn.floatReturn; - - params[2].evaluateTo(context, functionReturn); - float c = functionReturn.floatReturn; - - functionReturn.booleanReturn = this.eval(a, b, c); - } - - @Override - default Type getReturnType() { - return Type.Boolean; - } - - @Override - default Parameter[] getParameters() { - return new Parameter[]{Type.FloatParameter, Type.FloatParameter, Type.FloatParameter}; - } -} diff --git a/common/src/vendored/java/kroppeb/stareval/function/FFF2FFunction.java b/common/src/vendored/java/kroppeb/stareval/function/FFF2FFunction.java deleted file mode 100644 index c75573197..000000000 --- a/common/src/vendored/java/kroppeb/stareval/function/FFF2FFunction.java +++ /dev/null @@ -1,32 +0,0 @@ -package kroppeb.stareval.function; - -import kroppeb.stareval.expression.Expression; - -@FunctionalInterface -public interface FFF2FFunction extends TypedFunction { - float eval(float a, float b, float c); - - @Override - default void evaluateTo(Expression[] params, FunctionContext context, FunctionReturn functionReturn) { - params[0].evaluateTo(context, functionReturn); - float a = functionReturn.floatReturn; - - params[1].evaluateTo(context, functionReturn); - float b = functionReturn.floatReturn; - - params[2].evaluateTo(context, functionReturn); - float c = functionReturn.floatReturn; - - functionReturn.floatReturn = this.eval(a, b, c); - } - - @Override - default Type getReturnType() { - return Type.Float; - } - - @Override - default Parameter[] getParameters() { - return new Parameter[]{Type.FloatParameter, Type.FloatParameter, Type.FloatParameter}; - } -} diff --git a/common/src/vendored/java/kroppeb/stareval/function/FunctionContext.java b/common/src/vendored/java/kroppeb/stareval/function/FunctionContext.java deleted file mode 100644 index ae924554b..000000000 --- a/common/src/vendored/java/kroppeb/stareval/function/FunctionContext.java +++ /dev/null @@ -1,9 +0,0 @@ -package kroppeb.stareval.function; - -import kroppeb.stareval.expression.Expression; - -public interface FunctionContext { - Expression getVariable(String name); - - boolean hasVariable(String name); -} diff --git a/common/src/vendored/java/kroppeb/stareval/function/FunctionResolver.java b/common/src/vendored/java/kroppeb/stareval/function/FunctionResolver.java deleted file mode 100644 index c6b4769ed..000000000 --- a/common/src/vendored/java/kroppeb/stareval/function/FunctionResolver.java +++ /dev/null @@ -1,131 +0,0 @@ -package kroppeb.stareval.function; - -import it.unimi.dsi.fastutil.objects.Object2ObjectLinkedOpenHashMap; -import it.unimi.dsi.fastutil.objects.ObjectArrayList; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.function.Supplier; -import java.util.stream.Collectors; - -public class FunctionResolver { - private final Map>> functions; - // TODO: instead of a suplier we could use an int->function to make varargs - private final Map>>> dynamicFunctions; - - public FunctionResolver( - Map>> functions, - Map>>> dynamicFunctions) { - this.functions = functions; - this.dynamicFunctions = dynamicFunctions; - } - - public List resolve(String name, Type returnType) { - Map> normal = this.functions.get(name); - Map>> dynamic = this.dynamicFunctions.get(name); - List u = null; - - if (normal == null && dynamic == null) - throw new RuntimeException("No such function: " + name); - if (normal != null) - u = normal.get(returnType); - if (dynamic != null) { - List> p = dynamic.get(returnType); - if (p != null) { - List uDynamic = p.stream().map(Supplier::get).collect(Collectors.toList()); - if (u == null) { - u = uDynamic; - } else { - List newU = new ArrayList<>(u.size() + uDynamic.size()); - newU.addAll(u); - newU.addAll(uDynamic); - u = newU; - } - } - - } - - if (u == null) - return Collections.emptyList(); - return u; - } - - public void logAllFunctions() { - final Set names = new LinkedHashSet<>(); - names.addAll(this.functions.keySet()); - names.addAll(this.dynamicFunctions.keySet()); - for (final String name : names) { - final Map> overloads = new Object2ObjectLinkedOpenHashMap<>(); - Map> normal = this.functions.get(name); - if (normal != null) - overloads.putAll(normal); - - Map>> dynamic = this.dynamicFunctions.get(name); - if (dynamic != null) - overloads.putAll( - dynamic - .entrySet() - .stream() - .collect(Collectors.toMap( - Map.Entry::getKey, - entry -> entry.getValue() - .stream() - .map(Supplier::get) - .collect(Collectors.toList()) - ) - ) - ); - - for (Map.Entry> returnTypeOverloads : overloads.entrySet()) { - for (TypedFunction typedFunction : returnTypeOverloads.getValue()) { - System.out.println(TypedFunction.format(typedFunction, name)); - } - System.out.println(); - } - System.out.println(); - } - } - - public static class Builder { - private final Map> functions = new Object2ObjectLinkedOpenHashMap<>(); - private final Map>>> dynamicFunctions = new Object2ObjectLinkedOpenHashMap<>(); - - public void add(String name, T function) { - this.addFunction(name, function); - } - - public void addDynamic(String name, Type returnType, Supplier function) { - this.addDynamicFunction(name, returnType, function); - } - - public void addDynamicFunction(String name, Type returnType, Supplier function) { - this.dynamicFunctions - .computeIfAbsent(name, (n) -> new Object2ObjectLinkedOpenHashMap<>()) - .computeIfAbsent(returnType, (n) -> new ObjectArrayList<>()) - .add(function); - } - - public void addFunction(String name, TypedFunction function) { - this.functions.computeIfAbsent(name, (n) -> new ObjectArrayList<>()).add(function); - } - - public FunctionResolver build() { - Map>> functions = new Object2ObjectLinkedOpenHashMap<>(); - for (Map.Entry> entry : this.functions.entrySet()) { - Map> typeMap = new Object2ObjectLinkedOpenHashMap<>(); - for (TypedFunction function : entry.getValue()) { - typeMap.computeIfAbsent(function.getReturnType(), i -> new ObjectArrayList<>()) - .add(function); - } - functions.put(entry.getKey(), typeMap); - } - - return new FunctionResolver(functions, this.dynamicFunctions); - } - } - -} diff --git a/common/src/vendored/java/kroppeb/stareval/function/FunctionReturn.java b/common/src/vendored/java/kroppeb/stareval/function/FunctionReturn.java deleted file mode 100644 index 5bf14af47..000000000 --- a/common/src/vendored/java/kroppeb/stareval/function/FunctionReturn.java +++ /dev/null @@ -1,12 +0,0 @@ -package kroppeb.stareval.function; - -public class FunctionReturn { - public boolean booleanReturn; - public byte byteReturn; - public short shortReturn; - public int intReturn; - public long longReturn; - public float floatReturn; - public double doubleReturn; - public Object objectReturn; -} diff --git a/common/src/vendored/java/kroppeb/stareval/function/I2FFunction.java b/common/src/vendored/java/kroppeb/stareval/function/I2FFunction.java deleted file mode 100644 index fa73f9259..000000000 --- a/common/src/vendored/java/kroppeb/stareval/function/I2FFunction.java +++ /dev/null @@ -1,24 +0,0 @@ -package kroppeb.stareval.function; - -import kroppeb.stareval.expression.Expression; - -@FunctionalInterface -public interface I2FFunction extends TypedFunction { - float eval(int a); - - @Override - default void evaluateTo(Expression[] params, FunctionContext context, FunctionReturn functionReturn) { - params[0].evaluateTo(context, functionReturn); - functionReturn.floatReturn = this.eval(functionReturn.intReturn); - } - - @Override - default Type getReturnType() { - return Type.Float; - } - - @Override - default Parameter[] getParameters() { - return new Parameter[]{Type.IntParameter}; - } -} diff --git a/common/src/vendored/java/kroppeb/stareval/function/I2IFunction.java b/common/src/vendored/java/kroppeb/stareval/function/I2IFunction.java deleted file mode 100644 index 94135c212..000000000 --- a/common/src/vendored/java/kroppeb/stareval/function/I2IFunction.java +++ /dev/null @@ -1,24 +0,0 @@ -package kroppeb.stareval.function; - -import kroppeb.stareval.expression.Expression; - -@FunctionalInterface -public interface I2IFunction extends TypedFunction { - int eval(int a); - - @Override - default void evaluateTo(Expression[] params, FunctionContext context, FunctionReturn functionReturn) { - params[0].evaluateTo(context, functionReturn); - functionReturn.intReturn = this.eval(functionReturn.intReturn); - } - - @Override - default Type getReturnType() { - return Type.Int; - } - - @Override - default Parameter[] getParameters() { - return new Parameter[]{Type.IntParameter}; - } -} diff --git a/common/src/vendored/java/kroppeb/stareval/function/II2BFunction.java b/common/src/vendored/java/kroppeb/stareval/function/II2BFunction.java deleted file mode 100644 index 7e1d229bd..000000000 --- a/common/src/vendored/java/kroppeb/stareval/function/II2BFunction.java +++ /dev/null @@ -1,29 +0,0 @@ -package kroppeb.stareval.function; - -import kroppeb.stareval.expression.Expression; - -@FunctionalInterface -public interface II2BFunction extends TypedFunction { - boolean eval(int a, int b); - - @Override - default void evaluateTo(Expression[] params, FunctionContext context, FunctionReturn functionReturn) { - params[0].evaluateTo(context, functionReturn); - int a = functionReturn.intReturn; - - params[1].evaluateTo(context, functionReturn); - int b = functionReturn.intReturn; - - functionReturn.booleanReturn = this.eval(a, b); - } - - @Override - default Type getReturnType() { - return Type.Boolean; - } - - @Override - default Parameter[] getParameters() { - return new Parameter[]{Type.IntParameter, Type.IntParameter}; - } -} diff --git a/common/src/vendored/java/kroppeb/stareval/function/II2IFunction.java b/common/src/vendored/java/kroppeb/stareval/function/II2IFunction.java deleted file mode 100644 index 1e056d31c..000000000 --- a/common/src/vendored/java/kroppeb/stareval/function/II2IFunction.java +++ /dev/null @@ -1,29 +0,0 @@ -package kroppeb.stareval.function; - -import kroppeb.stareval.expression.Expression; - -@FunctionalInterface -public interface II2IFunction extends TypedFunction { - int eval(int a, int b); - - @Override - default void evaluateTo(Expression[] params, FunctionContext context, FunctionReturn functionReturn) { - params[0].evaluateTo(context, functionReturn); - int a = functionReturn.intReturn; - - params[1].evaluateTo(context, functionReturn); - int b = functionReturn.intReturn; - - functionReturn.intReturn = this.eval(a, b); - } - - @Override - default Type getReturnType() { - return Type.Int; - } - - @Override - default Parameter[] getParameters() { - return new Parameter[]{Type.IntParameter, Type.IntParameter}; - } -} diff --git a/common/src/vendored/java/kroppeb/stareval/function/III2BFunction.java b/common/src/vendored/java/kroppeb/stareval/function/III2BFunction.java deleted file mode 100644 index ed8478f1e..000000000 --- a/common/src/vendored/java/kroppeb/stareval/function/III2BFunction.java +++ /dev/null @@ -1,32 +0,0 @@ -package kroppeb.stareval.function; - -import kroppeb.stareval.expression.Expression; - -@FunctionalInterface -public interface III2BFunction extends TypedFunction { - boolean eval(int a, int b, int c); - - @Override - default void evaluateTo(Expression[] params, FunctionContext context, FunctionReturn functionReturn) { - params[0].evaluateTo(context, functionReturn); - int a = functionReturn.intReturn; - - params[1].evaluateTo(context, functionReturn); - int b = functionReturn.intReturn; - - params[2].evaluateTo(context, functionReturn); - int c = functionReturn.intReturn; - - functionReturn.booleanReturn = this.eval(a, b, c); - } - - @Override - default Type getReturnType() { - return Type.Boolean; - } - - @Override - default Parameter[] getParameters() { - return new Parameter[]{Type.IntParameter, Type.IntParameter, Type.IntParameter}; - } -} diff --git a/common/src/vendored/java/kroppeb/stareval/function/III2IFunction.java b/common/src/vendored/java/kroppeb/stareval/function/III2IFunction.java deleted file mode 100644 index f53c28d92..000000000 --- a/common/src/vendored/java/kroppeb/stareval/function/III2IFunction.java +++ /dev/null @@ -1,32 +0,0 @@ -package kroppeb.stareval.function; - -import kroppeb.stareval.expression.Expression; - -@FunctionalInterface -public interface III2IFunction extends TypedFunction { - int eval(int a, int b, int c); - - @Override - default void evaluateTo(Expression[] params, FunctionContext context, FunctionReturn functionReturn) { - params[0].evaluateTo(context, functionReturn); - int a = functionReturn.intReturn; - - params[1].evaluateTo(context, functionReturn); - int b = functionReturn.intReturn; - - params[2].evaluateTo(context, functionReturn); - int c = functionReturn.intReturn; - - functionReturn.intReturn = this.eval(a, b, c); - } - - @Override - default Type getReturnType() { - return Type.Int; - } - - @Override - default Parameter[] getParameters() { - return new Parameter[]{Type.IntParameter, Type.IntParameter, Type.IntParameter}; - } -} diff --git a/common/src/vendored/java/kroppeb/stareval/function/Type.java b/common/src/vendored/java/kroppeb/stareval/function/Type.java deleted file mode 100644 index e486934a5..000000000 --- a/common/src/vendored/java/kroppeb/stareval/function/Type.java +++ /dev/null @@ -1,182 +0,0 @@ -package kroppeb.stareval.function; - -import kroppeb.stareval.expression.ConstantExpression; -import kroppeb.stareval.function.TypedFunction.Parameter; -import net.irisshaders.iris.gl.uniform.UniformType; -import net.irisshaders.iris.parsing.MatrixType; -import net.irisshaders.iris.parsing.VectorType; - -public abstract class Type { - public static final Boolean Boolean = new Boolean(); - public static final Int Int = new Int(); - public static final Float Float = new Float(); - public static final Parameter BooleanParameter = new Parameter(Boolean); - public static final Parameter IntParameter = new Parameter(Int); - public static final Parameter FloatParameter = new Parameter(Float); - public static final Primitive[] AllPrimitives = {Type.Boolean, Type.Int, Type.Float}; - - public static UniformType convert(Type type) { - if (type == Type.Int || type == Type.Boolean) return UniformType.INT; - else if (type == Type.Float) return UniformType.FLOAT; - else if (type == VectorType.VEC2) return UniformType.VEC2; - else if (type == VectorType.VEC3) return UniformType.VEC3; - else if (type == VectorType.VEC4) return UniformType.VEC4; - else if (type == VectorType.I_VEC2) return UniformType.VEC2I; - else if (type == VectorType.I_VEC3) return UniformType.VEC3I; - else if (type == MatrixType.MAT4) return UniformType.MAT4; - else throw new IllegalArgumentException("Unsupported custom uniform type: " + type); - } - - public abstract ConstantExpression createConstant(FunctionReturn functionReturn); - - public abstract Object createArray(int length); - - public abstract void setValueFromReturn(Object array, int index, FunctionReturn value); - - public abstract void getValueFromArray(Object array, int index, FunctionReturn value); - - public abstract String toString(); - - public abstract static class Primitive extends Type { - } - - public static class ObjectType extends Type { - @Override - public ConstantExpression createConstant(FunctionReturn functionReturn) { - Object object = functionReturn.objectReturn; - return new ConstantExpression(this) { - @Override - public void evaluateTo(FunctionContext context, FunctionReturn functionReturn) { - functionReturn.objectReturn = object; - } - }; - } - - @Override - public Object createArray(int length) { - return new Object[length]; - } - - @Override - public void setValueFromReturn(Object array, int index, FunctionReturn value) { - Object[] arr = (Object[]) array; - arr[index] = value.objectReturn; - } - - @Override - public void getValueFromArray(Object array, int index, FunctionReturn value) { - Object[] arr = (Object[]) array; - value.objectReturn = arr[index]; - } - - @Override - public String toString() { - return "Object"; - } - } - - public static class Boolean extends Primitive { - @Override - public ConstantExpression createConstant(FunctionReturn functionReturn) { - boolean value = functionReturn.booleanReturn; - return new ConstantExpression(this) { - @Override - public void evaluateTo(FunctionContext context, FunctionReturn functionReturn) { - functionReturn.booleanReturn = value; - } - }; - } - - @Override - public Object createArray(int length) { - return new boolean[length]; - } - - @Override - public void setValueFromReturn(Object array, int index, FunctionReturn value) { - boolean[] arr = (boolean[]) array; - arr[index] = value.booleanReturn; - } - - @Override - public void getValueFromArray(Object array, int index, FunctionReturn value) { - boolean[] arr = (boolean[]) array; - value.booleanReturn = arr[index]; - } - - @Override - public String toString() { - return "bool"; - } - } - - public static class Int extends Primitive { - @Override - public ConstantExpression createConstant(FunctionReturn functionReturn) { - int value = functionReturn.intReturn; - return new ConstantExpression(this) { - @Override - public void evaluateTo(FunctionContext context, FunctionReturn functionReturn) { - functionReturn.intReturn = value; - } - }; - } - - @Override - public Object createArray(int length) { - return new int[length]; - } - - @Override - public void setValueFromReturn(Object array, int index, FunctionReturn value) { - int[] arr = (int[]) array; - arr[index] = value.intReturn; - } - - @Override - public void getValueFromArray(Object array, int index, FunctionReturn value) { - int[] arr = (int[]) array; - value.intReturn = arr[index]; - } - - @Override - public String toString() { - return "int"; - } - } - - public static class Float extends Primitive { - @Override - public ConstantExpression createConstant(FunctionReturn functionReturn) { - float value = functionReturn.floatReturn; - return new ConstantExpression(this) { - @Override - public void evaluateTo(FunctionContext context, FunctionReturn functionReturn) { - functionReturn.floatReturn = value; - } - }; - } - - @Override - public Object createArray(int length) { - return new float[length]; - } - - @Override - public void setValueFromReturn(Object array, int index, FunctionReturn value) { - float[] arr = (float[]) array; - arr[index] = value.floatReturn; - } - - @Override - public void getValueFromArray(Object array, int index, FunctionReturn value) { - float[] arr = (float[]) array; - value.floatReturn = arr[index]; - } - - @Override - public String toString() { - return "float"; - } - } -} diff --git a/common/src/vendored/java/kroppeb/stareval/function/TypedFunction.java b/common/src/vendored/java/kroppeb/stareval/function/TypedFunction.java deleted file mode 100644 index bed05058e..000000000 --- a/common/src/vendored/java/kroppeb/stareval/function/TypedFunction.java +++ /dev/null @@ -1,72 +0,0 @@ -package kroppeb.stareval.function; - -import kroppeb.stareval.expression.Expression; - -import java.util.Arrays; -import java.util.Objects; -import java.util.stream.Collectors; - -public interface TypedFunction { - - static String format(TypedFunction function, String name) { - return String.format("%s %s(%s) (priority: %d, pure:%s)", - function.getReturnType().toString(), - name, - Arrays.stream(function.getParameters()) - .map(param -> param.constant() ? "const " + param.type() : param.type().toString()) - .collect(Collectors.joining(", ")), - function.priority(), - function.isPure() ? "yes" : "no" - ); - } - - Type getReturnType(); - - Parameter[] getParameters(); - - void evaluateTo(Expression[] params, FunctionContext context, FunctionReturn functionReturn); - - default boolean isPure() { - return true; - } - - default int priority() { - return 0; - } - - class Parameter { - private final Type type; - private final boolean isConstant; - - public Parameter(Type type, boolean isConstant) { - this.type = type; - this.isConstant = isConstant; - } - - public Parameter(Type type) { - this(type, false); - } - - public Type type() { - return this.type; - } - - public boolean constant() { - return this.isConstant; - } - - @Override - public boolean equals(Object obj) { - if (obj instanceof Parameter p) { - return Objects.equals(type, p.type) && Objects.equals(isConstant, p.isConstant); - } - return false; - } - - @Override - public int hashCode() { - return Objects.hashCode(type) + 3192 + Objects.hashCode(isConstant); - } - } -} - diff --git a/common/src/vendored/java/kroppeb/stareval/function/V2FFunction.java b/common/src/vendored/java/kroppeb/stareval/function/V2FFunction.java deleted file mode 100644 index 0733ceb36..000000000 --- a/common/src/vendored/java/kroppeb/stareval/function/V2FFunction.java +++ /dev/null @@ -1,23 +0,0 @@ -package kroppeb.stareval.function; - -import kroppeb.stareval.expression.Expression; - -@FunctionalInterface -public interface V2FFunction extends TypedFunction { - float eval(); - - @Override - default void evaluateTo(Expression[] params, FunctionContext context, FunctionReturn functionReturn) { - functionReturn.floatReturn = this.eval(); - } - - @Override - default Type getReturnType() { - return Type.Float; - } - - @Override - default Parameter[] getParameters() { - return new Parameter[]{}; - } -} diff --git a/common/src/vendored/java/kroppeb/stareval/function/V2IFunction.java b/common/src/vendored/java/kroppeb/stareval/function/V2IFunction.java deleted file mode 100644 index 6dacfc544..000000000 --- a/common/src/vendored/java/kroppeb/stareval/function/V2IFunction.java +++ /dev/null @@ -1,23 +0,0 @@ -package kroppeb.stareval.function; - -import kroppeb.stareval.expression.Expression; - -@FunctionalInterface -public interface V2IFunction extends TypedFunction { - int eval(); - - @Override - default void evaluateTo(Expression[] params, FunctionContext context, FunctionReturn functionReturn) { - functionReturn.intReturn = this.eval(); - } - - @Override - default Type getReturnType() { - return Type.Int; - } - - @Override - default Parameter[] getParameters() { - return new Parameter[]{}; - } -} diff --git a/common/src/vendored/java/kroppeb/stareval/parser/BinaryOp.java b/common/src/vendored/java/kroppeb/stareval/parser/BinaryOp.java index aed11b1ac..41bf081a7 100644 --- a/common/src/vendored/java/kroppeb/stareval/parser/BinaryOp.java +++ b/common/src/vendored/java/kroppeb/stareval/parser/BinaryOp.java @@ -1,12 +1,20 @@ package kroppeb.stareval.parser; -public record BinaryOp(String name, int priority) { +public class BinaryOp { + private final String name; + private final int priority; + public BinaryOp(String name, int priority) { + this.name = name; + this.priority = priority; + } @Override public String toString() { return this.name + "{" + this.priority + "}"; } - + public int getPriority() { + return this.priority; + } } diff --git a/common/src/vendored/java/kroppeb/stareval/parser/OpResolver.java b/common/src/vendored/java/kroppeb/stareval/parser/OpResolver.java index bd2337862..80307e712 100644 --- a/common/src/vendored/java/kroppeb/stareval/parser/OpResolver.java +++ b/common/src/vendored/java/kroppeb/stareval/parser/OpResolver.java @@ -7,7 +7,6 @@ /** * OpResolver maps the trailing characters identifying an operator to an actual operator. - * * @param */ abstract class OpResolver { @@ -28,7 +27,7 @@ public void singleChar(T op) { * Adds a new multi-character operator. Calling this with an empty string is equivalent to calling singleChar. * * @param trailing every character after the first character of the operator. - * @param op the operator + * @param op the operator */ public void multiChar(String trailing, T op) { T previous = map.put(trailing, op); @@ -41,7 +40,7 @@ public void multiChar(String trailing, T op) { public OpResolver build() { if (map.size() > 2) { throw new RuntimeException("unimplemented: Cannot currently build an optimized operator resolver " + - "tree when more than two operators start with the same character"); + "tree when more than two operators start with the same character"); } T singleChar = map.get(""); @@ -58,33 +57,33 @@ public OpResolver build() { if (subEntry.getKey().length() != 1) { throw new RuntimeException("unimplemented: Optimized operator resolver trees can " + - "currently only be built of operators that contain one or two characters."); + "currently only be built of operators that contain one or two characters."); } // We can assume that this is the only other entry in the map due to the size check above return new OpResolver.SingleDualChar<>( - singleChar, - subEntry.getValue(), - subEntry.getKey().charAt(0) + singleChar, + subEntry.getValue(), + subEntry.getKey().charAt(0) ); } } } else { if (map.size() > 1) { throw new RuntimeException("unimplemented: Optimized operator resolver trees can currently only " + - "handle two operators starting with the same character if one operator is a single character"); + "handle two operators starting with the same character if one operator is a single character"); } for (Map.Entry subEntry : map.entrySet()) { if (subEntry.getKey().length() != 1) { throw new RuntimeException("unimplemented: Optimized operator resolver trees can " + - "currently only be built of operators that contain one or two characters."); + "currently only be built of operators that contain one or two characters."); } // We can assume that this is the only entry in the map due to the size check above. return new OpResolver.DualChar<>( - subEntry.getValue(), - subEntry.getKey().charAt(0) + subEntry.getValue(), + subEntry.getKey().charAt(0) ); } } diff --git a/common/src/vendored/java/kroppeb/stareval/parser/Parser.java b/common/src/vendored/java/kroppeb/stareval/parser/Parser.java index 29fdfb8f3..4824c6f48 100644 --- a/common/src/vendored/java/kroppeb/stareval/parser/Parser.java +++ b/common/src/vendored/java/kroppeb/stareval/parser/Parser.java @@ -60,13 +60,9 @@ public class Parser { Parser() { } - public static ExpressionElement parse(String input, ParserOptions options) throws ParseException { - return Tokenizer.parse(input, options); - } - private Element peek() { if (!this.stack.isEmpty()) { - return this.stack.getLast(); + return this.stack.get(this.stack.size() - 1); } return null; @@ -77,7 +73,7 @@ private Element pop() { throw new IllegalStateException("Internal token stack is empty"); } - return this.stack.removeLast(); + return this.stack.remove(this.stack.size() - 1); } private void push(Element element) { @@ -119,8 +115,6 @@ private ExpressionElement expressionReducePop(int priority) { return token; } - // visitor methods - /** * Executes following reduce step: *
    @@ -140,8 +134,8 @@ private void commaReduce(int index) throws ParseException { if (args == null) { throw new MissingTokenException( - "Expected an opening bracket '(' before seeing a comma ',' or closing bracket ')'", - index + "Expected an opening bracket '(' before seeing a comma ',' or closing bracket ')'", + index ); } @@ -149,11 +143,13 @@ private void commaReduce(int index) throws ParseException { ((UnfinishedArgsExpression) args).tokens.add(expr); } else { throw new UnexpectedTokenException( - "Expected to see an opening bracket '(' or a comma ',' right before an expression followed by a " + - "closing bracket ')' or a comma ','", index); + "Expected to see an opening bracket '(' or a comma ',' right before an expression followed by a " + + "closing bracket ')' or a comma ','", index); } } + // visitor methods + void visitId(String id) { this.push(new IdToken(id)); } @@ -217,8 +213,8 @@ void visitClosingParenthesis(int index) throws ParseException { if (!(pop instanceof UnfinishedArgsExpression)) { throw new UnexpectedTokenException( - "Expected to see an opening bracket '(' or a comma ',' right before an expression followed by a " + - "closing bracket ')' or a comma ','", index); + "Expected to see an opening bracket '(' or a comma ',' right before an expression followed by a " + + "closing bracket ')' or a comma ','", index); } args = (UnfinishedArgsExpression) pop; } @@ -236,7 +232,7 @@ void visitClosingParenthesis(int index) throws ParseException { } else if (!expressionOnTop) { throw new UnexpectedTokenException("Encountered a trailing comma in brackets that aren't a call", index); } else { - this.push(args.tokens.getFirst()); + this.push(args.tokens.get(0)); } } } @@ -260,7 +256,7 @@ boolean canReadBinaryOp() { */ void visitBinaryOperator(BinaryOp binaryOp) { // reduce the expressions to the needed priority level - ExpressionElement left = this.expressionReducePop(binaryOp.priority()); + ExpressionElement left = this.expressionReducePop(binaryOp.getPriority()); // stack[ {'a', '*'}, 'b'], token = '+' -> stack[], left = {'a', '*', 'b'} // -> stack[{{'a', '*', 'b'}, '+'}] // stack[ {'a', '+'}, 'b'], token = '+' -> stack[], left = {'a', '+', 'b'} @@ -291,8 +287,8 @@ ExpressionElement getFinal(int endIndex) throws ParseException { throw new MissingTokenException("Expected a closing bracket", endIndex); } else { throw new UnexpectedTokenException( - "The stack of tokens isn't empty at the end of the expression: " + this.stack + - " top: " + result, endIndex); + "The stack of tokens isn't empty at the end of the expression: " + this.stack + + " top: " + result, endIndex); } } else { Element top = this.peek(); @@ -300,16 +296,20 @@ ExpressionElement getFinal(int endIndex) throws ParseException { throw new MissingTokenException("Expected a closing bracket", endIndex); } else if (top instanceof PriorityOperatorElement) { throw new MissingTokenException( - "Expected a identifier, constant or subexpression on the right side of the operator", - endIndex); + "Expected a identifier, constant or subexpression on the right side of the operator", + endIndex); } else { throw new UnexpectedTokenException( - "The stack of tokens contains an unexpected token at the top: " + this.stack, - endIndex); + "The stack of tokens contains an unexpected token at the top: " + this.stack, + endIndex); } } } else { throw new MissingTokenException("The input seems to be empty", endIndex); } } + + public static ExpressionElement parse(String input, ParserOptions options) throws ParseException { + return Tokenizer.parse(input, options); + } } diff --git a/common/src/vendored/java/kroppeb/stareval/parser/ParserOptions.java b/common/src/vendored/java/kroppeb/stareval/parser/ParserOptions.java index b21fc20ec..2c3ee04ed 100644 --- a/common/src/vendored/java/kroppeb/stareval/parser/ParserOptions.java +++ b/common/src/vendored/java/kroppeb/stareval/parser/ParserOptions.java @@ -9,9 +9,9 @@ public final class ParserOptions { private final TokenRules tokenRules; private ParserOptions( - Char2ObjectMap> unaryOpResolvers, - Char2ObjectMap> binaryOpResolvers, - TokenRules tokenRules) { + Char2ObjectMap> unaryOpResolvers, + Char2ObjectMap> binaryOpResolvers, + TokenRules tokenRules) { this.unaryOpResolvers = unaryOpResolvers; this.binaryOpResolvers = binaryOpResolvers; this.tokenRules = tokenRules; @@ -29,12 +29,52 @@ OpResolver getBinaryOpResolver(char c) { return this.binaryOpResolvers.get(c); } + public static class Builder { + private final Char2ObjectMap> unaryOpResolvers = new Char2ObjectOpenHashMap<>(); + private final Char2ObjectMap> binaryOpResolvers = new Char2ObjectOpenHashMap<>(); + private TokenRules tokenRules = TokenRules.DEFAULT; + + public void addUnaryOp(String s, UnaryOp op) { + char first = s.charAt(0); + String trailing = s.substring(1); + + this.unaryOpResolvers.computeIfAbsent(first, (c) -> new OpResolver.Builder<>()).multiChar(trailing, op); + } + + public void addBinaryOp(String s, BinaryOp op) { + char first = s.charAt(0); + String trailing = s.substring(1); + + this.binaryOpResolvers.computeIfAbsent(first, (c) -> new OpResolver.Builder<>()).multiChar(trailing, op); + } + + public void setTokenRules(TokenRules tokenRules) { + this.tokenRules = tokenRules; + } + + private static Char2ObjectMap> buildOpResolvers( + Char2ObjectMap> ops) { + Char2ObjectMap> result = new Char2ObjectOpenHashMap<>(); + + ops.char2ObjectEntrySet().forEach( + entry -> result.put(entry.getCharKey(), entry.getValue().build())); + + return result; + } + + public ParserOptions build() { + return new ParserOptions( + buildOpResolvers(this.unaryOpResolvers), + buildOpResolvers(this.binaryOpResolvers), + this.tokenRules); + } + } + /** * Defines a set of rules that allows the tokenizer to identify tokens within a string. */ public interface TokenRules { - TokenRules DEFAULT = new TokenRules() { - }; + TokenRules DEFAULT = new TokenRules() {}; static boolean isNumber(final char c) { return c >= '0' && c <= '9'; @@ -76,45 +116,4 @@ default boolean isAccessPart(final char c) { return this.isAccessStart(c); } } - - public static class Builder { - private final Char2ObjectMap> unaryOpResolvers = new Char2ObjectOpenHashMap<>(); - private final Char2ObjectMap> binaryOpResolvers = new Char2ObjectOpenHashMap<>(); - private TokenRules tokenRules = TokenRules.DEFAULT; - - private static Char2ObjectMap> buildOpResolvers( - Char2ObjectMap> ops) { - Char2ObjectMap> result = new Char2ObjectOpenHashMap<>(); - - ops.char2ObjectEntrySet().forEach( - entry -> result.put(entry.getCharKey(), entry.getValue().build())); - - return result; - } - - public void addUnaryOp(String s, UnaryOp op) { - char first = s.charAt(0); - String trailing = s.substring(1); - - this.unaryOpResolvers.computeIfAbsent(first, (c) -> new OpResolver.Builder<>()).multiChar(trailing, op); - } - - public void addBinaryOp(String s, BinaryOp op) { - char first = s.charAt(0); - String trailing = s.substring(1); - - this.binaryOpResolvers.computeIfAbsent(first, (c) -> new OpResolver.Builder<>()).multiChar(trailing, op); - } - - public void setTokenRules(TokenRules tokenRules) { - this.tokenRules = tokenRules; - } - - public ParserOptions build() { - return new ParserOptions( - buildOpResolvers(this.unaryOpResolvers), - buildOpResolvers(this.binaryOpResolvers), - this.tokenRules); - } - } } diff --git a/common/src/vendored/java/kroppeb/stareval/parser/UnaryOp.java b/common/src/vendored/java/kroppeb/stareval/parser/UnaryOp.java index 6f0d65dfd..150110288 100644 --- a/common/src/vendored/java/kroppeb/stareval/parser/UnaryOp.java +++ b/common/src/vendored/java/kroppeb/stareval/parser/UnaryOp.java @@ -1,7 +1,11 @@ package kroppeb.stareval.parser; -public record UnaryOp(String name) { +public class UnaryOp { + private final String name; + public UnaryOp(String name) { + this.name = name; + } @Override public String toString() { diff --git a/common/src/vendored/java/kroppeb/stareval/resolver/ExpressionResolver.java b/common/src/vendored/java/kroppeb/stareval/resolver/ExpressionResolver.java deleted file mode 100644 index 7ab34d3f2..000000000 --- a/common/src/vendored/java/kroppeb/stareval/resolver/ExpressionResolver.java +++ /dev/null @@ -1,325 +0,0 @@ -package kroppeb.stareval.resolver; - -import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; -import kroppeb.stareval.element.ExpressionElement; -import kroppeb.stareval.element.token.IdToken; -import kroppeb.stareval.element.token.NumberToken; -import kroppeb.stareval.element.tree.AccessExpressionElement; -import kroppeb.stareval.element.tree.BinaryExpressionElement; -import kroppeb.stareval.element.tree.FunctionCall; -import kroppeb.stareval.element.tree.UnaryExpressionElement; -import kroppeb.stareval.expression.CallExpression; -import kroppeb.stareval.expression.ConstantExpression; -import kroppeb.stareval.expression.Expression; -import kroppeb.stareval.expression.VariableExpression; -import kroppeb.stareval.function.FunctionContext; -import kroppeb.stareval.function.FunctionResolver; -import kroppeb.stareval.function.FunctionReturn; -import kroppeb.stareval.function.Type; -import kroppeb.stareval.function.TypedFunction; -import kroppeb.stareval.function.TypedFunction.Parameter; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.function.Function; -import java.util.function.Supplier; - -public class ExpressionResolver { - private final FunctionResolver functionResolver; - private final Function variableTypeMap; - private final boolean enableDebugging; - private final Map numbers = new Object2ObjectOpenHashMap<>(); - private List logs; - - public ExpressionResolver(FunctionResolver functionResolver, Function variableTypeMap) { - this(functionResolver, variableTypeMap, false); - } - - - public ExpressionResolver(FunctionResolver functionResolver, Function variableTypeMap, boolean enableDebugging) { - this.functionResolver = functionResolver; - this.variableTypeMap = variableTypeMap; - this.enableDebugging = enableDebugging; - } - - public Expression resolveExpression(Type targetType, ExpressionElement expression) { - this.clearLogs(); - Expression result = this.resolveExpressionInternal(targetType, expression, true, true); - if (result != null) { - return result; - } - throw new RuntimeException("Couldn't resolve: \n" + String.join("\n", this.extractLogs())); - } - - Expression resolveCallExpressionInternal( - Type targetType, - String name, - List inner, - boolean implicit - ) { - int innerLength = inner.size(); - Expression result = null; - TypedFunction resultFunction = null; - functions: - for (TypedFunction f : this.functionResolver.resolve(name, targetType)) { - Parameter[] paramTypes = f.getParameters(); - if (paramTypes.length != innerLength) - continue; - - Expression[] params = new Expression[innerLength]; - for (int i = 0; i < innerLength; i++) { - ExpressionElement paramExpression = inner.get(i); - Parameter param = paramTypes[i]; - if (param.constant() && !(paramExpression instanceof NumberToken)) { - // not a constant - continue functions; - } - - Expression expression = this.resolveExpressionInternal(param.type(), paramExpression, - !implicit || innerLength > 1, implicit); - if (expression == null) - continue functions; - params[i] = expression; - } - // FIXME - if (result != null && f.priority() == resultFunction.priority()) { - throw new RuntimeException("Ambiguity, \n\told: " + TypedFunction.format(resultFunction, "") + "\n\tnew: " + TypedFunction.format(f, "")); - } else if (resultFunction == null || f.priority() >= resultFunction.priority()) { - result = new CallExpression(f, params); - resultFunction = f; - } - } - return result; - } - - private Expression resolveCallExpression( - Type targetType, - String name, - List inner, - boolean allowNonImplicit, - boolean allowImplicit) { - - this.log("[DEBUG] resolving function %s with args %s to type %s", - name, inner, targetType); - - Expression result = null; - - if (allowNonImplicit) { - result = this.resolveCallExpressionInternal(targetType, name, inner, false); - } - - if (result != null) { - this.log("[DEBUG] resolved function %s with args %s to type %s directly", - name, inner, targetType); - return result; - } else if (!allowImplicit) { - this.log("[DEBUG] Failed to resolve function %s with args %s to type %s directly", - name, inner, targetType); - return null; - } - - List casts = this.functionResolver.resolve("", targetType); - - for (TypedFunction f : casts) { - Expression u = this.resolveCallExpression(f.getParameters()[0].type(), name, inner, true, true); - if (u == null) - continue; - if (result != null) - throw new RuntimeException("Ambiguity"); - result = new CallExpression(f, new Expression[]{u}); - } - if (result != null) { - this.log("[DEBUG] resolved function %s with args %s to type %s using only final cast", - name, inner, targetType); - return result; - } - - result = this.resolveCallExpressionInternal(targetType, name, inner, true); - if (result != null) { - this.log("[DEBUG] resolved function %s with args %s to type %s using implicit inner casts", - name, inner, targetType); - } else { - this.log("[DEBUG] failed to resolve function %s with args %s to type %s", - name, inner, targetType); - } - return result; - } - - public List extractLogs() { - List old = this.logs; - this.clearLogs(); - return old; - } - - public void clearLogs() { - this.logs = new ArrayList<>(); - } - - private void log(String str) { - if (this.enableDebugging) - this.logs.add(str); - } - - private void log(String str, Object... args) { - if (this.enableDebugging) - this.logs.add(String.format(str, args)); - } - - private void log(Supplier str) { - if (this.enableDebugging) - this.log(str.get()); - } - - private Expression resolveExpressionInternal( - Type targetType, - ExpressionElement expression, - boolean allowNonImplicit, - boolean allowImplicit) { - Expression castable; - Type innerType; - - this.log("[DEBUG] resolving %s to type %s (%d%d)", - expression, targetType, allowNonImplicit ? 1 : 0, allowImplicit ? 1 : 0); - switch (expression) { - case UnaryExpressionElement token -> { - return this.resolveCallExpression(targetType, token.op().name(), Collections.singletonList(token.inner()), - allowNonImplicit, allowImplicit); - } - case BinaryExpressionElement token -> { - return this.resolveCallExpression(targetType, token.op().name(), Arrays.asList(token.left(), token.right()), - allowNonImplicit, allowImplicit); - } - case FunctionCall token -> { - return this.resolveCallExpression(targetType, token.id(), token.args(), - allowNonImplicit, allowImplicit); - } - case AccessExpressionElement token -> { - return this.resolveCallExpression(targetType, "", - Collections.singletonList(token.base()), - allowNonImplicit, allowImplicit); - } - case NumberToken token -> { - ConstantExpression exp = this.resolveNumber(token.getNumber()); - if (exp.getType().equals(targetType)) { - this.log("[DEBUG] resolved constant %s to type %s", token.getNumber(), targetType); - return exp; - } - // TODO: implicit casting is split up too much - if (!allowImplicit) { - this.log("[DEBUG] failed to resolve constant %s (of type %s) to type %s without implicit casts", - token.getNumber(), exp.getType(), targetType); - return null; - } - this.log("[DEBUG] trying implicit casts to resolve constant %s (of type %s) to type %s", - token.getNumber(), exp.getType(), targetType); - castable = exp; - innerType = exp.getType(); - } - case IdToken token -> { - final String name = token.getId(); - Type type = this.variableTypeMap.apply(name); - if (type == null) - throw new RuntimeException("Unknown variable: " + name); - if (type.equals(targetType)) { - log("[DEBUG] resolved variable %s to type %s", name, targetType); - // TODO: We should add a variable provider (and have this as default) - // doing so would remove the need for a FunctionContext. - return new VariableExpression() { - @Override - public void evaluateTo(FunctionContext c, FunctionReturn r) { - c.getVariable(name).evaluateTo(c, r); - } - - @Override - public Expression partialEval(FunctionContext context, FunctionReturn functionReturn) { - return context.hasVariable(name) ? context.getVariable(name) : this; - } - }; - } - if (!allowImplicit) { - log("[DEBUG] failed to resolve variable %s (of type %s) to type %s without implicit casts", - name, type, targetType); - return null; - } - // TODO duplicate of above - castable = new VariableExpression() { - @Override - public void evaluateTo(FunctionContext c, FunctionReturn r) { - c.getVariable(name).evaluateTo(c, r); - } - - @Override - public Expression partialEval(FunctionContext context, FunctionReturn functionReturn) { - return context.hasVariable(name) ? context.getVariable(name) : this; - } - }; - innerType = type; - } - case null, default -> throw new RuntimeException("unexpected token: " + expression.toString()); - } - - List casts = this.functionResolver.resolve("", targetType); - - for (TypedFunction f : casts) { - if (f.getParameters()[0].type().equals(innerType)) { - this.log("[DEBUG] resolved %s to type %s using implicit casts", - expression, targetType); - return new CallExpression(f, new Expression[]{castable}); - } - } - this.log("[DEBUG] failed to resolved %s to type %s, even using implicit casts", expression, targetType); - return null; - } - - private ConstantExpression resolveNumber(String s) { - return this.numbers.computeIfAbsent(s, str -> { - NumberFormatException p; - try { - final int val; - if (str.length() >= 2 && str.charAt(0) == '0') { - switch (str.charAt(1)) { - case 'b': { - val = Integer.parseInt(str.substring(2), 2); - break; - } - case 'x': { - val = Integer.parseInt(str.substring(2), 16); - break; - } - default: { - val = Integer.parseInt(str.substring(1), 8); - break; - } - } - } else - val = Integer.parseInt(str); - - return new ConstantExpression(Type.Int) { - @Override - public void evaluateTo(FunctionContext context, FunctionReturn functionReturn) { - functionReturn.intReturn = val; - } - }; - } catch (NumberFormatException ex) { - p = ex; - } - - try { - final float res = Float.parseFloat(str); - return new ConstantExpression(Type.Float) { - @Override - public void evaluateTo(FunctionContext context, FunctionReturn functionReturn) { - functionReturn.floatReturn = res; - } - }; - } catch (NumberFormatException ex) { - RuntimeException exception = new RuntimeException("Illegal number: " + str, ex); - exception.addSuppressed(p); - throw exception; - } - }); - } -} diff --git a/fabric/build.gradle.kts b/fabric/build.gradle.kts index 13e7ded9a..ec18245c7 100644 --- a/fabric/build.gradle.kts +++ b/fabric/build.gradle.kts @@ -37,12 +37,16 @@ dependencies { shadow("org.lwjgl:lwjgl-glfw") shadow("org.lwjgl:lwjgl-openal") shadow("org.lwjgl:lwjgl-opengl") + shadow("org.lwjgl:lwjgl-stb") + shadow("org.lwjgl:lwjgl-tinyfd") arrayOf("linux", "windows", "macos", "windows-arm64", "macos-arm64").forEach { platform -> shadow("org.lwjgl:lwjgl::natives-$platform") shadow("org.lwjgl:lwjgl-glfw::natives-$platform") shadow("org.lwjgl:lwjgl-openal::natives-$platform") shadow("org.lwjgl:lwjgl-opengl::natives-$platform") + shadow("org.lwjgl:lwjgl-stb::natives-$platform") + shadow("org.lwjgl:lwjgl-tinyfd::natives-$platform") } } @@ -66,14 +70,21 @@ dependencies { implementation("org.lwjgl:lwjgl-glfw") implementation("org.lwjgl:lwjgl-openal") implementation("org.lwjgl:lwjgl-opengl") + implementation("org.lwjgl:lwjgl-stb") + implementation("org.lwjgl:lwjgl-tinyfd") arrayOf("linux", "windows", "macos", "windows-arm64", "macos-arm64").forEach { platform -> runtimeOnly("org.lwjgl:lwjgl::natives-$platform") runtimeOnly("org.lwjgl:lwjgl-glfw::natives-$platform") runtimeOnly("org.lwjgl:lwjgl-openal::natives-$platform") runtimeOnly("org.lwjgl:lwjgl-opengl::natives-$platform") + runtimeOnly("org.lwjgl:lwjgl-stb::natives-$platform") + runtimeOnly("org.lwjgl:lwjgl-tinyfd::natives-$platform") } + implementation("org.anarres:jcpp:1.4.14") + implementation("io.github.douira:glsl-transformer:1.0.1") + modImplementation("net.fabricmc:fabric-loader:${BuildConfig.FABRIC_LOADER_VERSION}") modImplementation("net.legacyfabric.legacy-fabric-api:legacy-fabric-api:1.9.4+1.8.9") } diff --git a/fabric/src/main/java/net/caffeinemc/mods/sodium/fabric/SodiumFabricMod.java b/fabric/src/main/java/net/caffeinemc/mods/sodium/fabric/SodiumFabricMod.java index 31ddc335a..7e1e5dce1 100644 --- a/fabric/src/main/java/net/caffeinemc/mods/sodium/fabric/SodiumFabricMod.java +++ b/fabric/src/main/java/net/caffeinemc/mods/sodium/fabric/SodiumFabricMod.java @@ -9,7 +9,7 @@ public class SodiumFabricMod implements ClientModInitializer { @Override public void onInitializeClient() { ModContainer mod = FabricLoader.getInstance() - .getModContainer("sodium") + .getModContainer("radium") .orElseThrow(NullPointerException::new); SodiumClientMod.onInitialization(mod.getMetadata().getVersion().getFriendlyString()); diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json index 8d0f1cf7c..b2d2bbe5a 100644 --- a/fabric/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -75,8 +75,9 @@ "accessWidener" : "sodium-fabric.accesswidener", "mixins" : [ "legacy-lwjgl3.mixins.json", - "sodium-common.mixins.json", - "sodium-fabric.mixins.json" + "iris.mixins.json", + "iris-fantastic.mixins.json", + "iris-vertexformat.mixins.json" ], "depends" : { "minecraft": ["1.8.9"],