1 |
I mean, there's a variable thickness option, though it produces floating lines when close up. Also, there is a "low-quality" version which basically just renders the unit in GL_LINES mode with some depth/offset tweaks to make the lines largely only appear behind the unit. Doesn't completely fix the visibility issue for units that cut into the ground (like mexes), but works reasonably well otherwise.
|
1 |
I mean, there's a variable thickness option, though it produces floating lines when close up. Also, there is a "low-quality" version which basically just renders the unit in GL_LINES mode with some depth/offset tweaks to make the lines largely only appear behind the unit. Doesn't completely fix the visibility issue for units that cut into the ground (like mexes), but works reasonably well otherwise.
|
3 |
Lastly, the outline effect is mostly a shader (specifically a light fullscreen blur shader), but there is the stencilling bit that I had to put in to deal with water, and don't know how to replace it. I've done shader-only outlines in other applications, but that used geometry shaders, so it requires OpenGL 3+, not to mention having triangle adjacency data to work with, and it's not like geometry shaders are known for their performance. A pure fragment shader-only approach (render units with no texture in black to offscreen buffer, blur offscreen buffer, draw buffer image between map and units) doesn't work in Spring because the high-quality water reflection and refraction settings screw with depth and rendering order, which caused the outline silhouettes to render on top of the units.
|
3 |
Lastly, the outline effect is mostly a shader (specifically a light fullscreen blur shader), but there is the stencilling bit that I had to put in to deal with water, and don't know how to replace it. I've done shader-only outlines in other applications, but that used geometry shaders, so it requires OpenGL 3+, not to mention having triangle adjacency data to work with, and it's not like geometry shaders are known for their performance. A pure fragment shader-only approach (render units with no texture in black to offscreen buffer, blur offscreen buffer, draw buffer image between map and units) doesn't work in Spring because the high-quality water reflection and refraction settings screw with depth and rendering order, which caused the outline silhouettes to render on top of the units.
|