Hi Dirk,

Dirk Reiners schrieb:
	Hi Oliver,

On Mon, 2005-09-05 at 14:59 +0200, Oliver Kutter wrote:
  
Hi all,

I want to do some multipass shader rendering and I use the 
MultiPassMaterial. I have set up two ChunkMaterials, which I added to 
the MultiPassMaterial. I have added for each ChunkMaterial one SHLChunks 
for the shaders and some other necessary chunks (texture chunks, blend 
chunk and so on).
Now, my problem is that I can find no way how to get the result color of 
the first shader as input to my second shader. Is this possible at all? 
Or does somebody know a workaround?
    

It's not easily or directly possible, if you need more than the normal
blending gives you. The blending stage is still not programmable.

If you need to do it you have to render a first image into a texture and
use that in the second pass. Which is possible albeit a little tedious.
  
I think, that wont work for me. I think I have to find another solution.
But given the capabilities of current hardware that happens very rarely.
Are your calculations so complex that you run out of resources?

	Dirk
  
I'm still working on my general purpose computation for my particle system. The last time I wrote, I was looking for a 64bit texture format and you gave me the hint with the OpenSG format MTD (or MDT?) format. That was great, my shader works, renders the results in my 2nd viewport, I get the values, move my particle and so on. But when I stored my new position (comuted by the fragment) back to my geometry, my system is as fast as without shader computation, because of the assignment to the geometry.
Now I want to compute the whole particle system with the shader and don't write it back to the geometry. In the 1st pass I want to get the current position of the particle and compute its new position with the shader procedure, that I already have (I decoded the new position as the color). Then, in the 2nd pass, I want to assign the new vertex position computed by the fragment shader of the 1st pass. And with the fragment shader of the 2nd I set the texture and the color of the particle.

I think, it could be possible to compute the whole thing in one pass, but I don't know how?
My problem is (I did read this somewhere), that vertex shader has no texture access and is not as fast as a fragment shader. Or am I wrong?

bye
Oliver




------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to