Q:execution times of vertex/pixel shader

hi,I am a new one starting to learn GLSL.

after reading the turtorials at GLSL Tutorial (it’s really a great turtorial!!)
there is a big question come to me:
During one GL pipeline process,does the execution times of vertex shader equal to fragment shader’s?

what behind this question is my understanding confusion:
as been tought,vertex shader is per vertex and fragment shader is per pixel.but the realism

is,the pixel numbers is not equal(commonly much more than) to vertex numbers.so,their

execution times will be different,do they?

if my understanding is right,then a further question is,how does vertex and pixel shader to keep variables relative?from which vertex’s writing when a pixel shader use one varying variable that been wroten at vertex shader process?

I’m sorry for such a silly question and my poor english.
thanks advanced for any help and inspiration!

On DX9-class cards like GF7800, there were M vertex-shading units (“cpus”) and N fragment-shading units. So there, balancing was necessary.
On DX10+ class cards like GF8x00 and RHD2x00, there are P number of units. Each unit can be assigned to do either vtx-shading or frag-shading (or geom-processing). The gpu has circuitry that automatically distributes load. So, you absolutely don’t need to care about balance.

if my understanding is right,then a further question is,how does vertex and pixel shader to keep variables relative?from which vertex’s writing when a pixel shader use one varying variable that been wroten at vertex shader process?

Vertex shader outputs are interpolated across the face of the polygon (typically in a perspective-correct manor). Each fragment input is thus an interpolated value from the 3 vertex shader outputs.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.