Jump to content

Fog of War and Blending


Recommended Posts



I have posted this topic to a non-programming related thread, may be I should repeat my question in this thread too:


My First Message On That Thread was:



Before the age of shaders (that was a long time ago I know :)) I have made a 3D based small RTS game. At that time, I was using a technique for FoW (Fog of War) issue, it was like this:


- There were 3 textures, 1 the original ground image, 1 the previously visited areas (half-dark black and white texture) and 1 for the units and houses which have a sight range.

- I was blending these 3 textures with multiply blend

- voila! your FoW is ready :)




1.is there any easier way to do FoW in LW engine? Or is there an easy way for multiplication blend?

2.how can I get/set the texture of water plane?


Best regards,



My Second Message was:

Let me give you the example of my old program. You can downlaod it from here:




When you execute this file, you will see that an OpenGL app will start and there are some bright points on the window. Consider these bright points are the visible areas around some buildings or some units on an RTS game. When you move the mouse, another bright area will be moving, and every place it moved on will be less brighter, and this is the effect happens when a unit goes to somewhere else but its previously visited routed are half-bright. I have made this with a system of multiplication blend (with glBlendFunc(GL_SRC_ALPHA, GL_ONE); statement). How can I do the same with LW engine?




Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...