Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions assets/cubyz/shaders/graphics/Circle.frag

This file was deleted.

26 changes: 0 additions & 26 deletions assets/cubyz/shaders/graphics/Circle.vert

This file was deleted.

9 changes: 9 additions & 0 deletions assets/cubyz/shaders/graphics/Line.vert
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,21 @@ layout(location = 0) in vec2 vertex_pos;

layout(location = 0) flat out vec4 color;

#ifdef OPEN_GL
// in pixel
layout(location = 0) uniform vec2 start;
layout(location = 1) uniform vec2 direction;
layout(location = 2) uniform vec2 screen;

layout(location = 3) uniform int lineColor;
#else
layout(push_constant, std430) uniform _ {
vec2 start;
vec2 direction;
vec2 screen;
int lineColor;
};
#endif

void main() {
// Convert to opengl coordinates:
Expand Down
9 changes: 9 additions & 0 deletions assets/cubyz/shaders/graphics/Rect.vert
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,20 @@ layout(location = 0) in vec2 vertex_pos;
layout(location = 0) flat out vec4 color;

// in pixel
#ifdef OPEN_GL
layout(location = 0) uniform vec2 start;
layout(location = 1) uniform vec2 size;
layout(location = 2) uniform vec2 screen;

layout(location = 3) uniform int rectColor;
#else
layout(push_constant, std430) uniform _ {
vec2 start;
vec2 size;
vec2 screen;
int rectColor;
};
#endif

void main() {
// Convert to opengl coordinates:
Expand Down
10 changes: 10 additions & 0 deletions assets/cubyz/shaders/graphics/RectBorder.vert
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,22 @@ layout(location = 0) in vec4 vertex_pos;
layout(location = 0) flat out vec4 color;

// in pixel
#ifdef OPEN_GL
layout(location = 0) uniform vec2 start;
layout(location = 1) uniform vec2 size;
layout(location = 2) uniform vec2 screen;
layout(location = 3) uniform float lineWidth;

layout(location = 4) uniform int rectColor;
#else
layout(push_constant, std430) uniform _ {
vec2 start;
vec2 size;
vec2 screen;
float lineWidth;
int rectColor;
};
#endif

void main() {
// Convert to opengl coordinates:
Expand Down
9 changes: 5 additions & 4 deletions src/block_entity.zig
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,11 @@ pub const BlockEntityTypes = struct { // MARK: BlockEntityTypes
"",
&uniforms,
graphics.VertexArray.EmptyVertex,
&.{},
.{},
.{.depthTest = true, .depthCompare = .equal, .depthWrite = false},
.{.attachments = &.{.alphaBlending}, .formats = &.{.world}},
.{
.rasterState = .{},
.depthStencilState = .{.depthTest = true, .depthCompare = .equal, .depthWrite = false},
.blendState = .{.attachments = &.{.alphaBlending}, .formats = &.{.world}},
},
);
}
}
Expand Down
Loading
Loading