Specular light dumb question
it's possible to achieve per pixel specular light using ONLY opengl extensions? (yeah, WITHOUT any kind of vertex/pixel shaders) maybe using a specular map added to the diffuse texture, after the dot3 stage with a normalization cube map and a normal map... And if it's possible, HOW (i mean, the code) can this be done?
Hmmm I'm not sure I understand when you write "only Opengl extensions". Are register combiners OK or not (they are a kind of fragment programs actually) ?
If they are, you should look at this article : http://www.ronfrazier.net/apparition/index.asp?appmain=research/advanced_per_pixel_lighting.html
If they are, you should look at this article : http://www.ronfrazier.net/apparition/index.asp?appmain=research/advanced_per_pixel_lighting.html
SaM3d!, a cross-platform API for 3d based on SDL and OpenGL.The trouble is that things never get better, they just stay the same, only more so. -- (Terry Pratchett, Eric)
shure, it's possible, but it's a bit uggly(and not to mention slow).
Just subdivide everything until polygons are about the same size as pixels and then use the standard opengl lighting.
But as i said, it's not pretty, so i would suggest using fragment shaders.
Just subdivide everything until polygons are about the same size as pixels and then use the standard opengl lighting.
But as i said, it's not pretty, so i would suggest using fragment shaders.
www.flashbang.se | www.thegeekstate.com | nehe.gamedev.net | glAux fix for lesson 6 | [twitter]thegeekstate[/twitter]
@lc_overlord: i don't think u understood the question.
@rodzilla: i've already readed that article, but i don't like it's code :P i'm searching for something a bit more "simple"... (i mean: i need only specular light, not all the other stuff like shadows and so on.. otherwise i'll not understand the code -___- )
thank you for your help :)
@rodzilla: i've already readed that article, but i don't like it's code :P i'm searching for something a bit more "simple"... (i mean: i need only specular light, not all the other stuff like shadows and so on.. otherwise i'll not understand the code -___- )
thank you for your help :)
Quote:
Original post by b3rs3rk
i don't think u understood the question.
probobly not, witch basicly meeans that you have to practice writing questions that make more sence. :)
there is one other way of doing specular highlights(while not using pixel shaders or register combiners).
Basicly you use an enviromentmap (you know one of those that create really cheap crome effects, it's allso used in lesson 23) that is totaly black with a small white dot on it.
That tecnice only needs a small bit of tweaking to for a ok ppl specular highlight.
www.flashbang.se | www.thegeekstate.com | nehe.gamedev.net | glAux fix for lesson 6 | [twitter]thegeekstate[/twitter]
@lc_overlord: i'm sorry, but often my english sucks :P
i've already tryied to use enviroment mapping, but this way the "spot light texture" i use doesn't move with the light position :/ (or maybe i've done very big mistakes in my code :D )
i've already tryied to use enviroment mapping, but this way the "spot light texture" i use doesn't move with the light position :/ (or maybe i've done very big mistakes in my code :D )
There is a big difference between being able to create effect and being able to use it at acceptabile speeds. Since each card supporting dot3 also supports some other more powerful (vendor specific) extensions I advise you to use them.
You should never let your fears become the boundaries of your dreams.
Quote:
Original post by b3rs3rk
i've already tryied to use enviroment mapping, but this way the "spot light texture" i use doesn't move with the light position :/ (or maybe i've done very big mistakes in my code :D )
hers where the twaeking comes in, the normals for the spheremapping has to be rotated to match the lightsource coords.
note: this works well for lights that infinitly(or at least very far away) far away, but it's a little bit tricky to do normal lights since the normals has to be rotated individualy.
fragment programs are to be prefered though.
this is a great place to start.
www.flashbang.se | www.thegeekstate.com | nehe.gamedev.net | glAux fix for lesson 6 | [twitter]thegeekstate[/twitter]
Quote:
Original post by lc_overlord
hers where the twaeking comes in, the normals for the spheremapping has to be rotated to match the lightsource coords.
this is something that i've still never tryied :D how can be done?
You really should look at the code from the "apparition" article. It's ugly (let's say I don't like it) but not that difficult to understand. My guess is that extracting specular-related code would not be difficult.
Sure the VP/FP way is easier ;*)
Sure the VP/FP way is easier ;*)
SaM3d!, a cross-platform API for 3d based on SDL and OpenGL.The trouble is that things never get better, they just stay the same, only more so. -- (Terry Pratchett, Eric)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement