edit: here are some strings to look for to find the right part of code.
the shader filename is called "cartographic.fx".
The existing parameters are "viewMatrix", "projMatrix", "gridSizeCoeff", "terrainSizeCoeff", "elevMaximum", "elevMinimum", "frameWidth", "frameHeight", "elevTexture", "hypsometricTexture", "topographicTexture", "frameTexture", "decalTexture"
there are techniques called "Terrain_Stage0", "Terrain_Stage1", "Decal", "DecalGlow".
Basically I would be creating a new parameter that Terrain_Stage0 would use. The value for the parameter needs to be passed in from the new c++ code.
---------
edit for clarity: i am looking for someone to hack the fa executable to pass a single extra bit of data into the cartographic HLSL shader. This will allow me to override the standard cartographic view with super much more awesome 'strategic preview' instead.
---------
original post:
Dear C++ coders,
I worked out a way to get the cartographic view working for all maps. Whilst Duck has already made a tool to fix maps that don't have the cartographic data, my fix changes the cartographic HLSL shader to render something even if the data doesn't exist.
And suddenly I have the ability to implement the strategic preview in the game. Which means I will draw the terrain my way, where lines are used to represent cliffs (not contours, which is misleading). I believe this will be totally amazerific.
But I can't draw water because the shader doesn't know about water.
The C++ code passes all of the data to the shader. At the moment it does not pass the water elevation level to the shader, so it's impossible for to draw it. This is terrible. Does anyone have the ablilty to modify the c++ code to pass in this one extra parameter? That would be an impossible task for me, but it should be easy for the right guy. It's just one float field.
(If you are wondering how the current shader draws water, its because the c++ passes in a map of colors-to-elevation to render. The shader doesn't know its water, it just knows to use color X for position Y. That doesn't work for us because all colours are black on broken maps - which is why I started doing this in the first place).
FA's cartographic view:
My cartographic view:
My strategic view:
So basically the idea is to use my cartographic view whenever the proper one is not available. I'd like to enhance the lines so that they look more like the strategic view image, because i think its much smarter. I need help to get the water in there because without water my cartographic view sucks:
My carographic view of finns revenge, with no water
Help?