How I can do calculations necessary to create the mask is beyond me I don't even know how I can begin to translate the game world's data, relative to the what the camera sees, and update the texture accordingly. I say somehow in italics because I have no clue as to how I can create this "Mask" effect in the light map render texture. (However this does not take into account lights in the world, which I also have absolutely no clue how to include in my calculation to the light map render texture) The idea I had on how to achieve the desired effect is the following: Create a texture that is black and somehow calculate the area that is white, storing this in a light map render texture, finally doing an Additive Blend of both the main texture and the light map texture to achieve a similar effect to Starbound's. Starbound is using a shader to render its lighting, but how it's going about that is quite a mystery to me. Terraria's lighting system seems to be more blocky/tile based, but Starbound's is a lot more smooth. I'm trying to achieve the fog-of-war lighting style that Terraria and Starbound have.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |