- Home /
Problem with shaders and textures: drop FPS and blinks
Hello all,
I am opening this topic for help, already googled a lot and tried several things, but alone I am not able to solve these problems.
I am making a map made up of several blocks composed of quads.
By default each quad has the shader "Mobile / Unlit (Supports lightmap)" when the player is behind a wall, the quad will receive the shader "Custom / VertexLit_with_Z" making transparent wall.
The FPS drop problem occurs when the player is in an large area made up of quads with textures.
The other problem is when the wall becomes transparent, it is possible to note several pixels blinking. In shader "Custom / VertexLit_with_Z" I'm changing the "color.a" to 0.5f. When the player leaves behind the wall I change the shader for the "Mobile / Unlit (Supports lightmap)."
I made a gif for you guys, recorded direct from the editor.
http://giphy.com/gifs/xTiQyipuu5nCCcALyE (10mb, sorry for the bad quality)
There is no drop of FPS when textures are turned off, but the problem of pixels blinking continues when the wall becomes transparent.
Textures are .png files without transparency and 64x64.
How can I solve this? I do not know what to try to solve it.
Update!
I made a reduction of the number of quads and the FPS got a good value.
But the problem of transparent walls blink persists.
Here is a new gif: http://giphy.com/gifs/3o85gezB7exuELjbmE
2144 is the number of quads on the map.
Answer by Alexandreapt · Apr 07, 2016 at 05:50 PM
Solved!
The problem are 2 different objects occupy the same space and the renderer can't decide which one to show.