Sign in to follow this  

Per Pixel or Per Texel

This topic is 4854 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

Hi, If I have a pixel shader program does it get called per screen pixel or per texture texel? The reason I ask is if I've got a complex pixel shader and a large texture, would things run faster if the texture was smaller? (forgetting about the obvious fact that it uses less memory and bandwidth etc.) Thanks, Fleejay

Share this post


Link to post
Share on other sites
If you want to speed things up,you can do a million optimizations.Using smaller textures will speed things up a little,not because the shaders will be executed less times,but fot the reasons you mentioned above.
Technically,there is a difference between a fragment and a pixel.A pixel is the smallest element of the screen.A fragment is really the polygon element,that,when projected to the screen,has the size of exactly one pixel.The pixel can be defined by two coordinates(x,y),while the fragment needs 3(x,y,z).

Share this post


Link to post
Share on other sites
I've always thought of a fragment as part of a final pixel. If you have AA disabled, a fragment is a pixel. If you have 4XAA enabled, it takes several fragments (and runs through the shader, and fetches of texels) to create a pixel.

Maybe mikeman is correct. I don't know. Only OpenGL uses the term. The people who feel a need to point out the difference only ever say is "fragment != pixel", which doesn't really educate you as to the correct usage.

Share this post


Link to post
Share on other sites
Quote:
Original post by Namethatnobodyelsetook
A fragment is part of a final pixel. If you have AA disabled, a fragment is a pixel. If you have 4XAA enabled, it takes several fragments (and runs through the shader, and fetches of texels) to create a pixel.


I think you're confusing samples with fragments.

Share this post


Link to post
Share on other sites
So when the graphics card is rasterising the polygons it looks at whether or not anti-aliasing is enabled to determine how many fragments to calculate and draw. These fragments are then combied to form the on screen pixels.

Thanks for your help.

Share this post


Link to post
Share on other sites
ahhh! I was in the middle of a post only to post it and find out that it was wrong. Ok, so fragments are what pixels are called on the graphics card before they hit the screen and samples are like small sub-pixels.

Share this post


Link to post
Share on other sites

This topic is 4854 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.

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