Per Pixel Lighting question

i’m reading some paper about per-pixel lighting,and my question is it:is possible to
make per-pixel lighting with 2 texture(one 2D
Texture and other 1D Texture) whitout using the register combiners(nvidia cards)???

Thanks in advance

You need, at a minimum, the “dot3” bump mapping extension. The most basic per-pixel lighting model is then to create an object space normal map, and pass the global light direction in as a constant color. This gives you per-pixel diffuse brightness, on which you can later modulate in the base color map.

If you support articulated meshes, you have to pass one light vector per vertex, and you start needing some kinds of extensions to make it end up in the right spot, ideally after a normalize step.

If you want something more advanced, you’ll have to build it on top of the more advanced extensions (nVIDIA vs ATI).

We generally mean per-pixel lighting as “attenuation + bump map + specular + …”, but per-pixel lighting is technically any type of lighting that is calculated on a per-pixel basis rather than per-vertex interpolated. Jeppa, it sounds like what you are most interested in is simple distance attenuation. If so, you can do this on pretty much any card. Cass from nvidia made a demo of the technique. Look here: http://developer.nvidia.com/view.asp?IO=pp_attenuation_ogl

Thank for your reply Lordkronos.Yes I’m interesting at Diffuse-Specular attenuation

Thanks
Sandruzzo

Thank for your reply Lordkronos.Yes I’m interesting in Diffuse-Specular attenuation

Thanks
Sandruzzo

well… there is no attentuation in this one in, but its quite much you can get into 2 textures http://tyrannen.starcraft3d.net/PerPixelLighting

but seriously, you could do it with 2 textures, one is the normalmap, and the other one a

color normalized(vector v) {
float length = sqrt(v.dot(v));
return color(v/length,length);
}

3d texture…
now you can’t use 3d-textures => no way

attentuation on gf2 can be done with 1 texture, if mapped correctly (using primary color instead of a 1d texture )
normal can be done on a gf2 in another one texture…

but the point_to_light gets missed then most probably… could think about it with some **** of paper…