SP Native Unofficial M&B DX7 patch for 1.01x (beta)

Users who are viewing this thread

Manitas

Grandmaster Knight
Have you ever wondered why M&B looks so bad on older machines in DX7 mode?
Usually it's because DX7 is old n bad, but in this case there's another reason: they just gave up on it completely.
They stitched DX7 mode together in a hurry, just so it does not crash, not caring about visuals at all. They even rolled back stuff that was present in older versions (like bumpmapping etc..)

Now, the good news is, we can create our own shaders for DX7 mode.
The bad news is, possibilities are very limited, because they don't pass textures to shader in DX7 mode properly, so no fancy stuff, as we have to do with just one, basic texture.


So, introducing the beta version of unofficial DX7 patch for testing:
Download the patch (ver .02, updated Feb 07)

Keep in mind that it might be buggy, and there's no warranty whatsoever, so if you're afraid of having to reinstall M&B if things go wrong, don't apply the patch and wait for a more stable version.

Changes made:

- Glowing objects (rocks, outer terrain, foliage etc.) no longer glow and are now lit dynamicly.
- Shininess is back on weapons and some armors (not all of them because some require more than one texture, so it's impossible because they don't pass textures to shader in DX7 mode properly)
- Interiors become dynamicly lit again.
- It is dark at night.


Now a bunch of screens for comparison:

Burglen by night:


Some more:


And my new forrest terrain type at night:

Though, you won't see this ingame until WFAS is out.


Attention:
Tavern interiors may appear nastily yellow, this is not my shaders' fault, light scene props are bit strange (in native DX7 you don't experience this, because interiors are not affected by dynamic lighting at all).
I replaced those props in the native module, but there's no way I can modify other people's mods.

Heres an example of my light scene props:
  ("light",sokf_invisible,"light_sphere","0",  [
    (ti_on_init_scene_prop,
      [
          (store_trigger_param_1, ":prop_instance_no"),
          (set_fixed_point_multiplier, 100),
          (prop_instance_get_scale, pos5, ":prop_instance_no"),
          (position_get_scale_x, ":scale", pos5),
          (store_mul, ":red", 3 * 99, ":scale"),
          (store_mul, ":green", 3 * 88, ":scale"),
          (store_mul, ":blue", 3 * 53, ":scale"),
          (val_div, ":red", 100),
          (val_div, ":green", 100),
          (val_div, ":blue", 100),
          (set_current_color,":red", ":green", ":blue"),
          (set_position_delta,0,0,0),
          (add_point_light, 10, 30),
      ]),
    ]),
  ("light_red",sokf_invisible,"light_sphere","0",  [
    (ti_on_init_scene_prop,
      [
          (store_trigger_param_1, ":prop_instance_no"),
          (set_fixed_point_multiplier, 100),
          (prop_instance_get_scale, pos5, ":prop_instance_no"),
          (position_get_scale_x, ":scale", pos5),
          (store_mul, ":red", 1 * 170, ":scale"),
          (store_mul, ":green", 1 * 100, ":scale"),
          (store_mul, ":blue", 1 * 30, ":scale"),
          (val_div, ":red", 100),
          (val_div, ":green", 100),
          (val_div, ":blue", 100),
          (set_current_color,":red", ":green", ":blue"),
          (set_position_delta,0,0,0),
          (add_point_light, 20, 30),
      ]),
    ]),
  ("light_night",sokf_invisible,"light_sphere","0",  [
    (ti_on_init_scene_prop,
      [
#          (store_time_of_day,reg(12)),
#          (neg|is_between,reg(12),5,20),
          (is_currently_night, 0),
          (store_trigger_param_1, ":prop_instance_no"),
          (set_fixed_point_multiplier, 100),
          (prop_instance_get_scale, pos5, ":prop_instance_no"),
          (position_get_scale_x, ":scale", pos5),
          (store_mul, ":red", 1 * 99, ":scale"),
          (store_mul, ":green", 1 * 88, ":scale"),
          (store_mul, ":blue", 1 * 53, ":scale"),
          (val_div, ":red", 100),
          (val_div, ":green", 100),
          (val_div, ":blue", 100),
          (set_current_color,":red", ":green", ":blue"),
          (set_position_delta,0,0,0),
          (add_point_light, 10, 30),
      ]),
    ]),


Please, let me know if there are any problems, if some glowing problems still occur, and general opinions.
Especially, I expect the flora shader to cause some controversy, but it is difficult to do it right because they don't pass textures to shader in DX7 mode properly.
 
Hi!

First of all - I haven't checked the patch with game yet (I don't have it installed here), but just checked through your files.
Could you explain roughly what was your method? I see that you've been fiddling with shaders a bit. Wouldn't be easier to release updated fx file?

My other question is about skyboxes.txt. As I can see you've changed colours to make nights darker. Good shot, but I need to say something to all who are using my Panoramic Mod with yours: replacing skyboxes.txt is going to create huge conflict and it's not recommended.

Nonetheless - good attempt with making DX7 mode looking better. Good luck!

 
Edited From: TheWitcher said:
Nonetheless - good attempt with job at making DX7  mode looking better. Good luck!


I have no problems with DX9, so I don't use DX7, but this looks just freaking awesome. Very nice patch indeed! :O Awesome!
 
Good job!

If anyone feels like testing my Unique Armoury, please do and let me know, there were people having problems with some items showing up black in DX7.
I'm too lazy at the moment.
 
This is excellent.  I love huge sieges with unlimited bodies, but on Dx9 it's way too much for my machine to handle.  Thanks for this.
 
Manitas
Woah! This is some serious no-nonsense modding, not to mention WFAS stuff and autorigging.
Looking forward to your new threads whatever they will be!
 
Great work. Everything looks much better, but I think you overdid the night settings, I had to restore the default values to be able to see anything.
 
Performance in battles is a lot smoother, mind, I have it limited to 60fps.  Towns still suffer the occasional hiccup, but that dratted dx7 "glowing building" bug is gone.
 
You never noticed the glowing unshaded buildings on vanilla Dx7 mode? Lemme see if I can get a screenie.

mb156.jpg

before

mb157.jpg

after
 
D'Sparil said:
Great work. Everything looks much better, but I think you overdid the night settings, I had to restore the default values to be able to see anything.
That was, kinda, the point :wink:

Usually it is down to the monitor gamma settings, and the way your room is lit, anyway, the point is taken.
Let's see what others think about it.
 
Perdikas said:
I get an RGL error, even after re-installing M&B. It is: get_object failed for: bo_man_beech2
Fixed now, new version is up for download, thanks.
I wonder why others didn't get the error message.

M&B sucks some info from modules into save files for some reason., you might have to start a new game to get rid of that error message.
 
TheWitcher said:
Could you explain roughly what was your method? I see that you've been fiddling with shaders a bit. Wouldn't be easier to release updated fx file?
It would, if it worked.
fx holds version 2.0+ shaders, which aren't used in DX7 mode. I've tried and put some v1.1 shaders in there, it even compiled without errors and the game didn't crash, but the shader was not used - it fell back to fixed pipeline function.

I'm using ps 1.1 - 1.4 asm shaders, but they are not so important. The main thing that this patch does is fixing associations in core_shaders.brf, which is bloody mess full of bugs.

TheWitcher said:
My other question is about skyboxes.txt. As I can see you've changed colours to make nights darker. Good shot, but I need to say something to all who are using my Panoramic Mod with yours: replacing skyboxes.txt is going to create huge conflict and it's not recommended.
Yeah, skyboxes ain't modular and that's a shame.
Anyway, you might consider adopting this aproach in your mod, it's not so common to be able to see distant horizon in the middle of the night, you know :wink:



Meanwhile, another experiment, water reflections:



No use though, there's only one problem, which can't be seen on static screens. The water doesn't move, and there's no way I know of to move it with pixelshader alone.
 
Back
Top Bottom