Go Back   Project64 Forums > General Discussion > Open Discussion

Reply
 
Thread Tools Display Modes
  #1361  
Old 6th August 2014, 04:16 AM
HatCat's Avatar
HatCat HatCat is offline
Alpha Tester
Project Supporter
Senior Member
 
Join Date: Feb 2007
Location: In my hat.
Posts: 16,236
Default

I actually had nothing to read into your post because many pages ago I was asking for feedback about a possible way to do scanlines. I still have nothing to read into your post because it seems you don't have any particular preference, so I guess the best thing for me to do in the meantime is to leave it as-is.
Reply With Quote
  #1362  
Old 6th August 2014, 04:18 AM
HatCat's Avatar
HatCat HatCat is offline
Alpha Tester
Project Supporter
Senior Member
 
Join Date: Feb 2007
Location: In my hat.
Posts: 16,236
Default

Quote:
Originally Posted by GPDP View Post
Anyway, for what it's worth, yes, a simple scanline filter would be nice.
It seems that some people prefer different scanline ratios...a 1:3, 1:4 ratio etc. for how many scanlines are shown before a black line interrupts it. Also, sometimes the line isn't perfectly black. I was wondering how much of this is normal and if I should emulate the varying intensities as a fraction of some sort.

Quote:
Originally Posted by GPDP View Post
I forget, however. Is it possible to run this plugin at 640x480 fullscreen? If so, it would be perfect for my setup.
Full-screen just makes the window take up your current monitor screen's full space, so if you want 640x480 full-screen you would have to change the monitor desktop resolution to 640x480 before entering full-screen mode.
Reply With Quote
  #1363  
Old 6th August 2014, 04:24 AM
GPDP GPDP is offline
Senior Member
 
Join Date: May 2013
Posts: 146
Default

I am referring to your last comment where you said you would not sacrifice portability to make your monitor look like a shitty TV. I could only surmise you were interpreting my post as demanding that you implement some special filter or something, when I did not, and was in reality showing that this plugin can look EXTREMELY similar to real hardware on the kind of display it was originally made to run on, which was a compliment. Instead I not only get told it looks hideous (fair enough, not everyone likes the old CRT look), and a subtle implication that I might be wanting you to implement something outside your project goals.

But eh, I already stated a simple scanline filter would be nice. It's up to you if you want to implement it, of course. As for the exact implementation, the best way to go about it is an option for scanline opacity, from 0 (no scanlines at all) to 100 (completely black scanlines), or something like that.

Last edited by GPDP; 6th August 2014 at 04:28 AM.
Reply With Quote
  #1364  
Old 6th August 2014, 04:31 AM
HatCat's Avatar
HatCat HatCat is offline
Alpha Tester
Project Supporter
Senior Member
 
Join Date: Feb 2007
Location: In my hat.
Posts: 16,236
Default

The only scan-lines filter I can do now in OpenGL 1.1 is just, drawing simple, horizontal bars across the screen.

When you gave that screenshot that had all those complicated, interpolated pixels across a round TV screen, I was like, I can't do that, no way.

That is, not without modern GL shaders, anyway. Which I wasn't sure if you were saying, you would much rather have, than what I was asking you about. But if you're satisfied with the 50/50 scanlines ratio I can do that easily enough, yeah.

Quote:
As for the exact implementation, the best way to go about it is an option for scanline opacity, from 0 (no scanlines at all) to 100 (completely black scanlines), or something like that.
So I could have up to 2 options then...opacity of the black bars, and frequency/skip. Or, maybe there's one simple option that can combine both properties in 1 option?

Last edited by HatCat; 6th August 2014 at 04:33 AM.
Reply With Quote
  #1365  
Old 6th August 2014, 04:47 AM
GPDP GPDP is offline
Senior Member
 
Join Date: May 2013
Posts: 146
Default

Per the frequency of scanlines, there's two ways to do it. One way is to simply black out every other lines regardless of scale, so even if you set a non-integer-scaled window resolution like 800x600, it would result in every other line being scanlined. I would argue this method is hardly accurate, but the upside is it works no matter what resolution you set. Pete's plugins for PS1 emulators have a scanline option that works exactly like this.

The other way is to have the scanlines scale along with the overall picture. This means the scanlines are only 1 pixel in height at 2x scale, 2 pixels in height at 4x scale, etc. This is more accurate to how real TV scanlines work. The issue is that at non-integer scales, this results in hideously uneven scanlines, where some are 1 pixel in height while others are 2 pixels, and so on. To avoid this, you would have to exclusively use integer scales that are power of 2, such as 2x, 4x, 8x, etc., as even integer scales such as 3x and 6x would have scanlines that are of a different height than regular non-blacked-out lines.
Reply With Quote
  #1366  
Old 6th August 2014, 04:23 PM
oddMLan's Avatar
oddMLan oddMLan is offline
Alpha Tester
Project Supporter
Senior Member
 
Join Date: Jan 2009
Location: Parappa Town
Posts: 210
Default

Quote:
Originally Posted by HatCat View Post
Full-screen just makes the window take up your current monitor screen's full space, so if you want 640x480 full-screen you would have to change the monitor desktop resolution to 640x480 before entering full-screen mode.
I think a setting for customizing the fullscreen resolution would be nice and not too difficult to implement.
Reply With Quote
  #1367  
Old 6th August 2014, 08:01 PM
HatCat's Avatar
HatCat HatCat is offline
Alpha Tester
Project Supporter
Senior Member
 
Join Date: Feb 2007
Location: In my hat.
Posts: 16,236
Default

Quote:
Originally Posted by oddMLan View Post
I think a setting for customizing the fullscreen resolution would be nice and not too difficult to implement.
It would be nice but too complicated.
On Windows we would have to do this: http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx
And this is not a full source of all the possible full-screen display modes. On my system, only the NV control can tell me that, I think?

I was fine implementing free-form window resize since you can pick whatever resolution you want. With full-screen res you can't do that; you're limited to a narrow variety of "modes".

And I complain easy when programs change my desktop resolution for me without asking, because it screws up Winamp and the wallpaper desktop icons I sometimes had. Other people complained that it screwed up other processes they had open. And, it screws up my monitor on restore/load new resolution, and I have to adjust my monitor's settings for different resolutions, and people will blame that on my plugin if I implement changing fullscreen resolutions in my plugin, which isn't fair, because, I have no control over that.

So I personally think that changing the resolution for the user is a rude thing to risk doing (and what if the WINAPI call fails? I can't control the OS very well either!); it should be done by the user, in driver/Windows settings, when they're ready. Otherwise I'm just opening up this DLL to be blamed for inevitable consequences, so I think it would be safer to just talk about accurate screen output in a manual/readme and simply ask the user to change to 640x480.

[edit] Also, I've seen people report that entering full-screen mode on some plugins, like Rice's Video Plugin, crashed their system and forced them to reboot. Changing desktop display resolutions for various peoples' drivers is not very direct goal!

Because, 640x240 and 640x480 are the only accurate choices for full-screen resolution, except for an additional one: your monitor's native (usually, but not always, the maximum) resolution (which for me is 1024x768). The current implementation simply uses your monitor's current (hopefully native) resolution, which is by far the most stable, hazard-free, and definitely fast approach to changing to full-screen.

As for using 640x480 instead of 1024x768 / w/e your monitor's native res is, there's a setting I like to use under the Compatibility tab of a program, that loads the program in 640x480 display mode. I use this to quick-switch to 640x480 before entering full-screen. Sometimes as a setting on load pj64 exe, sometimes some random exe I just want to be able to double-click when I feel ready to change.

To wrap up this little essay, adding a list of full-screen resolutions in my plugin that you can change modes to when entering the full-screen would barely be different from simply having my NVIDIA control panel window open for configuring my monitor resolution there. It would be a slight improvement of convenience for sure, but in exchange for several complexities I'd rather not risk.

Quote:
Originally Posted by GPDP View Post
Per the frequency of scanlines, there's two ways to do it. One way is to simply black out every other lines regardless of scale, so even if you set a non-integer-scaled window resolution like 800x600, it would result in every other line being scanlined. I would argue this method is hardly accurate, but the upside is it works no matter what resolution you set. Pete's plugins for PS1 emulators have a scanline option that works exactly like this.
I just have a 1024x1024 texture, with a 640x240 sub-image (or other heights, depending on current game mode).

So this method seems kind of infeasible anyway.

Quote:
Originally Posted by GPDP View Post
The other way is to have the scanlines scale along with the overall picture. This means the scanlines are only 1 pixel in height at 2x scale, 2 pixels in height at 4x scale, etc. This is more accurate to how real TV scanlines work. The issue is that at non-integer scales, this results in hideously uneven scanlines, where some are 1 pixel in height while others are 2 pixels, and so on. To avoid this, you would have to exclusively use integer scales that are power of 2, such as 2x, 4x, 8x, etc., as even integer scales such as 3x and 6x would have scanlines that are of a different height than regular non-blacked-out lines.
That sounds like it could work, yeah.
I guess I'm supposed to assume a 640x480 resolution, so after scaling from 640x240 to 640x480, then I draw the alternating lines.

Maybe I could draw the black bars and prepare for blended scaling, where when resizing 640x480, on 1024x768, it could some out with some partial transparency on the top and bottom bits, but I dunno if that'd be worse/less accurate than making it solid black.

Should the black gaps always be pitch black then, or might the ratio (well, I mean, the frequency of the black gaps interrupting the scanlines) have an effect on the opacity/intensity of the blackness?

Also, let's say we end up with 50% scanlines 50% black gaps alternating...should it be alternating even or alternating odd? Like, should the pixel rows start off from top to bottom as X B X D X F, or A X C X E X, where X is a black gap? I'd actually prefer the former since bilinear upscale can sometimes mess up the color ratio of the very uppermost line of pixels in the scaled output, and this could give scanlines as an opportunity of hiding that. But, idk which would be more accurate, in any micro-reasoning logic, or on a real TV, or maybe it just depends.

Last edited by HatCat; 6th August 2014 at 08:15 PM.
Reply With Quote
  #1368  
Old 10th August 2014, 05:59 AM
oddMLan's Avatar
oddMLan oddMLan is offline
Alpha Tester
Project Supporter
Senior Member
 
Join Date: Jan 2009
Location: Parappa Town
Posts: 210
Default

I think we should start migrating the RSP/RDP development threads to Emutalk, the server problems are becoming increasingly more common on this place
Reply With Quote
  #1369  
Old 10th August 2014, 10:24 AM
RPGMaster's Avatar
RPGMaster RPGMaster is offline
Alpha Tester
Project Supporter
Super Moderator
 
Join Date: Dec 2013
Posts: 2,008
Default

Man idk why I didn't think of using frame skip as a way to get higher VI/s when I'm not able to normally run full speed. I've obviously messed with that refresh and skip triangle option before, but I wanted more! So I experimented with 1964's auto frameskip. It works great with 60fps games, all I have to do is set refresh to 1. I didn't like the fact that frameskip was automatic so I took out the automatic part in 1964 . Lol too bad I still can't get stable 60VI/s in SSB64 vs mode ;/ . Although I get 60VI/s in training mode lol.

I need to start benchmarking/profiling more often! I have a bad habit of focusing on less important code ;/ . I hope I learn a good deal this week .
Quote:
Originally Posted by oddMLan View Post
I think we should start migrating the RSP/RDP development threads to Emutalk, the server problems are becoming increasingly more common on this place
But isn't HatCat still banned?
Reply With Quote
  #1370  
Old 10th August 2014, 05:59 PM
the_randomizer's Avatar
the_randomizer the_randomizer is offline
Alpha Tester
Project Supporter
Senior Member
 
Join Date: Sep 2008
Location: USA
Posts: 1,136
Default

Quote:
Originally Posted by RPGMaster View Post
But isn't HatCat still banned?
Only because the butthurt mods over there still have a grudge, yes, so it wouldn't be ideal, but the server issues here are getting ridiculous.
__________________
My rig:
CPU: Intel Core i7 4470 3.4 GHz to 3.9 GHz
Video card:: MSI nVidia GTX 970 4 GB GDDR5
OS: Windows 7 Professional 64-bit
RAM: 16 GB DDR3 SDRAM 10600
HDD: 2 x Western Digital 1 TB HDDs
Monitor: 23" Asus Full HD LED

Oh, and Snes9x > Zsnes in every way
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 04:49 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.