login

Author Topic: Using Mtarini shaders/Compiling shaders in 1.10  (Read 6549 times)

Offline Dain Ironfoot

  • Master
  • *****
  • Posts: 542
    • View Profile
Using Mtarini shaders/Compiling shaders in 1.10
« on: November 15, 2008, 09:30:33 am »
Has anyone had any luck using Mtarini's fluttering banner shader in the latest version? I tried it, but all that happened was that the pole became extremely shiny, and the game crashed on the world map..

Any thoughts about what I might be doing wrong?
« Last Edit: November 20, 2008, 09:38:45 am by Dain Ironfoot »

Offline Dain Ironfoot

  • Master
  • *****
  • Posts: 542
    • View Profile
Re: Using Mtarini shaders
« Reply #1 on: November 16, 2008, 02:22:39 pm »
Ok, so I spent a while longer fiddling with this..

The fact that I'm getting an RGL error telling the technique mtarini_standart shader confuses me no end as I made sure there were no references to this name in the BRF file or the mb.fx files..

But I have noticed that now there's some .pp files which seem to be related to shaders in the M&B folder and a compile_fx .bat file, which doesn't seem to work.. is there a new way of doing custom shaders in this version?

EDIT: And giving the item a new shader, I still get the RGL errors even though there is no ref anywhere for it anymore, yarg..
« Last Edit: November 16, 2008, 02:32:31 pm by Dain Ironfoot »

Offline Ron Losey

  • Master
  • *****
  • Posts: 4418
    • View Profile
Re: Using Mtarini shaders
« Reply #2 on: November 17, 2008, 12:21:14 am »
Next time I catch him on Skype, I'll tell him you were asking about them.  Best to get your info straight from the source.

But just guessing, I'm going to say that it probably requires a custom MB.FX file, and those files are likely version-specific, so it probably won't work until you have a MB.FX file for 1.0x with the custom changes added.  I know the custom shaders for OnR operate that way.  Note that, as stated, I am guessing based on largely unrelated data, so that guess is not definitive of anything.

Offline Dain Ironfoot

  • Master
  • *****
  • Posts: 542
    • View Profile
Re: Using Mtarini shaders
« Reply #3 on: November 17, 2008, 05:32:27 am »
Well I definitely adjusted the mb.fx file and added the custom shaders.  Used the BRF file provided, set up my texture correctly.. result.. shiny pole and errors..

The odd thing is now, despite my attempts to remove them entirely, when starting my mod, I'm still getting RGL errors looking for the shaders...

But yes, talking to Mtarini would be super handy.
« Last Edit: November 17, 2008, 06:54:17 am by Dain Ironfoot »

Offline Ron Losey

  • Master
  • *****
  • Posts: 4418
    • View Profile
Re: Using Mtarini shaders
« Reply #4 on: November 17, 2008, 07:49:49 am »
Just adding the code to the new MB.FX may not do it - something else in the file, or in unrelated stuff in the game graphics processing, may have changed between versions.  Whatever it is, it's unlikely that you will find it without mtarini, since he's the only one who completely understands what he did in the first place.

I'll flag him down next chance I get, next time I see him on-line ... but that may be a couple of days, so hold that thought.

Offline Dain Ironfoot

  • Master
  • *****
  • Posts: 542
    • View Profile
Re: Using Mtarini shaders
« Reply #5 on: November 20, 2008, 05:49:42 am »
I don't suppose you have his email do you?

Offline Ron Losey

  • Master
  • *****
  • Posts: 4418
    • View Profile
Re: Using Mtarini shaders
« Reply #6 on: November 20, 2008, 06:03:42 am »
Better not just post it, or he'll get buckets of spam forever ...

I told him about it - he'll get back to you as soon as he gets time.  But I'll send you contact details by PM, if you want to flag him down yourself.

Offline Dain Ironfoot

  • Master
  • *****
  • Posts: 542
    • View Profile
Re: Using Mtarini shaders
« Reply #7 on: November 20, 2008, 08:27:29 am »
I've been playing about some more (Didn't realise the shaders had a BRF component, ha)

I now understand why the thing is shiny, it's using the iron shader has a fallback.. however the fact it still says it cannot find the technique is really confusing to me... I've checked and double checked it compared to native shaders, I can't see why it isn't able to get the technique unless there is indeed something required from the other files.. the compile_FX.bat interests me.... when I try to run it I get:

F:\Mount&Bladefinal\Mount&Blade>fxc /T fx_2_0 /Fo mb.fxo mb.fx
'fxc' is not recognized as an internal or external command,
operable program or batch file.

F:\Mount&Bladefinal\Mount&Blade>echo Script processing has ended.
Script processing has ended.

EDIT: Aha, FXC is a program in the direct X SDK.. lets give that a go...

F:\Mount&Bladefinal\Mount&Blade>echo Press any key to exit. . .
Press any key to exit. . .

F:\Mount&Bladefinal\Mount&Blade>pause1>nul
« Last Edit: November 20, 2008, 09:03:22 am by Dain Ironfoot »

Offline Dain Ironfoot

  • Master
  • *****
  • Posts: 542
    • View Profile
Re: Using Mtarini shaders
« Reply #8 on: November 20, 2008, 09:38:27 am »
Sorry to double post, but I fixed it! With a little push in the right direction from Yoshi I shoved FXC from the directX library into my M&B dir and then ran the shader compiler.bat.. compiled the .fxo and it now works perfectly!

So clearly now our custom shaders must be compiled.

Still a few oddities..

I have to alt-tab in and out before the shader displays correctly...

I'll have to work out how to make the banner hang down :P
« Last Edit: November 20, 2008, 10:06:38 am by Dain Ironfoot »