fix: return cc:r textures except advanced gui corners
@@ -43,7 +43,7 @@ public class MixinItemFrameEntityRenderer
|
||||
{
|
||||
int light = itemFrameEntity.getType() == EntityType.GLOW_ITEM_FRAME ? 0xf000d2 : itemFrameEntityLight; // See getLightVal.
|
||||
ItemPrintoutRenderer.INSTANCE.renderInFrame( matrixStack, vertexConsumerProvider, stack, light );
|
||||
// TODO: need to find how to make if instead return, like it doing Forge
|
||||
// TODO: need to find how to make if statement instead return, like it doing Forge
|
||||
matrixStack.pop();
|
||||
info.cancel();
|
||||
}
|
||||
|
@@ -1,40 +0,0 @@
|
||||
#version 140
|
||||
|
||||
#define FONT_WIDTH 6.0
|
||||
#define FONT_HEIGHT 9.0
|
||||
|
||||
uniform sampler2D u_font;
|
||||
uniform int u_width;
|
||||
uniform int u_height;
|
||||
uniform usamplerBuffer u_tbo;
|
||||
uniform vec3 u_palette[16];
|
||||
|
||||
in vec2 f_pos;
|
||||
|
||||
out vec4 colour;
|
||||
|
||||
vec2 texture_corner(int index) {
|
||||
float x = 1.0 + float(index % 16) * (FONT_WIDTH + 2.0);
|
||||
float y = 1.0 + float(index / 16) * (FONT_HEIGHT + 2.0);
|
||||
return vec2(x, y);
|
||||
}
|
||||
|
||||
void main() {
|
||||
vec2 term_pos = vec2(f_pos.x / FONT_WIDTH, f_pos.y / FONT_HEIGHT);
|
||||
vec2 corner = floor(term_pos);
|
||||
|
||||
ivec2 cell = ivec2(corner);
|
||||
int index = 3 * (clamp(cell.x, 0, u_width - 1) + clamp(cell.y, 0, u_height - 1) * u_width);
|
||||
|
||||
// 1 if 0 <= x, y < width, height, 0 otherwise
|
||||
vec2 outside = step(vec2(0.0, 0.0), vec2(cell)) * step(vec2(cell), vec2(float(u_width) - 1.0, float(u_height) - 1.0));
|
||||
float mult = outside.x * outside.y;
|
||||
|
||||
int character = int(texelFetch(u_tbo, index).r);
|
||||
int fg = int(texelFetch(u_tbo, index + 1).r);
|
||||
int bg = int(texelFetch(u_tbo, index + 2).r);
|
||||
|
||||
vec2 pos = (term_pos - corner) * vec2(FONT_WIDTH, FONT_HEIGHT);
|
||||
vec4 img = texture(u_font, (texture_corner(character) + pos) / 256.0);
|
||||
colour = vec4(mix(u_palette[bg], img.rgb * u_palette[fg], img.a * mult), 1.0);
|
||||
}
|
@@ -1,12 +0,0 @@
|
||||
#version 130
|
||||
|
||||
uniform mat4 u_mv;
|
||||
|
||||
in vec3 v_pos;
|
||||
|
||||
out vec2 f_pos;
|
||||
|
||||
void main() {
|
||||
gl_Position = gl_ProjectionMatrix * u_mv * vec4(v_pos.x, v_pos.y, 0, 1);
|
||||
f_pos = v_pos.xy;
|
||||
}
|
@@ -1,40 +0,0 @@
|
||||
#version 150
|
||||
|
||||
#define FONT_WIDTH 6.0
|
||||
#define FONT_HEIGHT 9.0
|
||||
|
||||
uniform sampler2D Sampler0; // Font
|
||||
uniform int Width;
|
||||
uniform int Height;
|
||||
uniform usamplerBuffer Tbo;
|
||||
uniform vec3 Palette[16];
|
||||
|
||||
in vec2 f_pos;
|
||||
|
||||
out vec4 colour;
|
||||
|
||||
vec2 texture_corner(int index) {
|
||||
float x = 1.0 + float(index % 16) * (FONT_WIDTH + 2.0);
|
||||
float y = 1.0 + float(index / 16) * (FONT_HEIGHT + 2.0);
|
||||
return vec2(x, y);
|
||||
}
|
||||
|
||||
void main() {
|
||||
vec2 term_pos = vec2(f_pos.x / FONT_WIDTH, f_pos.y / FONT_HEIGHT);
|
||||
vec2 corner = floor(term_pos);
|
||||
|
||||
ivec2 cell = ivec2(corner);
|
||||
int index = 3 * (clamp(cell.x, 0, Width - 1) + clamp(cell.y, 0, Height - 1) * Width);
|
||||
|
||||
// 1 if 0 <= x, y < Width, Height, 0 otherwise
|
||||
vec2 outside = step(vec2(0.0, 0.0), vec2(cell)) * step(vec2(cell), vec2(float(Width) - 1.0, float(Height) - 1.0));
|
||||
float mult = outside.x * outside.y;
|
||||
|
||||
int character = int(texelFetch(Tbo, index).r);
|
||||
int fg = int(texelFetch(Tbo, index + 1).r);
|
||||
int bg = int(texelFetch(Tbo, index + 2).r);
|
||||
|
||||
vec2 pos = (term_pos - corner) * vec2(FONT_WIDTH, FONT_HEIGHT);
|
||||
vec4 img = texture(Sampler0, (texture_corner(character) + pos) / 256.0);
|
||||
colour = vec4(mix(Palette[bg], img.rgb * Palette[fg], img.a * mult), 1.0);
|
||||
}
|
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"vertex": "computercraft:monitor_tbo",
|
||||
"fragment": "computercraft:monitor_tbo",
|
||||
"attributes": [ "Position" ],
|
||||
"samplers": [ { "name": "Sampler0" } ],
|
||||
"uniforms": [
|
||||
{ "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] },
|
||||
{ "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] },
|
||||
{ "name": "Width", "type": "int", "count": 1, "values": [ 1 ] },
|
||||
{ "name": "Height", "type": "int", "count": 1, "values": [ 1 ] },
|
||||
{ "name": "Tbo", "type": "int", "count": 1, "values": [ 3 ] }
|
||||
]
|
||||
}
|
@@ -1,14 +0,0 @@
|
||||
#version 150
|
||||
|
||||
in vec3 Position;
|
||||
in vec2 UV0;
|
||||
|
||||
uniform mat4 ModelViewMat;
|
||||
uniform mat4 ProjMat;
|
||||
|
||||
out vec2 f_pos;
|
||||
|
||||
void main() {
|
||||
gl_Position = ProjMat * ModelViewMat * vec4(Position, 1);
|
||||
f_pos = UV0;
|
||||
}
|
Before Width: | Height: | Size: 190 B After Width: | Height: | Size: 242 B |
Before Width: | Height: | Size: 181 B After Width: | Height: | Size: 228 B |
Before Width: | Height: | Size: 398 B After Width: | Height: | Size: 357 B |
Before Width: | Height: | Size: 476 B After Width: | Height: | Size: 410 B |
Before Width: | Height: | Size: 417 B After Width: | Height: | Size: 373 B |
Before Width: | Height: | Size: 526 B After Width: | Height: | Size: 380 B |
Before Width: | Height: | Size: 517 B After Width: | Height: | Size: 363 B |
Before Width: | Height: | Size: 404 B After Width: | Height: | Size: 347 B |
Before Width: | Height: | Size: 534 B After Width: | Height: | Size: 413 B |
Before Width: | Height: | Size: 426 B After Width: | Height: | Size: 206 B |
Before Width: | Height: | Size: 560 B After Width: | Height: | Size: 291 B |
Before Width: | Height: | Size: 554 B After Width: | Height: | Size: 286 B |
Before Width: | Height: | Size: 193 B After Width: | Height: | Size: 303 B |
Before Width: | Height: | Size: 214 B After Width: | Height: | Size: 355 B |
Before Width: | Height: | Size: 199 B After Width: | Height: | Size: 317 B |
Before Width: | Height: | Size: 217 B After Width: | Height: | Size: 389 B |
Before Width: | Height: | Size: 195 B After Width: | Height: | Size: 359 B |
Before Width: | Height: | Size: 218 B After Width: | Height: | Size: 408 B |
Before Width: | Height: | Size: 296 B After Width: | Height: | Size: 426 B |
Before Width: | Height: | Size: 294 B After Width: | Height: | Size: 422 B |
Before Width: | Height: | Size: 217 B After Width: | Height: | Size: 389 B |
Before Width: | Height: | Size: 195 B After Width: | Height: | Size: 359 B |
Before Width: | Height: | Size: 488 B After Width: | Height: | Size: 368 B |
Before Width: | Height: | Size: 490 B After Width: | Height: | Size: 366 B |
Before Width: | Height: | Size: 358 B After Width: | Height: | Size: 283 B |
Before Width: | Height: | Size: 360 B After Width: | Height: | Size: 280 B |
Before Width: | Height: | Size: 284 B After Width: | Height: | Size: 245 B |
Before Width: | Height: | Size: 205 B After Width: | Height: | Size: 175 B |
Before Width: | Height: | Size: 295 B After Width: | Height: | Size: 244 B |
Before Width: | Height: | Size: 450 B After Width: | Height: | Size: 360 B |
Before Width: | Height: | Size: 307 B After Width: | Height: | Size: 262 B |
Before Width: | Height: | Size: 248 B After Width: | Height: | Size: 212 B |
Before Width: | Height: | Size: 299 B After Width: | Height: | Size: 232 B |
Before Width: | Height: | Size: 224 B After Width: | Height: | Size: 196 B |
Before Width: | Height: | Size: 136 B After Width: | Height: | Size: 121 B |
Before Width: | Height: | Size: 227 B After Width: | Height: | Size: 176 B |
Before Width: | Height: | Size: 176 B After Width: | Height: | Size: 158 B |
Before Width: | Height: | Size: 75 B After Width: | Height: | Size: 75 B |
Before Width: | Height: | Size: 169 B After Width: | Height: | Size: 145 B |
Before Width: | Height: | Size: 236 B After Width: | Height: | Size: 215 B |
Before Width: | Height: | Size: 460 B After Width: | Height: | Size: 368 B |
Before Width: | Height: | Size: 152 B After Width: | Height: | Size: 149 B |
Before Width: | Height: | Size: 234 B After Width: | Height: | Size: 225 B |
Before Width: | Height: | Size: 522 B After Width: | Height: | Size: 388 B |
Before Width: | Height: | Size: 495 B After Width: | Height: | Size: 381 B |
Before Width: | Height: | Size: 484 B After Width: | Height: | Size: 368 B |
Before Width: | Height: | Size: 513 B After Width: | Height: | Size: 387 B |
Before Width: | Height: | Size: 511 B After Width: | Height: | Size: 375 B |
Before Width: | Height: | Size: 487 B After Width: | Height: | Size: 386 B |
Before Width: | Height: | Size: 508 B After Width: | Height: | Size: 388 B |
Before Width: | Height: | Size: 477 B After Width: | Height: | Size: 388 B |
Before Width: | Height: | Size: 522 B After Width: | Height: | Size: 388 B |
Before Width: | Height: | Size: 464 B After Width: | Height: | Size: 379 B |
Before Width: | Height: | Size: 487 B After Width: | Height: | Size: 393 B |
Before Width: | Height: | Size: 498 B After Width: | Height: | Size: 373 B |
Before Width: | Height: | Size: 445 B After Width: | Height: | Size: 367 B |
Before Width: | Height: | Size: 469 B After Width: | Height: | Size: 380 B |
Before Width: | Height: | Size: 505 B After Width: | Height: | Size: 371 B |
Before Width: | Height: | Size: 466 B After Width: | Height: | Size: 369 B |
Before Width: | Height: | Size: 482 B After Width: | Height: | Size: 385 B |
Before Width: | Height: | Size: 508 B After Width: | Height: | Size: 395 B |
Before Width: | Height: | Size: 487 B After Width: | Height: | Size: 386 B |
Before Width: | Height: | Size: 511 B After Width: | Height: | Size: 381 B |
Before Width: | Height: | Size: 195 B After Width: | Height: | Size: 347 B |
Before Width: | Height: | Size: 186 B After Width: | Height: | Size: 342 B |
Before Width: | Height: | Size: 182 B After Width: | Height: | Size: 251 B |
Before Width: | Height: | Size: 193 B After Width: | Height: | Size: 253 B |
Before Width: | Height: | Size: 238 B After Width: | Height: | Size: 218 B |
Before Width: | Height: | Size: 178 B After Width: | Height: | Size: 163 B |
Before Width: | Height: | Size: 233 B After Width: | Height: | Size: 217 B |
Before Width: | Height: | Size: 224 B After Width: | Height: | Size: 340 B |
Before Width: | Height: | Size: 175 B After Width: | Height: | Size: 230 B |
Before Width: | Height: | Size: 208 B After Width: | Height: | Size: 193 B |
Before Width: | Height: | Size: 242 B After Width: | Height: | Size: 223 B |
Before Width: | Height: | Size: 191 B After Width: | Height: | Size: 180 B |
Before Width: | Height: | Size: 117 B After Width: | Height: | Size: 113 B |
Before Width: | Height: | Size: 191 B After Width: | Height: | Size: 173 B |
Before Width: | Height: | Size: 155 B After Width: | Height: | Size: 148 B |
Before Width: | Height: | Size: 75 B After Width: | Height: | Size: 75 B |
Before Width: | Height: | Size: 155 B After Width: | Height: | Size: 145 B |
Before Width: | Height: | Size: 204 B After Width: | Height: | Size: 191 B |
Before Width: | Height: | Size: 186 B After Width: | Height: | Size: 345 B |
Before Width: | Height: | Size: 145 B After Width: | Height: | Size: 139 B |
Before Width: | Height: | Size: 198 B After Width: | Height: | Size: 192 B |
Before Width: | Height: | Size: 217 B After Width: | Height: | Size: 333 B |
Before Width: | Height: | Size: 212 B After Width: | Height: | Size: 326 B |
Before Width: | Height: | Size: 202 B After Width: | Height: | Size: 320 B |
Before Width: | Height: | Size: 210 B After Width: | Height: | Size: 330 B |
Before Width: | Height: | Size: 199 B After Width: | Height: | Size: 351 B |
Before Width: | Height: | Size: 188 B After Width: | Height: | Size: 348 B |
Before Width: | Height: | Size: 212 B After Width: | Height: | Size: 333 B |
Before Width: | Height: | Size: 203 B After Width: | Height: | Size: 329 B |
Before Width: | Height: | Size: 217 B After Width: | Height: | Size: 333 B |
Before Width: | Height: | Size: 234 B After Width: | Height: | Size: 322 B |