|
|
Hi,
first of all, thanks for the nice comments. I have some additional things to say:
First of all, I do not think that a Voodoo Banshee can do multitexturing. Even though my program works on such cards as it uses multi-pass singletexture.
To Mitch: No, it is not slow. I indeed use two DrawPrimitive() calls per Stone. It works the following way:
I have two textures, one with dark parts and one with bright (have a look at the two .dds files and you know what I mean). As I do all the lighting in software, I first lock the vertex buffer to calculate diffuse light, and render it once. Then I lock the VB again, calculate the specular light and store it in the alpha chanel of the diffuse (without changing the other parts of the diffuse). Then I call drawPrimitive() again, and thats it.
This could also be done singlepass with multitexturing, and even hardware T&L. You must only explain the pixel shader to use the specular light for texture blending between the two stages, or, even better, you write the vertex shader so that it calculates the specular color in the alpha of the diffuse. This way you only need a diffuse color for both, specular and diffuse lighting. And, if you don´t need the second texture stage for something different, it is as fast as drawing it without the effect.
To Waramp:
I would of course like to write a tutorial about it. But I don´t think that there is very much demand of this, as it is really not that difficult if you once understand the idea behind it. You might write me an email though, and I can explain you everything in detail, if you want.
To everyone else:
I had to know it already existed. I already thought of quite some things, finding out later that it already existed. Well, anyways thanks about everything. I also think it is better to use the alpha channel of the second texture to create this effect. But I simple didn´t mind this while writing the effect.
Joachim
|