Example #1
0
        public override void AddData(int mapperIndex, Block block, int blockLight, int sunlight)
        {
            if (!(block is BlockTorch torch))
            {
                return;
            }
            var pos    = block.Position;
            var filter = block.TextureFilter;
            var index  = torch.StaticData.GetTextureIndex(BlockFace.Up);

            _mapper.AddTask(new VboMapperTask <Block>(VboMapperTaskType.Add, block,
                                                      new[] {
                pos.X, pos.Y, index,
                filter.ValueF,
                blockLight / Block.MaxBlockLightF,
                sunlight / Block.MaxBlockLightF
            }, 0));
        }
Example #2
0
        public override void AddData(int mapperIndex, Block block, int blockLight, int sunlight)
        {
            if (!(block is CrossBlock crossBlock))
            {
                return;
            }
            var pos    = BitUtils.IntBitsToFloat(block.Position);
            var filter = block.TextureFilter;
            var index  = crossBlock.TextureIndex;

            _mapper.AddTask(new VboMapperTask <Block>(VboMapperTaskType.Add, block,
                                                      new[] {
                pos.X, pos.Y, pos.Z, index,
                filter.ValueF,
                blockLight / Block.MaxBlockLightF,
                sunlight / Block.MaxBlockLightF
            }, 0));
        }