single-pass bumpmapping

Is it physically possible to perform either emboss bumpmapping or dot3 bumpmapping with only two texture units in a single pass? I’ve been messing with combiners, but eventually I just end up needing a third texture unit.

Sure it is.

Provided you dont need to modulate with a basemap.

or

You model is tesselated enough to not need a normalization cubemap.

Good high powered specular is hard to come by. By 2 texture units I assume you mean Gf1+2, which only gives you 2 general combiner stages.

It’s definitly possible. Just depends how good you want it.

Nutty

yes it is. including selfshadowing and approximated specular function with gloss and variable exponent (i said APPROXIMATED ) of about ^32, including basemap.

and, if you want only half the brightness, even with full perpixelnormalizations of normals and to_light vectors…

but your geometry has to be VERY HIGH tesselated

should get this up online again… nutty can you host it?

POwer of 32? In 1 pass, with only 2 combiners?

Sure I’ll host it, just mail it to me.

Originally posted by Nutty:
[b]POwer of 32? In 1 pass, with only 2 combiners?

Sure I’ll host it, just mail it to me.[/b]

check out the latest article over at gamasutra.

I often find Excel a useful tool for finding polynomials which approximate another more complex function.

I haven’t seen that Gamasutra article ( reading it right now ). The author is saying that the 1D dependent texture lookup method won’t allow a vector to be renormalized before the lookup. That’s incorrect, it’s very much possible with pixel shaders 1.4 ( at least it is in OpenGL via ATI_fragment_shader ).

Originally posted by pocketmoon:
[b]
I often find Excel a useful tool for finding polynomials which approximate another more complex function.

[/b]

Hi

you can also use newtons approximation for interpolation a function with some known (x,y) pairs. You then get a polynom of (depending how many (x,y)-pairs) you use.

Bye
ScottManDeath

Originally posted by ScottManDeath:
[b]
Hi

you can also use newtons approximation for interpolation a function with some known (x,y) pairs. You then get a polynom of (depending how many (x,y)-pairs) you use.

Bye
ScottManDeath[/b]

I’m too lazy!

I just bung the function into a column in Excel covering the range I want, graph it, add a trend line and see what Excell comes up with

I have no idea what method is being used behind the scenes!

Using a dependant texture lookup for the specular power aint gonna work on gf1+2. Considering his question specifically asked for 2 texture units only, I assume he’s targetting below gf3. Gf3 only supports pixel shader 1.1 anyway, it’s gf4 that does 1.3 IIRC.

And that would still use 3 textures, basemap, normal-map, and specular lookup. Even without renormalizing the surface->light vector.

Nutty

I was just commenting on the article ( if you were refering to my post ).

To answer the original poster ( assuming he even wants specular ), I would suggest using Mark Kilgards steep specular ramp function ( look for a paper on NVIDIAs site - an old paper from 1999-2000 - cant’t remember the name ).
It’s simple, efficient, looks better than successive squaring and works on 2 texture hardware. This is probably what Dave is talking about.

Also, have a look at NVIDIAs paper called “practical perpixel effects on 2-texture hardware” ( something like that ). It contains additional bits of very useful infomation.