• Advertisement
Sign in to follow this  

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

This topic is 4589 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
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
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
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
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
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
Sign in to follow this  

  • Advertisement