- Home /
Better Performance for 2D game
I got this code from this http://forum.unity3d.com/threads/68402-Making-a-2D-game-for-iPhone-iPad-and-need-better-performance that claims that it can increase the game framerate if we emove shaders. i wouldlike to know where i can put this code? it is in AppController.mm? and where is position i can put this?
Shader "Unlit Transparent Vertex Colored" { Properties { _MainTex ("Base (RGB) Trans (A)", 2D) = "white" {} }
Category { Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"} ZWrite Off Alphatest Greater 0 Blend SrcAlpha OneMinusSrcAlpha SubShader { Pass { BindChannels { Bind "Vertex", vertex Bind "texcoord", texcoord Bind "Color", color }
Fog { Mode Off } Lighting Off SetTexture [_MainTex] { Combine texture primary, texture primary } } } } }
Here is a shader that just renders your texture without any lighting or alpha transparency: Shader "Unlit" { Properties { _MainTex ("Base (RGB)", 2D) = "white" {} }
SubShader { Pass { SetTexture [_MainTex] { Combine texture } } } }
Follow this Question
Related Questions
2D Android game - bad performance after launch 1 Answer
FPS alternate each time I run my application. Sometimes it's 100, sometimes its 500... 1 Answer
Performance Issue On Certain Devices 0 Answers
How do i dash in a direction an arrow is showing? 1 Answer
Is there a way to disable the IK Manager on playtime without impairing the animation? 0 Answers