tModLoader

tModLoader

Fancy Lighting
434 Comments
仔仔 22 hours ago 
good
Lool & Saturlo May 21 @ 9:24am 
adding to doomzy's comment : infernum lunatic cultist forcefield exists in all difficulties , though only on infernum hdr makes it ultra bright
Rex  [author] May 20 @ 7:53pm 
FancyLightingMod.UseBlackLights is used when rendering glow effects. It replaces all non-black light colors with near-black so that only glowing objects (such as glowmasks) are rendered brightly. This is how smooth lighting knows which pixels use normal lighting and which pixels have their own glow lighting. It's somewhat inefficient because tiles have to be rendered multiple times, but I haven't found a better solution.
Moonlight Glint May 20 @ 6:04pm 
Is [code]FancyLightingMod.UseBlackLights[/code] something that might be useful for other mods to use for compatibility like much of the other code that isn't exposed, or something that's really only for the inner workings of this mod?
Doomzy May 20 @ 3:21am 
Ok I have return to inform that after thorough testing, Infernum Lunatic Cultist and Infernum Supreme Calamitas are the only bosses that have HDR errors that were extremely noticeable. I tested Calamity, Infernum, Hunt of the Old God, and Catalyst.

Lunatic Cultist has a forcefield around him that becomes ultra bright, making it impossible to see his sprite during the battle.

Supreme Calamitas shoots a large red circular attack that becomes a giant red glowing ball and obscures all the details of the attack.

HDR Bloom looks really good during these boss battles otherwise. Im not sure if there is a way to make compatibility for specific attacks and effects, but that would certainly be amazing if so! Either way I figured this would be worth bringing to your attention. If I come across anymore, I will notify.
Doomzy May 20 @ 2:01am 
Seems Mod compatability for HDR is working for the vast majority of Infernum, but Lunatic Cultist is def still a concern. If Cultist is fixed it would negate the need for the "Disable during bosses" option, which would be mega pleasing, but not a deal breaker. Love this mod and what you've done here Rex, hats off to ya fella!
Oh, I see. Ok, OK. Thank you for your update. The Mod is great. Maybe I should adjust the resolution from 2K to 1080p and try it again.
Rex  [author] May 19 @ 8:31pm 
I'll try seeing if the new version of Nitrate changed anything regarding its tile renderer. If so, then I'll disable the override. Otherwise, I'll disable the override if smooth lighting is not enabled when the mods are loaded (assuming that the new version still requires a reload to enable/disable the tile renderer). The reason for the override is that the combination of smooth lighting and Nitrate's tile renderer was causing rather severe visual bugs, such as flashing cave backgrounds IIRC. I'll likely have a small update out tomorrow or Wednesday.
Rex  [author] May 19 @ 8:26pm 
If you have a gaming PC and are experiencing performance issues with this mod, then my guess is that you are using the ultra preset and are either using large content mods, running the game at a resolution above 1080p/1200p, or have a high-refresh rate monitor (and so expect higher FPS), or some combination. Large content mods have probably the biggest impact on performance. However, I'm not saying you should disable content mods. After all, they are the biggest reason to use mods. So in this case, I would recommend lowering the in-game resolution to 1080p/1200p and using the high preset. If you still have poor performance, then you could try the low preset to gain at least some benefit. If you have a gaming PC and are still having issues despite all of the above, then I'm afraid I don't know why. For context, my PC with a Ryzen 5600X and RX 580 4 GB (a now 8-year-old midrange graphics card) runs the game with the ultra preset at a rock-solid 60 FPS at 1080p with no other mods.
MOD是个好MOD,但听我句劝,显卡不好别用,我7800XT+14600KF用了帧数暴跌,调了一晚上设置还以为是电脑坏了:GDNormal:
Loksi May 15 @ 3:12pm 
Adding on to last comment maybe adding it to the Mod Compatibility setting or its own option
Loksi May 15 @ 1:32pm 
Is it possible you could make the Nitrate disable change toggleable?
xanderru May 14 @ 7:35pm 
Currently, I'm running Spooky and Thorium. Previously I ran Fargo's Souls, Calamity Fables, and Spirit Reforged for content mods. No other content mods besides that but I do have smaller QoL mods like Magic Storage, AlchemistNPC Lite, and so on. For other "enhancement mods", the only other one besides Fancy Lighting is Terraria Ambience
Rex  [author] May 12 @ 11:06pm 
Are you running any big content mods? 45 FPS is much lower than I’d expect from your hardware but that would be with no other mods.
xanderru May 12 @ 5:05pm 
I'm not using High FPS support so its from 60 FPS to 45-50 which is rather rough.
Ziomislaw May 12 @ 2:34am 
The mod is quite nice and cozy. However it eats your FPS like crazy. Especially underground, my FPS drop from 144 to 90 and sometimes less
Rex  [author] May 12 @ 1:14am 
It depends on your base FPS but a 10–15 (or even more) FPS drop is expected if your FPS before was really high. For context, my laptop with integrated graphics runs the game at 180 FPS (the max my monitor can do) with the mod disabled and around 110 FPS using the default settings for this mod.
xanderru May 11 @ 6:13pm 
Having specifically Smooth Lighting on causes a 10-15 FPS drops. Its most noticeable in mushroom biomes with towns and underground towns with lots of lighting or walls/surfaces. To a lesser extent, performance also drops in other places but not as badly. Is there anything I could tweak to lessen the performance hit, I quite like smooth lighting. I don't think my PC specs are the issue (4070 and i7-13th gen).
Hurrikaani May 8 @ 6:35am 
Ohhh myyy PC
GluGlux May 3 @ 12:32pm 
for some reason it now works, I really dont know what happened as I didnt change anything.
GluGlux May 3 @ 11:28am 
hello, I wanted to try the HDR rendering, but putting either HDR option in the render mode gives me either a black screen or a fixed image that is very saturated. I can provide video of it if you want to look at it ! thanks !
bitgen Apr 28 @ 10:17am 
@megabot yes, it works very well actually
megabot Apr 28 @ 12:00am 
hello! apologies for asking, does this mod work with the light and shadows mod?

Link: https://steamcommunity.com/sharedfiles/filedetails/?id=2670628346
С новым годом Apr 26 @ 4:38am 
))
RexB Apr 22 @ 3:16pm 
My twin makes mods?
Rex  [author] Apr 20 @ 10:30pm 
@LSPD: Sorry if I was being defensive. The issue you’ve experience is severe, no doubt, but given the way the mod is written and that I’ve never experienced such an issue, I was trying to explain why I think it’s more likely that something other than this mod caused you to lose your data.
Admiral Billy Apr 20 @ 1:18pm 
@LSPD I don't think he's being defensive, just making sure to thoroughly explain how the mod operates given that your claim is for an incredibly serious issue that would need to be fixed immediately if it did have to do with this mod in particular.

In this case I do think it's valid to say it's most likely some other mod conflict or tModLoader bug, given that the mod has almost no interaction with saves on its own.
Admiral Billy Apr 20 @ 1:12pm 
I can personally say I did a full heavily modded Calamity playthrough with several instances of me turning the mod on and off for testing and performance reasons, and had no issues regarding corruption.
Rex  [author] Apr 20 @ 12:12pm 
@LSPD: I don’t know how that would be possible, so I’m guessing something else likely corrupted your data. Fancy Lighting does not at all touch your world files or game files and does not affect gameplay at all except for modifying the lighting engine and rendering. The only way this mod can affect your files is that the modified lighting engine affects the light levels in the minimap, which is stored as a file in the Players folder. Other mods might make changes to world data that are affected by lighting or rendering, but lighting and rendering are supposed to only affect the graphics so I would consider it bad practice if other mods did that. Additionally, there is no code in Fancy Lighting to directly write to (or delete) any files. If removing this mod was the actual cause for your corruption, I would consider it a bug with tModLoader.
Rex  [author] Apr 20 @ 12:02pm 
@meatmobile: Are you running any other graphics, optimization, or big content mods? I’m fairly busy right now, so it might be a few days before I can test for bugs.
Rex  [author] Apr 20 @ 12:01pm 
@2bluntz@once: My Discord is username_of_rex
meatmobile Apr 19 @ 8:32pm 
Turning on full HDR gives me a black/white screen even with the bug fix turned on. The simple HDR option doesn't work either and makes everything invisible. What do I do?
Glaviern Apr 19 @ 1:34pm 
@pecs i highly recommend lossless scaling app from steam. It adds a very small input lag, but if lossless scaling is in adaptive mode, I am 100% sure that the screen can handle whatever Hz it is. and yes, it's smooth asf.
2bluntz@once Apr 19 @ 1:30pm 
what's ur discord rex, i have something to show you
fundilloslayer95 Apr 17 @ 1:33am 
anyone else using this and cooler item visual effect have the dark or white screen bug? the former is fixed by turning off the "smooth lighting" at the quality settings but it totally destroys the mod purpose, the other one im not sure how to fix it both happen at hdr and full hdr if any of you know a workaround to use both mods pls tell
InspectorGadget Apr 13 @ 2:50pm 
fancy lighting and lighting essentials + realistic skies + lights and shadows is genuinely the ultimate terraria lighting experience
Rex  [author] Apr 13 @ 10:08am 
Yes, this mod is compatible with Lights and Shadows. The default thread count should be optimal.
Sanki Apr 13 @ 6:44am 
compatibility question does it work with Lights and Shadows mod ? and how many threads I should allow for Fancy Lighting, the default was 16 I have 24, I lowered to 12 because of temperature spike to over 70*C :FireStrike:
Pecs Apr 12 @ 11:13pm 
That mod seems to be rather unstable. A resolution scaling program is much more efficient. I use Lossless Scaling for just a tad 1.5x gen for smoother stuff. Idk what they did to the game, but it's chugging with no load on my system. Stable frames but the game obviously is slowing down. Frame gen fixes the issue mostly, it's all in the render rate or something.
Rex  [author] Apr 12 @ 9:03pm 
If you want to play at frame rates above 60 I’d recommend the High FPS Support mod.
Pecs Apr 12 @ 6:47pm 
To answer my own question: that's a terraria FPS issue, caused by FPS above 60. Frame Skip is designed to fix this, though I suggest using the non-subtle setting, as subtle seems to break the smoothness of the feature.

Otherwise I seem to get stable frames using Ultra preset.
Pecs Apr 12 @ 6:34pm 
On a 3070 and i7-12700kf I experience ~90-177FPS, though in general the game's framerate doesn't seem to tell the truth, since I can tell it's slowing down a bit, which I can't seem to fix.

One big tip is to turn off skip frames, which was enabling VSync and tanking the overall look, though that didn't fix every weird slideshow moment.

Is flickering item icons when holding them a known issue? When I try to place blocks/rope the in-world icon flickers rapidly.
Sanki Apr 6 @ 2:37pm 
I dont know whats the deal with other people computers, I didnt notice any performance hit, same smooth 144 fps but with nicer light effects, this should be in the game from the beginning.
EXDD:) Apr 6 @ 10:01am 
finally a mod that improves lighting in the game and dont turn it into a slide show
Rex  [author] Apr 5 @ 11:04pm 
Nitrate's experimental tile renderer will be automatically disabled in the next update. This will prevent glitches from occurring, but you still won't get any performance improvements from it.
Rex  [author] Apr 5 @ 10:41pm 
I tested a few other mods with this mod and Nitrate's experimental tile renderer causes flickering and black cave backgrounds. If you aren't using Nitrate and are still experiencing this issue, please let me know.
Rex  [author] Apr 3 @ 6:27pm 
If your FPS is lower even after uninstalling this mod and restarting the game, then my best guess is that something is wrong with your system. An RTX 4080 Super should easily be able to run the ultra preset above 60 FPS unless your CPU is relatively weak or you’re running other mods (an RX 580 should be enough for this). Big content mods especially can have a significant impact on FPS. I’d suggest lowering the in-game resolution to 1920x1080 or 1920x1200 if you haven’t already and also seeing what the FPS is without other mods, because if it’s still below 60 something has really gone wrong.

I haven’t experienced black backgrounds or flickering, but running other graphics or optimization mods with this mod can cause bugs, so listing any other mods you’re running would help me reproduce these issues. It might also be a new issue with the tModLoader April update, but I’ve played with it some and haven’t noticed any issues yet.
GrimCreaper Apr 3 @ 4:11pm 
I get some backgrounds as pitch black and some flicker rapidly.
Increative Apr 3 @ 2:43pm 
as soon as i installed this mod my fps tanked from 240 to 30, and stayed like that even after uninstalling.... i have a 4080 super! it also caused all underground backgrounds to appear pitch black :steamhappy:
King Of Etheria Apr 2 @ 9:01am 
lmao :GDNormal: