Gamestudio Links
Zorro Links
Newest Posts
FXCM => AVA Trade Plugin???
by Martin_HH. 11/25/26 21:59
No connection to MT4
by Martin_HH. 11/23/26 06:38
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
What are you working on?
by rayp. 11/20/26 18:10
contractUpdate() is filtering if >2 rows
by mistery. 11/09/26 12:06
New Zorro version 3.15
by jcl. 11/09/26 09:24
Removing outliers from files
by jcl. 11/04/26 10:30
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 9,630 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: amp II "fake" specbump shader [Re: Matt_Aufderheide] #106989
01/17/07 23:24
01/17/07 23:24
Joined: Jun 2005
Posts: 4,875
broozar Offline OP
Expert
broozar  Offline OP
Expert

Joined: Jun 2005
Posts: 4,875
i know, i use one of your normal mapping shaders as well as sphere. i thought, an alternative render method for the specular effect, containing a highlight map, could speed up the rendering process, maybe as a fallback for slower PCs.

Re: amp II "fake" specbump shader [Re: broozar] #106990
01/18/07 01:17
01/18/07 01:17
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
That wont really work.. thast not how Amp2 works.. did you read my post?

The idea of using texture for highlights is used in "image-based" lighitng, which is useful rendering many lights, but this require some cubemaps and various things, not making it faster than normal shaders unless you us emany lights.. it still doesnt work the way you want. There is no quick fix for specularity


Sphere Engine--the premier A6 graphics plugin.
Re: amp II "fake" specbump shader [Re: Matt_Aufderheide] #106991
01/18/07 08:52
01/18/07 08:52
Joined: Jun 2005
Posts: 4,875
broozar Offline OP
Expert
broozar  Offline OP
Expert

Joined: Jun 2005
Posts: 4,875
ok, thanks nevertheless. i just looked at the demo and asked myself, "how did they do it?". well, if it's just an openGL shader producing some artifacts...

Re: amp II "fake" specbump shader [Re: broozar] #106992
01/18/07 13:17
01/18/07 13:17
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
If you are interested, here's the basic reason it looks like that.

Normally to calculate specular falloff you use a power series, like:
specular falloff = power((reflectvector dot viewdirection)),15)

This gives a nice smooth falloff.. however on older cards like GeForce 3 etc, the power function would take too many instructions/too many cycles, so a hack had to be found. The normal solution was to use a texture lookup..the texture just consisted of a gradation from black to white, and the texture coord was calculated in the shader.

Howeverm you still have to do the R dot V calculations.. and because of the limited color depth of an 8 bit grey channel, there would be artifacts in the falloff gradation. Also, they did normalization with cubemaps, which had similar problems.

However all modern methods use pure math for per-pixel lighting, as it is now actually faster and of much better quality to use shader math. Therefore, on a ny modern card, doing this old lookup method may be slowewr than using math, and quality is worse.

Remember, Amp2 is ancient; in fact it was perhaps the first game engine that used per-pixel lighting (even before Doom 3).


Sphere Engine--the premier A6 graphics plugin.
Page 2 of 2 1 2

Moderated by  Blink, Hummel, Superku 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1