PDA

View Full Version : adding diffuse and specular bump mapping



JanHH
10-29-2003, 02:39 AM
Hello,

I managed to do bump mapping with arb combiners, with diffuse and specular working, each one rendering pass. But how do I add both togehter? I thougt it would be quite simple blending with blend func GL_ONE, GL_ONE, so both images would be added together, but it seem's like I am wrong (as it does not work, the specular highlights are not visible).

Thanks and regards,
Jan

SeskaPeel
10-29-2003, 02:47 AM
This might no be the answer you are expecting, but you should really use fragment and vertex programs, instead of combiners.

Once you get passed through the specs, everything will look crystal clear to you.

SeskaPeel.

JanHH
10-29-2003, 02:55 AM
this is in fact not the answer I expected because

a) I am just learning these things and found arb combiners a good place to start, better to understand these first, then go on to nv/ati register combiners and then to vp/fp http://www.opengl.org/discussion_boards/ubb/wink.gif

b) the hardware I am writing for does not neccessarily have fragment programs

Jan

JanHH
10-29-2003, 03:30 AM
hm.. solved it myself, the problem was the depth buffering which prevented the second pass..

Jan

rgpc
10-29-2003, 03:46 AM
Originally posted by SeskaPeel:
This might no be the answer you are expecting, but you should really use fragment and vertex programs, instead of combiners.

Yes, don't bother supporting anything earlier than a geforce FX (and the equivalent Radeons) as there are hardly any of them out there.

JanHH
10-30-2003, 09:00 PM
what world do you live in? on my planet, there are tons of gf 2-4 out there (and yes, most people do NOT post in this forum http://www.opengl.org/discussion_boards/ubb/wink.gif ), believe me, there are a lot of people who are not opengl/game freaks who always buy new hardware.. and apart from that, I am writing for certain hardware, which is gf 4 ti (not mine but the _clients'_, and also, I just want to LEARN how to do it the "early" way, simply to build up some understanding..

Jan

rgpc
10-30-2003, 10:59 PM
Presumably you are replying to my post. Sorry, I forgot to put in the <sarcasm> </sarcasm>

I was making the point that it would be dumb to just do it on FP's as quite possibly (most likely) the majority of the cards out there don't support them. (There are far too many answers on this forum that amount to - do in an FP)

Korval
10-31-2003, 12:26 AM
There are far too many answers on this forum that amount to - do in an FP

This is the advanced forum. Fragment programs, though limitted to R3xx and NV3x-based cards, are the advanced solution to most per-fragment problems. And, once you understand how they work, they are usually easier and more direct than hacking the effect in for lower-end hardware.

SeskaPeel
10-31-2003, 01:46 AM
And that was exactly the point of my post, thanks Korval for your clear english.

SeskaPeel.

JanHH
10-31-2003, 01:53 AM
sorry rgpc I didn't get the irony :-(.

seems like we all agree know?