Timeline for How can I create a fog-of-war based on character line of sight mesh and a shader?
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 13, 2018 at 13:01 | comment | added | Philipp | This is really just half an answer. A good answer would not just talk about the theory but deliver a working solution. | |
Oct 18, 2017 at 9:35 | comment | added | Gavin Williams | Some other ideas I've had are .. 1) Use the alpha layer (if you're not using it) or keep an extra texture for all surfaces, each texture / layer is a map of what part of the surface you've seen already. You can then check this texture in shader to know if you've seen the pixel before. 2) If you constrain the view to be orthogonal (at an angle - so isometric) then you'll have a 2d view of the world, and you can paint the visible scene onto a mega texture to record the level that you've seen. | |
Oct 12, 2017 at 16:44 | comment | added | ag4w | Sorry for a slightly slow response, this causes multiple issues. Most notorious being that the mesh is 2D, it's not feasible to do volumetric raycasting due to performance reasons, and if I render the 2D mesh to the camera as some form of mask - I get artifacts along walls and similar where the player doesn't see "above" the mesh even though they should. This is solvable by raycast upwards from the mesh outline, but it's not very elegant and not really feasible in terms of performance either. I was really hoping this would be solveable via a screenspace shader instead. | |
Oct 12, 2017 at 9:18 | history | edited | Gavin Williams | CC BY-SA 3.0 |
clarification
|
Oct 12, 2017 at 2:27 | history | edited | Gavin Williams | CC BY-SA 3.0 |
added 46 characters in body
|
Oct 12, 2017 at 2:14 | history | edited | Gavin Williams | CC BY-SA 3.0 |
fixed some term consistency
|
Oct 12, 2017 at 1:59 | history | answered | Gavin Williams | CC BY-SA 3.0 |