Debugging dip in FPS

Started by
5 comments, last by dpadam450 9 years, 7 months ago

OpenGL btw.

I'm trying to determine what is causing this issue below. If you look at my 2 images, one is at an angle, one is straight on.

You are seeing only 2 triangles. The rest of my terrain is still rendered behind me with no culling so you can see the vert count is still the same. The side view actually renders LESS pixels as well but still has the much slower frame rate.

What I tried:

1.) I used to use anisotropic on everything, I disabled it. I figured it was more aniso samples when the view angle was high but that was not the case. With aniso on though, you see the same type of thing happen just both framerates are much lower. I swear it has to be this, unless my driver has started forcing anisotropic on, I do believe my application is controlling it however is wish.

2.) By only showing this portion of the terrain, any big textures (splats,lightmaps, etc) that are 4096 or so stretched over the terrain, would not be sampling any big jumps (mip-map caches etc).

3.) Its not pixel overdraw, its only 2 triangles.

4.) Its not some other thing like clipping as both images clip.

My guess is it has to be a texture sampling thing because it clearly is not a pixel shader cost, they both run the same and the one outputing LESS pixels is SLOWER. I'm done for the night, but are there any other thoughts? I'm going to have to really mess with debugging some simpler shaders/textures/filter parameters to see what is going on.

NBA2K, Madden, Maneater, Killing Floor, Sims http://www.pawlowskipinball.com/pinballeternal

Advertisement

Ok, If i take my tile textures and tile them once instead of 1,000 times, it fixes it. So I'm thinking that access to sample my textures is being blocked. When looking on the side view there are repeated textures, which means many pixels will try to sample the same exact texel.

Not sure if there is a way around that other than not tiling and trying something else.

NBA2K, Madden, Maneater, Killing Floor, Sims http://www.pawlowskipinball.com/pinballeternal

Are you using mipmaps?

Yea. And they are on for sure because there is no flickering. Right now I have only 2 splat textures, RGBA that are in a texture array.

I remember someone a few weeks ago saying that it might be faster to have them as separate textures, will try that as well, but I don't think thats going to fix the majority of the problem.

NBA2K, Madden, Maneater, Killing Floor, Sims http://www.pawlowskipinball.com/pinballeternal

Are you using trilinear filtering (GL_LINEAR_MIPMAP_LINEAR)? The problem case might be a little cheaper with bilinear (GL_LINEAR_MIPMAP_NEAREST).

I tried some random things with filtering but it didn't really matter.

What I did just try out: So I have actually 4 splats (2 tiled detail Diffuse , 2 tiled detail Normal).
The diffuse textures live in unit 1 texture array, the normal textures live in unit 2 texture array.

If I force specific mip sampling things get interesting. In these 3 cases again Im sampling 2 textureArrays 2 times = 4 texture fetches.
-With normal mip mapping via texture2DArray() or texture() : 69 - 71

-With textureLod(0) forcing to select mip 0 and look awful: 69-71 ^^^^ mip mapping didnt perform an increase, only visual quality...?

-With textureLod(6) forcing to select mip 6.......................: 175fps (the same looking down or across the terrain)

Its 2am, I'm going to try and move my splat texture outside of the texture array and see if that does something tomorrow.

NBA2K, Madden, Maneater, Killing Floor, Sims http://www.pawlowskipinball.com/pinballeternal

Had to get back up, knew it was something with mip mapping. My texture arrays were actually using anisotropic 16x for those splats which explains the angle which I knew it had to be from the beginning, but also the tile repetition. If the scale decreases the derivatives for screen/texel change so it was reducing the aniso sampling.

NBA2K, Madden, Maneater, Killing Floor, Sims http://www.pawlowskipinball.com/pinballeternal

This topic is closed to new replies.

Advertisement