Say I wanted to have a 3D grid of cells where each cell is affected by only its content and its immediate neighbors. In such a scenario, the light in one cell causes each of it's neighbors to have a slightly lesser light value in a neighboring cell. For instance, imagine this is a 2D map of one layer of the game world:
+---+---+---+---+---+---+
| 0 | 0 | 1 | 0 | 0 | 0 |
+---+---+---+---+---+---+
| 0 | 1 | 2 | 1 | 0 | 0 |
+---+---+---+---+---+---+
| 1 | 2 | 3 | 2 | 1 | 0 |
+---+---+---+---+---+---+
| 0 | 1 | 2 | 1 | 0 | 0 |
+---+---+---+---+---+---+
| 0 | 0 | 1 | 0 | 0 | 0 |
+---+---+---+---+---+---+
| 0 | 0 | 0 | 0 | 0 | 0 |
+---+---+---+---+---+---+
The cell with the "3" contains a light of intensity 3. This causes the surrounding cells to have a light of intensity 2, and the cells surrounding that intensity 1, etc. The 0's should be completely dark (black color for the material). Within a cell, the lighting should be constant, and in fact can be as simple as adjusting the color brightness for any textures that touch that cell. For example, you could imagine in the map above that each cell has a square floor. Each floor square would have a texture multiplied by the light intensity for that cell. If there is any obstruction (wall, block, etc.), it would prevent the light propagation to that cell.
Any idea how to get something like this working? Can it be done in shaders alone, or will each light level need its own submesh?