Kexikus

Fog and Speed Blur Fix for the 2016 TSL patch

Recommended Posts

As you might know, fog is not working or at least not working properly in Aspyr's 2016 Steam patch for KotOR 2: TSL. An official fix for this issue doesn't seem to be in sight but luckily HappyFunTimes101 wrote a fix himself.

 

To show the issue with the 2016 patch, here's a comparison between the Steam and the GOG version:

 

post-12766-0-92809900-1493458194_thumb.jpg   post-12766-0-02025200-1493458208_thumb.png

 

As you can see, the fog is really screwed up in the latest Steam version while all other versions (4CD, DVD, gog, Steam legacy) look the same as the "gog picture". In other areas, the issue is not as visible when the fog is completely missing in the Steam version, but if you compare the two versions it's easy to see.

 

And finally, here's what it looks like with HappyFunTImes101's fix applied:

 

post-12766-0-86280100-1493458327_thumb.jpg

 

One more comparison, taken from the Ravager where the fog is not present at all in the Steam version:

 

post-12766-0-01436400-1493458366_thumb.jpg   post-12766-0-57671100-1493458374_thumb.jpg

 

Additionally HappyFunTimes101 provides a completely new speed blur effect to get rid of that headache causing blur in the vanilla game while keeping some visual effect:

 

post-12766-0-56364900-1493458447_thumb.jpg   post-12766-0-21885700-1493458459_thumb.jpg   post-12766-0-93563700-1493458469_thumb.jpg

 

It's a little hard to see on a still frame but if you compare the last two pictures, you can see that the edges of the screen are warped while running with Force Speed active. I really like that new effect, but it's optional when installing the fog fix, so it's up to you to decide whether you want it or not.

 

Which brings me to the important part: How to install the fix

First of all, here's the Read-Me. But I'll provide easier to follow instructions, originally taken from a reddit post by TonyKaku but slightly edited:

 

  1. Go here and download the contents of the Release folder. Copy them in your main KotOR 2 directory. If you don't want the changed speed effect, go to KotOR 2 directory \ shaders_override and delete fp_speedblur.txt.
  2. Start the game
  3. You should now have two folders called shaders_original and shadow_override in your KOTOR folder.
  4. Go into the shaders_original folder and open the first file with a program like Notepad++
  5. locate the line that says "MOV result.color, r0" (second to last line usually)
  6. right above that line paste the content of the quote under "Fog Issue" that starts with PARAM p =.... Your file should look like this.
  7. Repeat this step for every text file in the folder that has the MOV result.color, r0 line (these are all files starting with fp). That can take some time and there might be ways to automate the process but explaining it might take so long that you're probably just better off doing the whole thing manually.
  8. After you pasted this into every file that has the MOV result.color, r0 line near the end, copy all text files into the shader_override folder.
  9. Launch the game, the fog should now be fixed

This fix is definitely a big step forward for the usability of the Steam patch, which I always avoided due to issues like these. It's up to you to decide if it's easier to fix the fog in the Steam version or to get widescreen support in a different version but it's definitely a good thing to have this patch available. Maybe this fix can even be expanded to include the missing saber hilt textures (if that's even a shader issue).

A big thanks to TonyKaku for posting this on the kotor reddit or I wouldn't have found it. :D

 

To the moderators: I wasn't sure if that qualifies as a tutorial, so I posted it in the general section. If it is, please just move it or maybe just pin it so that the information doesn't get lost. Thank you :D

 

Edit: I tried to apply the speed effect change to the older TSL version and to K1, but it's not as easy as I hoped it would be. The shader identified as the speed shader in shader_ident.txt just doesn't exist in these versions of K1/TSL so it can't be overwritten that way either. I assume it would be possible by editing the OpenGL32.dll file but I just don't know how to do that.

  • Like 4

Share this post


Link to post
Share on other sites

Dunno if it's possible (seems complicated to install) but would be great if we could include this in M4-78EP to fix that ugly fog effect the droid segments have at the moment.

Share this post


Link to post
Share on other sites

It could be possible to just provide the contents of shader_override together with the .dll file. It might require starting the game twice but it's unlikely anyone will get to M4 without doing that anyway so it wouldn't be an issue.

Share this post


Link to post
Share on other sites

Check the license files here. I think you don't need to ask permission but I didn't read them very thorougly.

Appears so, yeah;

Copyright © 2015 HappyFunTimes

 

Permission is hereby granted, free of charge, to any person obtaining a copy

of this software and associated documentation files (the "Software"), to deal

in the Software without restriction, including without limitation the rights

to use, copy, modify, merge, publish, distribute, sublicense, and/or sell

copies of the Software, and to permit persons to whom the Software is

furnished to do so, subject to the following conditions:

 

The above copyright notice and this permission notice shall be included in all

copies or substantial portions of the Software.

Share this post


Link to post
Share on other sites

Well, got it to work, but moving the files from the KOTOR2 folder to the M4-78EP workshop where I could distribute it it no longer works. So doesnt seem like I can just add it to the workshop download :/

 

(Or well, I can, but people need to manually move the files)

Share this post


Link to post
Share on other sites

Great tutorial! One question though - one of the files starting with "fp" has a line "MOV result.color.rgb, r0" instead of "MOV result.color, r0". Should I paste the necessary lines above "MOV result.color.rgb, r0" like this or simply leave the file unedited?

Share this post


Link to post
Share on other sites

I don't know. From looking at my shaders, it seems like I did add it there and I haven't noticed any issues with it. But I haven't played much of the game since I wrote this, so it's very possible that I simply missed the issue.

It's up to you I guess, but from the original instructions it's stated that it has to be added only for files that contain "MOV result.color, r0" so leaving it unedited is probably the right call.

Share this post


Link to post
Share on other sites

I don't know. From looking at my shaders, it seems like I did add it there and I haven't noticed any issues with it. But I haven't played much of the game since I wrote this, so it's very possible that I simply missed the issue.

It's up to you I guess, but from the original instructions it's stated that it has to be added only for files that contain "MOV result.color, r0" so leaving it unedited is probably the right call.

Alright, I'll leave it unedited then. Thanks!

Share this post


Link to post
Share on other sites
On 7/6/2017 at 3:31 AM, Hassat Hunter said:

Well, got it to work, but moving the files from the KOTOR2 folder to the M4-78EP workshop where I could distribute it it no longer works. So doesnt seem like I can just add it to the workshop download 😕

 

(Or well, I can, but people need to manually move the files)

Do you have any way I could get that off of you? I'm about to make a review of the game with and without mods to show what the game can look like, I'd love to have it fully updated if at all possible, and if you can link me the files what are the extra installation steps for the M4-78 fog fix you added?

Edited by Vexxedsoul

Share this post


Link to post
Share on other sites
22 hours ago, Vexxedsoul said:

Do you have any way I could get that off of you? I'm about to make a review of the game with and without mods to show what the game can look like, I'd love to have it fully updated if at all possible, and if you can link me the files what are the extra installation steps for the M4-78 fog fix you added?

I am personally not sure how this version works but I use

 which I subsequently added into my own project with permission.

Perhaps comparing the effects of the two versions, their fixes / changes and how they are applied could provide a better method to fix any more fog issues in the latest versions of the game.

  • Light Side Points 1

Share this post


Link to post
Share on other sites

That file is completely different from what the fix in this thread does and I'm not even sure if it will work properly without this fog fix.

On 12/12/2020 at 5:54 PM, Vexxedsoul said:

Do you have any way I could get that off of you? I'm about to make a review of the game with and without mods to show what the game can look like, I'd love to have it fully updated if at all possible, and if you can link me the files what are the extra installation steps for the M4-78 fog fix you added?

Why don't you just follow the instructions in the OP of this thread? There is no need for anything else. Hassat Hunter was just looking for a way to distribute the fix with a workshop mod which did not work but since you only want to play/show the fix, that's not necessary anyway.

Share this post


Link to post
Share on other sites

Hello, is anyone else having issues with getting the fog fix working ? I cannot get it to work for the life of me and it's driving me insane. What's weird is that the force speed thing is working fine so it means the dll is replacing the shaders as intended.

I have an AMD graphic card if that helps.

Share this post


Link to post
Share on other sites

it doesnt work in 2024, my game doesnt lauch with your opengl32 file.

Share this post


Link to post
Share on other sites
16 minutes ago, Arda said:

it doesnt work in 2024, my game doesnt lauch with your opengl32 file.

I think you're using the wrong Override.  Check your PMs.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.