[Patch] Specular Highlight

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] Specular Highlight

Postby Ian » Wed Mar 22, 2017 2:34 pm

That's good work Harry :)
Ian
 
Posts: 1646
Joined: Tue Feb 23, 2016 9:23 am

Re: [Patch] Specular Highlight

Postby HarryTuttle » Wed Mar 22, 2017 2:36 pm

Thanks! :D
User avatar
HarryTuttle
 
Posts: 646
Joined: Thu Mar 09, 2017 8:57 am

Re: [Patch] Specular Highlight

Postby Ian » Wed Mar 22, 2017 2:51 pm

What did you think about the lost world bullets?
Ian
 
Posts: 1646
Joined: Tue Feb 23, 2016 9:23 am

Re: [Patch] Specular Highlight

Postby HarryTuttle » Wed Mar 22, 2017 3:02 pm

Ian wrote:What did you think about the lost world bullets?


Actually it seems there's a little highlight on the right half. I get this shade in Supermodel, in line with the arcade:
lw2.jpeg
lw2.jpeg (243.43 KiB) Viewed 4999 times
User avatar
HarryTuttle
 
Posts: 646
Joined: Thu Mar 09, 2017 8:57 am

Re: [Patch] Specular Highlight

Postby Ian » Wed Mar 22, 2017 3:22 pm

Just for comparison
this is how the model2 does specular
Yeah it does specular?? :)

https://github.com/mamedev/mame/blob/ma ... .cpp#L1452
Ian
 
Posts: 1646
Joined: Tue Feb 23, 2016 9:23 am

Re: [Patch] Specular Highlight

Postby HarryTuttle » Wed Mar 22, 2017 3:36 pm

Ian wrote:Just for comparison
this is how the model2 does specular
Yeah it does specular?? :)

https://github.com/mamedev/mame/blob/ma ... .cpp#L1452


Well, as it seems, neither Model 3 is doing real specular. :lol: It fakes it elevating the angle of incidence value to some exponent. The actual formula could be re-written like this:
Code: Select all
float specularIntensity = pow(NdotL, pow(2.0, shininess + 3));
User avatar
HarryTuttle
 
Posts: 646
Joined: Thu Mar 09, 2017 8:57 am

Re: [Patch] Specular Highlight

Postby HarryTuttle » Wed Mar 22, 2017 4:07 pm

This is what happens if you don't normalize sun & vertex normals in vertex shader...

bug_swt1.png
bug_swt1.png (94.31 KiB) Viewed 4989 times
User avatar
HarryTuttle
 
Posts: 646
Joined: Thu Mar 09, 2017 8:57 am

Re: [Patch] Specular Highlight

Postby Ian » Wed Mar 22, 2017 4:50 pm

try lemans24, that game has tonnes of specular
Ian
 
Posts: 1646
Joined: Tue Feb 23, 2016 9:23 am

Re: [Patch] Specular Highlight

Postby HarryTuttle » Wed Mar 22, 2017 5:41 pm

Ian wrote:try lemans24, that game has tonnes of specular


Speaking of which... It's my impression or the game runs way faster than the original ?
User avatar
HarryTuttle
 
Posts: 646
Joined: Thu Mar 09, 2017 8:57 am

Re: [Patch] Specular Highlight

Postby Bart » Thu Mar 23, 2017 7:29 am

This is incredible work! The 3D engine is now very close to being perfect :) This weekend I need to sit down and hammer out the changes I've been working on. Might need to rewrite the ROM loading system one more time, too. I think we'll be able to decommission the legacy engine pretty soon -- can't see much of a reason for it to hang around, although I might let it stick around for just one more release as a fallback.
User avatar
Bart
Site Admin
 
Posts: 2347
Joined: Thu Sep 01, 2011 2:13 pm
Location: Santa Clara, California

PreviousNext

Return to The Dark Room

Who is online

Users browsing this forum: No registered users and 6 guests