I am developing a game using unity engine targeted for android. I have a device with SGX544. I have a simple scene with a plane. When I use simple fragment shaders there is no problem but when I use more complex fragment shaders, vertical gray lines appear that take 10-30ms. I have captured a screenshot of profiler. I change the shader at runtime to see the difference. Shader1 and shader2 are simple and there is no problem. You see when complex shader3 is used, vertical gray lines appear. So I am asking why gpu powers down when more task is required?
[attachment file=“Untitled-1.jpg”]
And here is a screenshot with shader3 with higher zoom level:
[attachment file=“112.jpg”]
You see every few frames this happens and it takes huge time.
Also Vsync is off. There is nothing happening on cpu side. only a simple plane with 200 tris is present. Surface shader function for shader3 is as following:
[blockquote]
void surf (Input IN, inout SurfaceOutput o) {
fixed4 splat_control = tex2D (_Control, IN.uv_Control);
fixed3 col;
col = splat_control.r * tex2D (_Splat0, IN.uv_Splat0).rgb;
col += splat_control.g * tex2D (_Splat1, IN.uv_Splat0).rgb;
col += splat_control.b * tex2D (_Splat2, IN.uv_Splat0).rgb;
col += splat_control.a * tex2D (_Splat3, IN.uv_Splat0).rgb;
o.Albedo = col;
}
[/blockquote]
If you happen to have unity game engine installed you can do the following steps to reproduce the problem exactly. You can download the free version of unity in https://unity3d.com/get-unity
STEPS: