Sign in to follow this  
lomateron

question!

Recommended Posts

when I render one mesh that has two quads that cover the screen completely on top of each other with no depth test and no blending 

does the pixel shader runs two times for the same pixel?

 

another question

I have seen that when my GPU is runing a scene that is very complex and the fps are let's say 5, and then suddenly I change the scene to one that is very simple (so it will run it let's say at 200 fps), it will take a little time for the fps to go up again, why?, the change of fps should be instantaneous.

Edited by lomateron

Share this post


Link to post
Share on other sites

when I render one mesh that has two quads that cover the screen completely on top of each other with no depth test and no blending 
does the pixel shader runs two times for the same pixel?

 

Yes. If there is no depth test the GPU has no way of knowing if a pixel inside the quad was already rendered "closer" than the one it is about to shade, so it just goes ahead and draws both quads since it doesn't know. It can't reason in high-level terms such as "these two quads obviously cover each other so I'll just render the topmost one". In other words, "no depth test" is equivalent to "always pass the depth comparison" == "always pass the fragment/pixel to the fragment/pixel shader" (actually if you do that you might need to clear the depth buffer first, I think there are some rules to follow)

 

 

 


I have seen that when my GPU is runing a scene that is very complex and the fps are let's say 5, and then suddenly I change the scene to one that is very simple (so it will run it let's say at 200 fps), it will take a little time for the fps to go up again, why?, the change of fps should be instantaneous.

 

It is. But your FPS counter can't detect instantaneous changes in framerate since it is ultimately taking an average (over a short period, admittedly, but it still needs time to "catch up" with the new framerate). Many advanced counters are built on the assumption that framerate does not change that drastically over a short period of time.

Edited by Bacterius

Share this post


Link to post
Share on other sites

I am not using a FPS counter to see how many FPS are, I see the low FPS with my own eyes.

 

If you have tried it and the change is instantaneous then it must be something in my computer

Share this post


Link to post
Share on other sites

I am not using a FPS counter to see how many FPS are, I see the low FPS with my own eyes.

 

If you have tried it and the change is instantaneous then it must be something in my computer

 

Could it just be the new scene loading on the CPU which is causing the FPS to lower as the CPU spends more frametime loading and streaming everything it needs? Where are you seeing this? The GPU is (mostly) stateless outside individual frames so replacing a scene by another should not cause any form of gradual change in raw performance, but of course other external factors may cause what you observe.

Share this post


Link to post
Share on other sites

Nop, the cpu does the same work always I just change the direction of my camera so it points to the sky and its just the sky what I see.

 

Have you tried it?

Edited by lomateron

Share this post


Link to post
Share on other sites

Just for future reference: it's helpful for the thread title to give some indication of the question you want to ask. "Question!" is way too general. I almost responded with "Answer!" but feared it would be too obtuse to be informative.

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