Page 2 of 4

Re: Anyone interested in having native ReShade support?

Posted: Mon Jul 15, 2019 10:53 pm
by Trevor
Since you say that XWA splits out illumination texture as an "overlay" could this not be used for bloom mask?

As for specular highlight, I don't see it as important as environment mapping (which is vertex based, not pixel based) and opts do have vertex normal since that's how they diffuse shade.

and AmbOcc again, I would suggest vertex based because its faster while providing satisfactory results (especially on hi-poly models)

don't get me wrong, per-pixel specular reflection on "normal diffuse textures" would allow "glossy/semi-glossy" surfaces with detail without being a "reflection" and would be a nice to have, but specular can be emulated by envmappping.

Trev

Re: Anyone interested in having native ReShade support?

Posted: Thu Jul 18, 2019 6:26 am
by blue_max
Hey Trevor, I can try and detect when the "overlay" textures are create by XWA and then use that as template to enable bloom. That's a good idea, thanks!

Yes, OPTs must have normals; but the problem is that XWA does not send this information to ddraw, so we don't have the normals when rendering the objects. AFAIK, env mapping needs per-pixel normals, otherwise it just looks blurred if it only uses per-vertex data (unless you have high vertex count, of course). But again, the main problem is that there are no normals to work with.

So, what I think I have to do here, is approximate the normals by computing the derivative of the depth buffer and then use that information for either specular ref, env mapping or AO.

Or, if someone can figure out a hook to send the normal data to ddraw, then all these problems go away ;)

Re: Anyone interested in having native ReShade support?

Posted: Fri Jul 19, 2019 1:06 am
by Bman
Side topic, Jeremy just released the (WIP) 32-bit color textures patch for .opt models (besides for static .dat images). The models may appear dark or very bright on occasions. It might have something to due with illumination issue, as it did in the past. Anyway, perhaps this is where Reshade/bloom effects might counter the issue.(?)

Re: Anyone interested in having native ReShade support?

Posted: Fri Jul 19, 2019 4:44 am
by blue_max
Bman wrote:
Fri Jul 19, 2019 1:06 am
Side topic, Jeremy just released the (WIP) 32-bit color textures patch for .opt models (besides for static .dat images). The models may appear dark or very bright on occasions. It might have something to due with illumination issue, as it did in the past. Anyway, perhaps this is where Reshade/bloom effects might counter the issue.(?)
Only one way to know: try it out with ReShade. My guess is that if the textures already look too bright, they will bloom all over the place with ReShade.

Re: Anyone interested in having native ReShade support?

Posted: Fri Jul 19, 2019 3:47 pm
by DarHan
I’ve tried that on my setup. In the Liberty hangar, the result was an extremely dark hangar with normally lit fighters and one blindingly glowing Lambda shuttle.

Re: Anyone interested in having native ReShade support?

Posted: Tue Aug 27, 2019 5:45 am
by blue_max
It's been a while since I posted here; but I've got some good news. Using Jeremy's texture tag hook, I can now make selective masks to apply the bloom only on certain textures, or even filter out the illumination textures. So, for instance, the Star Destroyers no longer look blindingly bright, and only the areas marked as "illuminated" in a texture get bloom now (I know, the effect is a bit overdone; but the strength can be configured by the user, and this is just a sample anyway):
bloom-sample-8.jpg
bloom-sample-9.jpg
The lasers and engine glow get full bloom. On the other hand, some OPTs may need a bit of a touch up to fix the illumination textures; but that's easy to do and I believe this is a reasonable solution to this problem. Did I mention there's no need to dim anything? The HUD and the Concourse no longer get any bloom.

Re: Anyone interested in having native ReShade support?

Posted: Tue Aug 27, 2019 6:00 am
by blue_max
It also works with the 32-bit mode hook (like I said, the effect is a bit exaggerated right now; but this is just a sample):
bloom-sample-10.jpg
bloom-sample-11.jpg
There are a few artifacts that I still need to figure out. For instance: I don't yet know why the lasers seem to remove the bloom effect of whatever is on the background. There are a couple of other minor problems like that too.

Re: Anyone interested in having native ReShade support?

Posted: Tue Aug 27, 2019 5:52 pm
by Trevor
WOW!!!
This is perfect!

Once 32bit becomes more standard across retextures I can see a huge benefit with this enabled in future.

Since you can now filter by Lights, I would be inclined to reduce the overall brightness so the lights stand out more (more contrast)

I assume the VRParams file brightness setting still works with this?

Trev

Re: Anyone interested in having native ReShade support?

Posted: Tue Aug 27, 2019 6:18 pm
by blue_max
Thanks Trevor. Yes, the vrparams brightness still works and can be used -- although I think this setting was specifically for the HUD/Text/Concourse. If I understood your comment properly, I believe you're talking about reducing the overall brightness of the 3D content (maybe through the in-game brightness setting?) I don't know if that will also affect the brightness of the lasers (but I guess I can force the brightness inside ddraw for these elements too).

Re: Anyone interested in having native ReShade support?

Posted: Tue Aug 27, 2019 6:56 pm
by DTM
:applaus:

Re: Anyone interested in having native ReShade support?

Posted: Tue Aug 27, 2019 10:55 pm
by ual002
Good job sir. Looking forward to it.

Re: Anyone interested in having native ReShade support?

Posted: Wed Aug 28, 2019 7:21 am
by keiranhalcyon7
The forcefield emitters look marvelous.

Re: Anyone interested in having native ReShade support?

Posted: Thu Aug 29, 2019 6:15 am
by blue_max
I think I fixed the problem with the lasers:
bloom-sample-17.jpg

Re: Anyone interested in having native ReShade support?

Posted: Sun Sep 01, 2019 4:45 pm
by Driftwood
Are you going to be releasing a version of this soonish? I kinda would like to ditch my reshade install due to it slowing down the concourse.

Re: Anyone interested in having native ReShade support?

Posted: Mon Sep 02, 2019 6:30 pm
by blue_max
Yup, I can release a preview this week while I continue to fine-tune the algorithm. It'll also include support for the Dynamic Cockpit and the 32-bit mode hook.

Re: Anyone interested in having native ReShade support?

Posted: Tue Sep 03, 2019 5:32 am
by blue_max
Eh, here's version 1.0.4:

https://www.dropbox.com/s/bceeg2z4a18il ... 4.zip?dl=0

This version includes a preview of the bloom shader. I'll keep working on it; but you guys can try it out. Just be aware that I might change how it's configured later.

This version also fixes the brightness of the lasers in 32-bit mode; but this has to be enabled in ddraw.cfg (I've provided an example).
Hyperspace-bloom.jpg

Re: Anyone interested in having native ReShade support?

Posted: Tue Sep 03, 2019 11:18 pm
by Driftwood
So I can uninstall reshade?

Re: Anyone interested in having native ReShade support?

Posted: Tue Sep 03, 2019 11:21 pm
by Bman
Great! This is the same file in other D.C. post, correct? Got it. Thanks

Re: Anyone interested in having native ReShade support?

Posted: Tue Sep 03, 2019 11:33 pm
by blue_max
@Bman: Yup, this is the same release I posted in the DC thread.

@Driftwood: If you're only using ReShade for the bloom effect then yes. However, you may still use ReShade for other effects if you wish.

Re: Anyone interested in having native ReShade support?

Posted: Thu Sep 12, 2019 8:16 pm
by Trevor
Unfortunately I am not getting bloom.
I even set really high values and still nothing...

also, the brightness value in vrparams only affects 2d elements (I was looking to reduce the overall brightness except for light emission sources)

trev

Re: Anyone interested in having native ReShade support?

Posted: Thu Sep 12, 2019 9:33 pm
by blue_max
Yeah, the brightness value only affects the Concourse and other 2D (HUD) elements. Making it work like you describe is going to take a bit of an effort. May I ask what are you trying to do with it?

I'm going to release a new version of the bloom effect soon, since I found a number of bugs in that release. So you might want to wait a few more days.

Re: Anyone interested in having native ReShade support?

Posted: Mon Sep 16, 2019 4:56 am
by blue_max
Here's a new version of ddraw with an improved version of the bloom shader:

https://www.dropbox.com/s/2kl6ydc6omjh6 ... 5.zip?dl=0
bloom-sample-18.jpg
bloom-sample-19.jpg
bloom-sample-20.jpg

Re: Anyone interested in having native ReShade support?

Posted: Mon Sep 16, 2019 5:00 am
by blue_max
bloom-sample-22.jpg
bloom-sample-21.jpg

Re: Anyone interested in having native ReShade support?

Posted: Mon Sep 16, 2019 6:27 am
by Bman
Very nice! Although the windows on SSD are a bit too bright, is it running on plutonium ? :-) Well done. Sorry haven't had a time to test your ddraw yet. Downloaded at least.

Re: Anyone interested in having native ReShade support?

Posted: Tue Sep 17, 2019 7:15 pm
by DarHan
Al right, quick test on my setup (Win7, DSUCP 2.6, 32-bit hook, ReShade 4.3):
  • Absolutely refuses to work with ReShade. Trying to start XWA with both this mod and ReShade active leads to an instant crash. I had to choose one or the other.
  • Bloom works perfectly in-game EXCEPT if the target box is active, at which point everything becomes pitch black except for the HUD and the bloom. Disabling the target box using the relevant hook makes everything visible again.
  • It seems that closing XWA doesn’t end the XwingAlliance.exe process?