Author Topic: NWShader  (Read 9324 times)

Legacy_Nostrebor

  • Newbie
  • *
  • Posts: 43
  • Karma: +0/-0
NWShader
« Reply #105 on: October 31, 2010, 09:37:29 pm »


               

pkpeachykeen wrote...

You may want to take a look at the map used to store the materials, if you haven't already. With a slight tweak, the same class can be used as a map and keep track of the texture name/ID relationship from both sides. It may also be a chance to forcibly optimize textures, as the map can be checked for an already-loaded texture and simply return that ID, instead of loading a new one.


The map<int, ptr> is what I did.  The texture id's seem to be pretty linear (only a few gaps).  I'm wondering if the one of the dynamic array templates my be a good choice.  We could set values to NULL for the entries that are skipped.

One of the reasons I was looking at this was to see if entire models (.mdl's) could be identified.  I found that nwn calls glDrawElements in the same order that the nodes appear in the models hiarchy.  In the red dragon model I placed a node called s.c_reddrg at the beginning of the node list and one called f.c_reddrg at the end.  The net result is that nwshader could identify the start and finish of a model and operate on the entire model.  

Interestingly the dragons wings (which are skinned) do not seem to go through glDrawElements.

I could see a couple of uses for this:
  • Let the gpu's do the vertex animation instead of the PC.
  • Have nwn process "bare bone" models (ones with very few vertexes, but all the bones) and let nwshader add the vertexes (the meat so to speak).  You might be able to create some very complex models that nwn would not normally be able to handle.

               
               

               
            

Legacy_Lord Sullivan

  • Hero Member
  • *****
  • Posts: 671
  • Karma: +0/-0
NWShader
« Reply #106 on: December 09, 2010, 12:26:41 am »


               Anything new going on with this awesome util lately?
               
               

               
            

Legacy_pkpeachykeen

  • Jr. Member
  • **
  • Posts: 89
  • Karma: +0/-0
NWShader
« Reply #107 on: December 09, 2010, 04:46:02 am »


               Not recently.
I have two bugs left on the list to take care of, then some testing, and we can call it a stable release.

I expect at least one more patch; one if I can get the shader loading bugs and the GUI list bug, two if I can't. That patch (or the second one) will, if all goes according to plan, be a preliminary 0.9 (release candidate) version and be promoted to 1.0 after testing. Of course, that assumes these last bugs can be squashed, and I've been chasing them for a while now (narrowed it down to a very few parts of the code where they may be lurking).


Most of my time lately has been spent on the project that will come to replace NWShader (actually, it will also replace the inspiration for NWShader, MGE, and at least influence a number of similar projects). There will be no significant change to how shaders or the NWN module work, I'm basing the new core on what I've learned writing NWS.

That's coming along nicely, I had a functional demo for another game (till I decided to rip the code apart and clean it up) and am working on fixing some bugs in the core. I'm setting up some stuff to help make a NWN module quick and simple (hooking OpenGL is ridiculously complicated compared to DirectX, but I've done it once, so...).

As a multi-game system, we'll be seeing better stability (from, hopefully, more testers), some more features (I'm going to be a bit tight-lipped about those until I get working demos, in case they fail, but if they don't, the spelling of epic will change ':wizard:'), plus making the shader linker more robust.

Right now, I use Cg to compile the shaders and have some old and kinda messy NWShader code handling the textures , parameters and what-not. My new system is designed from the ground up as a core for this sort of app and, from all my tests so far, does it pretty well. It can set up and link textures with ease and handle a good bit of stuff that's kind of hacky in NWShader at the moment.

That will eventually replace NWShader (the NWS forums have already been redirected to the new forum). It will support NWN, NWN2, The Elder Scrolls Morrowind and Oblivion, at least (any other OGL/DX8/9/10 games are possibilities). NWN and Morrowind are tied for #1 on the support list, NWN2 is next, and I'm trying to get in contact with the Oblivion Graphics Extender developers to see if they'd like to use the core (#3).

To prep for all that, I've purchased hosting with Westhost, one of the best hosting companies around (and a friend of mine works there, so I can bug him to fix anything '<img'>)  and set up some new and expanded forums.

Oh, and this all would be done, except for Minecraft and those meddling creepers. ':?'
               
               

               


                     Modifié par pkpeachykeen, 09 décembre 2010 - 04:52 .
                     
                  


            

Legacy_Lord Sullivan

  • Hero Member
  • *****
  • Posts: 671
  • Karma: +0/-0
NWShader
« Reply #108 on: December 09, 2010, 11:22:38 pm »


               Sounds cools, can't wait to see whatever comes out of your brain in binary '<img'>

               
               

               
            

Legacy_Birdman076

  • Sr. Member
  • ****
  • Posts: 320
  • Karma: +0/-0
NWShader
« Reply #109 on: January 12, 2011, 03:29:10 am »


               Does this update NWN's OpenGL at all allowing those with newer video cards the ability to play the game without the low FPS associated with Nvidia 200 series and newer cards that do not support older OpenGL?
               
               

               
            

Legacy_pkpeachykeen

  • Jr. Member
  • **
  • Posts: 89
  • Karma: +0/-0
NWShader
« Reply #110 on: January 12, 2011, 06:48:16 am »


               It uses some OpenGL 1.4 and newer features, but it does not inherently force NWN to use more modern render paths.



It may be possible, depending on how NWN handles some of the data internally, to upgrade functions on the fly. I have a few theories for doing that; unfortunately, none of them fit into the current NWShader setup. Fortunately, they do fit into the updated framework, so as soon as I finish laying the foundation for that, I can test that. At the very least, I hope to cache draw calls and call them as an array or multi-vert call later on, which will help take advantage of GPU power.
               
               

               
            

Legacy_Birdman076

  • Sr. Member
  • ****
  • Posts: 320
  • Karma: +0/-0
NWShader
« Reply #111 on: January 13, 2011, 02:01:24 am »


               Well, I'm just thinking that if provisions are made to allow people with new video cards to run the game then there would be that many more people with the ability to play and check out the game. Thank you for your answer, I have yet to try NWShader but have it downloaded on the computer and when I get some time I will load it up as it looks really sweet.
               
               

               
            

Legacy_pkpeachykeen

  • Jr. Member
  • **
  • Posts: 89
  • Karma: +0/-0
NWShader
« Reply #112 on: January 14, 2011, 01:53:51 am »


               There are a few possible solutions, although I'm not sure how much they'll improve speed (there's some overhead in the translation that may counter the increase from the new calls).



I think I mentioned it before, but I've been spending most of my free time lately reworking the core of NWShader. It originally started as a single-purpose system designed for one thing, then I started adding stuff and it started falling apart. The Chronepsis versions were a partial rewrite that obviously had issues, so I've been taking it from the bottom up.



It's taking some time, obviously, but so far is much more stable and does things properly that NWS kind of hacked in. I have to put the final touches on the core and finish the NWN module, then that'll be coming out for testing (shaders and materials will stay compatible, other stuff will just be improved).
               
               

               
            

Legacy_Dark_Ansem

  • Full Member
  • ***
  • Posts: 148
  • Karma: +0/-0
NWShader
« Reply #113 on: January 14, 2011, 08:23:38 am »


               serious quality stuff from you.
               
               

               
            

Legacy_xidekeen

  • Newbie
  • *
  • Posts: 27
  • Karma: +0/-0
NWShader
« Reply #114 on: June 05, 2011, 09:30:10 pm »


               Hi, sorry to revive an old thread but I'm having serious problems with the Nwshader.

I've downloaded - Chronepsis 0.2.2.3.rar and the Patch0230.rar.

I'm positive I installed them correctly but when I run it nothing changes everything looks the same.
I tried running the NwshaderGUI and I get message saying config not found and everything is unchecked. When I try to apply some of the features and load the game I just get a black screen inside the game (not menu) and I can only see my hotbars. I'm hoping if someone can help me out with this?

P.S - Using Chronepsis alone seems to work but everything is to blurry, I tried changing it and everything just unchecks itself and not able to save it.
               
               

               


                     Modifié par xidekeen, 05 juin 2011 - 08:42 .
                     
                  


            

Legacy_Ce1orn

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
NWShader
« Reply #115 on: June 15, 2011, 03:19:42 am »


               A year or so ago, I was enjoying nwshader, worked fine on an old nvidia 7k series, and an ati 2900, but now with an nVidia 5xx series it doesn't.

I'm having similar problems as xide; NWshader is hooking/running, but no shaders work. The camera hack works, and the fog setting works, but I get no shaders effects in-game like i used to. This is where the log starts showing errors:

19:20:14 ::   Shader Factory: Loaded texture error.png on 08CA7FD8.
19:20:14 ::   Shader Factory: Setup complete.
19:20:14 ::   Set up DirectInput interface.
19:20:20 ::   Cg: No vertex or fragment profiles found. Shaders may not function.
19:20:20 ::   NWShader: Compiling shaders...
19:20:20 ::   CG: Could not find valid techniques.
19:20:22 ::   CG: Could not find valid techniques.
19:20:22 ::   Shader Manager FS: Some shaders failed to load.

Any ideas as to what's going on from that?
               
               

               
            

Legacy_R-TEAM

  • Jr. Member
  • **
  • Posts: 51
  • Karma: +0/-0
NWShader
« Reply #116 on: October 22, 2011, 07:26:14 pm »


               Hi,

will it be ever an update or bug fix available .....?
Looks the project is dead :\\
With my old ATI X1950XT the shaders run fine ...
But now with my newer ATI HD4850 and actual drivers - no shader work anymore ...
Its make no diff which shader i test - none work.
So if no bugfix coming it is mainly only usefull for older cards imho .....(sad)

Regards
R-TEAM
               
               

               
            

Legacy_PC-48

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
NWShader
« Reply #117 on: November 24, 2011, 02:36:08 am »


               Wondering if this forum is still alive, having problems with shaders in the GUI staying checked. I check the 3 that I want to use: depth of field, bloom, and hdr but then when I reopen the GUI they are all unchecked again.
               
               

               
            

Legacy_pkpeachykeen

  • Jr. Member
  • **
  • Posts: 89
  • Karma: +0/-0
NWShader
« Reply #118 on: November 27, 2011, 06:10:07 am »


               Despite the lack of updates (here), the project is far from dead. About a year ago, it was rebranded as part of the Voodoo Shader Framework, providing an extended featureset among other things.

NWShader itself will not receive any more patches, but Voodoo/Frost is still being developed (how stable it is varies).

There are quite a few known issues with the last release of NWShader, some of which would take significant core work, hence the shift to the unified system and rewrite.

Until that is compete, I would recommend using the next-to-last release of NWShader, it was significantly more stable. You may also be interested in following Voodoo (can be found at https://github.com/p...en/VoodooShader ), as that is the replacement.

As far as the issues brought up in the last few posts:

@Ce1orn: That indicates that no available OpenGL profiles can be found by Cg on your hardware. It may be driver related, but there should always be a few available profiles. There are some significant issues with the recent nVidia drivers, particularly when it comes to their shader handling, but I'm not sure that's the cause. I assume drivers are up-to-date and such?

@R-TEAM: As noted, there will be no additional updates to NWS as such. What drivers are you running, what does the log note? I'm curious if it's related to Ce1orn's issues, or different.

@PC-48: IIRC, the shader list had at least one bug. Check to make sure they are in the config file, and if not, you may try manually adding them.

Again, as I mentioned, I'd recommend the next-to-last release as it is more stable, until Voodoo/Frost is complete. I'd put Frost at about 70% completeness compared to the last NWS, and significantly more stable.
               
               

               
            

Legacy_Dark_Ansem

  • Full Member
  • ***
  • Posts: 148
  • Karma: +0/-0
NWShader
« Reply #119 on: November 27, 2011, 07:47:00 am »


               great news! an excellent idea '<img'>