View unanswered posts | View active topics It is currently Thu Dec 12, 2019 7:44 am



This topic is locked, you cannot edit posts or make further replies.  [ 158 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 7  Next
The unofficial BSNES pixel shader thread 
Author Message
has wat u liek
User avatar

Joined: Tue Sep 11, 2007 2:54 pm
Posts: 559
Location: Banland.
Reply with quote
Post 
Quote:
Just curious; someone mentioned a while back that HQ2X is too complicated to implement as a shader, is that true? Not that I expect you to tackle a monster like that, but it'd be really damn awesome. Especially awesome if it's combined with OpenGL renderer shader support in the near future.


No. HQ2x texture scaling can be done on the video card. All it takes is a multipass shader, and a HQ2x lookup texture.

2xSai should be quite straightforward, same with Super2xSai.


Wed Mar 26, 2008 9:03 am
Profile
Regular
User avatar

Joined: Tue Mar 07, 2006 10:32 am
Posts: 347
Location: The Netherlands
Reply with quote
Post 
mudlord wrote:
Quote:
Just curious; someone mentioned a while back that HQ2X is too complicated to implement as a shader, is that true? Not that I expect you to tackle a monster like that, but it'd be really damn awesome. Especially awesome if it's combined with OpenGL renderer shader support in the near future.


No. HQ2x texture scaling can be done on the video card. All it takes is a multipass shader, and a HQ2x lookup texture.

2xSai should be quite straightforward, same with Super2xSai.


That someone was me, though I said (or atleast meant, I can't remember my exact words) it looked like it would be too complicated to get 60fps even on today's fastest cards. But that was from the perspective of only having worked with single-pass shaders, without much knowledge of lookup textures. I applaud the people who made that shader! By the way, you're right that 2xSaI is straightforward; the only reason I haven't converted the version I've worked on for OpenGl is that byuu mentioned not including 2xSaI in bsnes because of licensing issues, and I don't know where shaders stand with those.


Wed Mar 26, 2008 10:05 am
Profile
has wat u liek
User avatar

Joined: Tue Sep 11, 2007 2:54 pm
Posts: 559
Location: Banland.
Reply with quote
Post 
Quote:
By the way, you're right that 2xSaI is straightforward; the only reason I haven't converted the version I've worked on for OpenGl is that byuu mentioned not including 2xSaI in bsnes because of licensing issues, and I don't know where shaders stand with those.


Well, Pete's plugin is proprietary, yet guest(r)'s shaders are GPLed... So I don't know the legalese either.....


Wed Mar 26, 2008 10:21 am
Profile
ZSNES Developer
ZSNES Developer
User avatar

Joined: Tue Aug 17, 2004 5:24 am
Posts: 812
Location: In your garden
Reply with quote
Post 
If you really wanted to you could probably get away with using some shaders in a seperate library of sorts if you licensed it differently. Of course that might lead to plugin hell. So it might not be the best option.

_________________
Watering ur plants.


Thu Mar 27, 2008 5:39 pm
Profile
Reply with quote
Post 
The GPL is a distribution license only. Something only counts as a derivative work once it's linked with another application. You could argue that compiling and attaching shaders counts as linking, but this happens at runtime.

Now, you are allowed to distribute GPL licensed files with non-GPL licensed files, they just cannot be linked.

So technically, as far as I can see, it would be legal for me to include a shader/ folder in the bsnes distribution; but questionable to make the executable itself aware of those files by default (eg to add manual coded menu entries for them, or embed them inside the executable.)

You run into a gray area when software depends upon GPL files to work, even doing something such as dynamic linking. See all the nVidia binary driver hoopla, and constant blacklisting of NDISwrapper and such in the Linux kernel. But it hasn't really been tried in court yet.

However, with bsnes, it would not depend upon the shaders. In fact, the software itself wouldn't even have knowledge of them. The user would have to browse for the shader file and select it by hand. The software is fully independent of the shaders otherwise. As they won't be linked to bsnes until the user manually selects them (and even that link is questionable), ones personal use at that point is not a violation of the GPL.

I'll be including any shaders I like with the default archive, and I may even add a directory scanner to make actual menu entries dynamically. If an author (or copyright holder) of a shader has a problem, they can ask me to remove them. If anyone else has a problem, they can go jump off a cliff.


Thu Mar 27, 2008 6:22 pm
has wat u liek
User avatar

Joined: Tue Sep 11, 2007 2:54 pm
Posts: 559
Location: Banland.
Reply with quote
Post 
Quote:
You could argue that compiling and attaching shaders counts as linking, but this happens at runtime.


Correct, once the shader is "compiled" by D3DXCreateEffectFromFile(), thats it.

Quote:
Now, you are allowed to distribute GPL licensed files with non-GPL licensed files, they just cannot be linked.


Interesting, so basically, with me specifying a common filename for the shaders to be loaded, thats fine? Or am I misunderstanding something?

Quote:

PostPosted: Thu Mar 27, 2008 5:22 pm Post subject:
The GPL is a distribution license only. Something only counts as a derivative work once it's linked with another application. You could argue that compiling and attaching shaders counts as linking, but this happens at runtime.

Now, you are allowed to distribute GPL licensed files with non-GPL licensed files, they just cannot be linked.

So technically, as far as I can see, it would be legal for me to include a shader/ folder in the bsnes distribution; but questionable to make the executable itself aware of those files by default (eg to add manual coded menu entries for them, or embed them inside the executable.)


Hmmmmz...


Fri Mar 28, 2008 4:55 am
Profile
has wat u liek
User avatar

Joined: Tue Sep 11, 2007 2:54 pm
Posts: 559
Location: Banland.
Reply with quote
Post 
Quote:
I'd very much like to try a scanline shader if someone can make it.

BTW I notice no "sharpening" of the image when I use the sharpen shader. Perhaps it doesn't work with point filtering?

I did confirm the shaders do work on my system by testing the drunken wave one. That's a Vista 64-bit test done for ya


Thanks for testing, I'm glad it works under 64 bit Windows :P

As for the scanline shader, Verdauga Greeneyes wrote quite a accurate one compared to byuu's scanline CPU filter. It should be in the monster thread, somewhere....


Mon Mar 31, 2008 6:41 am
Profile
Hazed
User avatar

Joined: Mon Jan 22, 2007 3:27 am
Posts: 54
Reply with quote
Post 
creaothceann wrote:
A GoodSNES ROM name! :o


I was shocked too :o
GoodSNES = shit

On topic, so this filter is supposed to make the emulation faster in theory, but is slower in practice?


Mon Mar 31, 2008 7:44 am
Profile
has wat u liek
User avatar

Joined: Tue Sep 11, 2007 2:54 pm
Posts: 559
Location: Banland.
Reply with quote
Post 
Quote:
On topic, so this filter is supposed to make the emulation faster in theory, but is slower in practice?


Sorry for taking so long to respond.

Yes, thats the issue. On my card, I dont notice a speed hit at all. Considering though its a PCI-E one...

Part of the problem lies with how the DLL works. The DLL copies rendered frames, does shader calculation, than renders it back. With it all self contained though in BSNES, byuu could just post process the main D3D texture or OpenGL one, which saves a possible texture copy operation if byuu doesn't use a render target surface as a frame storage area.

I really need to fix that first link though, which broke during my site update, as well as upload VG's scanline shader into the pack...

So basically, if your video card is recent, you shouldnt notice that much of a speed hit, or one at all.


Mon Apr 14, 2008 10:03 am
Profile
Rookie

Joined: Thu Apr 17, 2008 10:27 pm
Posts: 29
Reply with quote
Post 
hey mudlord I am interested in trying out the shader pack as I have a fairly recent system(c2d 2.2, radeon 3650, 4 gig ram, x64 vista) but I output to a 1280x720 hdtv and so bsnes doesn't run at full speed with hq2x and such enabled. I wanted to see what help it might hopefully give. I realize most are saying a bit of slowdown but you aren't seeing any you said.

So to get to the point :D I was wondering if you had the new link to the shader pack please. I would appreciate it.

Thanks


Thu Apr 17, 2008 11:20 pm
Profile
has wat u liek
User avatar

Joined: Tue Sep 11, 2007 2:54 pm
Posts: 559
Location: Banland.
Reply with quote
Post 
I will, when I get a spare moment.


Thu Apr 17, 2008 11:43 pm
Profile
Rookie

Joined: Thu Apr 17, 2008 10:27 pm
Posts: 29
Reply with quote
Post 
cool, thank you


Fri Apr 18, 2008 12:13 am
Profile
has wat u liek
User avatar

Joined: Tue Sep 11, 2007 2:54 pm
Posts: 559
Location: Banland.
Reply with quote
Post 
Uploaded.

Unfortunately, I lost my updated source code to add timing events, so the uploaded pack is of a older version.


Fri Apr 18, 2008 12:28 am
Profile
Rookie

Joined: Thu Apr 17, 2008 10:27 pm
Posts: 29
Reply with quote
Post 
Thank you mudlord. I hate to be a pain but I copied the d3d9.dll to the same folder as bsnes.exe and then copied a shader fakehdr.fx to the same folder and it won't work. bsnes starts up but then immediately shuts right back down. I dont see mention of any special settings needed for bsnes to use them properly?

Sorry to be a pain. I am using vista x64 version so maybe that affects it? Also using a ati radeon 3650


Fri Apr 18, 2008 4:34 am
Profile
Rookie
User avatar

Joined: Tue Apr 22, 2008 4:38 am
Posts: 15
Location: Porto Alegre, Brazil
Reply with quote
Post 
joebells wrote:
Thank you mudlord. I hate to be a pain but I copied the d3d9.dll to the same folder as bsnes.exe and then copied a shader fakehdr.fx to the same folder and it won't work. bsnes starts up but then immediately shuts right back down. I dont see mention of any special settings needed for bsnes to use them properly?

Sorry to be a pain. I am using vista x64 version so maybe that affects it? Also using a ati radeon 3650


Here too...
Isn't this plugin compatible with version 0.031 of the bsnes?

I'm using a Ge-Force 6200


Thu Apr 24, 2008 3:14 am
Profile
has wat u liek
User avatar

Joined: Tue Sep 11, 2007 2:54 pm
Posts: 559
Location: Banland.
Reply with quote
Post 
Very strange...

I'll do some testing...


Thu Apr 24, 2008 4:55 am
Profile
has wat u liek
User avatar

Joined: Tue Sep 11, 2007 2:54 pm
Posts: 559
Location: Banland.
Reply with quote
Post 
Quote:
Here too...
Isn't this plugin compatible with version 0.031 of the bsnes?

I'm using a Ge-Force 6200


In the next few days, I will be uploading a new version. It has proper logging support, so it should be able to find where the issue is....:)

And it should work on any version of BSNES.


And...I am writing some new shaders, too.

EDIT: Uploaded.


Thu Jun 05, 2008 9:04 am
Profile
Regular
User avatar

Joined: Tue Mar 07, 2006 10:32 am
Posts: 347
Location: The Netherlands
Reply with quote
Post 
Hey, thanks for the update. My new card (9800GX2) crashes with the patched executable. How do I enable logging?

Edit: by the way, if you're interested in non-bsnes related issues, I tried it with TrackMania Nations Forever and it complains about 'D3DPERF_SetOptions' not being found in d4rk.dll ;) (then again, the game probably uses a million shaders of its own so I dunno if it'd be in the least compatible)


Thu Jun 05, 2008 2:48 pm
Profile
has wat u liek
User avatar

Joined: Tue Sep 11, 2007 2:54 pm
Posts: 559
Location: Banland.
Reply with quote
Post 
Quote:
How do I enable logging?


It should spit out a log, "debug.txt", so logging should not be enabled.

Strange it crashes for you. What OS are you using? You could try just renaming d4rk.dll to d3d9.dll and then place it where BSNES or whatever is...


Thu Jun 05, 2008 10:21 pm
Profile
Regular
User avatar

Joined: Tue Mar 07, 2006 10:32 am
Posts: 347
Location: The Netherlands
Reply with quote
Post 
mudlord wrote:
Quote:
How do I enable logging?


It should spit out a log, "debug.txt", so logging should not be enabled.

Strange it crashes for you. What OS are you using? You could try just renaming d4rk.dll to d3d9.dll and then place it where BSNES or whatever is...


It doesn't create any files, so I guess it crashes before it's even able to. I'll try the d3d9.dll approach.

Edit: nope, that crashes too. For the record, it worked on my previous card, a GeForce 6600 GT AGP. My OS is Windows XP (x86) with SP3.


Thu Jun 05, 2008 11:03 pm
Profile
has wat u liek
User avatar

Joined: Tue Sep 11, 2007 2:54 pm
Posts: 559
Location: Banland.
Reply with quote
Post 
Okay, I will upgrade to SP3 and see if I can reproduce the bug. :)


Thu Jun 05, 2008 11:42 pm
Profile
has wat u liek
User avatar

Joined: Tue Sep 11, 2007 2:54 pm
Posts: 559
Location: Banland.
Reply with quote
Post 
Shit. Can't reproduce.

I really should hack the last version that had PGO and modify its renderer so it supports shaders....

Thats if byuu wouldn't mind me making a build that does such a thing. :P


Fri Jun 06, 2008 10:25 pm
Profile
Reply with quote
Post 
Quote:
I really should hack the last version that had PGO and modify its renderer so it supports shaders....

Thats if byuu wouldn't mind me making a build that does such a thing. :P


Honestly, I'd prefer you didn't. I don't want to encourage people to cling to older, buggier versions just because they're faster. If you want to use bsnes v016, you might as well use SNESGT v230. In fact, the latter is probably more accurate.

But if you insist, you have my permission, of course.

Perhaps you could help get PGO working with the new versions, instead? :)


Fri Jun 06, 2008 11:11 pm
has wat u liek
User avatar

Joined: Tue Sep 11, 2007 2:54 pm
Posts: 559
Location: Banland.
Reply with quote
Post 
Quote:
Perhaps you could help get PGO working with the new versions, instead? :)


We need to find which code messed it up first. And which build had it last working. Sorry that I haven't been paying much attention to the dev process to find where. :(


Sat Jun 07, 2008 12:39 am
Profile
Regular
User avatar

Joined: Tue Mar 07, 2006 10:32 am
Posts: 347
Location: The Netherlands
Reply with quote
Post 
mudlord wrote:
Shit. Can't reproduce.

Hmm. Can I help you test this?


Sat Jun 07, 2008 12:53 am
Profile
Display posts from previous:  Sort by  
This topic is locked, you cannot edit posts or make further replies.   [ 158 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 7  Next

Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software.