[Patch] 2D-3D Layer Alignment (part 1)

Technical discussion for those interested in Supermodel development and Model 3 reverse engineering. Prospective contributors welcome.
Forum rules
Keep it classy!

  • No ROM requests or links.
  • Do not ask to be a play tester.
  • Do not ask about release dates.
  • No drama!

Re: [Patch] 2D-3D Layer Alignment (part 1)

Postby Shekel » Thu Mar 16, 2017 3:38 am

HarryTuttle wrote:On day, however, we could have a post-process pass and try, with shaders, to emulate crt monitor and overscan a bit like the arcade so none will notice it... :lol:

Harry, I wondered if you'd be good with SweetFX/ReShade. Especially after seeing your re-coloured screenshot comparisons and looking at the screengrab from the Star Wars trench shot. The colours through CRT feel totally different. You can do the overscan with that, too.
User avatar
Shekel
 
Posts: 343
Joined: Wed Mar 16, 2016 12:45 pm

Re: [Patch] 2D-3D Layer Alignment (part 1)

Postby HarryTuttle » Thu Mar 16, 2017 4:02 am

Shekel wrote:
HarryTuttle wrote:On day, however, we could have a post-process pass and try, with shaders, to emulate crt monitor and overscan a bit like the arcade so none will notice it... :lol:

Harry, I wondered if you'd be good with SweetFX/ReShade. Especially after seeing your re-coloured screenshot comparisons and looking at the screengrab from the Star Wars trench shot. The colours through CRT feel totally different. You can do the overscan with that, too.


I'm not a shader guru, however I've written in the past a decent CRT monitor simulator, taking the bits from here and there and adding something of my own, it was for the OpenGL shader chain supported by MAME. I've left 'cause that rendering engine will be deprecated in favor of BGFX. Anyway today there're a lot of good FX that can be converted almost easly for every shader language, in theory that shouldn't be a problem.

Incidentally I was tinkering the other day with Reshade (in the past I used ENBseries) because for what i know it's the more powerful injector around, however... it requires an OpenGL 4.x GPU, I've got a (t)rusted dual Radeon HD4850 crossfired setup :(

So for now it's not an option. *If* and *when* I'll learn to output Supermodel frame buffer to a texture, there *should* not be much of a problem to create a simple post-fx pass. I'd like to also output some useful uniform like current frame number (for interlace simulation), last frame time and a copy of the last image rendered (for phosphor persistence simulation). I like dreaming... :)
User avatar
HarryTuttle
 
Posts: 578
Joined: Thu Mar 09, 2017 8:57 am

Re: [Patch] 2D-3D Layer Alignment (part 1)

Postby Ian » Thu Mar 16, 2017 5:02 am

if you are lazy and don't want to create an FBO, it's pretty trivial to just copy the back buffer to a texture :p
Ian
 
Posts: 1243
Joined: Tue Feb 23, 2016 9:23 am

Re: [Patch] 2D-3D Layer Alignment (part 1)

Postby HarryTuttle » Thu Mar 16, 2017 5:19 am

Ian wrote:if you are lazy and don't want to create an FBO, it's pretty trivial to just copy the back buffer to a texture :p


Thanks :) I'll try to get my hands dirty after the last bunch of patches I'm going to submit during this week.
Last edited by HarryTuttle on Thu Mar 16, 2017 7:13 am, edited 1 time in total.
User avatar
HarryTuttle
 
Posts: 578
Joined: Thu Mar 09, 2017 8:57 am

Re: [Patch] 2D-3D Layer Alignment (part 1)

Postby Ian » Thu Mar 16, 2017 6:35 am

I am quite looking forward to seeing what you have come up with regarding fixed shading and the real3d head light :)
Ian
 
Posts: 1243
Joined: Tue Feb 23, 2016 9:23 am

Re: [Patch] 2D-3D Layer Alignment (part 1)

Postby Bart » Thu Mar 16, 2017 8:21 am

Likewise! You've done amazing work! It's always thrilling to see someone come out of stealth mode with a bunch of major contributions and fixes :) Between Ian, you, and Nik, pretty soon there won't be much of my original code left in Supermodel :lol:
User avatar
Bart
Site Admin
 
Posts: 2064
Joined: Thu Sep 01, 2011 2:13 pm
Location: New York City

Re: [Patch] 2D-3D Layer Alignment (part 1)

Postby Ian » Thu Mar 16, 2017 8:49 am

lol :)
My renderer just builds upon all the knowledge and foundations of your renderer. If I had started totally from scratch, it definitely wouldn't be so far along!
It's also been super useful to have another renderer to compare against, especially for the texturing bugs that plagued mine.
Ian
 
Posts: 1243
Joined: Tue Feb 23, 2016 9:23 am

Re: [Patch] 2D-3D Layer Alignment (part 1)

Postby HarryTuttle » Thu Mar 16, 2017 12:01 pm

Thank you all for your kind words! :)

BTW my knowledge of how to program an emulator or a 3D engine, is not even near your level, I've just tried to read the code of the 3D engine (starting from Bart's) and see what it's doing.

I'm interested in 3D but from a user perspective (I've started with Sculpt 3D on the Amiga! Then switched to 3D Studio for DOS...), what's happening "behind the curtain" I can barely imagine since also I'm not very good in trigonometry :oops: that, from what I know, it's the base for every 3D-related programming... go figure!

P.S.
I'm preparing the introduction to the Fixed Shading patch, I'll post something soon.
User avatar
HarryTuttle
 
Posts: 578
Joined: Thu Mar 09, 2017 8:57 am

Re: [Patch] 2D-3D Layer Alignment (part 1)

Postby Ian » Sat Mar 18, 2017 6:39 pm

Finally got around to merging this one. I did a fair bit of testing, the 3d layers seemed to line up perfectly. Lost world has a test program that tests the gun sight, and everything drawn is with the 3d.
So the crazy 2 pixel thing, must be the 2d layer.

Basically I shifted the 2d layer, then scissored around the viewport. So there will be a few black lines. In widescreen mode it scissors just the top and bottom.
Hopefully I didn't screw anything up !
Ian
 
Posts: 1243
Joined: Tue Feb 23, 2016 9:23 am

Re: [Patch] 2D-3D Layer Alignment (part 1)

Postby HarryTuttle » Sun Mar 19, 2017 5:38 am

Just saw the commit :)

I'll integrate as soon as possible 'cause I want to get rid of those 2px border...
User avatar
HarryTuttle
 
Posts: 578
Joined: Thu Mar 09, 2017 8:57 am

PreviousNext

Return to The Dark Room

Who is online

Users browsing this forum: No registered users and 1 guest