Question: My laptop has a nice GPU with dedicated video RAM. But I've noticed while playing Minecraft that the computer doesn't seem to be *using* it for anything. Only about 100 MB get used at all according to the Windows Task Manager, while it eats up about half my regular RAM.

I had thought that VRAM would be used for storing models and textures and stuff, which would reduce the demand on regular RAM; if that's true, the textures and models must be far smaller than I'd thought. (note that this is a heavily modded install, with much more complex models and textures than your standard Minecraft.)

If it's not true, what *is* VRAM used for? Is there any way I can get my computer to make better use of it?

Answer: 
Java Minecraft is CPU heavy, but the GPU really has very little to do, graphics-wise it is very simple and graphics resources are very small in comparison to say… Call of Duty. When I say small, I mean very small, 100MB sounds about right.

Because of the “block” design of the game, you can fill the screen with relatively little resources needed. Its like using “Duplo Lego” instead of “Lego Technics.”

Java is an “interpreted” language, meaning it is not compiled down to native instructions. So when it is run, it needs a virtual machine to get the instructions (or bytecode) into something the processor will understand. Your CPU is doing more work than the GPU.
> 
> It's not about poor coding.
> 
> 
> 

I would like to point something out. Modern graphics cards *could* process a large part of Minecraft in the card itself. Systems like PhysX attempt to do just that—CUDA, OpenCL etc. Consequently, this would increase VRAM usage.

Here's some things that could easily (relatively speaking) be offloaded to the graphics driver:

* Tick updates of blocks (think leaf blocks dying, lighting updates, etc.)
* Procedural generation
* Fluid updates
* Redstone
* Physics

However, GPU processing in a shader language (GLSL, HLSL, SPIR-V) is much more difficult and bug prone than a high level language like Java. Thus, all of these things are performed on the CPU.

Although several games have implemented some of that in GPUs before, Minecraft didn't have the large, skilled resource pool that triple-A titles have.

---

### The Math

Suppose Minecraft uses a 32-bit color scheme.

```
32 bits per color
4 colors per pixel (red, green, blue, alpha)
8 bits per byte
(32 bits * 4 colors per pixel) / 8 bits per byte = 128 / 8 = 16 bytes per pixel.

```

```
100MB / 16 bytes per pixel = 6,250,000 pixels
sqrt(6250000) = 2500x2500 image resource in GPU (uncompressed)
2500 pixels wide|tall / 16 pixels wide|tall = 156.25 tiles wide|tall (assuming 16x16 tile size)
156.25 tiles wide * 156.25 tiles tall = ~24,414 16x16 tiles.

```

In summary, you can store ~24,414, 16x16 tiles in an uncompressed, 32-bit, image resource in VRAM.

This exercise really helped me wrap my head around why [Factorio had issues with it's sprite-sheets](https://gamedev.stackexchange.com/questions/73316/how-do-we-solve-big-video-memory-requirements-in-a-2d-game)