Smooth Lighting Mod
Or search "Smooth Lighting" in the Mod Browser
- Improve visual quality during night
Beautiful. Do you have any example pictures of how it looks with light sources and not just the sun?
lolwutThis is something that SLR's Scalie has been trying to do for some time now, and then suddenly random computer user just does.
The only flaw I've noticed so far is more of a problem with Terraria than anything: that is some (very minor) frame stuttering above 60 fps on a high refresh rate monitor, but trust me, *this* is the least disturbing thing that tends to happen to terraria at that rate.
Eitherway, framelock can be turned off to disable it of course.
No, this mod does not work with emissive textures. My plan is to try to rewrite the mod and implement a shader that multiplies the tile texture color by the light texture color and apply the shader while drawing tiles, but I'm not currently sure how long that will take.Does this mod work correctly with emissive textures? (Any textures that glow without producing light.) Glowing moss, Duke Fishron's eyes, many player armors and weapons, strange dyes, Martian furniture, etc.
I was looking into making this mod, but did not because I wasn't sure that I would be able to do it properly without modifying shaders. This mod's approach of applying lighting after drawing everything usually makes emissive textures darker when lighting is applied. If any shaders draw emissive and non-emissive parts of a texture in a single draw call, it will be impossible to fix this mod without changing those shaders.
The only solution I can think of to make this mod bug free is to use the lighting texture to apply lighting to every sprite as it is drawn. This should require changing every shader that will receive light from the lighting texture.
Search for glowmask in the game's source code to get an idea of which items will cause problems.
I don't believe this is preferable.No, this mod does not work with emissive textures. My plan is to try to rewrite the mod and implement a shader that multiplies the tile texture color by the light texture color and apply the shader while drawing tiles, but I'm not currently sure how long that will take.
The light texture will be ignored while drawing emissive textures and everything will look perfect.I don't believe this is preferable.
GlowMasks are made to simulate glowing without producing light. If the modder intended for the sprite to be accompanied by light, they would have made it produce light as well.
Definitely a good idea, but I am not sure how to deal with painted blocks and their shaders. I could be overthinking things, but it seems a large number of shaders will need to be decompiled and modified to do it properly and without a significant performance loss. I was looking into doing this for 1.4 which has additional shaders for animated trees and vines, so it might be easier for the current tModloader version.No, this mod does not work with emissive textures. My plan is to try to rewrite the mod and implement a shader that multiplies the tile texture color by the light texture color and apply the shader while drawing tiles, but I'm not currently sure how long that will take.
I can honestly see this one being done, that's not a bad idea infact... On paperAnother hack solution I was considering was to keep using vertex lighting, but write different color values on each vertex and allow it to be interpolated along the tile. Spritebatch does not support this feature and always writes the same color to all four vertices of each sprite even though opengl/directx allow setting a different color for each vertex. Tiles would need to always split into 2x2 to provide enough vertices for smooth lighting. Pixel shaders could be left unmodified.
There isn't any real reason, until now it's just been because I'm lazy and there wasn't much incentive. The next release should be open source. Linking to GitHub allows previous releases of mods to be easily distributed and must be done in order for an icon to appear in the mod browser.