For anyone having issues with a grid texture, find this line in your SSSAO.compositor file ( in ShaderSSAO\materials\compositors): texture rt0 target_width_scaled 0.5 target_height_scaled 0.5 PF_A8R8G8B8 // half size
and change it to:texture rt0 target_width_scaled 1.0 target_height_scaled 1.0 PF_A8R8G8B8
Note that this will come with a performance hit the higher you set it, though 1.0 adds about 2-3% overhead on a 2070. The issue seems to be caused by your render resolution, and this fixes it for me at 2560x1440. You can play around with this setting or the one below it if you still have issues. I'd also suggest running kenshi in borderless mode to make sure it renders at the proper resolution.
Perfect lil Ambient Occlusion mod. Nice lil touch of quality with very little maintenance.
In contrast, I was experimenting with some other visual mods + configs using Reshade, but their I found their bloom, color balance and gamma changes be too dramatic and inconsistent. I was really just after a lil bit of AO the entire time.
This can be seen in the vanilla game as well in small deep pits in the desert when the Kenshi sun is low on horizon (like your snow picture). It's a limit of the game lighting, not the mod, but the mod makes it more visible. The obvious tri mesh in the top picture are 'invisible' in the bottom because each tri isn't contributing to the rock's shadow, so the mod provides more surface shadow in the render. Live with it, tweak the mod file, or uninstall.
so i was tweaking around with this mod for my setup and it turns out pretty well more shadows i can cast = more FXAA i can throw around the world good work
Unusable because of the grid that is on the screen when using this.
I tried going fullscreen as others have suggested here, but I still see it. I guess there's no way to fix it since people are still complaining about it and no one has said how to fix it?
At first I thought that it might've been these two lines in the SSAOB.hlsl file above, with what looked like hardcoded resolutions, but I honestly haven't got a clue what magical rendering tomfuckery is going down in there and I know not to dig when there's a cosine involved. Besides that, it looks like the ratio is what's important anyways, so the resolutions probably aren't actually important here. Changing them didn't make the grid go away, and that was enough for me to give up on that line of thought.
While screenshotting I noticed that specifically in fullscreen non-borderless, when I had set the resolution to 16:9 resolutions, the game was running at a 4:3 resolution instead (1600x1200 when set to 1920x1080) and just stretching out to fit the screen.
Weirdly enough, this doesn't even seem to have anything to do with the config, as I couldn't find any mention of these 4:3 resolutions in them. Did a little googling and I haven't seen any decent fixes other than "just don't use fullscreen, how about that?" because the most popular solution in a steam discussion post is usually of "give up" or "works for me".
This particular quirk/super annoying issue is entirely unrelated to the shader, but maybe it's the case that the grid only appears at post-1080 16:9 resolutions?
Can confirm, I have the same issues and see this grid. Fullscreen without borderless at 1440 worked for me. I have no UI mods besides this, a Reshade called TSUKI V.2 that requires this SSAO mod, as well as Transparent UI and the Font Redux and Compressed Textures+Detailed Textures(Faithful), all in English.
48 comments
texture rt0 target_width_scaled 0.5 target_height_scaled 0.5 PF_A8R8G8B8 // half size
and change it to:
texture rt0 target_width_scaled 1.0 target_height_scaled 1.0 PF_A8R8G8B8
Note that this will come with a performance hit the higher you set it, though 1.0 adds about 2-3% overhead on a 2070. The issue seems to be caused by your render resolution, and this fixes it for me at 2560x1440. You can play around with this setting or the one below it if you still have issues. I'd also suggest running kenshi in borderless mode to make sure it renders at the proper resolution.
Also edit SSSAO.material and reduced halo effect
param_named distanceThresholdmax float 0.9 (from 1.0)
p.s. Anyone wanna tweak it and upload it on steam?
Thanks for solution, this mod has become a must-use to improve Kenshi render.
also thank you disi for providing this nice mod!
Is this the same error as others I'm getting? And is there a workaround? Changing to Fullscreen fixes it but then I cant play in ultrawide.
https://imgur.com/a/R1nWu5w
In contrast, I was experimenting with some other visual mods + configs using Reshade, but their I found their bloom, color balance and gamma changes be too dramatic and inconsistent. I was really just after a lil bit of AO the entire time.
https://steamcommunity.com/sharedfiles/filedetails/?id=2612435306
Is there anyway to fix this?
?SSAO on:
SSAO off:
more shadows i can cast = more FXAA i can throw around the world
good work
I tried going fullscreen as others have suggested here, but I still see it. I guess there's no way to fix it since people are still complaining about it and no one has said how to fix it?
Get rid of your damn grid overlay. This is crazy stupid. Looks amazing tho ^w^
It seems like you know how to port in engine shaders, so I will ask you if you know or can add an outline shader like the kenshi 2 reshade.
I don't know if you follow me for what I'm asking.
Example: https://www.reddit.com/r/Kenshi/comments/ju2pc8/add_a_posteffect_like_a_effect_on_a_mod/
I've tried it at 1080 and 1440, and only get lines at 1440 and only on borderless.
?#define minRadius (0.0/1920) // (0.0/1920)
#define maxRadius (10.0/1080) // (10.0/1080)
At first I thought that it might've been these two lines in the SSAOB.hlsl file above, with what looked like hardcoded resolutions, but I honestly haven't got a clue what magical rendering tomfuckery is going down in there and I know not to dig when there's a cosine involved. Besides that, it looks like the ratio is what's important anyways, so the resolutions probably aren't actually important here. Changing them didn't make the grid go away, and that was enough for me to give up on that line of thought.
While screenshotting I noticed that specifically in fullscreen non-borderless, when I had set the resolution to 16:9 resolutions, the game was running at a 4:3 resolution instead (1600x1200 when set to 1920x1080) and just stretching out to fit the screen.
Weirdly enough, this doesn't even seem to have anything to do with the config, as I couldn't find any mention of these 4:3 resolutions in them. Did a little googling and I haven't seen any decent fixes other than "just don't use fullscreen, how about that?" because the most popular solution in a steam discussion post is usually of "give up" or "works for me".
This particular quirk/super annoying issue is entirely unrelated to the shader, but maybe it's the case that the grid only appears at post-1080 16:9 resolutions?
Don't know how to proceed from here though.