0
Under review

Erasing shader due missing node UnityVita

roy arechiga 10 years ago updated 10 years ago 3
I have a really bad problem, im working in the UnityVita version and i gues that you already know that there is a problem with the vertexcolor/color node (unityVita need that node called just color instead of Vertexcolor) but i handle that by changing manually those variables after compiling.

The problem is: when i try to reopen the shader, Shaderforge trow the problem that the shader cant be opened again due to lost node (the vertexcolor one) but after that message, the shader gets recompiled and ERASED and then i can open it in shader forge but is empty.

Why is this happening? before i just got that error and then i could keep working on the shader but know the shader is getting erased.

I hope you can help me because this i getting very bad, im losing hour of work because this :(

Thanks

Under review
That's very strange. There are some platform specific annoying quirks at the moment, and the vertex color name issue is one, but SF shouldn't be empty after reopening.
Did you get any errors in the console when reopening the shader?
No, there is no error when the shader is recompiled after ther error screen, but i found out what i was doing wrong, so i can edit again my shader without problem in shader forge and later change the nodes names in the compiled shader.

My specific error was using the tool "replace all" to change the vertexColor variable to just color, because of this i was changing "ShaderForge.SFN_VertexColor" that didn't needed to be changed and that is why i was getting the error and the erased shader. my bad. :P

I hope that the annoying quirks per platform be fixed some time, it occur to me that you can ad a buttons in the target renderer to enable VITA or PSM so the shader can compile the specific variables without need of correcting the later. in VITA the only specific variables that need later change are the "vertexColor to color" and "texcoord0 to texcoord" 

Thank you for this amazing tool and keep the good work :)
Hi! i found another change with Lerp node in the unityVITA version is this:

(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 ) ) ) );