Sign in to follow this  
RPTD

What is faster? (pixel shader vs fixed-pipeline)

Recommended Posts

RPTD    340
i want to implement shadow volumes for my engine and for this (going for the moment straight after the gamasutra tutorial) i implemented an ambient pass followed by a render pass for each light (where i only render elements hit by the light). now my question goes towards the ambient pass at the beginning. for consistency i create there a vertex and pixel program that does nothing but OutColor = InColor * Texture(InTexPos);. now would it be faster if for this ambient pass i disable the vertex and pixel programs and just do a fixed pipeline rendering of the same? personally i would guess it is faster but is it also worth it?

Share this post


Link to post
Share on other sites
_the_phantom_    11250
On the R300 and beyond and the GF6 and beyond there is no fixed function pipeline in hardware any more, so really it doesnt matter, the driver just builds a shader behind the scenes to do the work.
So, as speed wise they are going to be the same I'd stick with a unified approch to things, it will make it easier if in the future you want to change stuff about.

Share this post


Link to post
Share on other sites
James Trotter    432
I don't think you would notice a particular difference. It's not likely that this is your bottleneck in any case, so you shouldn't be worried.

Edit: _the_phantom_ beat me to it [smile]...

Share this post


Link to post
Share on other sites
RPTD    340
good to hear... then i can simply load my programs without worrying.

one question though. i can not read back data from memory in my pixel program right? for example i can not somehow create a 'larger' buffer (nor just RGBA i mean) so i can save for example the lighting data i calculated to avoid over-brighting (like if i point my strong flashlight at a already heavily lit surface) on a moderate hardware like a ATI Radeon 9700 (or 9600)?

Share this post


Link to post
Share on other sites
_the_phantom_    11250
fragment shader output always goes to a colour buffer, however the format of that colour buffer is a little flexible, you probably could do something by rendering to a texture to get back at the infomation later.

Share this post


Link to post
Share on other sites
RPTD    340
Quote:
Original post by _the_phantom_
fragment shader output always goes to a colour buffer, however the format of that colour buffer is a little flexible, you probably could do something by rendering to a texture to get back at the infomation later.

does that mean what i could als read the values from the buffer i want to write to? or would this mean i need to create an render target of the same size, render there and then use it as a texture? would be rather slow as somehow render-to-texture i could not get to work so far (i need the copy-to-texture method to do this atm).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this