Emuforums.com

Go Back   Emuforums.com > PSX Emulation > PSX Plugin Questions & Troubleshooting
Home Register Downloads FAQ Members List Calendar Arcade Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
Old 2 Weeks Ago   #1 (permalink)
Registered User
 
KrossX's Avatar
 
Join Date: Mar 2006
Location: Argentina
Posts: 930
16-235 to 0-255

I was testing BSNES and really liked the "Simulate NTSC gamma..." option, since it makes black be black. Which is one of the reasons I prefer to use OGL2 + shaders on PSX rather than PEOpS Soft. But, some of the shaders get overbright for some reason.

So I tried to modify the Brightness sample shader on Pete's site for something alike.

gpuPeteOGL2.slf
Code:
uniform sampler2D OGL2Texture;
varying vec2 TCoord;

void main()
{
	 vec4 col;

	 col = texture2D(OGL2Texture, TCoord);
	 
	 // 16-255
	 // col = col * 1.06694561 - 0.06694561;
	 
	 // 16-235	 
	 col = col * 1.16438356 - 0.07305936;

	 gl_FragColor = col;
}
gpuPeteOGL2.slv
Code:
varying vec2 TCoord;

void main()
{
 gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;

 TCoord = gl_MultiTexCoord0.xy;
}
I think this just changes the levels rather than simulate the NTSC gamma (I don't know how such gamma is to begin with). But anyhow, would it be too difficult to add some kind of option to PEOpS Soft for this kind of thing?
Attached Files
File Type: zip Test2.zip (511 Bytes, 0 views)
__________________

Last edited by KrossX; 1 Week Ago at 06:29.. Reason: Updated. Added 16-255 option.
KrossX is offline   Reply With Quote

Advertisement [Remove Advertisement]
Old 1 Week Ago   #2 (permalink)
Registered User
 
Join Date: Feb 2009
Location: N/A
Posts: 152
Modified draw.c - BlitScreen32 only (16-bit PSX mode). No filters.
Only works in 32-bit resolution

Thinking I did this wrong but fun to try out.


File list:
gpuPeopsSoft_BSnes_NTSC: plugin with BSnes NTSC gamma ramp
src: source files

snes-no: Mario World without adjustment
snes-yes: Mario World with adjustment
- Note: Look at the black colors + Mario's red hat

test1-no: Eve2 without
test1-yes: Eve2 with
- Note: I think I blew the gamma somewhere.

test2-no: Eve2 haunted house
test2-yes: Eve2 haunted house
- Note: Don't know how.

test3-no: Syphon2 without
test3-yes: Syphon2 with
- Note: No updates until someone finds why
Attached Images
File Type: png snes-no.PNG (108.6 KB, 8 views)
File Type: png snes-yes.PNG (111.2 KB, 8 views)
File Type: jpg test1-no.jpg (59.5 KB, 13 views)
File Type: jpg test1-yes.jpg (58.2 KB, 14 views)
File Type: jpg test2-no.jpg (40.3 KB, 9 views)
File Type: png test2-yes.PNG (387.8 KB, 7 views)
File Type: png test3-no.PNG (331.3 KB, 11 views)
File Type: png test3-yes.PNG (288.7 KB, 12 views)
Attached Files
File Type: 7z gpuPeopsSoft_BSnes_NTSC.7z (122.8 KB, 1 views)
File Type: 7z src.7z (467.0 KB, 1 views)
shalma is offline   Reply With Quote
Old 1 Week Ago   #3 (permalink)
Registered User
 
KrossX's Avatar
 
Join Date: Mar 2006
Location: Argentina
Posts: 930
Yay for trying it out!

I wouldn't know where to even start looking at that source. And even now that you've pointed out the file, and I've found the change... I still cannot understand it.

Anyway, I've tried to match the Mario pics using level correction in Photoshop. Which is what I used as base to think how to make that 16-235 shader. The images with "16-235" use the filter on the first post, and the "NTSC" use a filter as how it ended up after trying to match the Mario pic. This latter filter, gives almost same results on the other images.

16-235 filter is just a levels adjustment filter with 16, 1.0, 235 values.
NTSC filter ended up with the following values: 40, 1.50, 255.

I guess this NTSC filter only works nicely on the SNES with games like Mario and Zelda... and the 16-235 tends to make some things too brighter... maybe a new kind of color/levels correction filter is in order? Imma do some tests...

#EDIT: It seems just darkening with 16-255 may be enough.

gpuPeteOGL2.slf
Code:
uniform sampler2D OGL2Texture;
varying vec2 TCoord;

void main()
{
	vec4 col;

	col = texture2D(OGL2Texture, TCoord);		

	// That is, - 16/255) * 255/239 
	col = (col - 0.0627451) * 1.0669456;

	gl_FragColor = col;
}
Attached Images
File Type: jpg Test1_16-235.jpg (68.9 KB, 4 views)
File Type: jpg Test1_NTSC.jpg (70.0 KB, 4 views)
File Type: jpg Test2_16-235.jpg (76.3 KB, 4 views)
File Type: jpg Test2_NTSC.jpg (72.3 KB, 5 views)
File Type: jpg Test3_16-235.jpg (43.4 KB, 1 views)
File Type: jpg Test3_NTSC.jpg (33.5 KB, 1 views)
File Type: jpg Test4_16-235.jpg (41.9 KB, 2 views)
File Type: jpg Test4_NTSC.jpg (28.3 KB, 2 views)
__________________

Last edited by KrossX; 1 Week Ago at 17:16..
KrossX is offline   Reply With Quote
Old 1 Week Ago   #4 (permalink)
Registered User
 
Join Date: Feb 2009
Location: N/A
Posts: 152
I forgot that BSnes has that NTSC filter. Gotta play with that too.

Had the idea to check out a Gamespot image from 2000. Figure that they should have a reasonably good adjusted TV back then.

Maybe I can pump the overall gamma using BSnes code and see if it washes out.

Side-note:
I want my RGB - Screenshots
Attached Images
File Type: jpg eve2-gamespot.jpg (63.1 KB, 9 views)
File Type: jpg eve2-no.JPG (51.1 KB, 7 views)
File Type: jpg eve2-yes.JPG (42.0 KB, 4 views)
File Type: jpg eve2-4xglsoft-natural.JPG (44.6 KB, 3 views)
shalma is offline   Reply With Quote
Old 1 Week Ago   #5 (permalink)
Registered User
 
KrossX's Avatar
 
Join Date: Mar 2006
Location: Argentina
Posts: 930
Woah, nice site. Each one looks quite different, and seem oversaturated....

Anyhow, I've tired to make your normal image look like Gamespot's. Using level correction filter (4, 1.0, 120) and Hue/Saturation filter (+20 Hue, +20 Sat). I'm really wondering if that's how's supposed to look... =_=". So far I'm just happy with the slight darkening to make almost black be black.
Attached Images
File Type: jpg Test5_Custom.jpg (85.3 KB, 10 views)
__________________
KrossX is offline   Reply With Quote
Old 1 Week Ago   #6 (permalink)
Registered User
 
Join Date: Feb 2009
Location: N/A
Posts: 152
New build of PEOpS BSnes. Place all files in the plugins. Edit the peops_bsnes.txt to try different combos and see what works best.

That's what I can do for now.

EDIT:
Added 32-bit support for all non-hq2x filters
Attached Files
File Type: 7z plugins.7z (123.9 KB, 2 views)
File Type: 7z src.7z (451.9 KB, 1 views)

Last edited by shalma; 1 Week Ago at 17:10..
shalma is offline   Reply With Quote
Old 1 Week Ago   #7 (permalink)
Registered User
 
KrossX's Avatar
 
Join Date: Mar 2006
Location: Argentina
Posts: 930
Fantabulous shalma!

Now is just like testing shaders for Pete's OGL2, and not tied to one only option.
__________________
KrossX is offline   Reply With Quote
Old 1 Week Ago   #8 (permalink)
Registered User
 
Join Date: Feb 2009
Location: N/A
Posts: 152
Remembered to add 32-bit support for the filters. Well non-hq2x filters are working.

See 2 posts above for modified files.
shalma is offline   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
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 23:31.

© 2006 - 2008 Emu Forums | About Emu Forums | Legal | A member of the Crowdgather Forum Community


Powered by vBulletin® Version 3.7.6
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5