A HLSL Shader Toolkit for SWBFII - WIP

Started by SleepKiller, November 01, 2017, 04:05:30 PM

Previous topic - Next topic
I posted a bit about this in the WIP forever... thread recently but now in order to hide from tracking down a bug I've decided to make a proper WIP thread. How nifty!

This is another one of my fun hobby projects relating to SWBFII, which for some reason I find endlessly enjoyable to mess with. The idea is fairly straight forward writing shaders in assembly sounds hard and painful, writing shaders in HLSL sounds hard and painful. But since HLSL is easier to read and write itself I thought it would be nice to be able to edit the game's shaders in it. Thus enters this project to create a build process to compile and munge HLSL shaders and use them in SWBFII instead of the stock assembly ones.

The build process is all but complete and now I am just slowly porting the shaders one by one to HLSL. I've never programmed in HLSL (I'm a GLSL man personally) before and I'm not a graphics programmer (I barely qualify as any form of "programmer" tbh) by any means so it is a challenging process for me. But regardless of that I have been making good progress on it reasonably consistently and I kind of felt like seeking out what interest there was in the small SWBFII community for this. Although I am just making it because I want to edit the shaders myself it's still helpful to know how many (if any) people are interested in it. Hence a WIP thread.

Screenshots would be dull since at this stage if everything is progressing fine and working correctly you can't tell the difference between my rewritten shaders and the game's stock ones. So have some code to look at instead of here.

Although I did have some fun with the rain shader a couple days ago. Isn't it pretty?

Now you need to find a new way for people to convert things to .msh becuase XSI is just a pain in the butt. Your new tool sounds very intresting.  :cheers:

November 02, 2017, 08:14:15 AM #2 Last Edit: November 02, 2017, 08:57:28 AM by Ginev
 Cool i cannot wait to see some screenshot showing some new graphics but still i will be patient.I know i probably want more but if we can imitate the canceled bf3 graphics in some way that will be such an awsome thing.

After a while struggling with it the toolkit now has an implementation of the game's "normal" shader which (outside of mods) does most of the rendering. This brings the total rewritten shader count up to 21 out of 30. There are still some large shaders (like water and normal mapping) left but the toolkit is well on it's way to completion.