I'm implementing Warcraft/Age of Empires-style "Fog of War" by writing a Filter class and the appropriate JME material definition with vertex and fragment shaders.
I was able to figure that out very easily, I can now tint the entire screen for example.
But I'm now stuck again in computing where a given fragment is located in the world.
So, how can this be done?
Why I need this, is basically I have a texture (32x32) with which to darken the world at particular places based on the alpha channel of the texture.
0,0 in the texture would correspond to 0,0,0 in the world. Given a "world map or terrain" of size 100,100.