I''ve only a GeForce 256 DDR and it has no vertex shader, just T&L
For the : "lighting" instead of "lightning", I''m sorry, it''s a mistake.
So, here''s a new zip file without DX support.
http://ibelgique.ifrance.com/Slug-Production/Slug3D-V-0.6-Light-NoDX.zip
========================
Leyder Dylan
http://ibelgique.ifrance.com/Slug-Production/
Hi masters : Per Pixel Lightning problem
========================Leyder Dylan (dylan.leyder@slug-production.be.tf http://users.skynet.be/fa550206/Slug-Production/Index.htm/
http://ibelgique.ifrance.com/Slug-Production/Slug3D-V-0.6-Light-NoDX.zip
========================
Leyder Dylan
http://ibelgique.ifrance.com/Slug-Production/
========================
Leyder Dylan
http://ibelgique.ifrance.com/Slug-Production/
========================Leyder Dylan (dylan.leyder@slug-production.be.tf http://users.skynet.be/fa550206/Slug-Production/Index.htm/
Ok I''ve tried and it works.
after calling glEnable(GL_DEPTH_TEST), simply call glDepthFunc(GL_LEQUAL);
At this point it ''merely'' works. In fact, you have to enable blending for the second pass !
Call glEnable(GL_BLEND) just before the second pass and it works.
The problem is that you may also have transparent objects in your scene, and in that cases it breaks the blending equation for the second pass ! For this scene it''s not a problem because there''s no translucent objects, but according to your source code, you expect to render translucent objects sooner or later.
You have to do something about it, because translucent objects and multipass do no cohabit since they both access to the same OpenGL feature : blending.
Either you have to draw your translucent objects differently, or you have to perform your multipass differently. Obviously single-pass would be a good solution, but since your GeForce2 does not perform more than 2 texture units at each pass, I guess single-pass is a no-go.
after calling glEnable(GL_DEPTH_TEST), simply call glDepthFunc(GL_LEQUAL);
At this point it ''merely'' works. In fact, you have to enable blending for the second pass !
Call glEnable(GL_BLEND) just before the second pass and it works.
The problem is that you may also have transparent objects in your scene, and in that cases it breaks the blending equation for the second pass ! For this scene it''s not a problem because there''s no translucent objects, but according to your source code, you expect to render translucent objects sooner or later.
You have to do something about it, because translucent objects and multipass do no cohabit since they both access to the same OpenGL feature : blending.
Either you have to draw your translucent objects differently, or you have to perform your multipass differently. Obviously single-pass would be a good solution, but since your GeForce2 does not perform more than 2 texture units at each pass, I guess single-pass is a no-go.
Thanks a million !
Here''s the screenshot :

So I''ve done that thing :
In my InitGL() function :
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
And in the first pass :
Affiche_Map_Per_Pixel_Lightning();
Second pass :
glEnable(GL_BLEND);
glBlendFunc(GL_ONE,GL_SRC_COLOR);
Affiche_Map();
glDisable(GL_BLEND);
And it''s works !!!
Thank you very much for your help ...
Here''s a screenshot :
========================
Leyder Dylan
http://ibelgique.ifrance.com/Slug-Production/
Here''s the screenshot :

So I''ve done that thing :
In my InitGL() function :
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
And in the first pass :
Affiche_Map_Per_Pixel_Lightning();
Second pass :
glEnable(GL_BLEND);
glBlendFunc(GL_ONE,GL_SRC_COLOR);
Affiche_Map();
glDisable(GL_BLEND);
And it''s works !!!
Thank you very much for your help ...
Here''s a screenshot :
========================
Leyder Dylan
http://ibelgique.ifrance.com/Slug-Production/
========================Leyder Dylan (dylan.leyder@slug-production.be.tf http://users.skynet.be/fa550206/Slug-Production/Index.htm/
well. you will probably all slug me for this, but having only just moved up from a geforce 1 to a radeon, I can''t help feel that register combiners, fixed function, etc, and even to a level, openGL, is fast becomming obsolete... I just can''t help feeling overwhelemed by how awesomly powerful ps 1.4 is, etc...
I also get that feeling that nvidia will certainly have a struggle on their hands to stay where they are... I mean, look at the current situation, Ati now are leading in basically every area... high end with the 9700, low end with the 9000, laptops with the 9000 mobile. The only area nvidia have anything really worthwhile bang for buck wise is the mid range, with the ti4200, but when the 9500 comes out, that''ll be gone too... Not to mention the various firegl chips, including the new mobile variant...
interesting times indeed.
I also get that feeling that nvidia will certainly have a struggle on their hands to stay where they are... I mean, look at the current situation, Ati now are leading in basically every area... high end with the 9700, low end with the 9000, laptops with the 9000 mobile. The only area nvidia have anything really worthwhile bang for buck wise is the mid range, with the ti4200, but when the 9500 comes out, that''ll be gone too... Not to mention the various firegl chips, including the new mobile variant...
interesting times indeed.
Leyder Dylan: I''m not sure if your result is correct. Please look at the flipcode thread where I already replied.
RipTorn: NVIDIA sure was leading and is not really leading anymore, but ATI is not leading either. It is just well balanced now.
RipTorn: NVIDIA sure was leading and is not really leading anymore, but ATI is not leading either. It is just well balanced now.
Ok, I''m gonna try that.
But now, I don''t know why but since I''ve tryed to use PPL, my computer crash many times when I compile the PPL program ...
I don''t know if it''s a bug or if I''ve damaged my W2K ... We will see ...
========================
Leyder Dylan
http://ibelgique.ifrance.com/Slug-Production/
But now, I don''t know why but since I''ve tryed to use PPL, my computer crash many times when I compile the PPL program ...
I don''t know if it''s a bug or if I''ve damaged my W2K ... We will see ...
========================
Leyder Dylan
http://ibelgique.ifrance.com/Slug-Production/
========================Leyder Dylan (dylan.leyder@slug-production.be.tf http://users.skynet.be/fa550206/Slug-Production/Index.htm/
I don''t know if it will rassure you, but when I ran your application it was OK for ~10 minutes and then my computer rebooted. The only running program was yours, so it may be the origin of the problem.
The question is : where did the problem come from ? Is it the NVIDIA driver that doesn''t manage register combiners very well, or is it your program that does "something else" bad ?
The question is : where did the problem come from ? Is it the NVIDIA driver that doesn''t manage register combiners very well, or is it your program that does "something else" bad ?
I took the code from this message on the FlipCode forum :
http://www.flipcode.com/cgi-bin/msg.cgi?showThread=00005469&forum=3dtheory&id=-1
Next, I don''t know where the problem comes from, perhaps it''s a driver bug or a bug in my program.
So, I must check all ...
========================
Leyder Dylan
http://ibelgique.ifrance.com/Slug-Production/
http://www.flipcode.com/cgi-bin/msg.cgi?showThread=00005469&forum=3dtheory&id=-1
Next, I don''t know where the problem comes from, perhaps it''s a driver bug or a bug in my program.
So, I must check all ...
========================
Leyder Dylan
http://ibelgique.ifrance.com/Slug-Production/
========================Leyder Dylan (dylan.leyder@slug-production.be.tf http://users.skynet.be/fa550206/Slug-Production/Index.htm/
A simple test would be to disable register combiners and see if the program still crashes.
If the program crashes -> register combiners are not causing the problem ! It would be your own code.
If the program does not crash -> register combiners are causing the problem. Try calling glGetError() to see if an error is generated in your calls to register combiners functions. If every call to glGetError() returns GL_NO_ERROR, then it IS a driver bug.
If the program crashes -> register combiners are not causing the problem ! It would be your own code.
If the program does not crash -> register combiners are causing the problem. Try calling glGetError() to see if an error is generated in your calls to register combiners functions. If every call to glGetError() returns GL_NO_ERROR, then it IS a driver bug.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement