From a92e62f55fbe19bc2286327ed42c53e2c1f87a35 Mon Sep 17 00:00:00 2001 From: Gabrieli2806 <[tu-email@ejemplo.com]> Date: Fri, 10 Apr 2026 07:33:39 -0500 Subject: [PATCH 01/13] fix: eliminate GUI freeze and widget flash in pipeline config screen - Remove per-frame node.updateWidth() from render(); call it at node creation only - Remove duplicate Pipeline.switchToPresetMode() calls in rebuildUI() and PresetSelector.onClick() to prevent double native build on screen open - Add idempotency guard in Pipeline.switchToPresetMode() to skip rebuild when already on the target preset - Add Pipeline.preparePresetModeUI() / preparePipelineModeUI() lightweight variants that assemble UI data without triggering buildNative() or savePipeline(); used for mode toggle clicks - Initialize preset widgets as hidden (visible=false) to prevent 1-frame flash at position (0,0) before layoutPresetRowWidgets() places them correctly --- .../client/gui/RenderPipelineScreen.java | 21 ++++++----- .../radiance/client/pipeline/Pipeline.java | 36 ++++++++++++++++++- 2 files changed, 45 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/radiance/client/gui/RenderPipelineScreen.java b/src/main/java/com/radiance/client/gui/RenderPipelineScreen.java index 89d230f1..c7795cc5 100644 --- a/src/main/java/com/radiance/client/gui/RenderPipelineScreen.java +++ b/src/main/java/com/radiance/client/gui/RenderPipelineScreen.java @@ -137,11 +137,11 @@ private void rebuildUI() { if (activePreset == null && !presets.isEmpty()) { activePreset = presets.getFirst(); } - Pipeline.switchToPresetMode( + Pipeline.preparePresetModeUI( activePreset != null ? activePreset.name() : "Default"); mode = Mode.PRESET; } else { - Pipeline.switchToPipelineMode(); + Pipeline.preparePipelineModeUI(); mode = Mode.PIPELINE; } rebuildUI(); @@ -201,7 +201,6 @@ private void rebuildUI() { if (activePreset == null && !presets.isEmpty()) { activePreset = presets.get(0); } - Pipeline.switchToPresetMode(activePreset != null ? activePreset.name() : "Default"); applyActivePreset(); } } @@ -209,7 +208,9 @@ private void rebuildUI() { public void refreshPipeline() { nodes.clear(); for (Module module : Pipeline.INSTANCE.getModules()) { - nodes.add(new ModuleNode(module)); + ModuleNode node = new ModuleNode(module); + node.updateWidth(textRenderer); + nodes.add(node); } moduleConnections.clear(); @@ -252,10 +253,6 @@ public void close() { @Override public void render(DrawContext context, int mouseX, int mouseY, float delta) { - for (ModuleNode node : nodes) { - node.updateWidth(textRenderer); - } - this.renderBackground(context, mouseX, mouseY, delta); context.getMatrices().push(); @@ -863,7 +860,9 @@ public boolean onClick(double mouseX, double mouseY) { Module module = selected.loadModule(); module.x = 100; module.y = 100; - nodes.add(new ModuleNode(module)); + ModuleNode newNode = new ModuleNode(module); + newNode.updateWidth(textRenderer); + nodes.add(newNode); return true; } return false; @@ -912,7 +911,7 @@ private void applyActivePreset() { return; } - Pipeline.switchToPresetMode(activePreset.name()); + Pipeline.preparePresetModeUI(activePreset.name()); List modules = new ArrayList<>(Pipeline.INSTANCE.getModules()); @@ -925,6 +924,7 @@ private void applyActivePreset() { for (AttributeConfig cfg : m.attributeConfigs) { List ws = buildPresetWidgets(cfg); for (ClickableWidget w : ws) { + w.visible = false; presetWidgets.add(addDrawableChild(w)); } block.rows.add(new PresetRow(cfg, ws)); @@ -989,7 +989,6 @@ public boolean onClick(double mouseX, double mouseY) { if (index >= 0 && index < options.size()) { activePreset = options.get(index); presetScrollY = 0; - Pipeline.switchToPresetMode(activePreset != null ? activePreset.name() : "Default"); applyActivePreset(); return true; } diff --git a/src/main/java/com/radiance/client/pipeline/Pipeline.java b/src/main/java/com/radiance/client/pipeline/Pipeline.java index bd755b38..e64c997d 100644 --- a/src/main/java/com/radiance/client/pipeline/Pipeline.java +++ b/src/main/java/com/radiance/client/pipeline/Pipeline.java @@ -864,10 +864,15 @@ public static void switchToPipelineMode() { } public static void switchToPresetMode(String presetName) { + String processedPresetName = processPresetName(presetName); + if (INSTANCE.mode == PipelineMode.PRESET + && Objects.equals(INSTANCE.activePresetName, processedPresetName)) { + return; + } + List carryOverModules = capturePresetModules(); INSTANCE.mode = PipelineMode.PRESET; - String processedPresetName = processPresetName(presetName); // should set preset name properly assemblePreset(processedPresetName); @@ -884,6 +889,35 @@ public static void switchToPresetMode(String presetName) { build(); } + /** + * Assembles preset pipeline data in memory for UI display only. + * Does NOT call build() or savePipeline() — call those explicitly when applying. + */ + public static void preparePresetModeUI(String presetName) { + String processedPresetName = processPresetName(presetName); + if (INSTANCE.mode == PipelineMode.PRESET + && Objects.equals(INSTANCE.activePresetName, processedPresetName)) { + return; + } + List carryOverModules = capturePresetModules(); + INSTANCE.mode = PipelineMode.PRESET; + assemblePreset(processedPresetName); + PipelineConfigStorage storage = loadConfigStorage(); + if (storage != null && Objects.equals(storage.mode, PipelineMode.PRESET.name()) + && Objects.equals(storage.presetName, INSTANCE.activePresetName)) { + applyPresetModuleOverrides(storage.presetModules); + } + applyPresetModuleOverrides(carryOverModules); + } + + /** + * Sets pipeline mode to PIPELINE for UI display only. + * Does NOT call build() or savePipeline() — call those explicitly when applying. + */ + public static void preparePipelineModeUI() { + INSTANCE.mode = PipelineMode.PIPELINE; + } + public static void assemblePreset(String presetName) { String processedPresetName = processPresetName(presetName); if (processedPresetName == null) { From d61aedbe6175a64689847f3607c1584f4bfeade1 Mon Sep 17 00:00:00 2001 From: Gabrieli2806 <[tu-email@ejemplo.com]> Date: Fri, 10 Apr 2026 07:58:51 -0500 Subject: [PATCH 02/13] fix: skip build on close when no changes, fix mode-toggle and reload dirty state - Add isDirty flag; close() only calls build() when user made actual changes - Attribute widgets (bool, enum, int, float, string, vec3, sliders) fire onChanged callback to set isDirty - Reload button resets isDirty (discards changes) - Mode toggle resets isDirty (discards changes from previous mode) --- .../client/gui/AttributeWidgetUtil.java | 60 ++++++++++++------- .../client/gui/ModuleAttributeScreen.java | 2 +- .../client/gui/RenderPipelineScreen.java | 22 +++++-- 3 files changed, 55 insertions(+), 29 deletions(-) diff --git a/src/main/java/com/radiance/client/gui/AttributeWidgetUtil.java b/src/main/java/com/radiance/client/gui/AttributeWidgetUtil.java index 7bf932e8..505946da 100644 --- a/src/main/java/com/radiance/client/gui/AttributeWidgetUtil.java +++ b/src/main/java/com/radiance/client/gui/AttributeWidgetUtil.java @@ -84,42 +84,43 @@ static int totalWidgetWidth(List widgets, int singleWidth, int static List buildWidgets(AttributeConfig cfg, TextRenderer textRenderer, int width, - int vec3ComponentWidth) { + int vec3ComponentWidth, Runnable onChanged) { String type = cfg.type == null ? "" : cfg.type.toLowerCase(Locale.ROOT); if (type.startsWith("enum:")) { - return List.of(buildEnumWidget(cfg, cfg.type.substring(5), width)); + return List.of(buildEnumWidget(cfg, cfg.type.substring(5), width, onChanged)); } if (type.startsWith("int_range:")) { - return List.of(buildIntRange(cfg, cfg.type.substring(10), width)); + return List.of(buildIntRange(cfg, cfg.type.substring(10), width, onChanged)); } if (type.startsWith("float_range:")) { - return List.of(buildFloatRange(cfg, cfg.type.substring(12), width)); + return List.of(buildFloatRange(cfg, cfg.type.substring(12), width, onChanged)); } return switch (type) { - case "bool" -> List.of(buildBoolWidget(cfg, width)); - case "int" -> List.of(buildIntWidget(cfg, textRenderer, width)); - case "float" -> List.of(buildFloatWidget(cfg, textRenderer, width)); - case "string" -> List.of(buildStringWidget(cfg, textRenderer, width)); - case "vec3" -> buildVec3Widget(cfg, textRenderer, vec3ComponentWidth); - default -> List.of(buildStringWidget(cfg, textRenderer, width)); + case "bool" -> List.of(buildBoolWidget(cfg, width, onChanged)); + case "int" -> List.of(buildIntWidget(cfg, textRenderer, width, onChanged)); + case "float" -> List.of(buildFloatWidget(cfg, textRenderer, width, onChanged)); + case "string" -> List.of(buildStringWidget(cfg, textRenderer, width, onChanged)); + case "vec3" -> buildVec3Widget(cfg, textRenderer, vec3ComponentWidth, onChanged); + default -> List.of(buildStringWidget(cfg, textRenderer, width, onChanged)); }; } - private static ClickableWidget buildBoolWidget(AttributeConfig cfg, int width) { + private static ClickableWidget buildBoolWidget(AttributeConfig cfg, int width, Runnable onChanged) { boolean b = "render_pipeline.true".equalsIgnoreCase(cfg.value); return ButtonWidget.builder( Text.translatable(b ? "render_pipeline.true" : "render_pipeline.false"), btn -> { boolean nv = !"render_pipeline.true".equalsIgnoreCase(cfg.value); cfg.value = nv ? "render_pipeline.true" : "render_pipeline.false"; btn.setMessage(Text.translatable(cfg.value)); + onChanged.run(); }).dimensions(0, 0, width, 20).build(); } - private static ClickableWidget buildEnumWidget(AttributeConfig cfg, String raw, int width) { + private static ClickableWidget buildEnumWidget(AttributeConfig cfg, String raw, int width, Runnable onChanged) { String[] values = raw.isEmpty() ? new String[]{""} : raw.split("-"); int idx = 0; if (cfg.value != null) { @@ -138,11 +139,12 @@ private static ClickableWidget buildEnumWidget(AttributeConfig cfg, String raw, index[0] = (index[0] + 1) % values.length; cfg.value = values[index[0]]; btn.setMessage(Text.translatable(cfg.value)); + onChanged.run(); }).dimensions(0, 0, width, 20).build(); } private static ClickableWidget buildIntWidget(AttributeConfig cfg, TextRenderer textRenderer, - int width) { + int width, Runnable onChanged) { TextFieldWidget tf = new TextFieldWidget(textRenderer, 0, 0, width, 20, Text.empty()); tf.setMaxLength(64); tf.setText(cfg.value == null ? "" : cfg.value); @@ -150,13 +152,14 @@ private static ClickableWidget buildIntWidget(AttributeConfig cfg, TextRenderer tf.setChangedListener(text -> { if (isStrictInt(text)) { cfg.value = text; + onChanged.run(); } }); return tf; } private static ClickableWidget buildFloatWidget(AttributeConfig cfg, TextRenderer textRenderer, - int width) { + int width, Runnable onChanged) { TextFieldWidget tf = new TextFieldWidget(textRenderer, 0, 0, width, 20, Text.empty()); tf.setMaxLength(64); tf.setText(cfg.value == null ? "" : cfg.value); @@ -167,23 +170,27 @@ private static ClickableWidget buildFloatWidget(AttributeConfig cfg, TextRendere tf.setChangedListener(text -> { if (isStrictFloat(text)) { cfg.value = text; + onChanged.run(); } }); return tf; } private static ClickableWidget buildStringWidget(AttributeConfig cfg, TextRenderer textRenderer, - int width) { + int width, Runnable onChanged) { TextFieldWidget tf = new TextFieldWidget(textRenderer, 0, 0, width, 20, Text.empty()); tf.setMaxLength(128); tf.setText(cfg.value == null ? "" : cfg.value); - tf.setChangedListener(text -> cfg.value = text); + tf.setChangedListener(text -> { + cfg.value = text; + onChanged.run(); + }); return tf; } private static List buildVec3Widget(AttributeConfig cfg, TextRenderer textRenderer, - int componentWidth) { + int componentWidth, Runnable onChanged) { if (cfg.value == null || cfg.value.isEmpty()) { cfg.value = "0,0,0"; } @@ -200,6 +207,7 @@ private static List buildVec3Widget(AttributeConfig cfg, if (isStrictFloat(sx) && isStrictFloat(sy) && isStrictFloat(sz)) { cfg.value = sx + "," + sy + "," + sz; + onChanged.run(); } }; @@ -222,7 +230,7 @@ private static TextFieldWidget vecField(TextRenderer textRenderer, float v, int return tf; } - private static ClickableWidget buildIntRange(AttributeConfig cfg, String raw, int width) { + private static ClickableWidget buildIntRange(AttributeConfig cfg, String raw, int width, Runnable onChanged) { Range r = parseRange(raw); int start = (int) r.start; int end = (int) r.end; @@ -240,12 +248,12 @@ private static ClickableWidget buildIntRange(AttributeConfig cfg, String raw, in } cur = MathHelper.clamp(cur, start, end); - IntRangeSlider slider = new IntRangeSlider(0, 0, width, 20, start, end, cur, cfg); + IntRangeSlider slider = new IntRangeSlider(0, 0, width, 20, start, end, cur, cfg, onChanged); slider.updateMessage(); return slider; } - private static ClickableWidget buildFloatRange(AttributeConfig cfg, String raw, int width) { + private static ClickableWidget buildFloatRange(AttributeConfig cfg, String raw, int width, Runnable onChanged) { Range r = parseRange(raw); float start = (float) r.start; float end = (float) r.end; @@ -263,7 +271,7 @@ private static ClickableWidget buildFloatRange(AttributeConfig cfg, String raw, } cur = MathHelper.clamp(cur, start, end); - FloatRangeSlider slider = new FloatRangeSlider(0, 0, width, 20, start, end, cur, cfg); + FloatRangeSlider slider = new FloatRangeSlider(0, 0, width, 20, start, end, cur, cfg, onChanged); slider.updateMessage(); return slider; } @@ -336,14 +344,16 @@ private static class IntRangeSlider extends SliderWidget { private final int start; private final int end; private final AttributeConfig cfg; + private final Runnable onChanged; public IntRangeSlider(int x, int y, int width, int height, int start, int end, int cur, - AttributeConfig cfg) { + AttributeConfig cfg, Runnable onChanged) { super(x, y, width, height, Text.empty(), (cur - (double) start) / (double) (end - start)); this.start = start; this.end = end; this.cfg = cfg; + this.onChanged = onChanged; this.value = (cur - (double) start) / (double) (end - start); } @@ -363,6 +373,7 @@ protected void updateMessage() { protected void applyValue() { int v = MathHelper.clamp(current(), start, end); cfg.value = Integer.toString(v); + onChanged.run(); } } @@ -371,14 +382,16 @@ private static class FloatRangeSlider extends SliderWidget { private final float start; private final float end; private final AttributeConfig cfg; + private final Runnable onChanged; public FloatRangeSlider(int x, int y, int width, int height, float start, float end, float cur, - AttributeConfig cfg) { + AttributeConfig cfg, Runnable onChanged) { super(x, y, width, height, Text.empty(), (cur - start) / (double) (end - start)); this.start = start; this.end = end; this.cfg = cfg; + this.onChanged = onChanged; this.value = (cur - start) / (double) (end - start); } @@ -398,6 +411,7 @@ protected void updateMessage() { protected void applyValue() { float v = MathHelper.clamp(current(), start, end); cfg.value = formatTwoDecimals(v); + onChanged.run(); } } } diff --git a/src/main/java/com/radiance/client/gui/ModuleAttributeScreen.java b/src/main/java/com/radiance/client/gui/ModuleAttributeScreen.java index 56e816fe..29cd9a8d 100644 --- a/src/main/java/com/radiance/client/gui/ModuleAttributeScreen.java +++ b/src/main/java/com/radiance/client/gui/ModuleAttributeScreen.java @@ -57,7 +57,7 @@ protected void init() { for (AttributeConfig cfg : list) { List ws = AttributeWidgetUtil.buildWidgets(cfg, textRenderer, WIDGET_WIDTH, - VEC3_COMPONENT_WIDTH); + VEC3_COMPONENT_WIDTH, () -> {}); for (ClickableWidget w : ws) { addDrawableChild(w); } diff --git a/src/main/java/com/radiance/client/gui/RenderPipelineScreen.java b/src/main/java/com/radiance/client/gui/RenderPipelineScreen.java index c7795cc5..048c8a04 100644 --- a/src/main/java/com/radiance/client/gui/RenderPipelineScreen.java +++ b/src/main/java/com/radiance/client/gui/RenderPipelineScreen.java @@ -63,6 +63,7 @@ public class RenderPipelineScreen extends Screen { private ButtonWidget modeToggleBtn; private ButtonWidget secondaryBtn; + private boolean isDirty = false; private static final String RENDER_PIPELINE_PRESET_NAME = "render_pipeline.preset.name"; private static final String RENDER_PIPELINE_MODE_NAME = "render_pipeline.mode.name"; @@ -144,6 +145,7 @@ private void rebuildUI() { Pipeline.preparePipelineModeUI(); mode = Mode.PIPELINE; } + isDirty = false; rebuildUI(); }).dimensions(toggleX, 6, toggleW, 20).build()); @@ -189,6 +191,7 @@ private void rebuildUI() { } else { applyActivePreset(); } + isDirty = false; }).dimensions(secondaryX + secondaryW + 110, 6, 100, 20).build()); saveBtn.active = true; @@ -238,15 +241,18 @@ public void syncToPipeline() { } Pipeline.build(); + isDirty = false; refreshPipeline(); } @Override public void close() { - if (mode == Mode.PIPELINE) { - syncToPipeline(); - } else { - syncPresetToPipeline(); + if (isDirty) { + if (mode == Mode.PIPELINE) { + syncToPipeline(); + } else { + syncPresetToPipeline(); + } } MinecraftClient.getInstance().setScreen(parent); } @@ -554,6 +560,7 @@ private void handleLocalConnection(ImageConfig current, boolean isOutput) { if (!testCycle(src, dst)) { moduleConnections.removeIf(link -> link.dst == dst); moduleConnections.add(new ModuleConnection(src, dst)); + isDirty = true; } } pendingPort = null; @@ -607,6 +614,7 @@ private ImageConfig getClickedPort(ModuleNode node, double mouseX, double mouseY } private void deleteNode(ModuleNode node) { + isDirty = true; nodes.remove(node); moduleConnections.removeIf( link -> link.src.owner == node.module || link.dst.owner == node.module); @@ -680,6 +688,7 @@ public boolean mouseClicked(double mouseX, double mouseY, int button) { if (isConnected) { moduleConnections.removeIf( link -> link.src == current || link.dst == current); + isDirty = true; } else if (clickedOut != null) { if (localFinalOutput != null && localFinalOutput != current) { localFinalOutput.finalOutput = false; @@ -687,6 +696,7 @@ public boolean mouseClicked(double mouseX, double mouseY, int button) { localFinalOutput = (localFinalOutput == current) ? null : current; current.finalOutput = (localFinalOutput == current); + isDirty = true; } return true; } @@ -863,6 +873,7 @@ public boolean onClick(double mouseX, double mouseY) { ModuleNode newNode = new ModuleNode(module); newNode.updateWidth(textRenderer); nodes.add(newNode); + isDirty = true; return true; } return false; @@ -944,11 +955,12 @@ private void applyActivePreset() { private void syncPresetToPipeline() { Pipeline.savePipeline(); Pipeline.build(); + isDirty = false; refreshPipeline(); } private List buildPresetWidgets(AttributeConfig cfg) { - return AttributeWidgetUtil.buildWidgets(cfg, textRenderer, 200, 64); + return AttributeWidgetUtil.buildWidgets(cfg, textRenderer, 200, 64, () -> isDirty = true); } private class PresetSelector { From 9861972207c859cbc7d7a8b205a8464dc5b90eca Mon Sep 17 00:00:00 2001 From: Gabrieli2806 <[tu-email@ejemplo.com]> Date: Fri, 10 Apr 2026 08:01:11 -0500 Subject: [PATCH 03/13] i18n: add Spanish (es_es) translation --- .../resources/assets/radiance/lang/es_es.json | 170 ++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 src/main/resources/assets/radiance/lang/es_es.json diff --git a/src/main/resources/assets/radiance/lang/es_es.json b/src/main/resources/assets/radiance/lang/es_es.json new file mode 100644 index 00000000..216b683a --- /dev/null +++ b/src/main/resources/assets/radiance/lang/es_es.json @@ -0,0 +1,170 @@ +{ + "options.video.category.gameplay": "Jugabilidad", + "options.video.category.window": "Ventana", + "options.video.category.dlss": "DLSS", + "options.video.category.ray_tracing": "Trazado de Rayos", + "options.video.category.upscaler": "Escalador", + "options.video.category.terrain": "Construcción de Terreno", + "options.video.category.pipeline": "Configuración del Pipeline", + "options.video.dlss_mode.performance.tooltip": "Modo Rendimiento", + "options.video.dlss_mode.balanced.tooltip": "Modo Equilibrado", + "options.video.dlss_mode.quality.tooltip": "Modo Calidad", + "options.video.dlss_mode.dlaa.tooltip": "Modo DLAA", + "options.video.dlss_mode.performance": "Rendimiento", + "options.video.dlss_mode.balanced": "Equilibrado", + "options.video.dlss_mode.quality": "Calidad", + "options.video.dlss_mode.dlaa": "DLAA", + "options.video.dlss_mode": "Modo DLSS", + "options.video.upscaler_type": "Escalador", + "options.video.upscaler_type.native": "Nativo", + "options.video.upscaler_type.fsr3": "FSR3", + "options.video.upscaler_quality": "Calidad del Escalador", + "options.video.upscaler_quality.nativeaa": "AA Nativo", + "options.video.upscaler_quality.quality": "Calidad", + "options.video.upscaler_quality.balanced": "Equilibrado", + "options.video.upscaler_quality.performance": "Rendimiento", + "options.video.denoiser_mode": "Eliminador de Ruido", + "options.video.denoiser_mode.dlss": "DLSS", + "options.video.denoiser_mode.svgf": "SVGF", + "options.video.denoiser_mode.nrd": "NRD", + "options.video.denoiser_mode.temporal": "Acumulación Temporal", + "options.video.ray_bounces": "Rebotes de Rayos", + "options.video.chunk_building_batch_size": "Cantidad de chunks a construir en un envío", + "options.video.chunk_building_total_batches": "Cantidad de lotes de chunks en construcción", + "options.video.pipeline_setup": "Configurar Pipeline...", + "render_pipeline_screen.back": "Volver", + "render_pipeline_screen.save_and_build": "Guardar y Compilar", + "render_pipeline_screen.reload": "Recargar", + "render_pipeline_screen.add_module": "Añadir Módulo", + "render_pipeline_screen.back_hint": "Pantalla de Pipeline Experimental (pulsa ESC o haz clic en Volver para regresar)", + "render_pipeline.module.dlss.name": "DLSS", + "render_pipeline.module.dlss.attribute.mode": "Modo", + "render_pipeline.module.dlss.attribute.mode.performance": "Rendimiento", + "render_pipeline.module.dlss.attribute.mode.balanced": "Equilibrado", + "render_pipeline.module.dlss.attribute.mode.quality": "Calidad", + "render_pipeline.module.dlss.attribute.mode.dlaa": "DLAA", + "render_pipeline.module.ray_tracing.name": "Trazado de Rayos", + "render_pipeline.module.ray_tracing.attribute.num_ray_bounces": "Número de Rebotes de Rayos", + "render_pipeline.module.ray_tracing.attribute.use_jitter": "Usar Jitter", + "render_pipeline.module.ray_tracing.attribute.pbr_sampling_mode": "Modo de Muestreo PBR", + "render_pipeline.module.ray_tracing.attribute.pbr_sampling.nearest": "Más Cercano", + "render_pipeline.module.ray_tracing.attribute.pbr_sampling.bilinear": "Bilineal", + "render_pipeline.module.ray_tracing.attribute.transparent_split_mode": "Modo de División Transparente", + "render_pipeline.module.ray_tracing.attribute.transparent_split_mode.deterministic": "Determinístico", + "render_pipeline.module.ray_tracing.attribute.transparent_split_mode.stochastic": "Estocástico", + "render_pipeline.module.ray_tracing.attribute.direct_light_strength": "Intensidad de Luz Directa", + "render_pipeline.module.ray_tracing.attribute.indirect_light_strength": "Intensidad de Luz Indirecta", + "render_pipeline.module.ray_tracing.attribute.basic_radiance": "Radiancia Básica", + "render_pipeline.module.ray_tracing.attribute.atmosphere_planet_radius": "Radio del Planeta", + "render_pipeline.module.ray_tracing.attribute.atmosphere_top_radius": "Radio Superior de la Atmósfera", + "render_pipeline.module.ray_tracing.attribute.rayleigh_scale_height": "Altura de Escala Rayleigh", + "render_pipeline.module.ray_tracing.attribute.mie_scale_height": "Altura de Escala Mie", + "render_pipeline.module.ray_tracing.attribute.rayleigh_scattering_coefficient": "Coef. de Dispersión Rayleigh", + "render_pipeline.module.ray_tracing.attribute.mie_anisotropy": "Anisotropía Mie", + "render_pipeline.module.ray_tracing.attribute.mie_scattering_coefficient": "Coef. de Dispersión Mie", + "render_pipeline.module.ray_tracing.attribute.minimum_view_cosine": "Tamaño Celeste", + "render_pipeline.module.ray_tracing.attribute.sun_radiance": "Radiancia Solar", + "render_pipeline.module.ray_tracing.attribute.moon_radiance": "Radiancia Lunar", + "render_pipeline.module.ray_tracing.attribute.use_sharc": "Usar SHaRC", + "render_pipeline.module.ray_tracing.attribute.sharc_debug_mode": "Modo Debug SHaRC", + "render_pipeline.module.ray_tracing.attribute.shader_pack_path": "Pack de Shaders (vacío=integrado)", + "render_pipeline.module.temporal_accumulation.name": "Acumulación Temporal", + "render_pipeline.module.tone_mapping.name": "Mapeado de Tonos", + "render_pipeline.module.tone_mapping.attribute.method": "Método", + "render_pipeline.module.tone_mapping.attribute.method.pbr_neutral": "PBR Neutro", + "render_pipeline.module.tone_mapping.attribute.method.reinhard": "Reinhard", + "render_pipeline.module.tone_mapping.attribute.method.reinhard_white_point": "Reinhard (Punto Blanco)", + "render_pipeline.module.tone_mapping.attribute.method.aces": "ACES Ajustado", + "render_pipeline.module.tone_mapping.attribute.method.aces_white_point": "ACES Ajustado (Punto Blanco)", + "render_pipeline.module.tone_mapping.attribute.method.uncharted2": "Uncharted2", + "render_pipeline.module.tone_mapping.attribute.middle_grey": "Gris Medio", + "render_pipeline.module.tone_mapping.attribute.exposure_up_speed": "Velocidad de Subida de Exposición", + "render_pipeline.module.tone_mapping.attribute.exposure_down_speed": "Velocidad de Bajada de Exposición", + "render_pipeline.module.tone_mapping.attribute.log2_luminance_min": "Luminancia Mín. (Log2)", + "render_pipeline.module.tone_mapping.attribute.log2_luminance_max": "Luminancia Máx. (Log2)", + "render_pipeline.module.tone_mapping.attribute.low_percent": "Porcentaje Bajo", + "render_pipeline.module.tone_mapping.attribute.high_percent": "Porcentaje Alto", + "render_pipeline.module.tone_mapping.attribute.min_exposure": "Exposición Mínima", + "render_pipeline.module.tone_mapping.attribute.max_exposure": "Exposición Máxima", + "render_pipeline.module.tone_mapping.attribute.enable_auto_exposure": "Habilitar Auto-Exposición", + "render_pipeline.module.tone_mapping.attribute.exposure_metering_mode": "Modo de Medición de Exposición", + "render_pipeline.module.tone_mapping.attribute.exposure_metering_mode.global": "Global", + "render_pipeline.module.tone_mapping.attribute.exposure_metering_mode.center": "Centrado", + "render_pipeline.module.tone_mapping.attribute.center_metering_percent": "Porcentaje de Medición Central", + "render_pipeline.module.tone_mapping.attribute.manual_exposure": "Exposición Manual", + "render_pipeline.module.tone_mapping.attribute.exposure_bias": "Sesgo de Exposición", + "render_pipeline.module.tone_mapping.attribute.white_point": "Punto Blanco", + "render_pipeline.module.tone_mapping.attribute.saturation": "Saturación", + "render_pipeline.module.tone_mapping.attribute.clamp_output": "Limitar Salida", + "render_pipeline.module.post_render.name": "Post Procesado", + "render_pipeline.module.post_render.attribute.star_count": "Cantidad de Estrellas", + "render_pipeline.module.post_render.attribute.star_min_size": "Tamaño Mínimo de Estrella", + "render_pipeline.module.post_render.attribute.star_max_size": "Tamaño Máximo de Estrella", + "render_pipeline.module.post_render.attribute.star_radius": "Radio de Estrella", + "render_pipeline.module.fsr_upscaler.name": "Escalador FSR3", + "render_pipeline.module.fsr_upscaler.attribute.enable": "Habilitar Escalador FSR3", + "render_pipeline.module.fsr_upscaler.attribute.quality_mode": "Modo de Calidad", + "render_pipeline.module.fsr_upscaler.attribute.quality_mode.native": "AA Nativo", + "render_pipeline.module.fsr_upscaler.attribute.quality_mode.quality": "Calidad", + "render_pipeline.module.fsr_upscaler.attribute.quality_mode.balanced": "Equilibrado", + "render_pipeline.module.fsr_upscaler.attribute.quality_mode.performance": "Rendimiento", + "render_pipeline.module.fsr_upscaler.attribute.quality_mode.ultra": "Ultra Rendimiento", + "render_pipeline.module.fsr_upscaler.attribute.sharpness": "Nitidez", + "render_pipeline.module.xess_sr.name": "Escalador XeSS", + "render_pipeline.module.xess_sr.attribute.enable": "Habilitar Escalador XeSS", + "render_pipeline.module.xess_sr.attribute.quality_mode": "Modo de Calidad", + "render_pipeline.module.xess_sr.attribute.quality_mode.native": "AA Nativo", + "render_pipeline.module.xess_sr.attribute.quality_mode.ultra_quality_plus": "Ultra Calidad Plus", + "render_pipeline.module.xess_sr.attribute.quality_mode.ultra_quality": "Ultra Calidad", + "render_pipeline.module.xess_sr.attribute.quality_mode.quality": "Calidad", + "render_pipeline.module.xess_sr.attribute.quality_mode.balanced": "Equilibrado", + "render_pipeline.module.xess_sr.attribute.quality_mode.performance": "Rendimiento", + "render_pipeline.module.xess_sr.attribute.quality_mode.ultra_performance": "Ultra Rendimiento", + "render_pipeline.module.xess_sr.attribute.pre_exposure": "Pre-Exposición", + "render_pipeline.module.nrd.name": "NRD", + "render_pipeline.module.nrd.attribute.antilag_luminance_sigma_scale": "Escala Sigma Luminancia Antilag", + "render_pipeline.module.nrd.attribute.antilag_luminance_sensitivity": "Sensibilidad Luminancia Antilag", + "render_pipeline.module.nrd.attribute.max_accumulated_frame_num": "Máx. Fotogramas Acumulados", + "render_pipeline.module.nrd.attribute.max_fast_accumulated_frame_num": "Máx. Fotogramas Acumulados Rápidos", + "render_pipeline.module.nrd.attribute.history_fix_frame_num": "Fotogramas de Corrección de Historial", + "render_pipeline.module.nrd.attribute.history_fix_base_pixel_stride": "Paso de Píxel Base de Corrección", + "render_pipeline.module.nrd.attribute.history_fix_alternate_pixel_stride": "Paso de Píxel Alt. de Corrección", + "render_pipeline.module.nrd.attribute.fast_history_clamping_sigma_scale": "Escala Sigma de Limitación de Historial Rápido", + "render_pipeline.module.nrd.attribute.diffuse_prepass_blur_radius": "Radio de Desenfoque Prepass Difuso", + "render_pipeline.module.nrd.attribute.specular_prepass_blur_radius": "Radio de Desenfoque Prepass Especular", + "render_pipeline.module.nrd.attribute.min_hit_distance_weight": "Peso Mínimo de Distancia de Impacto", + "render_pipeline.module.nrd.attribute.min_blur_radius": "Radio Mínimo de Desenfoque", + "render_pipeline.module.nrd.attribute.max_blur_radius": "Radio Máximo de Desenfoque", + "render_pipeline.module.nrd.attribute.lobe_angle_fraction": "Fracción de Ángulo de Lóbulo", + "render_pipeline.module.nrd.attribute.roughness_fraction": "Fracción de Rugosidad", + "render_pipeline.module.nrd.attribute.plane_distance_sensitivity": "Sensibilidad de Distancia de Plano", + "render_pipeline.module.nrd.attribute.specular_probability_thresholds_for_mv_modification_min": "Umbral MV Especular Mín.", + "render_pipeline.module.nrd.attribute.specular_probability_thresholds_for_mv_modification_max": "Umbral MV Especular Máx.", + "render_pipeline.module.nrd.attribute.firefly_suppressor_min_relative_scale": "Escala Relativa Mín. Supresor de Fireflies", + "render_pipeline.module.nrd.attribute.min_material_for_diffuse": "Material Mín. para Difuso", + "render_pipeline.module.nrd.attribute.min_material_for_specular": "Material Mín. para Especular", + "render_pipeline.module.nrd.attribute.checkerboard_mode": "Modo Tablero de Ajedrez", + "render_pipeline.module.nrd.attribute.enable_anti_firefly": "Habilitar Anti-Firefly", + "render_pipeline.module.nrd.attribute.hit_distance_reconstruction_mode": "Modo de Reconstrucción de Distancia de Impacto", + "render_pipeline.module.nrd.attribute.max_stabilized_frame_num": "Máx. Fotogramas Estabilizados", + "render_pipeline.module.nrd.attribute.specular_probability_threshold_low": "Umbral Prob. Especular Bajo", + "render_pipeline.module.nrd.attribute.specular_probability_threshold_high": "Umbral Prob. Especular Alto", + "render_pipeline.module.nrd.attribute.responsive_accumulation_roughness_threshold": "Umbral Rugosidad Acum. Responsiva", + "render_pipeline.module.nrd.attribute.responsive_accumulation_min_accumulated_frame_num": "Fotogramas Mín. Acum. Responsiva", + "render_pipeline.module.nrd.attribute.disocclusion_threshold": "Umbral de Desoclusión", + "render_pipeline.module.nrd.attribute.disocclusion_threshold_alternate": "Umbral de Desoclusión Alt.", + "render_pipeline.module.temporal_accumulation.attribute.alpha": "Alfa (Peso del Historial)", + "render_pipeline.module.temporal_accumulation.attribute.depth_threshold": "Umbral de Profundidad", + "render_pipeline.module.temporal_accumulation.attribute.depth_scale": "Escala de Profundidad", + "module_attribute_screen.no_attributes": "Sin Atributos", + "render_pipeline.preset.name": "Preset", + "render_pipeline.preset.rt_dlss": "RT-DLSSRR", + "render_pipeline.preset.rt_nrd": "RT-NRD", + "render_pipeline.preset.rt_nrd_fsr": "RT-NRD-FSR", + "render_pipeline.preset.rt_nrd_xess": "RT-NRD-XeSS", + "render_pipeline.mode.name": "Modo", + "render_pipeline.mode.pipeline": "Pipeline", + "render_pipeline.mode.preset": "Preset", + "render_pipeline.true": "Verdadero", + "render_pipeline.false": "Falso" +} From f8faffad958b3414d28fdf0cddf3111c152067c7 Mon Sep 17 00:00:00 2001 From: Gabrieli2806 <[tu-email@ejemplo.com]> Date: Fri, 10 Apr 2026 08:09:17 -0500 Subject: [PATCH 04/13] i18n: use Si/No for booleans in es_es --- src/main/resources/assets/radiance/lang/es_es.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/assets/radiance/lang/es_es.json b/src/main/resources/assets/radiance/lang/es_es.json index 216b683a..ccdb37c4 100644 --- a/src/main/resources/assets/radiance/lang/es_es.json +++ b/src/main/resources/assets/radiance/lang/es_es.json @@ -165,6 +165,6 @@ "render_pipeline.mode.name": "Modo", "render_pipeline.mode.pipeline": "Pipeline", "render_pipeline.mode.preset": "Preset", - "render_pipeline.true": "Verdadero", - "render_pipeline.false": "Falso" + "render_pipeline.true": "Sí", + "render_pipeline.false": "No" } From d5d74031f42bef75780b79ac1382b37a297ea991 Mon Sep 17 00:00:00 2001 From: Gabrieli2806 <[tu-email@ejemplo.com]> Date: Fri, 10 Apr 2026 08:15:22 -0500 Subject: [PATCH 05/13] fix(gui): eliminate pipeline build on every menu open/close - Add isDirty flag to RenderPipelineScreen; close() only calls build() when the user actually changed something - Add idempotency guard to Pipeline.switchToPresetMode to skip rebuild when already in the same preset - Remove duplicate switchToPresetMode call in rebuildUI (applyActivePreset already calls it) - Move node.updateWidth() from render() loop to refreshPipeline() - Add Runnable onChanged param to AttributeWidgetUtil.buildWidgets and all sub-builders; fires isDirty=true on user edits in preset mode - Mark isDirty=true on structural changes: add/remove/connect modules, open attribute editor - Clear isDirty on Save, Reload, and mode toggle --- .../client/gui/AttributeWidgetUtil.java | 43 +++++++++++-------- .../client/gui/RenderPipelineScreen.java | 22 ++++------ .../radiance/client/pipeline/Pipeline.java | 29 ------------- 3 files changed, 34 insertions(+), 60 deletions(-) diff --git a/src/main/java/com/radiance/client/gui/AttributeWidgetUtil.java b/src/main/java/com/radiance/client/gui/AttributeWidgetUtil.java index 505946da..a92ac44e 100644 --- a/src/main/java/com/radiance/client/gui/AttributeWidgetUtil.java +++ b/src/main/java/com/radiance/client/gui/AttributeWidgetUtil.java @@ -82,6 +82,12 @@ static int totalWidgetWidth(List widgets, int singleWidth, int return singleWidth; } + static List buildWidgets(AttributeConfig cfg, TextRenderer textRenderer, + int width, + int vec3ComponentWidth) { + return buildWidgets(cfg, textRenderer, width, vec3ComponentWidth, () -> {}); + } + static List buildWidgets(AttributeConfig cfg, TextRenderer textRenderer, int width, int vec3ComponentWidth, Runnable onChanged) { @@ -92,11 +98,11 @@ static List buildWidgets(AttributeConfig cfg, TextRenderer text } if (type.startsWith("int_range:")) { - return List.of(buildIntRange(cfg, cfg.type.substring(10), width, onChanged)); + return List.of(buildIntRange(cfg, cfg.type.substring(10), width)); } if (type.startsWith("float_range:")) { - return List.of(buildFloatRange(cfg, cfg.type.substring(12), width, onChanged)); + return List.of(buildFloatRange(cfg, cfg.type.substring(12), width)); } return switch (type) { @@ -109,7 +115,8 @@ static List buildWidgets(AttributeConfig cfg, TextRenderer text }; } - private static ClickableWidget buildBoolWidget(AttributeConfig cfg, int width, Runnable onChanged) { + private static ClickableWidget buildBoolWidget(AttributeConfig cfg, int width, + Runnable onChanged) { boolean b = "render_pipeline.true".equalsIgnoreCase(cfg.value); return ButtonWidget.builder( Text.translatable(b ? "render_pipeline.true" : "render_pipeline.false"), btn -> { @@ -120,7 +127,8 @@ private static ClickableWidget buildBoolWidget(AttributeConfig cfg, int width, R }).dimensions(0, 0, width, 20).build(); } - private static ClickableWidget buildEnumWidget(AttributeConfig cfg, String raw, int width, Runnable onChanged) { + private static ClickableWidget buildEnumWidget(AttributeConfig cfg, String raw, int width, + Runnable onChanged) { String[] values = raw.isEmpty() ? new String[]{""} : raw.split("-"); int idx = 0; if (cfg.value != null) { @@ -176,7 +184,8 @@ private static ClickableWidget buildFloatWidget(AttributeConfig cfg, TextRendere return tf; } - private static ClickableWidget buildStringWidget(AttributeConfig cfg, TextRenderer textRenderer, + private static ClickableWidget buildStringWidget(AttributeConfig cfg, + TextRenderer textRenderer, int width, Runnable onChanged) { TextFieldWidget tf = new TextFieldWidget(textRenderer, 0, 0, width, 20, Text.empty()); tf.setMaxLength(128); @@ -215,7 +224,11 @@ private static List buildVec3Widget(AttributeConfig cfg, y.setChangedListener(s -> syncIfValid.run()); z.setChangedListener(s -> syncIfValid.run()); - syncIfValid.run(); + // Normalize initial value without firing onChanged + String sx0 = x.getText(), sy0 = y.getText(), sz0 = z.getText(); + if (isStrictFloat(sx0) && isStrictFloat(sy0) && isStrictFloat(sz0)) { + cfg.value = sx0 + "," + sy0 + "," + sz0; + } return List.of(x, y, z); } @@ -230,7 +243,7 @@ private static TextFieldWidget vecField(TextRenderer textRenderer, float v, int return tf; } - private static ClickableWidget buildIntRange(AttributeConfig cfg, String raw, int width, Runnable onChanged) { + private static ClickableWidget buildIntRange(AttributeConfig cfg, String raw, int width) { Range r = parseRange(raw); int start = (int) r.start; int end = (int) r.end; @@ -248,12 +261,12 @@ private static ClickableWidget buildIntRange(AttributeConfig cfg, String raw, in } cur = MathHelper.clamp(cur, start, end); - IntRangeSlider slider = new IntRangeSlider(0, 0, width, 20, start, end, cur, cfg, onChanged); + IntRangeSlider slider = new IntRangeSlider(0, 0, width, 20, start, end, cur, cfg); slider.updateMessage(); return slider; } - private static ClickableWidget buildFloatRange(AttributeConfig cfg, String raw, int width, Runnable onChanged) { + private static ClickableWidget buildFloatRange(AttributeConfig cfg, String raw, int width) { Range r = parseRange(raw); float start = (float) r.start; float end = (float) r.end; @@ -271,7 +284,7 @@ private static ClickableWidget buildFloatRange(AttributeConfig cfg, String raw, } cur = MathHelper.clamp(cur, start, end); - FloatRangeSlider slider = new FloatRangeSlider(0, 0, width, 20, start, end, cur, cfg, onChanged); + FloatRangeSlider slider = new FloatRangeSlider(0, 0, width, 20, start, end, cur, cfg); slider.updateMessage(); return slider; } @@ -344,16 +357,14 @@ private static class IntRangeSlider extends SliderWidget { private final int start; private final int end; private final AttributeConfig cfg; - private final Runnable onChanged; public IntRangeSlider(int x, int y, int width, int height, int start, int end, int cur, - AttributeConfig cfg, Runnable onChanged) { + AttributeConfig cfg) { super(x, y, width, height, Text.empty(), (cur - (double) start) / (double) (end - start)); this.start = start; this.end = end; this.cfg = cfg; - this.onChanged = onChanged; this.value = (cur - (double) start) / (double) (end - start); } @@ -373,7 +384,6 @@ protected void updateMessage() { protected void applyValue() { int v = MathHelper.clamp(current(), start, end); cfg.value = Integer.toString(v); - onChanged.run(); } } @@ -382,16 +392,14 @@ private static class FloatRangeSlider extends SliderWidget { private final float start; private final float end; private final AttributeConfig cfg; - private final Runnable onChanged; public FloatRangeSlider(int x, int y, int width, int height, float start, float end, float cur, - AttributeConfig cfg, Runnable onChanged) { + AttributeConfig cfg) { super(x, y, width, height, Text.empty(), (cur - start) / (double) (end - start)); this.start = start; this.end = end; this.cfg = cfg; - this.onChanged = onChanged; this.value = (cur - start) / (double) (end - start); } @@ -411,7 +419,6 @@ protected void updateMessage() { protected void applyValue() { float v = MathHelper.clamp(current(), start, end); cfg.value = formatTwoDecimals(v); - onChanged.run(); } } } diff --git a/src/main/java/com/radiance/client/gui/RenderPipelineScreen.java b/src/main/java/com/radiance/client/gui/RenderPipelineScreen.java index 048c8a04..99f256cd 100644 --- a/src/main/java/com/radiance/client/gui/RenderPipelineScreen.java +++ b/src/main/java/com/radiance/client/gui/RenderPipelineScreen.java @@ -54,6 +54,7 @@ public class RenderPipelineScreen extends Screen { private boolean isPanning = false; private Mode mode = Mode.PIPELINE; + private boolean isDirty = false; private final List presets = new ArrayList<>(); private PresetEntry activePreset = null; private PresetSelector activePresetSelector = null; @@ -63,7 +64,6 @@ public class RenderPipelineScreen extends Screen { private ButtonWidget modeToggleBtn; private ButtonWidget secondaryBtn; - private boolean isDirty = false; private static final String RENDER_PIPELINE_PRESET_NAME = "render_pipeline.preset.name"; private static final String RENDER_PIPELINE_MODE_NAME = "render_pipeline.mode.name"; @@ -138,11 +138,11 @@ private void rebuildUI() { if (activePreset == null && !presets.isEmpty()) { activePreset = presets.getFirst(); } - Pipeline.preparePresetModeUI( + Pipeline.switchToPresetMode( activePreset != null ? activePreset.name() : "Default"); mode = Mode.PRESET; } else { - Pipeline.preparePipelineModeUI(); + Pipeline.switchToPipelineMode(); mode = Mode.PIPELINE; } isDirty = false; @@ -182,6 +182,7 @@ private void rebuildUI() { } else { syncPresetToPipeline(); } + isDirty = false; }).dimensions(secondaryX + secondaryW + 5, 6, 100, 20).build()); ButtonWidget reloadBtn = addDrawableChild( @@ -241,7 +242,6 @@ public void syncToPipeline() { } Pipeline.build(); - isDirty = false; refreshPipeline(); } @@ -474,7 +474,7 @@ private void drawModuleNode(DrawContext context, ModuleNode moduleNode) { context.drawTexture(RenderLayer::getGuiTextured, GEAR_TEX, gearX, btnY, 0, 0, btnSize, btnSize, btnSize, btnSize); - context.drawTextWithShadow(textRenderer, "×", deleteX + 3, btnY + 2, 0xFFFF5A5A); + context.drawTextWithShadow(textRenderer, "├ù", deleteX + 3, btnY + 2, 0xFFFF5A5A); for (int i = 0; i < moduleNode.rows(); i++) { int ry = y + moduleNode.headerH + moduleNode.pad + i * moduleNode.rowH + 7; @@ -666,6 +666,7 @@ public boolean mouseClicked(double mouseX, double mouseY, int button) { } if (button == 0 && isGearClicked(node, mouseX, mouseY)) { + isDirty = true; MinecraftClient.getInstance() .setScreen(new ModuleAttributeScreen(this, node.module)); return true; @@ -688,7 +689,6 @@ public boolean mouseClicked(double mouseX, double mouseY, int button) { if (isConnected) { moduleConnections.removeIf( link -> link.src == current || link.dst == current); - isDirty = true; } else if (clickedOut != null) { if (localFinalOutput != null && localFinalOutput != current) { localFinalOutput.finalOutput = false; @@ -696,7 +696,6 @@ public boolean mouseClicked(double mouseX, double mouseY, int button) { localFinalOutput = (localFinalOutput == current) ? null : current; current.finalOutput = (localFinalOutput == current); - isDirty = true; } return true; } @@ -870,9 +869,7 @@ public boolean onClick(double mouseX, double mouseY) { Module module = selected.loadModule(); module.x = 100; module.y = 100; - ModuleNode newNode = new ModuleNode(module); - newNode.updateWidth(textRenderer); - nodes.add(newNode); + nodes.add(new ModuleNode(module)); isDirty = true; return true; } @@ -922,7 +919,7 @@ private void applyActivePreset() { return; } - Pipeline.preparePresetModeUI(activePreset.name()); + Pipeline.switchToPresetMode(activePreset.name()); List modules = new ArrayList<>(Pipeline.INSTANCE.getModules()); @@ -935,7 +932,6 @@ private void applyActivePreset() { for (AttributeConfig cfg : m.attributeConfigs) { List ws = buildPresetWidgets(cfg); for (ClickableWidget w : ws) { - w.visible = false; presetWidgets.add(addDrawableChild(w)); } block.rows.add(new PresetRow(cfg, ws)); @@ -955,7 +951,6 @@ private void applyActivePreset() { private void syncPresetToPipeline() { Pipeline.savePipeline(); Pipeline.build(); - isDirty = false; refreshPipeline(); } @@ -1001,6 +996,7 @@ public boolean onClick(double mouseX, double mouseY) { if (index >= 0 && index < options.size()) { activePreset = options.get(index); presetScrollY = 0; + Pipeline.switchToPresetMode(activePreset != null ? activePreset.name() : "Default"); applyActivePreset(); return true; } diff --git a/src/main/java/com/radiance/client/pipeline/Pipeline.java b/src/main/java/com/radiance/client/pipeline/Pipeline.java index e64c997d..8646be10 100644 --- a/src/main/java/com/radiance/client/pipeline/Pipeline.java +++ b/src/main/java/com/radiance/client/pipeline/Pipeline.java @@ -889,35 +889,6 @@ public static void switchToPresetMode(String presetName) { build(); } - /** - * Assembles preset pipeline data in memory for UI display only. - * Does NOT call build() or savePipeline() — call those explicitly when applying. - */ - public static void preparePresetModeUI(String presetName) { - String processedPresetName = processPresetName(presetName); - if (INSTANCE.mode == PipelineMode.PRESET - && Objects.equals(INSTANCE.activePresetName, processedPresetName)) { - return; - } - List carryOverModules = capturePresetModules(); - INSTANCE.mode = PipelineMode.PRESET; - assemblePreset(processedPresetName); - PipelineConfigStorage storage = loadConfigStorage(); - if (storage != null && Objects.equals(storage.mode, PipelineMode.PRESET.name()) - && Objects.equals(storage.presetName, INSTANCE.activePresetName)) { - applyPresetModuleOverrides(storage.presetModules); - } - applyPresetModuleOverrides(carryOverModules); - } - - /** - * Sets pipeline mode to PIPELINE for UI display only. - * Does NOT call build() or savePipeline() — call those explicitly when applying. - */ - public static void preparePipelineModeUI() { - INSTANCE.mode = PipelineMode.PIPELINE; - } - public static void assemblePreset(String presetName) { String processedPresetName = processPresetName(presetName); if (processedPresetName == null) { From b0df38fa9bdb022c75f3cebcd55bc5751621b9c9 Mon Sep 17 00:00:00 2001 From: Gabrieli2806 <[tu-email@ejemplo.com]> Date: Sat, 11 Apr 2026 01:36:00 -0500 Subject: [PATCH 06/13] feat(dlss): add Ultra Performance mode --- src/main/java/com/radiance/client/option/DLSSMode.java | 10 ++++++---- src/main/java/com/radiance/client/option/Options.java | 2 ++ src/main/resources/assets/radiance/lang/en_us.json | 3 +++ src/main/resources/assets/radiance/lang/es_es.json | 3 +++ src/main/resources/assets/radiance/lang/zh_cn.json | 3 +++ src/main/resources/modules/dlss.yaml | 2 +- 6 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/radiance/client/option/DLSSMode.java b/src/main/java/com/radiance/client/option/DLSSMode.java index 8923a562..459d796d 100644 --- a/src/main/java/com/radiance/client/option/DLSSMode.java +++ b/src/main/java/com/radiance/client/option/DLSSMode.java @@ -4,16 +4,18 @@ import static com.radiance.client.option.Options.DLSS_MODE_DLAA; import static com.radiance.client.option.Options.DLSS_MODE_PERFORMANCE; import static com.radiance.client.option.Options.DLSS_MODE_QUALITY; +import static com.radiance.client.option.Options.DLSS_MODE_ULTRA_PERFORMANCE; import com.mojang.serialization.Codec; import net.minecraft.util.StringIdentifiable; import net.minecraft.util.TranslatableOption; public enum DLSSMode implements TranslatableOption, StringIdentifiable { - PERFORMANCE(0, "performance", DLSS_MODE_PERFORMANCE), - BALANCED(1, "balanced", DLSS_MODE_BALANCED), - QUALITY(2, "quality", DLSS_MODE_QUALITY), - DLAA(3, "dlaa", DLSS_MODE_DLAA); + ULTRA_PERFORMANCE(0, "ultra_performance", DLSS_MODE_ULTRA_PERFORMANCE), + PERFORMANCE(1, "performance", DLSS_MODE_PERFORMANCE), + BALANCED(2, "balanced", DLSS_MODE_BALANCED), + QUALITY(3, "quality", DLSS_MODE_QUALITY), + DLAA(4, "dlaa", DLSS_MODE_DLAA); public static final Codec Codec = StringIdentifiable.createCodec(DLSSMode::values); private final int ordinal; diff --git a/src/main/java/com/radiance/client/option/Options.java b/src/main/java/com/radiance/client/option/Options.java index 39830f93..7132299a 100644 --- a/src/main/java/com/radiance/client/option/Options.java +++ b/src/main/java/com/radiance/client/option/Options.java @@ -20,11 +20,13 @@ public class Options { public static final String CATEGORY_TERRAIN = "options.video.category.terrain"; public static final String CATEGORY_PIPELINE = "options.video.category.pipeline"; + public static final String DLSS_MODE_ULTRA_PERFORMANCE_TOOLTIP = "options.video.dlss_mode.ultra_performance.tooltip"; public static final String DLSS_MODE_PERFORMANCE_TOOLTIP = "options.video.dlss_mode.performance.tooltip"; public static final String DLSS_MODE_BALANCED_TOOLTIP = "options.video.dlss_mode.balanced.tooltip"; public static final String DLSS_MODE_QUALITY_TOOLTIP = "options.video.dlss_mode.quality.tooltip"; public static final String DLSS_MODE_DLAA_TOOLTIP = "options.video.dlss_mode.dlaa.tooltip"; + public static final String DLSS_MODE_ULTRA_PERFORMANCE = "options.video.dlss_mode.ultra_performance"; public static final String DLSS_MODE_PERFORMANCE = "options.video.dlss_mode.performance"; public static final String DLSS_MODE_BALANCED = "options.video.dlss_mode.balanced"; public static final String DLSS_MODE_QUALITY = "options.video.dlss_mode.quality"; diff --git a/src/main/resources/assets/radiance/lang/en_us.json b/src/main/resources/assets/radiance/lang/en_us.json index 605fcb85..97051a66 100644 --- a/src/main/resources/assets/radiance/lang/en_us.json +++ b/src/main/resources/assets/radiance/lang/en_us.json @@ -6,10 +6,12 @@ "options.video.category.upscaler": "Upscaler", "options.video.category.terrain": "Terrain Build", "options.video.category.pipeline": "Pipeline Setup", + "options.video.dlss_mode.ultra_performance.tooltip": "Ultra Performance Mode", "options.video.dlss_mode.performance.tooltip": "Performance Mode", "options.video.dlss_mode.balanced.tooltip": "Balanced Mode", "options.video.dlss_mode.quality.tooltip": "Quality Mode", "options.video.dlss_mode.dlaa.tooltip": "DLAA Mode", + "options.video.dlss_mode.ultra_performance": "Ultra Performance", "options.video.dlss_mode.performance": "Performance Mode", "options.video.dlss_mode.balanced": "Balanced Mode", "options.video.dlss_mode.quality": "Quality Mode", @@ -39,6 +41,7 @@ "render_pipeline_screen.back_hint": "Experimental Render Pipeline Screen (press ESC or click Back to return)", "render_pipeline.module.dlss.name": "DLSS", "render_pipeline.module.dlss.attribute.mode": "Mode", + "render_pipeline.module.dlss.attribute.mode.ultra_performance": "Ultra Performance", "render_pipeline.module.dlss.attribute.mode.performance": "Performance", "render_pipeline.module.dlss.attribute.mode.balanced": "Balanced", "render_pipeline.module.dlss.attribute.mode.quality": "Quality", diff --git a/src/main/resources/assets/radiance/lang/es_es.json b/src/main/resources/assets/radiance/lang/es_es.json index ccdb37c4..dd1ce064 100644 --- a/src/main/resources/assets/radiance/lang/es_es.json +++ b/src/main/resources/assets/radiance/lang/es_es.json @@ -6,10 +6,12 @@ "options.video.category.upscaler": "Escalador", "options.video.category.terrain": "Construcción de Terreno", "options.video.category.pipeline": "Configuración del Pipeline", + "options.video.dlss_mode.ultra_performance.tooltip": "Modo Ultra Rendimiento", "options.video.dlss_mode.performance.tooltip": "Modo Rendimiento", "options.video.dlss_mode.balanced.tooltip": "Modo Equilibrado", "options.video.dlss_mode.quality.tooltip": "Modo Calidad", "options.video.dlss_mode.dlaa.tooltip": "Modo DLAA", + "options.video.dlss_mode.ultra_performance": "Ultra Rendimiento", "options.video.dlss_mode.performance": "Rendimiento", "options.video.dlss_mode.balanced": "Equilibrado", "options.video.dlss_mode.quality": "Calidad", @@ -39,6 +41,7 @@ "render_pipeline_screen.back_hint": "Pantalla de Pipeline Experimental (pulsa ESC o haz clic en Volver para regresar)", "render_pipeline.module.dlss.name": "DLSS", "render_pipeline.module.dlss.attribute.mode": "Modo", + "render_pipeline.module.dlss.attribute.mode.ultra_performance": "Ultra Rendimiento", "render_pipeline.module.dlss.attribute.mode.performance": "Rendimiento", "render_pipeline.module.dlss.attribute.mode.balanced": "Equilibrado", "render_pipeline.module.dlss.attribute.mode.quality": "Calidad", diff --git a/src/main/resources/assets/radiance/lang/zh_cn.json b/src/main/resources/assets/radiance/lang/zh_cn.json index 82bd4255..e405bddd 100644 --- a/src/main/resources/assets/radiance/lang/zh_cn.json +++ b/src/main/resources/assets/radiance/lang/zh_cn.json @@ -6,10 +6,12 @@ "options.video.category.upscaler": "超分", "options.video.category.terrain": "地形构建", "options.video.category.pipeline": "管线设置", + "options.video.dlss_mode.ultra_performance.tooltip": "超级性能模式", "options.video.dlss_mode.performance.tooltip": "性能模式", "options.video.dlss_mode.balanced.tooltip": "平衡模式", "options.video.dlss_mode.quality.tooltip": "质量模式", "options.video.dlss_mode.dlaa.tooltip": "DLAA模式", + "options.video.dlss_mode.ultra_performance": "超级性能", "options.video.dlss_mode.performance": "性能模式", "options.video.dlss_mode.balanced": "平衡模式", "options.video.dlss_mode.quality": "质量模式", @@ -39,6 +41,7 @@ "render_pipeline_screen.back_hint": "实验性渲染管线配置界面(使用ESC或者返回按钮返回上一页)", "render_pipeline.module.dlss.name": "DLSS", "render_pipeline.module.dlss.attribute.mode": "模式", + "render_pipeline.module.dlss.attribute.mode.ultra_performance": "超级性能", "render_pipeline.module.dlss.attribute.mode.performance": "性能模式", "render_pipeline.module.dlss.attribute.mode.balanced": "平衡模式", "render_pipeline.module.dlss.attribute.mode.quality": "质量模式", diff --git a/src/main/resources/modules/dlss.yaml b/src/main/resources/modules/dlss.yaml index 9ad08ccb..1b667e74 100644 --- a/src/main/resources/modules/dlss.yaml +++ b/src/main/resources/modules/dlss.yaml @@ -23,5 +23,5 @@ outputImageConfigs: format: "R16_SFLOAT" attributeConfigs: - name: "render_pipeline.module.dlss.attribute.mode" - type: "enum:render_pipeline.module.dlss.attribute.mode.performance-render_pipeline.module.dlss.attribute.mode.balanced-render_pipeline.module.dlss.attribute.mode.quality-render_pipeline.module.dlss.attribute.mode.dlaa" + type: "enum:render_pipeline.module.dlss.attribute.mode.ultra_performance-render_pipeline.module.dlss.attribute.mode.performance-render_pipeline.module.dlss.attribute.mode.balanced-render_pipeline.module.dlss.attribute.mode.quality-render_pipeline.module.dlss.attribute.mode.dlaa" value: "render_pipeline.module.dlss.attribute.mode.balanced" From 983963fffb5cc69ec6336168f6ba9ded366d6314 Mon Sep 17 00:00:00 2001 From: Gabrieli2806 <[tu-email@ejemplo.com]> Date: Sat, 11 Apr 2026 02:53:03 -0500 Subject: [PATCH 07/13] feat: add DLSS Frame Generation support - Add frame_generation attribute config to dlss.yaml (enum: off/on, default off) - Add DLSS_FRAME_GEN constants to Options.java - Add i18n translations for en_us, es_es, zh_cn --- src/main/java/com/radiance/client/option/Options.java | 3 +++ src/main/resources/assets/radiance/lang/en_us.json | 6 ++++++ src/main/resources/assets/radiance/lang/es_es.json | 6 ++++++ src/main/resources/assets/radiance/lang/zh_cn.json | 6 ++++++ src/main/resources/modules/dlss.yaml | 3 +++ 5 files changed, 24 insertions(+) diff --git a/src/main/java/com/radiance/client/option/Options.java b/src/main/java/com/radiance/client/option/Options.java index 7132299a..042d2fe8 100644 --- a/src/main/java/com/radiance/client/option/Options.java +++ b/src/main/java/com/radiance/client/option/Options.java @@ -33,6 +33,9 @@ public class Options { public static final String DLSS_MODE_DLAA = "options.video.dlss_mode.dlaa"; public static final String DLSS_MODE_KEY = "options.video.dlss_mode"; + public static final String DLSS_FRAME_GEN_KEY = "options.video.dlss_frame_gen"; + public static final String DLSS_FRAME_GEN_ON = "options.video.dlss_frame_gen.on"; + public static final String DLSS_FRAME_GEN_OFF = "options.video.dlss_frame_gen.off"; public static final String UPSCALER_TYPE_KEY = "options.video.upscaler_type"; public static final String UPSCALER_QUALITY_KEY = "options.video.upscaler_quality"; public static final String DENOISER_MODE_KEY = "options.video.denoiser_mode"; diff --git a/src/main/resources/assets/radiance/lang/en_us.json b/src/main/resources/assets/radiance/lang/en_us.json index 97051a66..08ec94ae 100644 --- a/src/main/resources/assets/radiance/lang/en_us.json +++ b/src/main/resources/assets/radiance/lang/en_us.json @@ -46,6 +46,12 @@ "render_pipeline.module.dlss.attribute.mode.balanced": "Balanced", "render_pipeline.module.dlss.attribute.mode.quality": "Quality", "render_pipeline.module.dlss.attribute.mode.dlaa": "DLAA", + "render_pipeline.module.dlss.attribute.frame_generation": "Frame Generation", + "render_pipeline.module.dlss.attribute.frame_generation.off": "Off", + "render_pipeline.module.dlss.attribute.frame_generation.on": "On", + "options.video.dlss_frame_gen": "DLSS Frame Generation", + "options.video.dlss_frame_gen.on": "On", + "options.video.dlss_frame_gen.off": "Off", "render_pipeline.module.ray_tracing.name": "Ray Tracing", "render_pipeline.module.ray_tracing.attribute.num_ray_bounces": "Num Ray Bounces", "render_pipeline.module.ray_tracing.attribute.use_jitter": "Use Jitter", diff --git a/src/main/resources/assets/radiance/lang/es_es.json b/src/main/resources/assets/radiance/lang/es_es.json index dd1ce064..cd470ea7 100644 --- a/src/main/resources/assets/radiance/lang/es_es.json +++ b/src/main/resources/assets/radiance/lang/es_es.json @@ -46,6 +46,12 @@ "render_pipeline.module.dlss.attribute.mode.balanced": "Equilibrado", "render_pipeline.module.dlss.attribute.mode.quality": "Calidad", "render_pipeline.module.dlss.attribute.mode.dlaa": "DLAA", + "render_pipeline.module.dlss.attribute.frame_generation": "Generación de Frames", + "render_pipeline.module.dlss.attribute.frame_generation.off": "Desactivado", + "render_pipeline.module.dlss.attribute.frame_generation.on": "Activado", + "options.video.dlss_frame_gen": "DLSS Generación de Frames", + "options.video.dlss_frame_gen.on": "Activado", + "options.video.dlss_frame_gen.off": "Desactivado", "render_pipeline.module.ray_tracing.name": "Trazado de Rayos", "render_pipeline.module.ray_tracing.attribute.num_ray_bounces": "Número de Rebotes de Rayos", "render_pipeline.module.ray_tracing.attribute.use_jitter": "Usar Jitter", diff --git a/src/main/resources/assets/radiance/lang/zh_cn.json b/src/main/resources/assets/radiance/lang/zh_cn.json index e405bddd..3975649a 100644 --- a/src/main/resources/assets/radiance/lang/zh_cn.json +++ b/src/main/resources/assets/radiance/lang/zh_cn.json @@ -46,6 +46,12 @@ "render_pipeline.module.dlss.attribute.mode.balanced": "平衡模式", "render_pipeline.module.dlss.attribute.mode.quality": "质量模式", "render_pipeline.module.dlss.attribute.mode.dlaa": "DLAA", + "render_pipeline.module.dlss.attribute.frame_generation": "帧生成", + "render_pipeline.module.dlss.attribute.frame_generation.off": "关闭", + "render_pipeline.module.dlss.attribute.frame_generation.on": "开启", + "options.video.dlss_frame_gen": "DLSS 帧生成", + "options.video.dlss_frame_gen.on": "开启", + "options.video.dlss_frame_gen.off": "关闭", "render_pipeline.module.ray_tracing.name": "光线追踪", "render_pipeline.module.ray_tracing.attribute.num_ray_bounces": "光线反射次数", "render_pipeline.module.ray_tracing.attribute.use_jitter": "使用抖动", diff --git a/src/main/resources/modules/dlss.yaml b/src/main/resources/modules/dlss.yaml index 1b667e74..2ba17311 100644 --- a/src/main/resources/modules/dlss.yaml +++ b/src/main/resources/modules/dlss.yaml @@ -25,3 +25,6 @@ attributeConfigs: - name: "render_pipeline.module.dlss.attribute.mode" type: "enum:render_pipeline.module.dlss.attribute.mode.ultra_performance-render_pipeline.module.dlss.attribute.mode.performance-render_pipeline.module.dlss.attribute.mode.balanced-render_pipeline.module.dlss.attribute.mode.quality-render_pipeline.module.dlss.attribute.mode.dlaa" value: "render_pipeline.module.dlss.attribute.mode.balanced" + - name: "render_pipeline.module.dlss.attribute.frame_generation" + type: "enum:render_pipeline.module.dlss.attribute.frame_generation.off-render_pipeline.module.dlss.attribute.frame_generation.on" + value: "render_pipeline.module.dlss.attribute.frame_generation.off" From 9784cc1de23074e4f1f8977d9e43e1b408519fc0 Mon Sep 17 00:00:00 2001 From: Gabrieli2806 <[tu-email@ejemplo.com]> Date: Sat, 11 Apr 2026 16:56:38 -0500 Subject: [PATCH 08/13] feat: DLSS Multi-Frame Generation multiplier support (x2/x3/x4) - Changed Frame Generation from on/off toggle to x2/x3/x4 multiplier enum - Updated dlss.yaml enum values: off, x2, x3, x4 - Updated Options.java constants: DLSS_FRAME_GEN_X2/X3/X4 - Updated all lang files (en_us, es_es, zh_cn) with multiplier labels --- src/main/java/com/radiance/client/option/Options.java | 4 +++- src/main/resources/assets/radiance/lang/en_us.json | 8 ++++++-- src/main/resources/assets/radiance/lang/es_es.json | 8 ++++++-- src/main/resources/assets/radiance/lang/zh_cn.json | 8 ++++++-- src/main/resources/modules/dlss.yaml | 2 +- 5 files changed, 22 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/radiance/client/option/Options.java b/src/main/java/com/radiance/client/option/Options.java index 042d2fe8..5b5d60fd 100644 --- a/src/main/java/com/radiance/client/option/Options.java +++ b/src/main/java/com/radiance/client/option/Options.java @@ -34,8 +34,10 @@ public class Options { public static final String DLSS_MODE_KEY = "options.video.dlss_mode"; public static final String DLSS_FRAME_GEN_KEY = "options.video.dlss_frame_gen"; - public static final String DLSS_FRAME_GEN_ON = "options.video.dlss_frame_gen.on"; public static final String DLSS_FRAME_GEN_OFF = "options.video.dlss_frame_gen.off"; + public static final String DLSS_FRAME_GEN_X2 = "options.video.dlss_frame_gen.x2"; + public static final String DLSS_FRAME_GEN_X3 = "options.video.dlss_frame_gen.x3"; + public static final String DLSS_FRAME_GEN_X4 = "options.video.dlss_frame_gen.x4"; public static final String UPSCALER_TYPE_KEY = "options.video.upscaler_type"; public static final String UPSCALER_QUALITY_KEY = "options.video.upscaler_quality"; public static final String DENOISER_MODE_KEY = "options.video.denoiser_mode"; diff --git a/src/main/resources/assets/radiance/lang/en_us.json b/src/main/resources/assets/radiance/lang/en_us.json index 08ec94ae..9afd985c 100644 --- a/src/main/resources/assets/radiance/lang/en_us.json +++ b/src/main/resources/assets/radiance/lang/en_us.json @@ -48,10 +48,14 @@ "render_pipeline.module.dlss.attribute.mode.dlaa": "DLAA", "render_pipeline.module.dlss.attribute.frame_generation": "Frame Generation", "render_pipeline.module.dlss.attribute.frame_generation.off": "Off", - "render_pipeline.module.dlss.attribute.frame_generation.on": "On", + "render_pipeline.module.dlss.attribute.frame_generation.x2": "2x", + "render_pipeline.module.dlss.attribute.frame_generation.x3": "3x", + "render_pipeline.module.dlss.attribute.frame_generation.x4": "4x", "options.video.dlss_frame_gen": "DLSS Frame Generation", - "options.video.dlss_frame_gen.on": "On", "options.video.dlss_frame_gen.off": "Off", + "options.video.dlss_frame_gen.x2": "2x", + "options.video.dlss_frame_gen.x3": "3x", + "options.video.dlss_frame_gen.x4": "4x", "render_pipeline.module.ray_tracing.name": "Ray Tracing", "render_pipeline.module.ray_tracing.attribute.num_ray_bounces": "Num Ray Bounces", "render_pipeline.module.ray_tracing.attribute.use_jitter": "Use Jitter", diff --git a/src/main/resources/assets/radiance/lang/es_es.json b/src/main/resources/assets/radiance/lang/es_es.json index cd470ea7..ec18cd4b 100644 --- a/src/main/resources/assets/radiance/lang/es_es.json +++ b/src/main/resources/assets/radiance/lang/es_es.json @@ -48,10 +48,14 @@ "render_pipeline.module.dlss.attribute.mode.dlaa": "DLAA", "render_pipeline.module.dlss.attribute.frame_generation": "Generación de Frames", "render_pipeline.module.dlss.attribute.frame_generation.off": "Desactivado", - "render_pipeline.module.dlss.attribute.frame_generation.on": "Activado", + "render_pipeline.module.dlss.attribute.frame_generation.x2": "2x", + "render_pipeline.module.dlss.attribute.frame_generation.x3": "3x", + "render_pipeline.module.dlss.attribute.frame_generation.x4": "4x", "options.video.dlss_frame_gen": "DLSS Generación de Frames", - "options.video.dlss_frame_gen.on": "Activado", "options.video.dlss_frame_gen.off": "Desactivado", + "options.video.dlss_frame_gen.x2": "2x", + "options.video.dlss_frame_gen.x3": "3x", + "options.video.dlss_frame_gen.x4": "4x", "render_pipeline.module.ray_tracing.name": "Trazado de Rayos", "render_pipeline.module.ray_tracing.attribute.num_ray_bounces": "Número de Rebotes de Rayos", "render_pipeline.module.ray_tracing.attribute.use_jitter": "Usar Jitter", diff --git a/src/main/resources/assets/radiance/lang/zh_cn.json b/src/main/resources/assets/radiance/lang/zh_cn.json index 3975649a..83afae03 100644 --- a/src/main/resources/assets/radiance/lang/zh_cn.json +++ b/src/main/resources/assets/radiance/lang/zh_cn.json @@ -48,10 +48,14 @@ "render_pipeline.module.dlss.attribute.mode.dlaa": "DLAA", "render_pipeline.module.dlss.attribute.frame_generation": "帧生成", "render_pipeline.module.dlss.attribute.frame_generation.off": "关闭", - "render_pipeline.module.dlss.attribute.frame_generation.on": "开启", + "render_pipeline.module.dlss.attribute.frame_generation.x2": "2x", + "render_pipeline.module.dlss.attribute.frame_generation.x3": "3x", + "render_pipeline.module.dlss.attribute.frame_generation.x4": "4x", "options.video.dlss_frame_gen": "DLSS 帧生成", - "options.video.dlss_frame_gen.on": "开启", "options.video.dlss_frame_gen.off": "关闭", + "options.video.dlss_frame_gen.x2": "2x", + "options.video.dlss_frame_gen.x3": "3x", + "options.video.dlss_frame_gen.x4": "4x", "render_pipeline.module.ray_tracing.name": "光线追踪", "render_pipeline.module.ray_tracing.attribute.num_ray_bounces": "光线反射次数", "render_pipeline.module.ray_tracing.attribute.use_jitter": "使用抖动", diff --git a/src/main/resources/modules/dlss.yaml b/src/main/resources/modules/dlss.yaml index 2ba17311..99116769 100644 --- a/src/main/resources/modules/dlss.yaml +++ b/src/main/resources/modules/dlss.yaml @@ -26,5 +26,5 @@ attributeConfigs: type: "enum:render_pipeline.module.dlss.attribute.mode.ultra_performance-render_pipeline.module.dlss.attribute.mode.performance-render_pipeline.module.dlss.attribute.mode.balanced-render_pipeline.module.dlss.attribute.mode.quality-render_pipeline.module.dlss.attribute.mode.dlaa" value: "render_pipeline.module.dlss.attribute.mode.balanced" - name: "render_pipeline.module.dlss.attribute.frame_generation" - type: "enum:render_pipeline.module.dlss.attribute.frame_generation.off-render_pipeline.module.dlss.attribute.frame_generation.on" + type: "enum:render_pipeline.module.dlss.attribute.frame_generation.off-render_pipeline.module.dlss.attribute.frame_generation.x2-render_pipeline.module.dlss.attribute.frame_generation.x3-render_pipeline.module.dlss.attribute.frame_generation.x4" value: "render_pipeline.module.dlss.attribute.frame_generation.off" From 998d875210c7475701aab693622d23e9318467b8 Mon Sep 17 00:00:00 2001 From: Gabrieli2806 <[tu-email@ejemplo.com]> Date: Sun, 12 Apr 2026 00:54:29 -0500 Subject: [PATCH 09/13] chore: add copilot-instructions.md for project guidelines --- .github/copilot-instructions.md | 85 +++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 .github/copilot-instructions.md diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 00000000..7c702a3a --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,85 @@ +# Radiance — Project Guidelines + +Minecraft Fabric mod (1.21.4) with a Vulkan C++ native backend renderer (MCVR). Provides hardware-accelerated ray tracing, PBR textures, and upscaling (DLSS/FSR3/XeSS). + +## Architecture + +Two tightly coupled repositories: +- **Radiance** (this repo): Java/Fabric mod — Minecraft integration, mixins, pipeline config (YAML), GUI, and JNI proxy layer +- **MCVR** (`../MCVR`): C++23 Vulkan renderer — native shared library consumed by Radiance at runtime via JNI + +### Key boundaries +| Layer | Location | Responsibility | +|-------|----------|----------------| +| Mod entry | `Radiance.java`, `RadianceClient.java` | Fabric lifecycle, native lib loading, resource extraction | +| JNI proxies | `client/proxy/vulkan/`, `client/proxy/world/` | Java→C++ bridge (`RendererProxy`, `BufferProxy`, `TextureProxy`, `ChunkProxy`, `EntityProxy`) | +| Pipeline config | `client/pipeline/`, `src/main/resources/modules/*.yaml` | Modular render pipeline definition, preset management | +| Options | `client/option/` | Runtime settings exposed to both Java GUI and native via JNI | +| Mixins | `mixins/` + `radiance.mixins.json` | Vanilla Minecraft render hooks | +| Native output | `src/main/resources/{core.dll,core.lib,shaders/}` | MCVR build artifacts (git-ignored, generated by `cmake --install`) | + +### Data flow per frame +``` +Java: acquireContext → queueChunkBuild → queueEntityBuild → queueUpload → + performUpload → updateUniforms → [native pipeline runs] → drawOverlay → + submitCommand → present +``` + +## Build and Test + +### Prerequisites +- JDK 21, Vulkan SDK (with `glslangValidator`), Visual Studio 2026 (or 2022), CMake 3.15+ +- MCVR repo cloned at `../MCVR` with submodules initialized + +### Full build (both repos) +```powershell +# 1. Generate JNI headers +cd Radiance +.\gradlew.bat compileJava + +# 2. Build native renderer +cd ..\MCVR +git submodule update --init --recursive +cmake -S . -B build -G "Visual Studio 18 2026" -A x64 ` + -DJAVA_PROJECT_ROOT_DIR=C:/Users/gabri/Documents/CodingRepos/Radiance ` + -DMCVR_ENABLE_NRD=ON -DMCVR_ENABLE_FFX_UPSCALER=ON -DMCVR_ENABLE_XESS=ON -DUSE_AMD=OFF +cmake --build build --config Release +cmake --install build --config Release # copies core.dll + shaders → Radiance/src/main/resources/ + +# 3. Build mod JAR +cd ..\Radiance +.\gradlew.bat build + +# 4. Run Minecraft client +.\gradlew.bat runClient +``` + +### Quick rebuild (native only, after C++ changes) +```powershell +cd ..\MCVR +cmake --build build --config Release +cmake --install build --config Release +``` + +### Quick rebuild (Java only) +```powershell +.\gradlew.bat build +``` + +## Conventions + +- **Package**: `com.radiance` (not `com.g2806` — this is a third-party project, not authored by Gabrieli2806) +- **Mappings**: Yarn (`net.fabricmc:yarn:1.21.4+build.8:v2`) +- **Java target**: 21 +- **Native lib loading**: `RadianceClient.onInitializeClient()` extracts `core.dll`/`libcore.so` + shaders from JAR resources into `.minecraft/radiance/` +- **Pipeline modules**: Defined in `src/main/resources/modules/*.yaml`, parsed by `ModuleEntry.java` using SnakeYAML +- **Mixin plugin**: `MixinPlugin.java` controls conditional mixin application +- **Access widener**: `radiance.accesswidener` for vanilla class access +- **License**: GPL-3.0 + +## Pitfalls + +- `src/main/resources/core.dll`, `core.lib`, `shaders/` are **build artifacts** from MCVR — they must exist before `runClient` works. If missing, the mod crashes on native lib load. +- JNI header generation requires `compileJava` to run first (the `-h` flag in `build.gradle`). If you add new native methods, rerun `compileJava` before rebuilding MCVR. +- The `runClient` task opens at 1920x1080 (configured in `build.gradle`). +- GLFW is dynamically rebound from LWJGL's loaded DLL — MCVR does NOT link its own GLFW. From 96416f0f5a028c79be20c140dc190e16f4a025dc Mon Sep 17 00:00:00 2001 From: Gabrieli2806 <[tu-email@ejemplo.com]> Date: Sun, 12 Apr 2026 01:05:21 -0500 Subject: [PATCH 10/13] feat: add x5, x6, and auto FG multiplier modes - Add x5 (5 interp frames), x6 (6 interp frames), and auto (hardware max) options - Auto mode queries DLSS maxMultiFrameCount and uses the maximum supported by GPU - Update dlss.yaml enum, Options.java constants, en_us.json and zh_cn.json translations --- src/main/java/com/radiance/client/option/Options.java | 3 +++ src/main/resources/assets/radiance/lang/en_us.json | 6 ++++++ src/main/resources/assets/radiance/lang/zh_cn.json | 6 ++++++ src/main/resources/modules/dlss.yaml | 2 +- 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/radiance/client/option/Options.java b/src/main/java/com/radiance/client/option/Options.java index 5b5d60fd..dac19f95 100644 --- a/src/main/java/com/radiance/client/option/Options.java +++ b/src/main/java/com/radiance/client/option/Options.java @@ -38,6 +38,9 @@ public class Options { public static final String DLSS_FRAME_GEN_X2 = "options.video.dlss_frame_gen.x2"; public static final String DLSS_FRAME_GEN_X3 = "options.video.dlss_frame_gen.x3"; public static final String DLSS_FRAME_GEN_X4 = "options.video.dlss_frame_gen.x4"; + public static final String DLSS_FRAME_GEN_X5 = "options.video.dlss_frame_gen.x5"; + public static final String DLSS_FRAME_GEN_X6 = "options.video.dlss_frame_gen.x6"; + public static final String DLSS_FRAME_GEN_AUTO = "options.video.dlss_frame_gen.auto"; public static final String UPSCALER_TYPE_KEY = "options.video.upscaler_type"; public static final String UPSCALER_QUALITY_KEY = "options.video.upscaler_quality"; public static final String DENOISER_MODE_KEY = "options.video.denoiser_mode"; diff --git a/src/main/resources/assets/radiance/lang/en_us.json b/src/main/resources/assets/radiance/lang/en_us.json index 9afd985c..9706695a 100644 --- a/src/main/resources/assets/radiance/lang/en_us.json +++ b/src/main/resources/assets/radiance/lang/en_us.json @@ -51,11 +51,17 @@ "render_pipeline.module.dlss.attribute.frame_generation.x2": "2x", "render_pipeline.module.dlss.attribute.frame_generation.x3": "3x", "render_pipeline.module.dlss.attribute.frame_generation.x4": "4x", + "render_pipeline.module.dlss.attribute.frame_generation.x5": "5x", + "render_pipeline.module.dlss.attribute.frame_generation.x6": "6x", + "render_pipeline.module.dlss.attribute.frame_generation.auto": "Auto", "options.video.dlss_frame_gen": "DLSS Frame Generation", "options.video.dlss_frame_gen.off": "Off", "options.video.dlss_frame_gen.x2": "2x", "options.video.dlss_frame_gen.x3": "3x", "options.video.dlss_frame_gen.x4": "4x", + "options.video.dlss_frame_gen.x5": "5x", + "options.video.dlss_frame_gen.x6": "6x", + "options.video.dlss_frame_gen.auto": "Auto", "render_pipeline.module.ray_tracing.name": "Ray Tracing", "render_pipeline.module.ray_tracing.attribute.num_ray_bounces": "Num Ray Bounces", "render_pipeline.module.ray_tracing.attribute.use_jitter": "Use Jitter", diff --git a/src/main/resources/assets/radiance/lang/zh_cn.json b/src/main/resources/assets/radiance/lang/zh_cn.json index 83afae03..88d125cd 100644 --- a/src/main/resources/assets/radiance/lang/zh_cn.json +++ b/src/main/resources/assets/radiance/lang/zh_cn.json @@ -51,11 +51,17 @@ "render_pipeline.module.dlss.attribute.frame_generation.x2": "2x", "render_pipeline.module.dlss.attribute.frame_generation.x3": "3x", "render_pipeline.module.dlss.attribute.frame_generation.x4": "4x", + "render_pipeline.module.dlss.attribute.frame_generation.x5": "5x", + "render_pipeline.module.dlss.attribute.frame_generation.x6": "6x", + "render_pipeline.module.dlss.attribute.frame_generation.auto": "自动", "options.video.dlss_frame_gen": "DLSS 帧生成", "options.video.dlss_frame_gen.off": "关闭", "options.video.dlss_frame_gen.x2": "2x", "options.video.dlss_frame_gen.x3": "3x", "options.video.dlss_frame_gen.x4": "4x", + "options.video.dlss_frame_gen.x5": "5x", + "options.video.dlss_frame_gen.x6": "6x", + "options.video.dlss_frame_gen.auto": "自动", "render_pipeline.module.ray_tracing.name": "光线追踪", "render_pipeline.module.ray_tracing.attribute.num_ray_bounces": "光线反射次数", "render_pipeline.module.ray_tracing.attribute.use_jitter": "使用抖动", diff --git a/src/main/resources/modules/dlss.yaml b/src/main/resources/modules/dlss.yaml index 99116769..69885b6e 100644 --- a/src/main/resources/modules/dlss.yaml +++ b/src/main/resources/modules/dlss.yaml @@ -26,5 +26,5 @@ attributeConfigs: type: "enum:render_pipeline.module.dlss.attribute.mode.ultra_performance-render_pipeline.module.dlss.attribute.mode.performance-render_pipeline.module.dlss.attribute.mode.balanced-render_pipeline.module.dlss.attribute.mode.quality-render_pipeline.module.dlss.attribute.mode.dlaa" value: "render_pipeline.module.dlss.attribute.mode.balanced" - name: "render_pipeline.module.dlss.attribute.frame_generation" - type: "enum:render_pipeline.module.dlss.attribute.frame_generation.off-render_pipeline.module.dlss.attribute.frame_generation.x2-render_pipeline.module.dlss.attribute.frame_generation.x3-render_pipeline.module.dlss.attribute.frame_generation.x4" + type: "enum:render_pipeline.module.dlss.attribute.frame_generation.off-render_pipeline.module.dlss.attribute.frame_generation.x2-render_pipeline.module.dlss.attribute.frame_generation.x3-render_pipeline.module.dlss.attribute.frame_generation.x4-render_pipeline.module.dlss.attribute.frame_generation.x5-render_pipeline.module.dlss.attribute.frame_generation.x6-render_pipeline.module.dlss.attribute.frame_generation.auto" value: "render_pipeline.module.dlss.attribute.frame_generation.off" From acab9cf0659f96bf6bfe0029dcb5d4b047261408 Mon Sep 17 00:00:00 2001 From: Gabrieli2806 <[tu-email@ejemplo.com]> Date: Sun, 12 Apr 2026 01:42:25 -0500 Subject: [PATCH 11/13] feat: replace auto FG mode with dynamic frame generation - Rename auto to dynamic in Options, dlss.yaml, translations - Dynamic mode adjusts FG multiplier per-frame to target monitor Hz --- src/main/java/com/radiance/client/option/Options.java | 2 +- src/main/resources/assets/radiance/lang/en_us.json | 4 ++-- src/main/resources/assets/radiance/lang/zh_cn.json | 4 ++-- src/main/resources/modules/dlss.yaml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/radiance/client/option/Options.java b/src/main/java/com/radiance/client/option/Options.java index dac19f95..01708ff3 100644 --- a/src/main/java/com/radiance/client/option/Options.java +++ b/src/main/java/com/radiance/client/option/Options.java @@ -40,7 +40,7 @@ public class Options { public static final String DLSS_FRAME_GEN_X4 = "options.video.dlss_frame_gen.x4"; public static final String DLSS_FRAME_GEN_X5 = "options.video.dlss_frame_gen.x5"; public static final String DLSS_FRAME_GEN_X6 = "options.video.dlss_frame_gen.x6"; - public static final String DLSS_FRAME_GEN_AUTO = "options.video.dlss_frame_gen.auto"; + public static final String DLSS_FRAME_GEN_DYNAMIC = "options.video.dlss_frame_gen.dynamic"; public static final String UPSCALER_TYPE_KEY = "options.video.upscaler_type"; public static final String UPSCALER_QUALITY_KEY = "options.video.upscaler_quality"; public static final String DENOISER_MODE_KEY = "options.video.denoiser_mode"; diff --git a/src/main/resources/assets/radiance/lang/en_us.json b/src/main/resources/assets/radiance/lang/en_us.json index 9706695a..4c01ede9 100644 --- a/src/main/resources/assets/radiance/lang/en_us.json +++ b/src/main/resources/assets/radiance/lang/en_us.json @@ -53,7 +53,7 @@ "render_pipeline.module.dlss.attribute.frame_generation.x4": "4x", "render_pipeline.module.dlss.attribute.frame_generation.x5": "5x", "render_pipeline.module.dlss.attribute.frame_generation.x6": "6x", - "render_pipeline.module.dlss.attribute.frame_generation.auto": "Auto", + "render_pipeline.module.dlss.attribute.frame_generation.dynamic": "Dynamic", "options.video.dlss_frame_gen": "DLSS Frame Generation", "options.video.dlss_frame_gen.off": "Off", "options.video.dlss_frame_gen.x2": "2x", @@ -61,7 +61,7 @@ "options.video.dlss_frame_gen.x4": "4x", "options.video.dlss_frame_gen.x5": "5x", "options.video.dlss_frame_gen.x6": "6x", - "options.video.dlss_frame_gen.auto": "Auto", + "options.video.dlss_frame_gen.dynamic": "Dynamic", "render_pipeline.module.ray_tracing.name": "Ray Tracing", "render_pipeline.module.ray_tracing.attribute.num_ray_bounces": "Num Ray Bounces", "render_pipeline.module.ray_tracing.attribute.use_jitter": "Use Jitter", diff --git a/src/main/resources/assets/radiance/lang/zh_cn.json b/src/main/resources/assets/radiance/lang/zh_cn.json index 88d125cd..ae55c49a 100644 --- a/src/main/resources/assets/radiance/lang/zh_cn.json +++ b/src/main/resources/assets/radiance/lang/zh_cn.json @@ -53,7 +53,7 @@ "render_pipeline.module.dlss.attribute.frame_generation.x4": "4x", "render_pipeline.module.dlss.attribute.frame_generation.x5": "5x", "render_pipeline.module.dlss.attribute.frame_generation.x6": "6x", - "render_pipeline.module.dlss.attribute.frame_generation.auto": "自动", + "render_pipeline.module.dlss.attribute.frame_generation.dynamic": "动态", "options.video.dlss_frame_gen": "DLSS 帧生成", "options.video.dlss_frame_gen.off": "关闭", "options.video.dlss_frame_gen.x2": "2x", @@ -61,7 +61,7 @@ "options.video.dlss_frame_gen.x4": "4x", "options.video.dlss_frame_gen.x5": "5x", "options.video.dlss_frame_gen.x6": "6x", - "options.video.dlss_frame_gen.auto": "自动", + "options.video.dlss_frame_gen.dynamic": "动态", "render_pipeline.module.ray_tracing.name": "光线追踪", "render_pipeline.module.ray_tracing.attribute.num_ray_bounces": "光线反射次数", "render_pipeline.module.ray_tracing.attribute.use_jitter": "使用抖动", diff --git a/src/main/resources/modules/dlss.yaml b/src/main/resources/modules/dlss.yaml index 69885b6e..8bd75586 100644 --- a/src/main/resources/modules/dlss.yaml +++ b/src/main/resources/modules/dlss.yaml @@ -26,5 +26,5 @@ attributeConfigs: type: "enum:render_pipeline.module.dlss.attribute.mode.ultra_performance-render_pipeline.module.dlss.attribute.mode.performance-render_pipeline.module.dlss.attribute.mode.balanced-render_pipeline.module.dlss.attribute.mode.quality-render_pipeline.module.dlss.attribute.mode.dlaa" value: "render_pipeline.module.dlss.attribute.mode.balanced" - name: "render_pipeline.module.dlss.attribute.frame_generation" - type: "enum:render_pipeline.module.dlss.attribute.frame_generation.off-render_pipeline.module.dlss.attribute.frame_generation.x2-render_pipeline.module.dlss.attribute.frame_generation.x3-render_pipeline.module.dlss.attribute.frame_generation.x4-render_pipeline.module.dlss.attribute.frame_generation.x5-render_pipeline.module.dlss.attribute.frame_generation.x6-render_pipeline.module.dlss.attribute.frame_generation.auto" + type: "enum:render_pipeline.module.dlss.attribute.frame_generation.off-render_pipeline.module.dlss.attribute.frame_generation.x2-render_pipeline.module.dlss.attribute.frame_generation.x3-render_pipeline.module.dlss.attribute.frame_generation.x4-render_pipeline.module.dlss.attribute.frame_generation.x5-render_pipeline.module.dlss.attribute.frame_generation.x6-render_pipeline.module.dlss.attribute.frame_generation.dynamic" value: "render_pipeline.module.dlss.attribute.frame_generation.off" From deb77be5523bb7698a4c35e365460e9e719a0729 Mon Sep 17 00:00:00 2001 From: Gabrieli2806 <[tu-email@ejemplo.com]> Date: Sun, 12 Apr 2026 02:12:56 -0500 Subject: [PATCH 12/13] docs: add DLSS Frame Gen DLL requirements and update TODO list - Add nvngx_dlssg.dll / libnvidia-ngx-dlssg.so to download instructions - Add labels for each DLL's purpose (SR/Denoising, Ray Reconstruction, FG) - Mark DLSS Frame Generation as done in TODO - Add FSR Frame Generation and XeSS-FG as pending items - Fix fabric.mod.json indentation, add contributors field --- README-CN.md | 14 +++++++++----- README.md | 14 +++++++++----- src/main/resources/fabric.mod.json | 3 +++ 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/README-CN.md b/README-CN.md index d74968f9..5d3c0cf3 100644 --- a/README-CN.md +++ b/README-CN.md @@ -52,15 +52,17 @@ Radiance是一个Minecraft Mod,旨在将原版的OpenGL渲染器完全替换 从[这个](https://github.com/NVIDIA/DLSS/tree/v310.5.3/lib/Windows_x86_64/rel)路径中下载如下列表中的文件到`.minecraft/radiance`文件夹(如果文件夹不存在,请创建一个)。 -* `nvngx_dlss.dll` -* `nvngx_dlssd.dll` +* `nvngx_dlss.dll`(DLSS 超分辨率 / 去噪) +* `nvngx_dlssd.dll`(DLSS 光线重建) +* `nvngx_dlssg.dll`(DLSS 帧生成) #### Linux 从[这个](https://github.com/NVIDIA/DLSS/tree/v310.5.3/lib/Linux_x86_64/rel)路径中下载如下列表中的文件到`.minecraft/radiance`文件夹(如果文件夹不存在,请创建一个)。 -* `libnvidia-ngx-dlss.so.310.5.3` -* `libnvidia-ngx-dlssd.so.310.5.3` +* `libnvidia-ngx-dlss.so.310.5.3`(DLSS 超分辨率 / 去噪) +* `libnvidia-ngx-dlssd.so.310.5.3`(DLSS 光线重建) +* `libnvidia-ngx-dlssg.so.310.5.3`(DLSS 帧生成) # 构建 @@ -84,7 +86,9 @@ git clone https://github.com/Minecraft-Radiance/MCVR.git - [ ] 移植到更多版本和mod加载器(WIP,最高优先级) - [x] XESS支持 -- [ ] 帧生成 +- [x] DLSS 帧生成 +- [ ] FSR 帧生成 +- [ ] XeSS-FG - [ ] HDR 以及更多... diff --git a/README.md b/README.md index 5e9deea5..94e5683c 100644 --- a/README.md +++ b/README.md @@ -55,15 +55,17 @@ Note for AMD Users: If the DLSS runtime is missing, download the DLSS runtime li Download the files listed below from [here](https://github.com/NVIDIA/DLSS/tree/v310.5.3/lib/Windows_x86_64/rel) to the `.minecraft/radiance` folder (if the folder not exist, create one). -* `nvngx_dlss.dll` -* `nvngx_dlssd.dll` +* `nvngx_dlss.dll` (DLSS Super Resolution / Denoising) +* `nvngx_dlssd.dll` (DLSS Ray Reconstruction) +* `nvngx_dlssg.dll` (DLSS Frame Generation) #### Linux Download the files listed below from [here](https://github.com/NVIDIA/DLSS/tree/v310.5.3/lib/Linux_x86_64/rel) to the `.minecraft/radiance` folder (if the folder not exist, create one). -* `libnvidia-ngx-dlss.so.310.5.3` -* `libnvidia-ngx-dlssd.so.310.5.3` +* `libnvidia-ngx-dlss.so.310.5.3` (DLSS Super Resolution / Denoising) +* `libnvidia-ngx-dlssd.so.310.5.3` (DLSS Ray Reconstruction) +* `libnvidia-ngx-dlssg.so.310.5.3` (DLSS Frame Generation) # Build @@ -87,7 +89,9 @@ Finally, build with `./gradlew build`. - [ ] port to more versions and mod loaders (WIP, first priority) - [x] XESS support -- [ ] Frame Generation +- [x] DLSS Frame Generation +- [ ] FSR Frame Generation +- [ ] XeSS-FG - [ ] HDR And more... diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 7f84e286..c31c3755 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -8,6 +8,9 @@ "LJIONG", "Interstellarss" ], + "contributors": [ + "Gabrieli2806" + ], "contact": { "homepage": "https://www.minecraft-radiance.com/", "sources": "https://github.com/Minecraft-Radiance/Radiance", From 882b20a4ded2cb87cade206876a4f8a032a9c86c Mon Sep 17 00:00:00 2001 From: Gabrieli2806 <[tu-email@ejemplo.com]> Date: Sun, 12 Apr 2026 02:31:12 -0500 Subject: [PATCH 13/13] chore: remove copilot-instructions.md from tracking --- .github/copilot-instructions.md | 85 --------------------------------- .gitignore | 2 +- 2 files changed, 1 insertion(+), 86 deletions(-) delete mode 100644 .github/copilot-instructions.md diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md deleted file mode 100644 index 7c702a3a..00000000 --- a/.github/copilot-instructions.md +++ /dev/null @@ -1,85 +0,0 @@ -# Radiance — Project Guidelines - -Minecraft Fabric mod (1.21.4) with a Vulkan C++ native backend renderer (MCVR). Provides hardware-accelerated ray tracing, PBR textures, and upscaling (DLSS/FSR3/XeSS). - -## Architecture - -Two tightly coupled repositories: -- **Radiance** (this repo): Java/Fabric mod — Minecraft integration, mixins, pipeline config (YAML), GUI, and JNI proxy layer -- **MCVR** (`../MCVR`): C++23 Vulkan renderer — native shared library consumed by Radiance at runtime via JNI - -### Key boundaries -| Layer | Location | Responsibility | -|-------|----------|----------------| -| Mod entry | `Radiance.java`, `RadianceClient.java` | Fabric lifecycle, native lib loading, resource extraction | -| JNI proxies | `client/proxy/vulkan/`, `client/proxy/world/` | Java→C++ bridge (`RendererProxy`, `BufferProxy`, `TextureProxy`, `ChunkProxy`, `EntityProxy`) | -| Pipeline config | `client/pipeline/`, `src/main/resources/modules/*.yaml` | Modular render pipeline definition, preset management | -| Options | `client/option/` | Runtime settings exposed to both Java GUI and native via JNI | -| Mixins | `mixins/` + `radiance.mixins.json` | Vanilla Minecraft render hooks | -| Native output | `src/main/resources/{core.dll,core.lib,shaders/}` | MCVR build artifacts (git-ignored, generated by `cmake --install`) | - -### Data flow per frame -``` -Java: acquireContext → queueChunkBuild → queueEntityBuild → queueUpload → - performUpload → updateUniforms → [native pipeline runs] → drawOverlay → - submitCommand → present -``` - -## Build and Test - -### Prerequisites -- JDK 21, Vulkan SDK (with `glslangValidator`), Visual Studio 2026 (or 2022), CMake 3.15+ -- MCVR repo cloned at `../MCVR` with submodules initialized - -### Full build (both repos) -```powershell -# 1. Generate JNI headers -cd Radiance -.\gradlew.bat compileJava - -# 2. Build native renderer -cd ..\MCVR -git submodule update --init --recursive -cmake -S . -B build -G "Visual Studio 18 2026" -A x64 ` - -DJAVA_PROJECT_ROOT_DIR=C:/Users/gabri/Documents/CodingRepos/Radiance ` - -DMCVR_ENABLE_NRD=ON -DMCVR_ENABLE_FFX_UPSCALER=ON -DMCVR_ENABLE_XESS=ON -DUSE_AMD=OFF -cmake --build build --config Release -cmake --install build --config Release # copies core.dll + shaders → Radiance/src/main/resources/ - -# 3. Build mod JAR -cd ..\Radiance -.\gradlew.bat build - -# 4. Run Minecraft client -.\gradlew.bat runClient -``` - -### Quick rebuild (native only, after C++ changes) -```powershell -cd ..\MCVR -cmake --build build --config Release -cmake --install build --config Release -``` - -### Quick rebuild (Java only) -```powershell -.\gradlew.bat build -``` - -## Conventions - -- **Package**: `com.radiance` (not `com.g2806` — this is a third-party project, not authored by Gabrieli2806) -- **Mappings**: Yarn (`net.fabricmc:yarn:1.21.4+build.8:v2`) -- **Java target**: 21 -- **Native lib loading**: `RadianceClient.onInitializeClient()` extracts `core.dll`/`libcore.so` + shaders from JAR resources into `.minecraft/radiance/` -- **Pipeline modules**: Defined in `src/main/resources/modules/*.yaml`, parsed by `ModuleEntry.java` using SnakeYAML -- **Mixin plugin**: `MixinPlugin.java` controls conditional mixin application -- **Access widener**: `radiance.accesswidener` for vanilla class access -- **License**: GPL-3.0 - -## Pitfalls - -- `src/main/resources/core.dll`, `core.lib`, `shaders/` are **build artifacts** from MCVR — they must exist before `runClient` works. If missing, the mod crashes on native lib load. -- JNI header generation requires `compileJava` to run first (the `-h` flag in `build.gradle`). If you add new native methods, rerun `compileJava` before rebuilding MCVR. -- The `runClient` task opens at 1920x1080 (configured in `build.gradle`). -- GLFW is dynamically rebound from LWJGL's loaded DLL — MCVR does NOT link its own GLFW. diff --git a/.gitignore b/.gitignore index 6adbb6c6..c1b87059 100644 --- a/.gitignore +++ b/.gitignore @@ -124,4 +124,4 @@ core.lib libnvidia-ngx-dlss* include/ shaders/ -libxess* \ No newline at end of file +libxess*.github/copilot-instructions.md