I have a shader that combines two textures based upon a projection matrix. This shader works fine in the editor but the uvs don't seem to map properly while the game is running. The texture is vertically compressed and tears at the bottom of the screen.
I rewrote the below shader as a cg shader and the effect was the same, vertically compressed and torn.
So what would cause a shader to behave differently in editor as opposed to in play mode in engine.
Shader "AngleCombine" {
Properties {
_MainTex ("Base (RGB) Gloss(A)", 2D) = "white" {}
_Other("Other", 2D) = "white" { }
}
Subshader {
Pass {
SetTexture[_MainTex] { combine texture }
SetTexture[_Other] {
matrix [_ProjMatrix]
combine texture * previous DOUBLE
}
}
}
Subshader {
Pass {
SetTexture [_MainTex] { combine texture }
}
}
}