Alpha blended Gouraud Shaded Polygons

Started by
3 comments, last by Phillip Schuster 24 years, 8 months ago
You could add this to the precalculated RGB types, by including the alpha in the packed RGB dword stored in every vertex. However you will have to build some kind of editor or routine that generates the alpha values you want.

Author of Power Render (http:/www.powerrender.com)
Advertisement
Hi !!

Hmmm, I am trying to do volumetric fog. Because I don't get it with Textures, I simply increased the vertex count for each wall and then I am doing the volumetric volume intersection tests with vertices, instead of calculating a 3D Point based on UVs (My previous question in this board) and doing the intersection test with this point. This works very fine. So I can calculate an alpha value between 0 and 255 !

But how do I "pack" the alpha value into the rgb DWORD ??

I did the following:
I checked out PRLight.c and took the same code. So, every vertex is tested for intersection. Then I put the r,b and g values into a DWORD which was then put into the face_data.col[nr] DWORD. This works fine, but no alpha, just color ??
I don't see a packed RGB Value in each vertex, just in PR_FACE->PR_FACE_DATA.col ?

Thanks, Phillip

Phillip Schuster
In addition to the RGB values, put the A value into the dword as well.

Then you need to create your own rendering method routine which sets the alpha values of the vertex (see the d3dstate.c and RGB methods).

Author of Power Render (http:/www.powerrender.com)
Hi !!

Does anyone know how to do Alpha Blended Gouraud Shaded Polygons with Power Render ? So, the face has a constant color, but different alpha values for each vertex.

Thanks.

Phillip Schuster
Hi !!

Thanks for your help. I have created my own rendering method (based on RGBGOUR or so) and just added alpha. Thanks. Now I know how to do that, well that's great )

Ok, I think this should be added to Power Render 3 (I can send it to you), because it's quite usefull I think.

My volumetric fog is working now, and (when you have a room with lots of vertices) it's looking great. Do you want an example (executable).

I could also write an article and could post it into the coding corner. I could also write an article how to do C++ with Power Render 2.6 !! Because I hope Power Render 3 will support it without tricks and hacks.

Phillip Schuster

This topic is closed to new replies.

Advertisement