I just made my first build on Vita and as expected got my first crash. Below the video : - https://www.facebook.com/photo.php?v=544538125659390&set=vb.262298680550004&type=2&theater Well, wondering if there is anyway to debbug this? I have Unity Pro, opened the Profiler, and sticked Developement Build + Autoconnect Profiler in the Build Settings... But the Profiler belong empty, absolutly nothing occur. What I can say so far is the game is 100% running on : - iphone : 3GS to 5S, (ipad2,4, mini). - Android :Nexus 7, Galaxy S3,4 - Ouya... Never got any problem during the map loading process... Not sure if it is a memory management issue, maybe some c# or lib not supported on Vita... or else? A few other feedback : The black cloud on the video seems to be a shader issue. I am using the Mobile/Particles/ Alpha Blend shader. I hope an update inthe RuntimePlatform including the Vita : https://docs.unity3d.com/Documentation/ScriptReference/RuntimePlatform.html EDIT : it seems #if UNITY_PSM is already available... Thank you!
You have to use a non-documented argument with mobiletoolsunity\tools\PsmDevice\PsmDeviceForUnity.exe : With your Vita connected and Unity Tool running, enter: PsmDeviceForUnity.exe -list_devices copy the GUID of your installed game, then: PsmDeviceForUnity.exe -get_log GUID More info: http://beta.unity3d.com/download/psm_public_preview/UnityJapan2014-Introduction_to_Unity-for-PSM.pdf
Awesome ^___^!! >> THANK YOU! Finally.... Code (csharp): [80.896059] 4469: fps 19.91 ms/f 50.22 [kernel avail main 161MB, cdram 0MB, phy cont 26MB] [80.256858] attribute mismatch, channels offset: 16 calculated: 24 [80.258266] Compiling VERTEX shader "sama.van/VertexColor, alpha, slide" variati on with entrypoint 'main' (md5:e3973a3cfde8f21f051c5aac5b9aa87f) [80.784010] Compiling FRAGMENT shader "sama.van/VertexColor, alpha, slide" varia tion with entrypoint 'main' (md5:4487a1d06e797018274a29b9a64f33f6) [80.894485] Shader : sama.van/VertexColor, alpha, slide [80.894985] Entrypoint : main [80.895365] WARN (16,16): local variable 'prev' is unreferenced [80.896059] ERROR (24,17): ambiguous call to 'lerp'. Found 2 possible candidates: [80.896784] INFO (24,17): function was called with params: (fixed4, fixed4, half) It seems something wrong is the lerp?? .... Code (csharp): Shader "sama.van/Blend 2 Textures, Alpha, 2sided" { Properties { _Blend ("Blend", Range (0, 1) ) = 0.5 _MainTex ("Base (RGB) Trans (A) 1", 2D) = "" _Texture2 ("Base (RGB) Trans (A) 2", 2D) = "" } SubShader { Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"} ZWrite Off Blend SrcAlpha OneMinusSrcAlpha Cull Off Pass { SetTexture[_MainTex] SetTexture[_Texture2] { ConstantColor (0,0,0, [_Blend]) Combine texture lerp(constant) previous } } }
I wrote a bew version of the shader and now it works. The source below if it can help some... Code (csharp): Shader "sama.van/Blend 2 Textures, Alpha, 2sided" { Properties { _Blend ("Blend", Range (0, 1) ) = 0.5 _MainTex ("Base (RGB) Trans (A) 1", 2D) = "" _Texture2 ("Base (RGB) Trans (A) 2", 2D) = "" } SubShader { Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"} ZWrite Off Blend SrcAlpha OneMinusSrcAlpha Cull Off Pass { CGPROGRAM #pragma vertex vert #pragma fragment frag uniform float _Blend; uniform sampler2D _MainTex; uniform sampler2D _Texture2; struct appdata_base { float4 vertex : POSITION; float4 texcoord : TEXCOORD0; }; struct v2f { float4 pos : POSITION; float2 texcoord0 : TEXCOORD0; }; v2f vert(appdata_base v) { v2f o; o.pos = mul(UNITY_MATRIX_MVP, v.vertex); o.texcoord0 = v.texcoord.xy; return o; } float4 frag(v2f value) : COLOR { float4 mainTex = tex2D(_MainTex, value.texcoord0); float4 texture2 = tex2D(_Texture2, value.texcoord0); return lerp(mainTex, texture2, _Blend); } ENDCG } } }
Yes, this is a bug where the generated code assumes that lerp can be called with mismatching params (fixed4 vs half). The workaround is to manually force the params to be of the same type (as in your CG code). EDIT: I've the updated the fixed function emulation to generate the correct lerp() call - the next version of Unity-for-PSM won't have this problem.
(not working) //float3 reflection = reflect ( normalize ( mul ( UNITY_MATRIX_MV , ad.vertex ) ), float3 ( normalize ( mul ( (float3x3)UNITY_MATRIX_MV , ad.normal ) ) ) ); (working) float3 reflection = reflect ( float3( normalize ( mul ( UNITY_MATRIX_MV , ad.vertex ) ) ), float3 ( normalize ( mul ( (float3x3)UNITY_MATRIX_MV , ad.normal ) ) ) ); The commented out line is from Core Framework, with the cast to float3 being present in the uncommented line. I include it here to give Unity a heads up on their compiler behaviour under Vita. I am not 100% certain it affects this version of vita but I include it just in case. It *does* affect the other version of vita for retail, and afaik doesn't use lerp. Reflect is also affected by this issue.
I rather not make any promises with regards to release dates. The timeline given earlier states "summer", as in June/July/August 2014. And I would say June/July is more likely (and preferable) than August. Is there a specific issue that is blocking you? The lerp() issue discussed previously in this thread can be worked around..
lerp issue is the one that is stopping me , I brought the shader off the store and there is like 10 place the lerp is used , I have contacted the developer , just waiting for a response from them as I dont know shaders that well Here is the Log Output [37.412173] Shader : Toony Colors Pro/Normal/OneDirLight/Basic Rim [37.412704] Entrypoint : vert_surf [37.413090] WARN (79,9): local variable 'worldPos' is unreferenced [37.413784] WARN (382,9): unrecognized pragma directive 'lighting' will be ignored [37.414493] WARN (386,15): implicit cast from 'half4' to 'half3' [37.415195] ERROR (387,9): ambiguous call to 'lerp'. Found 2 possible candidates: [37.415915] INFO (387,9): function was called with params: (half4, half4, half3) [37.416631] INFO (5,7): could be: half4 lerp(half4, half4, float)
@eriQue 'camera near clip/cull' bug. This one affects everybody and makes it near impossible to view levels and particle effects correctly. Surely that bug alone warrants at least one more release before June/July! Even if that's the only fix included in it.
IIRC all the Toony Colors shaders use an include (TGP_Include.cginc?) where there is a call (or two) that looks like _SColor and _Color are fixed4 while ramp is fixed3. This will trigger the error. Change the lerp call to include casts for the _SColor/_Color to fixed3 (Or the more proper fix - make sure ramp is a fixed4).
While I agree with you, and it indeed would be ideal to get the fix for this released ASAP, it's unfortunately not that simple. There is a lead time connected with releasing an updated version of the Development Assistant which slows down the release process. The bug is fixed, but getting it into your hands takes 2-3 weeks minimum (and would delay the subsequent release).. But I hope we will be able to streamline this process going forward, once we have an official release (and all the code in place)..
Cheers that fixed the issue , I finally got the game working on the vita , now to sort out the FPS issues