diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3f9138d5..740c1dc0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,12 +17,13 @@ jobs: - uses: mlugg/setup-zig@v1 with: version: 0.14.0 - - run: sudo apt install libgl-dev libasound2-dev libx11-dev + - run: sudo apt install libgl-dev libasound2-dev libx11-dev glslang-tools - run: wget -O /opt/hostedtoolcache/zig/0.14.0/x64/lib/std/zig/render.zig https://github.com/PixelGuys/Cubyz-std-lib/releases/download/0.14.0/render.zig - run: zig build - run: zig build -Dtarget=x86_64-windows-gnu - run: zig build test - run: zig build format --summary none + - run: find assets/cubyz/shaders -type f | xargs -L1 glslangValidator -G100 - run: | if zig build fmt -- *.zig src/*.zig src/*/*.zig src/*/*/*.zig src/*/*/*/*.zig src/*/*/*/*/*.zig src/*/*/*/*/*/*.zig src/*/*/*/*/*/*/*.zig src/*/*/*/*/*/*/*/*.zig src/*/*/*/*/*/*/*/*/*.zig src/*/*/*/*/*/*/*/*/*/*.zig | grep -q . ; then git diff --color=always; diff --git a/assets/cubyz/shaders/animation_pre_processing.glsl b/assets/cubyz/shaders/animation_pre_processing.comp similarity index 100% rename from assets/cubyz/shaders/animation_pre_processing.glsl rename to assets/cubyz/shaders/animation_pre_processing.comp diff --git a/assets/cubyz/shaders/background/fragment.fs b/assets/cubyz/shaders/background/fragment.frag similarity index 100% rename from assets/cubyz/shaders/background/fragment.fs rename to assets/cubyz/shaders/background/fragment.frag diff --git a/assets/cubyz/shaders/background/vertex.vs b/assets/cubyz/shaders/background/vertex.vert similarity index 100% rename from assets/cubyz/shaders/background/vertex.vs rename to assets/cubyz/shaders/background/vertex.vert diff --git a/assets/cubyz/shaders/block_selection_fragment.fs b/assets/cubyz/shaders/block_selection_fragment.frag similarity index 100% rename from assets/cubyz/shaders/block_selection_fragment.fs rename to assets/cubyz/shaders/block_selection_fragment.frag diff --git a/assets/cubyz/shaders/block_selection_vertex.vs b/assets/cubyz/shaders/block_selection_vertex.vert similarity index 100% rename from assets/cubyz/shaders/block_selection_vertex.vs rename to assets/cubyz/shaders/block_selection_vertex.vert diff --git a/assets/cubyz/shaders/bloom/color_extractor_downsample.fs b/assets/cubyz/shaders/bloom/color_extractor_downsample.frag similarity index 100% rename from assets/cubyz/shaders/bloom/color_extractor_downsample.fs rename to assets/cubyz/shaders/bloom/color_extractor_downsample.frag diff --git a/assets/cubyz/shaders/bloom/color_extractor_downsample.vs b/assets/cubyz/shaders/bloom/color_extractor_downsample.vert similarity index 100% rename from assets/cubyz/shaders/bloom/color_extractor_downsample.vs rename to assets/cubyz/shaders/bloom/color_extractor_downsample.vert diff --git a/assets/cubyz/shaders/bloom/first_pass.fs b/assets/cubyz/shaders/bloom/first_pass.frag similarity index 100% rename from assets/cubyz/shaders/bloom/first_pass.fs rename to assets/cubyz/shaders/bloom/first_pass.frag diff --git a/assets/cubyz/shaders/bloom/first_pass.vs b/assets/cubyz/shaders/bloom/first_pass.vert similarity index 100% rename from assets/cubyz/shaders/bloom/first_pass.vs rename to assets/cubyz/shaders/bloom/first_pass.vert diff --git a/assets/cubyz/shaders/bloom/second_pass.fs b/assets/cubyz/shaders/bloom/second_pass.frag similarity index 100% rename from assets/cubyz/shaders/bloom/second_pass.fs rename to assets/cubyz/shaders/bloom/second_pass.frag diff --git a/assets/cubyz/shaders/bloom/second_pass.vs b/assets/cubyz/shaders/bloom/second_pass.vert similarity index 100% rename from assets/cubyz/shaders/bloom/second_pass.vs rename to assets/cubyz/shaders/bloom/second_pass.vert diff --git a/assets/cubyz/shaders/chunks/chunk_fragment.fs b/assets/cubyz/shaders/chunks/chunk_fragment.frag similarity index 100% rename from assets/cubyz/shaders/chunks/chunk_fragment.fs rename to assets/cubyz/shaders/chunks/chunk_fragment.frag diff --git a/assets/cubyz/shaders/chunks/chunk_vertex.vs b/assets/cubyz/shaders/chunks/chunk_vertex.vert similarity index 100% rename from assets/cubyz/shaders/chunks/chunk_vertex.vs rename to assets/cubyz/shaders/chunks/chunk_vertex.vert diff --git a/assets/cubyz/shaders/chunks/fillIndirectBuffer.glsl b/assets/cubyz/shaders/chunks/fillIndirectBuffer.comp similarity index 100% rename from assets/cubyz/shaders/chunks/fillIndirectBuffer.glsl rename to assets/cubyz/shaders/chunks/fillIndirectBuffer.comp diff --git a/assets/cubyz/shaders/chunks/occlusionTestFragment.fs b/assets/cubyz/shaders/chunks/occlusionTestFragment.frag similarity index 100% rename from assets/cubyz/shaders/chunks/occlusionTestFragment.fs rename to assets/cubyz/shaders/chunks/occlusionTestFragment.frag diff --git a/assets/cubyz/shaders/chunks/occlusionTestVertex.vs b/assets/cubyz/shaders/chunks/occlusionTestVertex.vert similarity index 100% rename from assets/cubyz/shaders/chunks/occlusionTestVertex.vs rename to assets/cubyz/shaders/chunks/occlusionTestVertex.vert diff --git a/assets/cubyz/shaders/chunks/transparent_fragment.fs b/assets/cubyz/shaders/chunks/transparent_fragment.frag similarity index 100% rename from assets/cubyz/shaders/chunks/transparent_fragment.fs rename to assets/cubyz/shaders/chunks/transparent_fragment.frag diff --git a/assets/cubyz/shaders/deferred_render_pass.fs b/assets/cubyz/shaders/deferred_render_pass.frag similarity index 100% rename from assets/cubyz/shaders/deferred_render_pass.fs rename to assets/cubyz/shaders/deferred_render_pass.frag diff --git a/assets/cubyz/shaders/deferred_render_pass.vs b/assets/cubyz/shaders/deferred_render_pass.vert similarity index 100% rename from assets/cubyz/shaders/deferred_render_pass.vs rename to assets/cubyz/shaders/deferred_render_pass.vert diff --git a/assets/cubyz/shaders/entity_fragment.fs b/assets/cubyz/shaders/entity_fragment.frag similarity index 100% rename from assets/cubyz/shaders/entity_fragment.fs rename to assets/cubyz/shaders/entity_fragment.frag diff --git a/assets/cubyz/shaders/entity_vertex.vs b/assets/cubyz/shaders/entity_vertex.vert similarity index 100% rename from assets/cubyz/shaders/entity_vertex.vs rename to assets/cubyz/shaders/entity_vertex.vert diff --git a/assets/cubyz/shaders/fake_reflection.fs b/assets/cubyz/shaders/fake_reflection.frag similarity index 100% rename from assets/cubyz/shaders/fake_reflection.fs rename to assets/cubyz/shaders/fake_reflection.frag diff --git a/assets/cubyz/shaders/fake_reflection.vs b/assets/cubyz/shaders/fake_reflection.vert similarity index 100% rename from assets/cubyz/shaders/fake_reflection.vs rename to assets/cubyz/shaders/fake_reflection.vert diff --git a/assets/cubyz/shaders/graphics/Circle.fs b/assets/cubyz/shaders/graphics/Circle.frag similarity index 100% rename from assets/cubyz/shaders/graphics/Circle.fs rename to assets/cubyz/shaders/graphics/Circle.frag diff --git a/assets/cubyz/shaders/graphics/Circle.vs b/assets/cubyz/shaders/graphics/Circle.vert similarity index 100% rename from assets/cubyz/shaders/graphics/Circle.vs rename to assets/cubyz/shaders/graphics/Circle.vert diff --git a/assets/cubyz/shaders/graphics/Image.fs b/assets/cubyz/shaders/graphics/Image.frag similarity index 100% rename from assets/cubyz/shaders/graphics/Image.fs rename to assets/cubyz/shaders/graphics/Image.frag diff --git a/assets/cubyz/shaders/graphics/Image.vs b/assets/cubyz/shaders/graphics/Image.vert similarity index 100% rename from assets/cubyz/shaders/graphics/Image.vs rename to assets/cubyz/shaders/graphics/Image.vert diff --git a/assets/cubyz/shaders/graphics/Line.fs b/assets/cubyz/shaders/graphics/Line.frag similarity index 100% rename from assets/cubyz/shaders/graphics/Line.fs rename to assets/cubyz/shaders/graphics/Line.frag diff --git a/assets/cubyz/shaders/graphics/Line.vs b/assets/cubyz/shaders/graphics/Line.vert similarity index 100% rename from assets/cubyz/shaders/graphics/Line.vs rename to assets/cubyz/shaders/graphics/Line.vert diff --git a/assets/cubyz/shaders/graphics/Rect.fs b/assets/cubyz/shaders/graphics/Rect.frag similarity index 100% rename from assets/cubyz/shaders/graphics/Rect.fs rename to assets/cubyz/shaders/graphics/Rect.frag diff --git a/assets/cubyz/shaders/graphics/Rect.vs b/assets/cubyz/shaders/graphics/Rect.vert similarity index 100% rename from assets/cubyz/shaders/graphics/Rect.vs rename to assets/cubyz/shaders/graphics/Rect.vert diff --git a/assets/cubyz/shaders/graphics/RectBorder.fs b/assets/cubyz/shaders/graphics/RectBorder.frag similarity index 100% rename from assets/cubyz/shaders/graphics/RectBorder.fs rename to assets/cubyz/shaders/graphics/RectBorder.frag diff --git a/assets/cubyz/shaders/graphics/RectBorder.vs b/assets/cubyz/shaders/graphics/RectBorder.vert similarity index 100% rename from assets/cubyz/shaders/graphics/RectBorder.vs rename to assets/cubyz/shaders/graphics/RectBorder.vert diff --git a/assets/cubyz/shaders/graphics/Text.fs b/assets/cubyz/shaders/graphics/Text.frag similarity index 100% rename from assets/cubyz/shaders/graphics/Text.fs rename to assets/cubyz/shaders/graphics/Text.frag diff --git a/assets/cubyz/shaders/graphics/Text.vs b/assets/cubyz/shaders/graphics/Text.vert similarity index 100% rename from assets/cubyz/shaders/graphics/Text.vs rename to assets/cubyz/shaders/graphics/Text.vert diff --git a/assets/cubyz/shaders/graphics/graph.fs b/assets/cubyz/shaders/graphics/graph.frag similarity index 100% rename from assets/cubyz/shaders/graphics/graph.fs rename to assets/cubyz/shaders/graphics/graph.frag diff --git a/assets/cubyz/shaders/graphics/graph.vs b/assets/cubyz/shaders/graphics/graph.vert similarity index 100% rename from assets/cubyz/shaders/graphics/graph.vs rename to assets/cubyz/shaders/graphics/graph.vert diff --git a/assets/cubyz/shaders/item_drop.fs b/assets/cubyz/shaders/item_drop.frag similarity index 100% rename from assets/cubyz/shaders/item_drop.fs rename to assets/cubyz/shaders/item_drop.frag diff --git a/assets/cubyz/shaders/item_drop.vs b/assets/cubyz/shaders/item_drop.vert similarity index 100% rename from assets/cubyz/shaders/item_drop.vs rename to assets/cubyz/shaders/item_drop.vert diff --git a/assets/cubyz/shaders/item_texture_post.fs b/assets/cubyz/shaders/item_texture_post.frag similarity index 100% rename from assets/cubyz/shaders/item_texture_post.fs rename to assets/cubyz/shaders/item_texture_post.frag diff --git a/assets/cubyz/shaders/item_texture_post.vs b/assets/cubyz/shaders/item_texture_post.vert similarity index 100% rename from assets/cubyz/shaders/item_texture_post.vs rename to assets/cubyz/shaders/item_texture_post.vert diff --git a/assets/cubyz/shaders/skybox/star.fs b/assets/cubyz/shaders/skybox/star.frag similarity index 100% rename from assets/cubyz/shaders/skybox/star.fs rename to assets/cubyz/shaders/skybox/star.frag diff --git a/assets/cubyz/shaders/skybox/star.vs b/assets/cubyz/shaders/skybox/star.vert similarity index 100% rename from assets/cubyz/shaders/skybox/star.vs rename to assets/cubyz/shaders/skybox/star.vert diff --git a/assets/cubyz/shaders/ui/button.fs b/assets/cubyz/shaders/ui/button.frag similarity index 100% rename from assets/cubyz/shaders/ui/button.fs rename to assets/cubyz/shaders/ui/button.frag diff --git a/assets/cubyz/shaders/ui/button.vs b/assets/cubyz/shaders/ui/button.vert similarity index 100% rename from assets/cubyz/shaders/ui/button.vs rename to assets/cubyz/shaders/ui/button.vert diff --git a/assets/cubyz/shaders/ui/window_border.fs b/assets/cubyz/shaders/ui/window_border.frag similarity index 100% rename from assets/cubyz/shaders/ui/window_border.fs rename to assets/cubyz/shaders/ui/window_border.frag diff --git a/assets/cubyz/shaders/ui/window_border.vs b/assets/cubyz/shaders/ui/window_border.vert similarity index 100% rename from assets/cubyz/shaders/ui/window_border.vs rename to assets/cubyz/shaders/ui/window_border.vert diff --git a/src/blocks.zig b/src/blocks.zig index b86e24ea..6129bb0f 100644 --- a/src/blocks.zig +++ b/src/blocks.zig @@ -465,7 +465,7 @@ pub const meshes = struct { // MARK: meshes const emptyImage = Image{.width = 1, .height = 1, .imageData = emptyTexture[0..]}; pub fn init() void { - animationComputePipeline = graphics.ComputePipeline.init("assets/cubyz/shaders/animation_pre_processing.glsl", "", &animationUniforms); + animationComputePipeline = graphics.ComputePipeline.init("assets/cubyz/shaders/animation_pre_processing.comp", "", &animationUniforms); blockTextureArray = .init(); emissionTextureArray = .init(); reflectivityAndAbsorptionTextureArray = .init(); diff --git a/src/entity.zig b/src/entity.zig index 4f71f416..bcd913ea 100644 --- a/src/entity.zig +++ b/src/entity.zig @@ -101,8 +101,8 @@ pub const ClientEntityManager = struct { pub fn init() void { entities = .init(); pipeline = graphics.Pipeline.init( - "assets/cubyz/shaders/entity_vertex.vs", - "assets/cubyz/shaders/entity_fragment.fs", + "assets/cubyz/shaders/entity_vertex.vert", + "assets/cubyz/shaders/entity_fragment.frag", "", &uniforms, .{}, diff --git a/src/formatter/format.zig b/src/formatter/format.zig index 72b8f4db..d83fcb79 100644 --- a/src/formatter/format.zig +++ b/src/formatter/format.zig @@ -78,7 +78,7 @@ fn checkDirectory(dir: std.fs.Dir) !void { std.log.err("File name should end with .zig.zon so it gets syntax highlighting on github.", .{}); failed = true; } - if(child.kind == .file and (std.mem.endsWith(u8, child.basename, ".vs") or std.mem.endsWith(u8, child.basename, ".fs") or std.mem.endsWith(u8, child.basename, ".glsl"))) { + if(child.kind == .file and (std.mem.endsWith(u8, child.basename, ".vert") or std.mem.endsWith(u8, child.basename, ".frag") or std.mem.endsWith(u8, child.basename, ".comp"))) { try checkFile(dir, child.path); } } diff --git a/src/graphics.zig b/src/graphics.zig index 23bf7e38..14714230 100644 --- a/src/graphics.zig +++ b/src/graphics.zig @@ -142,8 +142,8 @@ pub const draw = struct { // MARK: draw fn initRect() void { rectPipeline = Pipeline.init( - "assets/cubyz/shaders/graphics/Rect.vs", - "assets/cubyz/shaders/graphics/Rect.fs", + "assets/cubyz/shaders/graphics/Rect.vert", + "assets/cubyz/shaders/graphics/Rect.frag", "", &rectUniforms, .{.cullMode = .none}, @@ -205,8 +205,8 @@ pub const draw = struct { // MARK: draw fn initRectBorder() void { rectBorderPipeline = Pipeline.init( - "assets/cubyz/shaders/graphics/RectBorder.vs", - "assets/cubyz/shaders/graphics/RectBorder.fs", + "assets/cubyz/shaders/graphics/RectBorder.vert", + "assets/cubyz/shaders/graphics/RectBorder.frag", "", &rectBorderUniforms, .{.cullMode = .none}, @@ -276,8 +276,8 @@ pub const draw = struct { // MARK: draw fn initLine() void { linePipeline = Pipeline.init( - "assets/cubyz/shaders/graphics/Line.vs", - "assets/cubyz/shaders/graphics/Line.fs", + "assets/cubyz/shaders/graphics/Line.vert", + "assets/cubyz/shaders/graphics/Line.frag", "", &lineUniforms, .{.cullMode = .none}, @@ -383,8 +383,8 @@ pub const draw = struct { // MARK: draw fn initCircle() void { circlePipeline = Pipeline.init( - "assets/cubyz/shaders/graphics/Circle.vs", - "assets/cubyz/shaders/graphics/Circle.fs", + "assets/cubyz/shaders/graphics/Circle.vert", + "assets/cubyz/shaders/graphics/Circle.frag", "", &circleUniforms, .{.cullMode = .none}, @@ -445,8 +445,8 @@ pub const draw = struct { // MARK: draw fn initImage() void { imagePipeline = Pipeline.init( - "assets/cubyz/shaders/graphics/Image.vs", - "assets/cubyz/shaders/graphics/Image.fs", + "assets/cubyz/shaders/graphics/Image.vert", + "assets/cubyz/shaders/graphics/Image.frag", "", &imageUniforms, .{.cullMode = .none}, @@ -1133,8 +1133,8 @@ const TextRendering = struct { // MARK: TextRendering fn init() !void { pipeline = Pipeline.init( - "assets/cubyz/shaders/graphics/Text.vs", - "assets/cubyz/shaders/graphics/Text.fs", + "assets/cubyz/shaders/graphics/Text.vert", + "assets/cubyz/shaders/graphics/Text.frag", "", &uniforms, .{.cullMode = .none}, @@ -2504,8 +2504,8 @@ const block_texture = struct { // MARK: block_texture fn init() void { pipeline = Pipeline.init( - "assets/cubyz/shaders/item_texture_post.vs", - "assets/cubyz/shaders/item_texture_post.fs", + "assets/cubyz/shaders/item_texture_post.vert", + "assets/cubyz/shaders/item_texture_post.frag", "", &uniforms, .{.cullMode = .none}, diff --git a/src/gui/GuiWindow.zig b/src/gui/GuiWindow.zig index a70e8ffa..1f196014 100644 --- a/src/gui/GuiWindow.zig +++ b/src/gui/GuiWindow.zig @@ -105,8 +105,8 @@ pub var borderUniforms: struct { pub fn __init() void { pipeline = graphics.Pipeline.init( - "assets/cubyz/shaders/ui/button.vs", - "assets/cubyz/shaders/ui/button.fs", + "assets/cubyz/shaders/ui/button.vert", + "assets/cubyz/shaders/ui/button.frag", "", &windowUniforms, .{.cullMode = .none}, @@ -114,8 +114,8 @@ pub fn __init() void { .{.attachments = &.{.alphaBlending}}, ); borderPipeline = graphics.Pipeline.init( - "assets/cubyz/shaders/ui/window_border.vs", - "assets/cubyz/shaders/ui/window_border.fs", + "assets/cubyz/shaders/ui/window_border.vert", + "assets/cubyz/shaders/ui/window_border.frag", "", &borderUniforms, .{.cullMode = .none}, diff --git a/src/gui/components/Button.zig b/src/gui/components/Button.zig index dc975fbb..9f60f18c 100644 --- a/src/gui/components/Button.zig +++ b/src/gui/components/Button.zig @@ -61,8 +61,8 @@ child: GuiComponent, pub fn __init() void { pipeline = graphics.Pipeline.init( - "assets/cubyz/shaders/ui/button.vs", - "assets/cubyz/shaders/ui/button.fs", + "assets/cubyz/shaders/ui/button.vert", + "assets/cubyz/shaders/ui/button.frag", "", &buttonUniforms, .{.cullMode = .none}, diff --git a/src/gui/windows/crosshair.zig b/src/gui/windows/crosshair.zig index 6b8bbdd8..a8e9afbd 100644 --- a/src/gui/windows/crosshair.zig +++ b/src/gui/windows/crosshair.zig @@ -34,8 +34,8 @@ var uniforms: struct { pub fn init() void { pipeline = graphics.Pipeline.init( - "assets/cubyz/shaders/graphics/Image.vs", - "assets/cubyz/shaders/graphics/Image.fs", + "assets/cubyz/shaders/graphics/Image.vert", + "assets/cubyz/shaders/graphics/Image.frag", "", &uniforms, .{.cullMode = .none}, diff --git a/src/gui/windows/performance_graph.zig b/src/gui/windows/performance_graph.zig index 49aff303..4d5122ee 100644 --- a/src/gui/windows/performance_graph.zig +++ b/src/gui/windows/performance_graph.zig @@ -42,8 +42,8 @@ var uniforms: struct { pub fn init() void { ssbo = graphics.SSBO.init(); pipeline = graphics.Pipeline.init( - "assets/cubyz/shaders/graphics/graph.vs", - "assets/cubyz/shaders/graphics/graph.fs", + "assets/cubyz/shaders/graphics/graph.vert", + "assets/cubyz/shaders/graphics/graph.frag", "", &uniforms, .{.cullMode = .none}, diff --git a/src/itemdrop.zig b/src/itemdrop.zig index 2f2ce774..39dd01f7 100644 --- a/src/itemdrop.zig +++ b/src/itemdrop.zig @@ -649,8 +649,8 @@ pub const ItemDropRenderer = struct { // MARK: ItemDropRenderer pub fn init() void { itemPipeline = graphics.Pipeline.init( - "assets/cubyz/shaders/item_drop.vs", - "assets/cubyz/shaders/item_drop.fs", + "assets/cubyz/shaders/item_drop.vert", + "assets/cubyz/shaders/item_drop.frag", "", &itemUniforms, .{}, diff --git a/src/renderer.zig b/src/renderer.zig index 872c4e26..33aac8f3 100644 --- a/src/renderer.zig +++ b/src/renderer.zig @@ -61,8 +61,8 @@ var reflectionCubeMap: graphics.CubeMapTexture = undefined; pub fn init() void { deferredRenderPassPipeline = graphics.Pipeline.init( - "assets/cubyz/shaders/deferred_render_pass.vs", - "assets/cubyz/shaders/deferred_render_pass.fs", + "assets/cubyz/shaders/deferred_render_pass.vert", + "assets/cubyz/shaders/deferred_render_pass.frag", "", &deferredUniforms, .{.cullMode = .none}, @@ -70,8 +70,8 @@ pub fn init() void { .{.attachments = &.{.noBlending}}, ); fakeReflectionPipeline = graphics.Pipeline.init( - "assets/cubyz/shaders/fake_reflection.vs", - "assets/cubyz/shaders/fake_reflection.fs", + "assets/cubyz/shaders/fake_reflection.vert", + "assets/cubyz/shaders/fake_reflection.frag", "", &fakeReflectionUniforms, .{.cullMode = .none}, @@ -340,8 +340,8 @@ const Bloom = struct { // MARK: Bloom emptyBuffer = .init(); emptyBuffer.generate(graphics.Image.emptyImage); firstPassPipeline = graphics.Pipeline.init( - "assets/cubyz/shaders/bloom/first_pass.vs", - "assets/cubyz/shaders/bloom/first_pass.fs", + "assets/cubyz/shaders/bloom/first_pass.vert", + "assets/cubyz/shaders/bloom/first_pass.frag", "", null, .{.cullMode = .none}, @@ -349,8 +349,8 @@ const Bloom = struct { // MARK: Bloom .{.attachments = &.{.noBlending}}, ); secondPassPipeline = graphics.Pipeline.init( - "assets/cubyz/shaders/bloom/second_pass.vs", - "assets/cubyz/shaders/bloom/second_pass.fs", + "assets/cubyz/shaders/bloom/second_pass.vert", + "assets/cubyz/shaders/bloom/second_pass.frag", "", null, .{.cullMode = .none}, @@ -358,8 +358,8 @@ const Bloom = struct { // MARK: Bloom .{.attachments = &.{.noBlending}}, ); colorExtractAndDownsamplePipeline = graphics.Pipeline.init( - "assets/cubyz/shaders/bloom/color_extractor_downsample.vs", - "assets/cubyz/shaders/bloom/color_extractor_downsample.fs", + "assets/cubyz/shaders/bloom/color_extractor_downsample.vert", + "assets/cubyz/shaders/bloom/color_extractor_downsample.frag", "", &colorExtractUniforms, .{.cullMode = .none}, @@ -468,8 +468,8 @@ pub const MenuBackGround = struct { fn init() !void { lastTime = std.time.nanoTimestamp(); pipeline = graphics.Pipeline.init( - "assets/cubyz/shaders/background/vertex.vs", - "assets/cubyz/shaders/background/fragment.fs", + "assets/cubyz/shaders/background/vertex.vert", + "assets/cubyz/shaders/background/fragment.frag", "", &uniforms, .{.cullMode = .none}, @@ -681,8 +681,8 @@ pub const Skybox = struct { defer starColorImage.deinit(main.stackAllocator); starPipeline = graphics.Pipeline.init( - "assets/cubyz/shaders/skybox/star.vs", - "assets/cubyz/shaders/skybox/star.fs", + "assets/cubyz/shaders/skybox/star.vert", + "assets/cubyz/shaders/skybox/star.frag", "", &starUniforms, .{.cullMode = .none}, @@ -853,8 +853,8 @@ pub const MeshSelection = struct { // MARK: MeshSelection pub fn init() void { pipeline = graphics.Pipeline.init( - "assets/cubyz/shaders/block_selection_vertex.vs", - "assets/cubyz/shaders/block_selection_fragment.fs", + "assets/cubyz/shaders/block_selection_vertex.vert", + "assets/cubyz/shaders/block_selection_fragment.frag", "", &uniforms, .{.depthBias = .{ diff --git a/src/renderer/chunk_meshing.zig b/src/renderer/chunk_meshing.zig index 08db2091..0212666f 100644 --- a/src/renderer/chunk_meshing.zig +++ b/src/renderer/chunk_meshing.zig @@ -75,8 +75,8 @@ pub var transparentQuadsDrawn: usize = 0; pub fn init() void { lighting.init(); pipeline = graphics.Pipeline.init( - "assets/cubyz/shaders/chunks/chunk_vertex.vs", - "assets/cubyz/shaders/chunks/chunk_fragment.fs", + "assets/cubyz/shaders/chunks/chunk_vertex.vert", + "assets/cubyz/shaders/chunks/chunk_fragment.frag", "", &uniforms, .{}, @@ -84,8 +84,8 @@ pub fn init() void { .{.attachments = &.{.noBlending}}, ); transparentPipeline = graphics.Pipeline.init( - "assets/cubyz/shaders/chunks/chunk_vertex.vs", - "assets/cubyz/shaders/chunks/transparent_fragment.fs", + "assets/cubyz/shaders/chunks/chunk_vertex.vert", + "assets/cubyz/shaders/chunks/transparent_fragment.frag", "#define transparent\n", &transparentUniforms, .{}, @@ -99,10 +99,10 @@ pub fn init() void { .alphaBlendOp = .add, }}}, ); - commandPipeline = graphics.ComputePipeline.init("assets/cubyz/shaders/chunks/fillIndirectBuffer.glsl", "", &commandUniforms); + commandPipeline = graphics.ComputePipeline.init("assets/cubyz/shaders/chunks/fillIndirectBuffer.comp", "", &commandUniforms); occlusionTestPipeline = graphics.Pipeline.init( - "assets/cubyz/shaders/chunks/occlusionTestVertex.vs", - "assets/cubyz/shaders/chunks/occlusionTestFragment.fs", + "assets/cubyz/shaders/chunks/occlusionTestVertex.vert", + "assets/cubyz/shaders/chunks/occlusionTestFragment.frag", "", &occlusionTestUniforms, .{},