Вопрос Vbo, ibo render pipeline не находит шейдеры (1.21.10)

  • Автор темы Автор темы cosssmix
  • Дата начала Дата начала
Начинающий
Начинающий
Статус
Оффлайн
Регистрация
3 Ноя 2025
Сообщения
7
Реакции
0
Java:
Expand Collapse Copy
package com.test.renderer;

import com.mojang.blaze3d.pipeline.BlendFunction;
import com.mojang.blaze3d.pipeline.RenderPipeline;
import com.mojang.blaze3d.platform.DepthTestFunction;
import com.mojang.blaze3d.vertex.VertexFormat;

import net.minecraft.client.gl.UniformType;
import net.minecraft.util.Identifier;

public class RenderPipelines {
    public static final RenderPipeline UI_COLORED = RenderPipeline.builder()
        .withLocation(Identifier.of("test", "pipeline/ui_colored"))
        .withVertexFormat(VertexFormats.POS2_COLOR, VertexFormat.DrawMode.TRIANGLES)
        .withUniform("MeshData", UniformType.UNIFORM_BUFFER)
        .withVertexShader(Identifier.of("test", "core/pos_color.vsh"))
        .withFragmentShader(Identifier.of("test", "core/pos_color.fsh"))
        .withDepthTestFunction(DepthTestFunction.NO_DEPTH_TEST)
        .withDepthWrite(false)
        .withBlend(BlendFunction.TRANSLUCENT)
        .withCull(true)
        .build();
}

в консоли пишет что не удалось найти шейдер хотя он лежим в папке ресурсов:

1762177873618.png


я пытался ложить в /core потом передовать shaders/core и просто /core без shaders но он все равно не находит, в чем проблема?
 
Java:
Expand Collapse Copy
package com.test.renderer;

import com.mojang.blaze3d.pipeline.BlendFunction;
import com.mojang.blaze3d.pipeline.RenderPipeline;
import com.mojang.blaze3d.platform.DepthTestFunction;
import com.mojang.blaze3d.vertex.VertexFormat;

import net.minecraft.client.gl.UniformType;
import net.minecraft.util.Identifier;

public class RenderPipelines {
    public static final RenderPipeline UI_COLORED = RenderPipeline.builder()
        .withLocation(Identifier.of("test", "pipeline/ui_colored"))
        .withVertexFormat(VertexFormats.POS2_COLOR, VertexFormat.DrawMode.TRIANGLES)
        .withUniform("MeshData", UniformType.UNIFORM_BUFFER)
        .withVertexShader(Identifier.of("test", "core/pos_color"))
        .withFragmentShader(Identifier.of("test", "core/pos_color"))
        .withDepthTestFunction(DepthTestFunction.NO_DEPTH_TEST)
        .withDepthWrite(false)
        .withBlend(BlendFunction.TRANSLUCENT)
        .withCull(true)
        .build();
}
 
Java:
Expand Collapse Copy
package com.test.renderer;

import com.mojang.blaze3d.pipeline.BlendFunction;
import com.mojang.blaze3d.pipeline.RenderPipeline;
import com.mojang.blaze3d.platform.DepthTestFunction;
import com.mojang.blaze3d.vertex.VertexFormat;

import net.minecraft.client.gl.UniformType;
import net.minecraft.util.Identifier;

public class RenderPipelines {
    public static final RenderPipeline UI_COLORED = RenderPipeline.builder()
        .withLocation(Identifier.of("test", "pipeline/ui_colored"))
        .withVertexFormat(VertexFormats.POS2_COLOR, VertexFormat.DrawMode.TRIANGLES)
        .withUniform("MeshData", UniformType.UNIFORM_BUFFER)
        .withVertexShader(Identifier.of("test", "core/pos_color"))
        .withFragmentShader(Identifier.of("test", "core/pos_color"))
        .withDepthTestFunction(DepthTestFunction.NO_DEPTH_TEST)
        .withDepthWrite(false)
        .withBlend(BlendFunction.TRANSLUCENT)
        .withCull(true)
        .build();
}
а по структуре чё, такую же оставить?
 
Java:
Expand Collapse Copy
package com.test.renderer;

import com.mojang.blaze3d.pipeline.BlendFunction;
import com.mojang.blaze3d.pipeline.RenderPipeline;
import com.mojang.blaze3d.platform.DepthTestFunction;
import com.mojang.blaze3d.vertex.VertexFormat;

import net.minecraft.client.gl.UniformType;
import net.minecraft.util.Identifier;

public class RenderPipelines {
    public static final RenderPipeline UI_COLORED = RenderPipeline.builder()
        .withLocation(Identifier.of("test", "pipeline/ui_colored"))
        .withVertexFormat(VertexFormats.POS2_COLOR, VertexFormat.DrawMode.TRIANGLES)
        .withUniform("MeshData", UniformType.UNIFORM_BUFFER)
        .withVertexShader(Identifier.of("test", "core/pos_color.vsh"))
        .withFragmentShader(Identifier.of("test", "core/pos_color.fsh"))
        .withDepthTestFunction(DepthTestFunction.NO_DEPTH_TEST)
        .withDepthWrite(false)
        .withBlend(BlendFunction.TRANSLUCENT)
        .withCull(true)
        .build();
}

в консоли пишет что не удалось найти шейдер хотя он лежим в папке ресурсов:

Посмотреть вложение 319066

я пытался ложить в /core потом передовать shaders/core и просто /core без shaders но он все равно не находит, в чем проблема?
в том, что ресурсы твоего мода загружаются не в ресурсах майнкрафта
 
вроде разобрался, только щас другая ошибка вроде
шейдера в shaders/core положи
я положил, я не тупой, я все пофиксил, щас там ошибка с RenderPass и все должно заработать
 
Последнее редактирование:
Назад
Сверху Снизу