After many hours of work, I finally have a spiffy GLSL bumpmapping shader working. As always, it still needs a little work, but i'm satisfied for now.
(quality reduced from bmp to jpeg conversion)
After many hours of work, I finally have a spiffy GLSL bumpmapping shader working. As always, it still needs a little work, but i'm satisfied for now.
(quality reduced from bmp to jpeg conversion)
M.Eng Computer Engineering CandidateB.Sc Computer Science
Robotics and graphics enthusiast.
Wow, that's purrty
Looks like it's coming on nicely - keep it up man
Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.
- Mike McShaffry
very very nice
Lookin' good!
I'm not immature, I'm refined in the opposite direction.
Nice, makes me wish my card had shader support
Heh, thanks all!
Only one more step to go with this: make it work properly with multiple lights.
That's going to be the hardest part. To get more than three lights working at once, I need to use more than one rendering pass. Right now, the lowest framerate I've seen in my test level is 30fps. Rendering and blending the scene a second time would slow it to a crawl.
Anyone know of any effective ways to solve this? I'm thinking portal/sector rendering at the moment; two passes a sector allowing 6 enabled lights. If the sector can't be seen, both rendering and lighting passes are skipped anway, and within the sector, frustum culling should ease the load of the second pass. If there's an easier way, please tell me!
Last edited by psychopath; 02-13-2006 at 08:50 PM.
M.Eng Computer Engineering CandidateB.Sc Computer Science
Robotics and graphics enthusiast.
when making a costome light engine in lets say direct x. how much direct x light specific code would you acually use. direct x dose not do perpixle so whould you use any at all.
I'm not 100% sure how DX handles fixed-function lighting, but to do per-pixel, you would need to use shaders or lightmapping, neither of which requre DX functions. For my lighting, I just have a lighting manager that keeps track of light positions, colors, and attenuation. I have a sorting function that sorts the array of lights in order of highest diffuse contribution to the lowest for each object. The three highest on the list are rendered by the shader.
M.Eng Computer Engineering CandidateB.Sc Computer Science
Robotics and graphics enthusiast.
the bare minimum for doing perpixle shading with lightmapping would be to just have the texture and a normal map, right? but are you saying that you could also do perpixle without any thing but the texture and shaders, no need for specular, diffuse, normal, and ect lightmaps?
The shader would calculate the specular and diffuse lighting. For any lighting, the vertex shader has to have a vertex normal supplied to it. For bumpmapping (with normal maps), you would need to calculate the tangent and bitangent vectors (usually when you load the objects vertices), and pass those to the vertex shader as well.but are you saying that you could also do perpixle without any thing but the texture and shaders, no need for specular, diffuse, normal, and ect lightmaps?
M.Eng Computer Engineering CandidateB.Sc Computer Science
Robotics and graphics enthusiast.
DirectX will do per-pixel blending but not lighting w/o external shaders. DX FFP will do per-pixel bump-mapping and per-pixel blending.