mirror of
https://github.com/PixelGuys/Cubyz.git
synced 2025-09-10 04:41:32 -04:00
parent
85ce42d023
commit
d8a3df1aa4
@ -280,11 +280,9 @@ void mainItemDrop() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
vec4 color = decodeColor(block);
|
fragColor = decodeColor(block);
|
||||||
color.a = 1; // No transparency supported!
|
fragColor.a = 1; // No transparency supported!
|
||||||
color = color*vec4(ambientLight*normalVariations[lastNormal], 1);
|
fragColor = fragColor*vec4(ambientLight*normalVariations[lastNormal], 1);
|
||||||
|
|
||||||
fragColor.rgb /= 4;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
@ -541,9 +541,9 @@ pub const ItemDropRenderer = struct { // MARK: ItemDropRenderer
|
|||||||
var z: u32 = 0;
|
var z: u32 = 0;
|
||||||
while(z < 1) : (z += 1) {
|
while(z < 1) : (z += 1) {
|
||||||
var x: u32 = 0;
|
var x: u32 = 0;
|
||||||
while(x < self.size[0]) : (x += 1) {
|
while(x < img.width) : (x += 1) {
|
||||||
var y: u32 = 0;
|
var y: u32 = 0;
|
||||||
while(y < self.size[1]) : (y += 1) {
|
while(y < img.height) : (y += 1) {
|
||||||
dataSection[i] = img.getRGB(x, y).toARBG();
|
dataSection[i] = img.getRGB(x, y).toARBG();
|
||||||
i += 1;
|
i += 1;
|
||||||
}
|
}
|
||||||
@ -690,7 +690,7 @@ pub const ItemDropRenderer = struct { // MARK: ItemDropRenderer
|
|||||||
modelMatrix = modelMatrix.mul(Mat4f.rotationZ(-rot[2]));
|
modelMatrix = modelMatrix.mul(Mat4f.rotationZ(-rot[2]));
|
||||||
c.glUniformMatrix4fv(itemUniforms.modelMatrix, 1, c.GL_TRUE, @ptrCast(&modelMatrix));
|
c.glUniformMatrix4fv(itemUniforms.modelMatrix, 1, c.GL_TRUE, @ptrCast(&modelMatrix));
|
||||||
|
|
||||||
if(item == .baseItem and item.baseItem.block != null) {
|
if(item == .baseItem and item.baseItem.block != null and item.baseItem.image.imageData.ptr == graphics.Image.defaultImage.imageData.ptr) {
|
||||||
const blockType = item.baseItem.block.?;
|
const blockType = item.baseItem.block.?;
|
||||||
const block = blocks.Block{.typ = blockType, .data = 0};
|
const block = blocks.Block{.typ = blockType, .data = 0};
|
||||||
c.glUniform1i(itemUniforms.modelIndex, block.mode().model(block));
|
c.glUniform1i(itemUniforms.modelIndex, block.mode().model(block));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user