Bastion said:Is the existing framebuffer content for a given pixel a standard input to Pixel Shaders in the latest DX9 video cards? Thanks.
Yes, this is what I meant. My next question should be fairly obvious; why not?Enos_Feedler said:Depends what you mean by 'standard input'. If you are talking about whether or not it is available in an input register, then no.
Bastion said:Yes, this is what I meant. My next question should be fairly obvious; why not?
Mainly data coherency. The pixel shader needs to keep track of the cases where pixels from different polygons overlap each other, so that it can apply these pixels to the framebuffer in correct order. With traditional fixed-function blending or Z-test, the number of pixels it needs to perform such tracking of is quite small since the blending/Z-test takes a fairly short constant time. With framebuffer data pulled into the pixel shader, you increase the read->write delay by perhaps 2 orders of magnitude for typical shaders, potentially making the data dependency checking ~2 orders of magnitude more expensive as well. There are also extra complications with situations such as:Bastion said:Yes, this is what I meant. My next question should be fairly obvious; why not?
If my original query was answered in the positive my job would be easierEnos_Feedler said:What are you trying to do anyway?
It might be expensive on some architectures, yet it has been done already (S3). On some other architectures it might even be easy to do.ERP said:The short none technical version is as much as developers would like it, it's prohibitively expensive from a hardware (or performance if it's not done well) standpoint.
Bastion said:Is the existing framebuffer content for a given pixel a standard input to Pixel Shaders in the latest DX9 video cards? Thanks.
If you wanted to use multipass effects on a single object, you're better off just rendering that particular object to a texture then using that texture on the next pass.K.I.L.E.R said:Hang on a second.
The framebuffer content has already fully been processed, 2nd of all if you used that approach that you're suggesting then how would someone apply a shader to a single "Object" in a scene?
If you answered the question of what you're doing (not why, nor where or for whom) someone could work with that and perhaps suggest a different way to make your job easierBastion said:If my original query was answered in the positive my job would be easier
He is asking for a way to get the current framebuffer content at the current pixel location into the shader. I.e. programmable blending.K.I.L.E.R said:I don't understand what the original poster is asking and it's confusing me.
Well, I've long learned that I can't have it all but your first sentence is essentially correct.K.I.L.E.R said:So he only wants to access the colour values in the framebuffer?
I thought he wanted the entire thing. My bad.
For a post-process effect using mutipass rendering I currently need to render to a texture. If a 3D chip allowed me to have my shader to get to the frame buffer, I wouldn't need that texture of mine.zeckensack said:If you answered the question of what you're doing (not why, nor where or for whom) someone could work with that and perhaps suggest a different way to make your job easier